Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-04-24 18:43:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-24 21:13:35 +0400
commitb8ea2e73d2b10b6c1db46dcc14471c1291ef1bd2 (patch)
tree72079ba19a2c4fb819c72c96739d355a0fff9497 /release/scripts/startup/bl_operators/uvcalc_smart_project.py
parentd12ceec40146f98b6d584a6ea276ab77834d816e (diff)
Smart UV Project: don't rotate islands which are almost square
Diffstat (limited to 'release/scripts/startup/bl_operators/uvcalc_smart_project.py')
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py3
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)