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>2018-09-25 07:15:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-25 07:24:19 +0300
commitebdeb3eca0d6ea483a4ef057c5ffbbb20938d25b (patch)
treed47eff729dd38471a4df79fe0a6c504074e53075 /source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
parenta7bf4966e2d691be90a55b1189846bfaa17a9ef7 (diff)
Gizmo: support spin tool normal flipping
Use the 2x spin tool has 2x handles to control normal direction, dragging either handle backwards now reverses normals. Previously it was common for the spin result to have normals flipped the wrong way.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c')
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
index e3fa02e946e..5978f521bb9 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
@@ -197,7 +197,14 @@ static void gizmo_mesh_spin_init_refresh_axis_orientation(
for (int j = 0; j < 2; j++) {
gz = ggd->gizmos.icon_button[axis_index][j];
PointerRNA *ptr = WM_gizmo_operator_set(gz, 0, ggd->data.ot_spin, NULL);
- RNA_float_set_array(ptr, "axis", axis_vec);
+ float axis_vec_flip[3];
+ if (0 == j) {
+ negate_v3_v3(axis_vec_flip, axis_vec);
+ }
+ else {
+ copy_v3_v3(axis_vec_flip, axis_vec);
+ }
+ RNA_float_set_array(ptr, "axis", axis_vec_flip);
}
}
}