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:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-11-27 16:41:33 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-11-27 16:41:33 +0300
commitf9e994d0f463abb87761591e30c47a9613be6cca (patch)
treeece90999dc9cecbe466a7789fb08641f10ada623 /source/blender/editors/transform/transform_gizmo_3d.c
parent24e57eea4325bf39617114c182430691d74c78e9 (diff)
Fix T83092: Direction of rotation with View orientation changed in 2.91
The change was intentional so that the orientation matrices match (`rv3d->viewinv` becomes equal to the orientation matrix). But, although in a projection matrix the Z axis is negative, this should not be so from the user's point of view. So the solution here is to negate the Z axis when the View orientation is chosen. This affects all modes, but is only evident for rotation. --- Another change here is to use the final rotation value (`values_final`) for the gizmo drawing since this value can be changed by the mode.
Diffstat (limited to 'source/blender/editors/transform/transform_gizmo_3d.c')
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index d5c6ea2dfdd..37fd8bb63c1 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1331,7 +1331,7 @@ void drawDial3d(const TransInfo *t)
}
else {
axis_idx = MAN_AXIS_ROT_C;
- copy_v3_v3(mat_basis[2], t->spacemtx[t->orient_axis]);
+ negate_v3_v3(mat_basis[2], t->spacemtx[t->orient_axis]);
scale *= 1.2f;
line_with -= 1.0f;
}
@@ -1379,7 +1379,7 @@ void drawDial3d(const TransInfo *t)
false,
&(struct Dial3dParams){
.draw_options = ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_VALUE,
- .angle_delta = t->values[0],
+ .angle_delta = t->values_final[0],
.angle_increment = increment,
});