diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-01-29 14:33:57 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-01-29 14:56:08 +0300 |
commit | 1b32679284628339c181de9f93d8904288cf4816 (patch) | |
tree | 328dd6683563dc988bc78d86c1f781e5d9e2032e /source/blender/editors/transform/transform_gizmo_2d.c | |
parent | cf91fb347d5385d814bc731fa148f5a9d8d01964 (diff) |
Fix T85169: UV scale gizmo swaps X/Y
Introduced with swapped axis in rB0d67eb277f9b.
Similar was fixed for the translate gizmo in rB567212c3434a.
Now do the same for scaling as well.
Maniphest Tasks: T85169
Differential Revision: https://developer.blender.org/D10245
Diffstat (limited to 'source/blender/editors/transform/transform_gizmo_2d.c')
-rw-r--r-- | source/blender/editors/transform/transform_gizmo_2d.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_2d.c b/source/blender/editors/transform/transform_gizmo_2d.c index 09100bb50cc..0b677e2560b 100644 --- a/source/blender/editors/transform/transform_gizmo_2d.c +++ b/source/blender/editors/transform/transform_gizmo_2d.c @@ -618,7 +618,7 @@ static void gizmo2d_resize_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgrou /* set up widget data */ RNA_float_set(gz->ptr, "length", 1.0f); float axis[3] = {0.0f}; - axis[(i + 1) % 2] = 1.0f; + axis[i] = 1.0f; WM_gizmo_set_matrix_rotation_from_z_axis(gz, axis); RNA_enum_set(gz->ptr, "draw_style", ED_GIZMO_ARROW_STYLE_BOX); @@ -651,8 +651,8 @@ static void gizmo2d_resize_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgrou /* Assign operator. */ PointerRNA *ptr = WM_gizmo_operator_set(gz, 0, ot_resize, NULL); if (i < 2) { - bool constraint[3] = {0}; - constraint[(i + 1) % 2] = 1; + bool constraint[3] = {false}; + constraint[i] = true; if (RNA_struct_find_property(ptr, "constraint_axis")) { RNA_boolean_set_array(ptr, "constraint_axis", constraint); } |