From b8ea2e73d2b10b6c1db46dcc14471c1291ef1bd2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 25 Apr 2014 00:43:15 +1000 Subject: [PATCH] Smart UV Project: don't rotate islands which are almost square --- release/scripts/startup/bl_operators/uvcalc_smart_project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)