Smart UV Project: don't rotate islands which are almost square

This commit is contained in:
Campbell Barton 2014-04-25 00:43:15 +10:00
parent d12ceec401
commit b8ea2e73d2
1 changed files with 2 additions and 1 deletions

View File

@ -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)