[Bf-blender-cvs] [4ee5ba4] master: Fix T48086: Smart UV Project fails w/ small faces
Campbell Barton
noreply at git.blender.org
Wed Apr 20 03:49:36 CEST 2016
Commit: 4ee5ba41bbd669ae4c9b57129c9711d2def41540
Author: Campbell Barton
Date: Wed Apr 20 11:49:14 2016 +1000
Branches: master
https://developer.blender.org/rB4ee5ba41bbd669ae4c9b57129c9711d2def41540
Fix T48086: Smart UV Project fails w/ small faces
Epsilon for small faces was too large.
Also suppress exception when all faces area are below the epsilon.
===================================================================
M release/scripts/startup/bl_operators/uvcalc_smart_project.py
===================================================================
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 7ad8352..52e7b0e 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -23,7 +23,11 @@ import bpy
from bpy.types import Operator
DEG_TO_RAD = 0.017453292519943295 # pi/180.0
-SMALL_NUM = 0.00000001 # see bug [#31598] why we dont have smaller values
+# see bugs:
+# - T31598 (when too small).
+# - T48086 (when too big).
+SMALL_NUM = 1e-12
+
global USER_FILL_HOLES
global USER_FILL_HOLES_QUALITY
@@ -813,9 +817,6 @@ def main(context,
else:
meshFaces = [thickface(f, uv_layer, me_verts) for i, f in enumerate(me.polygons)]
- if not meshFaces:
- continue
-
#XXX Window.DrawProgressBar(0.1, 'SmartProj UV Unwrapper, mapping "%s", %i faces.' % (me.name, len(meshFaces)))
# =======
@@ -835,6 +836,9 @@ def main(context,
uv.zero()
meshFaces.pop()
+ if not meshFaces:
+ continue
+
# Smallest first is slightly more efficient, but if the user cancels early then its better we work on the larger data.
# Generate Projection Vecs
More information about the Bf-blender-cvs
mailing list