summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authordzil123 <5725958+dzil123@users.noreply.github.com>2022-11-10 04:31:05 -0800
committerdzil123 <5725958+dzil123@users.noreply.github.com>2022-11-10 04:31:05 -0800
commit445062e43bdbe4ee94881430e3f33670a3e7d6d8 (patch)
tree3d4d068c6059a58b968cf0081a68b4f805e9f441 /scene
parentdca5cb8e40fd2a348a59ea73c597eb742c14c980 (diff)
Visual Shader UVFunc keep existing input value on function change
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/visual_shader_nodes.cpp4
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();