diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-09 13:44:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-09 13:44:25 +0300 |
commit | 09ee3eb173b3889d4f5309e450df290a8c0bbe76 (patch) | |
tree | 155a879b95825392bd8c476b6ab2922e370d56d5 /source/blender/editors/transform/transform_generics.c | |
parent | 3cb42e59174e9b898ba5c9f9a70335f95cdda23d (diff) | |
parent | 287296565260373232146f3b4c6648d3800fe03e (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index b42e00a2bb4..6a813eb2a55 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1916,14 +1916,6 @@ void calculateCenter(TransInfo *t) if (t->spacetype == SPACE_VIEW3D) { /* ED_view3d_calc_zfac() defines a factor for perspective depth correction, used in ED_view3d_win_to_delta() */ - float vec[3]; - if (t->flag & (T_EDIT | T_POSE)) { - Object *ob = t->obedit ? t->obedit : t->poseobj; - mul_v3_m4v3(vec, ob->obmat, t->center); - } - else { - copy_v3_v3(vec, t->center); - } /* zfac is only used convertViewVec only in cases operator was invoked in RGN_TYPE_WINDOW * and never used in other cases. @@ -1932,7 +1924,7 @@ void calculateCenter(TransInfo *t) * for a region different from RGN_TYPE_WINDOW. */ if (t->ar->regiontype == RGN_TYPE_WINDOW) { - t->zfac = ED_view3d_calc_zfac(t->ar->regiondata, vec, NULL); + t->zfac = ED_view3d_calc_zfac(t->ar->regiondata, t->center_global, NULL); } else { t->zfac = 0.0f; |