diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-24 18:43:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-24 21:13:35 +0400 |
commit | b8ea2e73d2b10b6c1db46dcc14471c1291ef1bd2 (patch) | |
tree | 72079ba19a2c4fb819c72c96739d355a0fff9497 /release/scripts | |
parent | d12ceec40146f98b6d584a6ea276ab77834d816e (diff) |
Smart UV Project: don't rotate islands which are almost square
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_smart_project.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 1a8bd44e846..bf8b10ac4af 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -250,7 +250,8 @@ def optiRotateUvIsland(faces): # orient them vertically (could be an option) minx, miny, maxx, maxy = boundsIsland(faces) w, h = maxx - minx, maxy - miny - if h < w: + # use epsilon so we dont randomly rotate (almost) perfect squares. + if h + 0.00001 < w: from math import pi angle = pi / 2.0 rotate_uvs(uv_points, angle) |