diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-06-17 18:03:07 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2021-06-28 14:38:08 +0300 |
commit | 46cd36f00995b23dc3184316fa46c2fcfefa6619 (patch) | |
tree | 7a6fd2660f0ecf5bc116f57d3587e4eeefadd431 /scene/resources | |
parent | f030b0c83df14192384290d82ef77bc507d267aa (diff) |
Fix auto-connection from output node to input (VisualShaders)
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/visual_shader.cpp | 8 | ||||
-rw-r--r-- | scene/resources/visual_shader.h | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 774c1a5c33..54bc7382db 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -2533,6 +2533,14 @@ Vector<StringName> VisualShaderNodeInput::get_editable_properties() const { return props; } +void VisualShaderNodeInput::set_shader_type(VisualShader::Type p_shader_type) { + shader_type = p_shader_type; +} + +void VisualShaderNodeInput::set_shader_mode(Shader::Mode p_shader_mode) { + shader_mode = p_shader_mode; +} + void VisualShaderNodeInput::_bind_methods() { ClassDB::bind_method(D_METHOD("set_input_name", "name"), &VisualShaderNodeInput::set_input_name); ClassDB::bind_method(D_METHOD("get_input_name"), &VisualShaderNodeInput::get_input_name); diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h index 53b165fe0f..454012b7ed 100644 --- a/scene/resources/visual_shader.h +++ b/scene/resources/visual_shader.h @@ -350,6 +350,10 @@ class VisualShaderNodeInput : public VisualShaderNode { String input_name = "[None]"; +public: + void set_shader_type(VisualShader::Type p_shader_type); + void set_shader_mode(Shader::Mode p_shader_mode); + protected: static void _bind_methods(); void _validate_property(PropertyInfo &property) const override; |