summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2019-10-04 13:57:01 +0300
committerGitHub <noreply@github.com>2019-10-04 13:57:01 +0300
commitb6f8726c664552956310d1fb6f36be349b8c4ca6 (patch)
treeafa9fc7fbd8dbfd4180b2f729cb28a3791c25442 /editor
parent3b2033b9419f76ffaff47654372df1559b6c2b95 (diff)
parent0a34fa701fc98f8ea84941dd7514a87212ed1949 (diff)
Merge pull request #32543 from Chaosus/vs_fix_input
Fix VisualShaderInput (if compiled with MinGW) (correct, tested version)
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 715b1a3b7c..c962751c7a 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -2053,7 +2053,7 @@ Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
Dictionary d;
d["id"] = id;
- if (op.sub_func_str != "") {
+ if (op.sub_func == -1) {
d["sub_func"] = op.sub_func_str;
} else {
d["sub_func"] = op.sub_func;
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index 700e7cfd7d..6f77641936 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -137,6 +137,7 @@ class VisualShaderEditor : public VBoxContainer {
category = p_category;
sub_category = p_sub_category;
description = p_description;
+ sub_func = 0;
sub_func_str = p_sub_func;
return_type = p_return_type;
mode = p_mode;