From dcdf59cd7396c0f5c47af78639bc60acf96273fa Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Thu, 4 Nov 2021 18:42:57 +0300 Subject: Added 2D boolean hint for particle emitters in visual shaders --- editor/plugins/visual_shader_editor_plugin.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'editor') diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index c06eafae50..10a9b2bb10 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -4977,7 +4977,7 @@ public: } } - void setup(Ref p_parent_resource, Vector p_properties, const Vector &p_names, Ref p_node) { + void setup(Ref p_parent_resource, Vector p_properties, const Vector &p_names, const Map &p_overrided_names, Ref p_node) { parent_resource = p_parent_resource; updating = false; node = p_node; @@ -4993,7 +4993,11 @@ public: Label *prop_name = memnew(Label); String prop_name_str = p_names[i]; - prop_name_str = prop_name_str.capitalize() + ":"; + if (p_overrided_names.has(p_names[i])) { + prop_name_str = p_overrided_names[p_names[i]] + ":"; + } else { + prop_name_str = prop_name_str.capitalize() + ":"; + } prop_name->set_text(prop_name_str); prop_name->set_visible(false); hbox->add_child(prop_name); @@ -5085,7 +5089,7 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref &p_par properties.push_back(pinfo[i].name); } VisualShaderNodePluginDefaultEditor *editor = memnew(VisualShaderNodePluginDefaultEditor); - editor->setup(p_parent_resource, editors, properties, p_node); + editor->setup(p_parent_resource, editors, properties, p_node->get_editable_properties_names(), p_node); return editor; } -- cgit v1.2.3