-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make grouping exported variables easier #1255
Comments
Sorry, but this is not a description of the feature or how it would be implemented... Could you at least copy-paste the syntax proposed in the PR related to this proposal. This is the thing that should be discussed, not "making something easier", which isn't really a proposal... |
Whoops, it was fairly late and I didn't notice I put it in the wrong place :P - updated. |
Direct Link to the PR: godotengine/godot#40669 |
Now that we have GDScript annotations, I suppose we could have a
Why not a generic programmatic API or a more complex syntax? See my comment here: #2080 (comment) |
For posterity, vnen's proposal regarding grouping annotations was: @export_category("category")
@export_group("group", "prefix") # All variables with name starting with "prefix" are added to the group. |
This is a great idea! It would really help in cases like this where there's lot of properties that have the same prefix. If all of the
An |
Describe the project you are working on:
2d space game
Describe the problem or limitation you are having in your project:
My nodes (e.g. planets, stars) have a LOT of exported variables, often thematically grouped (eg. physical properties and cosmetic stuff, ship physics and AI stuff and cargo...)
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
We already have a workaround to group the exported variables, https://docs.godotengine.org/en/stable/getting_started/scripting/gdscript/gdscript_exports.html#adding-script-categories , but it is... NOT pleasant to use.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
The syntax proposed in PR #40669 is the following: cosmetic (section, "sectionname"): followed by an indent and any variable declarations wanted.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
It can be worked around, but it takes TOO many lines of script (circa 10 per each variable, times 10 variables, that's around 100 lines just for that - and in another project, I have nodes with 20 variables...)
Is there a reason why this should be core and not an add-on in the asset library?:
I don't think addons can do such deep injections into the inspector, AND the same NEEDS to apply to remote scene tree debugging, where the issue is exacerbated by also showing non-exposed variables.
The text was updated successfully, but these errors were encountered: