You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 17:36:07 +00:00
Added VisualShaderNodeCurve to easy gather data from a CurveTexture
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/plugins/curve_editor_plugin.h"
|
||||
#include "editor/property_editor.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/graph_edit.h"
|
||||
@@ -74,6 +75,7 @@ private:
|
||||
LineEdit *uniform_name;
|
||||
OptionButton *const_op;
|
||||
CodeEdit *expression_edit;
|
||||
CurveEditor *curve_editor;
|
||||
};
|
||||
|
||||
Ref<VisualShader> visual_shader;
|
||||
@@ -93,6 +95,7 @@ public:
|
||||
void register_default_input_button(int p_node_id, int p_port_id, Button *p_button);
|
||||
void register_constant_option_btn(int p_node_id, OptionButton *p_button);
|
||||
void register_expression_edit(int p_node_id, CodeEdit *p_expression_edit);
|
||||
void register_curve_editor(int p_node_id, CurveEditor *p_curve_editor);
|
||||
void clear_links();
|
||||
void set_shader_type(VisualShader::Type p_type);
|
||||
bool is_preview_visible(int p_id) const;
|
||||
@@ -111,6 +114,7 @@ public:
|
||||
void set_input_port_default_value(VisualShader::Type p_type, int p_node_id, int p_port_id, Variant p_value);
|
||||
void update_uniform_refs();
|
||||
void set_uniform_name(VisualShader::Type p_type, int p_node_id, const String &p_name);
|
||||
void update_curve(int p_node_id);
|
||||
void update_constant(VisualShader::Type p_type, int p_node_id);
|
||||
void set_expression(VisualShader::Type p_type, int p_node_id, const String &p_expression);
|
||||
int get_constant_index(float p_constant) const;
|
||||
@@ -254,6 +258,7 @@ class VisualShaderEditor : public VBoxContainer {
|
||||
int texture2d_array_node_option_idx;
|
||||
int texture3d_node_option_idx;
|
||||
int custom_node_option_idx;
|
||||
int curve_node_option_idx;
|
||||
List<String> keyword_list;
|
||||
|
||||
List<VisualShaderNodeUniformRef> uniform_refs;
|
||||
@@ -265,6 +270,8 @@ class VisualShaderEditor : public VBoxContainer {
|
||||
void _add_texture2d_node(const String &p_path);
|
||||
void _add_texture2d_array_node(const String &p_path);
|
||||
void _add_texture3d_node(const String &p_path);
|
||||
void _add_curve_node(const String &p_path);
|
||||
|
||||
VisualShaderNode *_add_node(int p_idx, int p_op_idx = -1);
|
||||
void _update_options_menu();
|
||||
void _set_mode(int p_which);
|
||||
|
||||
Reference in New Issue
Block a user