You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Visual Shader UVFunc keep existing input value on function change
This commit is contained in:
@@ -3108,9 +3108,9 @@ void VisualShaderNodeUVFunc::set_function(VisualShaderNodeUVFunc::Function p_fun
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (p_func == FUNC_PANNING) {
|
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
|
} 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;
|
func = p_func;
|
||||||
emit_changed();
|
emit_changed();
|
||||||
|
|||||||
Reference in New Issue
Block a user