summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-13 10:03:44 +0200
committerGitHub <noreply@github.com>2021-10-13 10:03:44 +0200
commit74a87fe98bc7a7cb1268f7d153dfc1af0c06399a (patch)
tree91578d8f96356dda2cb3f9381de777f369ea952e /editor
parent6f1d2133bb2b77048bf13a8180f57bff1a747226 (diff)
parentc299c5402330f3425c5a7decb0957ea668b9f5d9 (diff)
Merge pull request #53683 from Chaosus/vs_previews
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
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 b1b64564bb..48f64e041c 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -777,7 +777,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
expand->connect("pressed", callable_mp(VisualShaderEditor::get_singleton(), &VisualShaderEditor::_expand_output_port), varray(p_id, i, !vsnode->_is_output_port_expanded(i)), CONNECT_DEFERRED);
hb->add_child(expand);
}
- if (visual_shader->get_shader_type() == VisualShader::TYPE_FRAGMENT && port_right != VisualShaderNode::PORT_TYPE_TRANSFORM && port_right != VisualShaderNode::PORT_TYPE_SAMPLER) {
+ if (vsnode->has_output_port_preview(i) && port_right != VisualShaderNode::PORT_TYPE_TRANSFORM && port_right != VisualShaderNode::PORT_TYPE_SAMPLER) {
TextureButton *preview = memnew(TextureButton);
preview->set_toggle_mode(true);
preview->set_normal_texture(VisualShaderEditor::get_singleton()->get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons")));