diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-04-30 14:38:18 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-04-30 14:38:18 +0300 |
commit | 41b45d9159fcb349c5b98e8af57cb1e5318616e8 (patch) | |
tree | 8c218dc91043c9aa3dbef50439ce1ecd3455249b /source/blender/editors/transform/transform_orientations.c | |
parent | ae98a033c85607d324e9690654b0c27d4b64a122 (diff) |
Fix T76260: Inverted rotation in non-3d views
Issue introduced in rBc57e4418bb85.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 4e34c469258..3b1f3559daa 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -476,20 +476,20 @@ void initTransformOrientation(bContext *C, TransInfo *t, short orientation) break; - case V3D_ORIENT_VIEW: + case V3D_ORIENT_VIEW: { + float mat[3][3]; if ((t->spacetype == SPACE_VIEW3D) && (t->region->regiontype == RGN_TYPE_WINDOW)) { - float mat[3][3]; - BLI_strncpy(t->spacename, TIP_("view"), sizeof(t->spacename)); copy_m3_m4(mat, t->viewinv); normalize_m3(mat); - negate_v3(mat[2]); - copy_m3_m3(t->spacemtx, mat); } else { - unit_m3(t->spacemtx); + unit_m3(mat); } + negate_v3(mat[2]); + copy_m3_m3(t->spacemtx, mat); break; + } case V3D_ORIENT_CURSOR: { BLI_strncpy(t->spacename, TIP_("cursor"), sizeof(t->spacename)); BKE_scene_cursor_rot_to_mat3(&t->scene->cursor, t->spacemtx); |