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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-01-29 14:58:39 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-01-29 14:58:39 +0300
commit02bb3595d05476e49763d1b92ef609e7d45111ff (patch)
treef3fe04684084d1e4fed045716edf4e1c5110a901 /source/blender/editors/transform
parentbc794109db21d5c5deb23cc1c88e3a67c1575739 (diff)
parent1b32679284628339c181de9f93d8904288cf4816 (diff)
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source/blender/editors/transform')
-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 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);
}