Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-03-25 11:40:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-25 11:42:41 +0300
commit567212c3434ad1ca851769fd8616ee2b1bd725ae (patch)
treedf27e07970ac27eb51a3159242334a29febd68eb /source/blender/editors/transform/transform_gizmo_2d.c
parent1587eb16d8f24d1f7d90c623acffd0f8d7d9d4ea (diff)
Fix T74846: UV gizmo swaps X/Y
Diffstat (limited to 'source/blender/editors/transform/transform_gizmo_2d.c')
-rw-r--r--source/blender/editors/transform/transform_gizmo_2d.c6
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 dce2625e8a1..e85b9f0bee1 100644
--- a/source/blender/editors/transform/transform_gizmo_2d.c
+++ b/source/blender/editors/transform/transform_gizmo_2d.c
@@ -300,7 +300,7 @@ static void gizmo2d_xform_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup
/* set up widget data */
RNA_float_set(gz->ptr, "length", 0.8f);
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);
float offset[3] = {0, 0, 0};
@@ -336,8 +336,8 @@ static void gizmo2d_xform_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup
/* Assign operator. */
PointerRNA *ptr = WM_gizmo_operator_set(gz, 0, ot_translate, 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);
}