summaryrefslogtreecommitdiff
path: root/scene/resources/visual_shader.h
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2020-09-09 11:21:38 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2020-09-09 11:29:40 +0300
commitea49d8b9d53302baf0cde3aec0d13547f0669e84 (patch)
tree89bda694bbd4fcf9be9be083ade8594b5ad5d9a6 /scene/resources/visual_shader.h
parent9568bcf1662b0feeaaf6c67ff7d0d25072f7860d (diff)
Improve performance of Undo:change node position in visual shader
Diffstat (limited to 'scene/resources/visual_shader.h')
-rw-r--r--scene/resources/visual_shader.h8
1 files changed, 8 insertions, 0 deletions
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<VisualShaderNode> node;
Vector2 position;
List<int> 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<PropertyInfo> *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;