diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-19 11:56:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 11:56:29 +0200 |
commit | 71c40ff4da85a4770958533cdc65f2c9f7ddeaff (patch) | |
tree | ed7ad88cad6f12c4c60f8db404a2bc192ca11fbb /scene/resources/visual_shader.cpp | |
parent | c0d189fbb85cbfc1b7e91e38d882e123730f7e98 (diff) | |
parent | fc3b845c072538f33836db38eb9d4f4d3fcfb16a (diff) |
Merge pull request #61180 from timothyqiu/property-extract
Diffstat (limited to 'scene/resources/visual_shader.cpp')
-rw-r--r-- | scene/resources/visual_shader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 8e7824665f..3281ebb2f6 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -1547,7 +1547,7 @@ void VisualShader::reset_state() { } void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { //mode - p_list->push_back(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Node3D,CanvasItem,Particles,Sky,Fog")); + p_list->push_back(PropertyInfo(Variant::INT, PNAME("mode"), PROPERTY_HINT_ENUM, "Node3D,CanvasItem,Particles,Sky,Fog")); //render modes HashMap<String, String> blend_mode_enums; @@ -1576,15 +1576,15 @@ void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const { } for (const KeyValue<String, String> &E : blend_mode_enums) { - p_list->push_back(PropertyInfo(Variant::INT, "modes/" + E.key, PROPERTY_HINT_ENUM, E.value)); + p_list->push_back(PropertyInfo(Variant::INT, vformat("%s/%s", PNAME("modes"), E.key), PROPERTY_HINT_ENUM, E.value)); } for (RBSet<String>::Element *E = toggles.front(); E; E = E->next()) { - p_list->push_back(PropertyInfo(Variant::BOOL, "flags/" + E->get())); + p_list->push_back(PropertyInfo(Variant::BOOL, vformat("%s/%s", PNAME("flags"), E->get()))); } for (const KeyValue<String, Varying> &E : varyings) { - p_list->push_back(PropertyInfo(Variant::STRING, "varyings/" + E.key)); + p_list->push_back(PropertyInfo(Variant::STRING, vformat("%s/%s", PNAME("varyings"), E.key))); } for (int i = 0; i < TYPE_MAX; i++) { |