diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2020-09-14 09:22:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 09:22:48 +0300 |
commit | 95314e3568c4df5dd98947a9c3de38f28db60e79 (patch) | |
tree | 6afc9a7648b05dd9a6caabbbfb58fa5e6e516334 /editor/plugins | |
parent | de465c41dc1a63e1a984b09e790fcc87eff21535 (diff) | |
parent | 0fd9ad8801b0d2bd3a4f4c7f49f44a00d7721eea (diff) |
Merge pull request #42044 from Chaosus/vs_fix_regression2
Fix visual shader connection regression
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index be5fb390d4..e34f0855b2 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -621,7 +621,7 @@ void VisualShaderGraphPlugin::connect_nodes(VisualShader::Type p_type, int p_fro void VisualShaderGraphPlugin::disconnect_nodes(VisualShader::Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port) { if (visual_shader->get_shader_type() == p_type) { VisualShaderEditor::get_singleton()->graph->disconnect_node(itos(p_from_node), p_from_port, itos(p_to_node), p_to_port); - if (links[p_to_node].input_ports.has(p_to_port) && links[p_to_node].input_ports[p_to_port].default_input_button != nullptr) { + if (links[p_to_node].input_ports.has(p_to_port) && links[p_to_node].input_ports[p_to_port].default_input_button != nullptr && links[p_to_node].visual_node->get_input_port_default_value(p_to_port).get_type() != Variant::NIL) { links[p_to_node].input_ports[p_to_port].default_input_button->show(); set_input_port_default_value(p_type, p_to_node, p_to_port, links[p_to_node].visual_node->get_input_port_default_value(p_to_port)); } |