From ea49d8b9d53302baf0cde3aec0d13547f0669e84 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Wed, 9 Sep 2020 11:21:38 +0300 Subject: Improve performance of Undo:change node position in visual shader --- scene/resources/visual_shader.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scene/resources/visual_shader.h') diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h index 3f5266142a..d45029ec03 100644 --- a/scene/resources/visual_shader.h +++ b/scene/resources/visual_shader.h @@ -33,6 +33,7 @@ #include "core/string_builder.h" #include "scene/gui/control.h" +#include "scene/gui/graph_edit.h" #include "scene/resources/shader.h" class VisualShaderNodeUniform; @@ -69,10 +70,13 @@ public: }; private: + Type current_type; + struct Node { Ref node; Vector2 position; List prev_connected_nodes; + GraphNode *graph_node; }; struct Graph { @@ -124,6 +128,10 @@ protected: bool _get(const StringName &p_name, Variant &r_ret) const; void _get_property_list(List *p_list) const; +public: // internal methods + void set_graph_node(Type p_type, int p_id, GraphNode *p_graph_node); + void set_shader_type(Type p_type); + public: void set_version(const String &p_version); String get_version() const; -- cgit v1.2.3