diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-26 08:45:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-26 08:45:09 +0300 |
commit | c74255181e59d21e8d580d1694bc15359bfa1e6d (patch) | |
tree | ab132f3aaa93e5fe43930b1d81ee53e2354d25ab /source/blender/editors/transform/transform_constraints.c | |
parent | 2cdcb1c1716180c00c23feb8332f17c2bab74864 (diff) |
Cleanup: transform aspect
Transform code had duplicate aspect checking,
now store aspect in TransInfo.aspect for reuse.
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 03d626fe179..50c255bc9db 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -751,19 +751,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) mul_m4_v3(t->obedit->obmat, center); /* because t->center is in local space */ } else if (t->spacetype == SPACE_IMAGE) { - float aspx, aspy; - - if (t->options & CTX_MASK) { - /* untested - mask aspect is TODO */ - ED_space_image_get_aspect(t->sa->spacedata.first, &aspx, &aspy); - } - else if (t->options & CTX_PAINT_CURVE) { - aspx = aspy = 1.0f; - } - else { - ED_space_image_get_uv_aspect(t->sa->spacedata.first, &aspx, &aspy); - } - glScalef(1.0f / aspx, 1.0f / aspy, 1.0f); + glScalef(1.0f / t->aspect[0], 1.0f / t->aspect[1], 1.0f); } else if (ELEM(t->spacetype, SPACE_IPO, SPACE_ACTION)) { /* only scale y */ |