-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
[3.x] Add dedicated macros for property name extraction #61141
Conversation
Is this also needed for subgroups and arrays? There are a few macros that don't seem to be included by
|
@fire-forge This is for |
* Replace case-by-case extraction with PNAME & GNAME * Fix group handling when group hint begins with property name * Exclude properties that are PROPERTY_USAGE_NOEDITOR
c65b718
to
b657d0c
Compare
@@ -785,13 +785,13 @@ void register_scene_types() { | |||
OS::get_singleton()->yield(); //may take time to init | |||
|
|||
for (int i = 0; i < 20; i++) { | |||
GLOBAL_DEF("layer_names/2d_render/layer_" + itos(i + 1), ""); | |||
GLOBAL_DEF("layer_names/3d_render/layer_" + itos(i + 1), ""); | |||
GLOBAL_DEF(vformat("%s/layer_%d", PNAME("layer_names/2d_render"), i + 1), ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you localize layer
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's the formated string (layer_1
/ Layer 1
) that will be sent for localization. Translating layer
alone won't work. It's currently a limitation.
Thanks! |
PNAME
&GNAME
godot/scene/resources/skin.cpp
Line 130 in e86d840
godot/servers/physics_server.cpp
Line 814 in e86d840
_get_property_list()
:godot/editor/plugins/tile_set_editor_plugin.cpp
Lines 3539 to 3545 in e86d840
PROPERTY_USAGE_NOEDITOR
I have a feeling that these are not good macro names. But I can't find a suitable short name for them currently. Any suggestions?