diff options
author | dzil123 <5725958+dzil123@users.noreply.github.com> | 2022-11-10 04:31:05 -0800 |
---|---|---|
committer | dzil123 <5725958+dzil123@users.noreply.github.com> | 2022-11-10 04:31:05 -0800 |
commit | 445062e43bdbe4ee94881430e3f33670a3e7d6d8 (patch) | |
tree | 3d4d068c6059a58b968cf0081a68b4f805e9f441 /scene/resources | |
parent | dca5cb8e40fd2a348a59ea73c597eb742c14c980 (diff) |
Visual Shader UVFunc keep existing input value on function change
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/visual_shader_nodes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index 04637983b5..03abac1b3e 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -3108,9 +3108,9 @@ void VisualShaderNodeUVFunc::set_function(VisualShaderNodeUVFunc::Function p_fun return; } if (p_func == FUNC_PANNING) { - set_input_port_default_value(2, Vector2()); // offset + set_input_port_default_value(2, Vector2(), get_input_port_default_value(2)); // offset } else { // FUNC_SCALING - set_input_port_default_value(2, Vector2(0.5, 0.5)); // pivot + set_input_port_default_value(2, Vector2(0.5, 0.5), get_input_port_default_value(2)); // pivot } func = p_func; emit_changed(); |