From 36937e523a4fee4515d9cbca43aae6a1ae9b22c3 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Mon, 13 Feb 2023 21:13:58 -0300 Subject: [PATCH] Fix #66863: Bisect plane rotation behavior bugged for side/cut view The matrix of the rotation gizmo is somewhat confusing. Attaching to the Z axis has more predictable results. --- source/blender/editors/mesh/editmesh_bisect.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index aab33678bec..4fc225f5433 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -54,7 +54,7 @@ typedef struct { BMBackup mesh_backup; bool is_valid; bool is_dirty; - } * backup; + } *backup; int backup_len; } BisectData; @@ -528,15 +528,7 @@ static void gizmo_mesh_bisect_update_from_op(GizmoGroup *ggd) normalize_v3(ggd->data.rotate_up); WM_gizmo_set_matrix_rotation_from_z_axis(ggd->translate_c, plane_no); - - float plane_no_cross[3]; - cross_v3_v3v3(plane_no_cross, plane_no, ggd->data.rotate_axis); - - WM_gizmo_set_matrix_offset_rotation_from_yz_axis( - ggd->rotate_c, plane_no_cross, ggd->data.rotate_axis); - RNA_enum_set(ggd->rotate_c->ptr, - "draw_options", - ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_MIRROR | ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_START_Y); + WM_gizmo_set_matrix_rotation_from_z_axis(ggd->rotate_c, ggd->data.rotate_axis); } }