Some custom global nodes/resources are always visible in create dialogue, which are, in practice, just for private use and polluting the dialog.
Some custom global nodes/resources that should be visible displays with suffix, which would be a bit incoherent with other items in the create dialogue. Sometimes we want the suffix to be something else that contains some information.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
They all have one solution that is flexible and optional: metadata.
Since a metadata is allowed to be manually added to a script in the latter's inspector, this would be solved in few fingers.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Adding some metadata - object_show_in_dialog and script_suffix respectively.
object_show_in_dialog: The value should be a bool. When it is true or the metadata is not set, the node/resource will be shown in the create dialog; otherwise, the node/resource will be hidden from it.
script_suffix: The value can be anything, but better be a StringName or String. This allows a user to replace the suffix of a node/resource in create dialog to a custom one:
Node
|- MyCustomNode (test.gd)
to
Node
|- MyCustomNode (custom suffix)
Also, if the suffix is an empty string, there will be no suffix shown.
This is useful for adding a pseudo namespace for each nodes, or some short notes stick to the class name.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Since the create dialog and the scene tree dock is not exposed to the engine, it is impossible.
Is there a reason why this should be core and not an add-on in the asset library?
Same as "If this enhancement will not be used often, can it be worked around with a few lines of script?"
It is a problematic work to remove the script icon (or "open script" button) from the scene tree editor, and will cause potential issues, so I removed it from the list
Describe the project you are working on
Script improvement + Addons
Describe the problem or limitation you are having in your project
Extension of https://github.com/godotengine/godot-proposals/issues/1047 During the practice of Godot, I (together with some users) have encountered these inconveniences:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
They all have one solution that is flexible and optional: metadata. Since a metadata is allowed to be manually added to a script in the latter's inspector, this would be solved in few fingers.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Adding some metadata -
object_show_in_dialog
andscript_suffix
respectively.object_show_in_dialog
: The value should be abool
. When it istrue
or the metadata is not set, the node/resource will be shown in the create dialog; otherwise, the node/resource will be hidden from it.script_suffix
: The value can be anything, but better be aStringName
orString
. This allows a user to replace the suffix of a node/resource in create dialog to a custom one:to
Also, if the suffix is an empty string, there will be no suffix shown. This is useful for adding a pseudo namespace for each nodes, or some short notes stick to the class name.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Since the create dialog and the scene tree dock is not exposed to the engine, it is impossible.
Is there a reason why this should be core and not an add-on in the asset library?
Same as "If this enhancement will not be used often, can it be worked around with a few lines of script?"
Progress
script_suffix
object_show_in_dialog