You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GUI RPG which uses custom Resources to store all the data, whereas Nodes are only used for the UI and to access these Resources. Some Resources are @tool scripts.
Describe the problem or limitation you are having in your project
I have variables that I edit in the Inspector to modify another variable with another type that is only stored. The setters for these variables never modify the variable itself, so it doesn't make sense to store these variables. For example, I might have a stored transform variable, so I would have setter variables position, rotation and scale that modifies transform. These variables also have getters that read transform and return information accordingly. Since these variables would not have the same type as transform (they would be Vector2/3, while transform would be Transform2/3D), I cannot use the same setters and getters for transform, and therefore can't be stored directly.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Having the @export_editor annotation would make it quick and easy to define these variables, without having to pass two default arguments in @export_custom just to access the third. It would improve readability as well. Also, when there is @export_storage, it makes sense to have this annotation, too, for consistency.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Just put @export_editor in front of the variable the same way you would put @export_storage.
If this enhancement will not be used often, can it be worked around with a few lines of script?
@export_custom(PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), but it is incredibly verbose for simply having it appear in the Inspector without being serialized.
Is there a reason why this should be core and not an add-on in the asset library?
@export annotations are core, so it would be more intuitive this way.
The text was updated successfully, but these errors were encountered:
The problem is that unlike @export_storage, there are many field appearance variations in the editor: not only @export, but also other @export_* annotations (@export_range, @export_multiline, etc.). So we will probably need to implement a separate modifier annotation that would remove the PROPERTY_USAGE_STORAGE flag. See #7794 (comment).
Describe the project you are working on
A GUI RPG which uses custom Resources to store all the data, whereas Nodes are only used for the UI and to access these Resources. Some Resources are
@tool
scripts.Describe the problem or limitation you are having in your project
I have variables that I edit in the Inspector to modify another variable with another type that is only stored. The setters for these variables never modify the variable itself, so it doesn't make sense to store these variables. For example, I might have a stored
transform
variable, so I would have setter variablesposition
,rotation
andscale
that modifiestransform
. These variables also have getters that readtransform
and return information accordingly. Since these variables would not have the same type astransform
(they would be Vector2/3, whiletransform
would be Transform2/3D), I cannot use the same setters and getters fortransform
, and therefore can't be stored directly.Describe the feature / enhancement and how it helps to overcome the problem or limitation
Having the
@export_editor
annotation would make it quick and easy to define these variables, without having to pass two default arguments in@export_custom
just to access the third. It would improve readability as well. Also, when there is@export_storage
, it makes sense to have this annotation, too, for consistency.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Just put
@export_editor
in front of the variable the same way you would put@export_storage
.If this enhancement will not be used often, can it be worked around with a few lines of script?
@export_custom(PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR)
, but it is incredibly verbose for simply having it appear in the Inspector without being serialized.Is there a reason why this should be core and not an add-on in the asset library?
@export
annotations are core, so it would be more intuitive this way.The text was updated successfully, but these errors were encountered: