summaryrefslogtreecommitdiffstats
path: root/editor/plugins/visual_shader_editor_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.h')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index d3dc2e7564..6b7c07e5a7 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -221,6 +221,10 @@ class VisualShaderEditor : public ShaderEditor {
Button *code_preview_button = nullptr;
Button *shader_preview_button = nullptr;
+ int last_to_node = -1;
+ int last_to_port = -1;
+ Label *info_label = nullptr;
+
OptionButton *edit_type = nullptr;
OptionButton *edit_type_standard = nullptr;
OptionButton *edit_type_particles = nullptr;
@@ -276,6 +280,7 @@ class VisualShaderEditor : public ShaderEditor {
bool shader_preview_showed = true;
LineEdit *param_filter = nullptr;
+ MenuButton *preview_tools = nullptr;
String selected_param_id;
Tree *parameters = nullptr;
HashMap<String, PropertyInfo> parameter_props;
@@ -318,6 +323,11 @@ class VisualShaderEditor : public ShaderEditor {
COLLAPSE_ALL
};
+ enum PreviewToolsMenuOptions {
+ COPY_PARAMS_FROM_MATERIAL,
+ PASTE_PARAMS_TO_MATERIAL,
+ };
+
#ifdef MINGW_ENABLED
#undef DELETE
#endif
@@ -367,6 +377,7 @@ class VisualShaderEditor : public ShaderEditor {
void _show_add_varying_dialog();
void _show_remove_varying_dialog();
+ void _preview_tools_menu_option(int p_idx);
void _clear_preview_param();
void _update_preview_parameter_list();
bool _update_preview_parameter_tree();
@@ -495,6 +506,7 @@ class VisualShaderEditor : public ShaderEditor {
void _unlink_node_from_parent_frame(int p_node_id);
+ void _connection_drag_ended();
void _connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position);
void _connection_from_empty(const String &p_to, int p_to_slot, const Vector2 &p_release_position);
bool _check_node_drop_on_connection(const Vector2 &p_position, Ref<GraphEdit::Connection> *r_closest_connection, int *r_node_id = nullptr, int *r_to_port = nullptr);