summaryrefslogtreecommitdiffstats
path: root/editor/plugins/visual_shader_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-11-05 12:01:36 +0100
committerGitHub <noreply@github.com>2021-11-05 12:01:36 +0100
commit56cfebbe98ef18d91b891dbbde96081343d5b4cc (patch)
tree5c0353d026b25f7a8dd749bfad84acc2f8883e6e /editor/plugins/visual_shader_editor_plugin.cpp
parentbf10956b7fba72111adaf5e3df5545854fcb3dc4 (diff)
parentdcdf59cd7396c0f5c47af78639bc60acf96273fa (diff)
downloadredot-engine-56cfebbe98ef18d91b891dbbde96081343d5b4cc.tar.gz
Merge pull request #54599 from Chaosus/vs_particles_2d_emitters
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp10
1 files changed, 7 insertions, 3 deletions
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<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, Ref<VisualShaderNode> p_node) {
+ void setup(Ref<Resource> p_parent_resource, Vector<EditorProperty *> p_properties, const Vector<StringName> &p_names, const Map<StringName, String> &p_overrided_names, Ref<VisualShaderNode> 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<Resource> &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;
}