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.
This commit is contained in:
2023-02-13 21:13:58 -03:00
parent 0fa34aa0ec
commit 36937e523a

View File

@@ -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);
}
}