From 6f2abd68f27b966ba4b45ae8e90192b7a0ea1382 Mon Sep 17 00:00:00 2001 From: Chaosus Date: Tue, 21 May 2019 18:37:31 +0300 Subject: [PATCH] Fix few bugs in expression node --- editor/plugins/visual_shader_editor_plugin.cpp | 4 ++-- scene/resources/visual_shader.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index cdb1dbfdc41..31f5d337a79 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -984,9 +984,9 @@ void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p box_size.x = gn->get_size().x; } } - box_size.x -= text_box->get_margin(Margin::MARGIN_LEFT); + box_size.x -= text_box->get_margin(MARGIN_LEFT); box_size.x -= 28 * EDSCALE; - box_size.y -= text_box->get_margin(Margin::MARGIN_TOP); + box_size.y -= text_box->get_margin(MARGIN_TOP); box_size.y -= 28 * EDSCALE; text_box->set_custom_minimum_size(Size2(box_size.x, box_size.y)); text_box->set_size(Size2(1, 1)); diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 29998e6ba34..76f379de5f5 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -2204,6 +2204,7 @@ String VisualShaderNodeExpression::generate_code(Shader::Mode p_mode, VisualShad if (post_symbols.empty()) { post_symbols.push_back("\t"); post_symbols.push_back("\n"); + post_symbols.push_back(";"); post_symbols.push_back("}"); post_symbols.push_back("]"); post_symbols.push_back(")");