diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-09 13:39:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-09 13:40:10 +0300 |
commit | 287296565260373232146f3b4c6648d3800fe03e (patch) | |
tree | ab3eec5d002ba48c8ff3ad1cda857faea40c255f /source/blender/editors/transform/transform.c | |
parent | d6a1a0ebb86c3e0ca14540f79fbf54e7429d28a1 (diff) |
Cleanup: avoid recalculating global center
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 6ca9485599c..90014667b43 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1694,23 +1694,13 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata) TransInfo *t = (TransInfo *)customdata; if (t->helpline != HLP_NONE && !(t->flag & T_USES_MANIPULATOR)) { - float vecrot[3], cent[2]; + float cent[2]; int mval[2]; mval[0] = x; mval[1] = y; - copy_v3_v3(vecrot, t->center); - if (t->flag & T_EDIT) { - Object *ob = t->obedit; - if (ob) mul_m4_v3(ob->obmat, vecrot); - } - else if (t->flag & T_POSE) { - Object *ob = t->poseobj; - if (ob) mul_m4_v3(ob->obmat, vecrot); - } - - projectFloatViewEx(t, vecrot, cent, V3D_PROJ_TEST_CLIP_ZERO); + projectFloatViewEx(t, t->center_global, cent, V3D_PROJ_TEST_CLIP_ZERO); glPushMatrix(); |