diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-31 00:11:36 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-05-31 00:11:50 +0300 |
commit | ba711824b3aec2ab4678e50f15b75cd417f56a70 (patch) | |
tree | e7bc3048951c4985ff6c6b6206ac556a367f67bb /source/blender/editors/transform/transform_orientations.c | |
parent | 347c1912920a0a3c68ef7b79887a8450e241bdf6 (diff) |
Fix T77206: G + MMB Doesn't work in Graph Editor if the transform orientation is set to 'Local'
Scene orientation is used only for 3DView.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index d0d04793eae..70060b5812b 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -552,28 +552,30 @@ short transform_orientation_matrix_get(bContext *C, return V3D_ORIENT_CUSTOM_MATRIX; } - Object *ob = CTX_data_active_object(C); - Object *obedit = CTX_data_active_object(C); - RegionView3D *rv3d = NULL; - int orientation_index_custom = 0; - if ((t->spacetype == SPACE_VIEW3D) && (t->region->regiontype == RGN_TYPE_WINDOW)) { - rv3d = t->region->regiondata; - } - if (orientation >= V3D_ORIENT_CUSTOM) { - orientation_index_custom = orientation - V3D_ORIENT_CUSTOM; + Object *ob = CTX_data_active_object(C); + Object *obedit = CTX_data_active_object(C); + RegionView3D *rv3d = t->region->regiondata; + int orientation_index_custom = 0; + + if (orientation >= V3D_ORIENT_CUSTOM) { + orientation_index_custom = orientation - V3D_ORIENT_CUSTOM; + } + + return ED_transform_calc_orientation_from_type_ex(C, + r_spacemtx, + /* extra args (can be accessed from context) */ + t->scene, + rv3d, + ob, + obedit, + orientation, + orientation_index_custom, + t->around); } - return ED_transform_calc_orientation_from_type_ex(C, - r_spacemtx, - /* extra args (can be accessed from context) */ - t->scene, - rv3d, - ob, - obedit, - orientation, - orientation_index_custom, - t->around); + unit_m3(r_spacemtx); + return V3D_ORIENT_GLOBAL; } const char *transform_orientations_spacename_get(TransInfo *t, const short orient_type) |