Revert "Fix T83092: Direction of rotation with View orientation changed in 2.91"

This reverts commit f9e994d0f4.
And fixes T85227.

That commit created an inverted orientation matrix but the 'Align to
Transform Orientation' operator doesn't work well with inverted matrices.
This commit is contained in:
Germano Cavalcante 2021-01-30 12:49:42 -03:00
parent 036b65d778
commit acc662ea5a
Notes: blender-bot 2023-02-13 20:24:59 +01:00
Referenced by issue #85227, Align to Transform Orientation Not Working
Referenced by issue #83216, Potential candidates for corrective releases
Referenced by issue #83092, Rotate with "R" key or using bpy.ops.transform.rotate produces inverted rotation. Effects Object, Mesh Edit and Pose Mode
3 changed files with 4 additions and 5 deletions

View File

@ -1336,7 +1336,7 @@ void drawDial3d(const TransInfo *t)
}
else {
axis_idx = MAN_AXIS_ROT_C;
negate_v3_v3(mat_basis[2], t->spacemtx[t->orient_axis]);
copy_v3_v3(mat_basis[2], t->spacemtx[t->orient_axis]);
scale *= 1.2f;
line_with -= 1.0f;
}
@ -1384,7 +1384,7 @@ void drawDial3d(const TransInfo *t)
false,
&(struct Dial3dParams){
.draw_options = ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_VALUE,
.angle_delta = t->values_final[0],
.angle_delta = t->values[0],
.angle_increment = increment,
});

View File

@ -56,12 +56,12 @@ static void initShear_mouseInputMode(TransInfo *t)
/* Needed for axis aligned view gizmo. */
if (t->orient[t->orient_curr].type == V3D_ORIENT_VIEW) {
if (t->orient_axis_ortho == 0) {
if (t->center2d[1] < t->mouse.imval[1]) {
if (t->center2d[1] > t->mouse.imval[1]) {
dir_flip = !dir_flip;
}
}
else if (t->orient_axis_ortho == 1) {
if (t->center2d[0] < t->mouse.imval[0]) {
if (t->center2d[0] > t->mouse.imval[0]) {
dir_flip = !dir_flip;
}
}

View File

@ -561,7 +561,6 @@ short ED_transform_calc_orientation_from_type_ex(const bContext *C,
if (rv3d != NULL) {
copy_m3_m4(r_mat, rv3d->viewinv);
normalize_m3(r_mat);
negate_v3(r_mat[2]);
}
else {
unit_m3(r_mat);