Add naming convention for engine internal nodes and metadata #4550
Replies: 2 comments 1 reply
-
I believe this is already tracked by #1018. |
Beta Was this translation helpful? Give feedback.
-
Small summary of the discussion over at godotengine/godot#76563:
The suggestions gaining the most acceptance were:
[Please let me know if I overlooked an important point, got something wrong or you think something is depicted in a biased way] My opinion: |
Beta Was this translation helpful? Give feedback.
-
Some of the engine's internal nodes have friendly names, while others are left with auto-generated names. I remember seeing a comment from one of the maintainers that friendly node names are desirable (although it was about editor nodes).
godotengine/godot#30391 adds an optional
include_internal
parameter to many methods, but not toget_node
. Therefore, if we decide to give friendly names for internal nodes, then we need a naming convention for them.Also, not all internal nodes have getters like
ScrollContainer.get_h_scroll_bar
. If we decide to leave it as it is, then it would be nice if all the internal nodes of a node had friendly deterministic names.Metadata names starting with
_
are not displayed in the editor. However, this may be required not only by the engine, but also by custom code and/or plugins. A naming convention would avoid name collisions.Suggestion: add naming convention engine internal nodes and metadata. For example, names that start with the
_gd_
prefix are considered reserved for the Godot Engine.Some conventions are already in use, but I haven't compiled a complete list of engine metadata, so I'm not sure if
_edit_*_
names are used everywhere.Beta Was this translation helpful? Give feedback.
All reactions