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>2016-04-20 04:49:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-04-20 04:51:03 +0300
commit4ee5ba41bbd669ae4c9b57129c9711d2def41540 (patch)
tree268a937bd8a6be4f635678f735854f8a80ae32fb /release/scripts/startup/bl_operators/uvcalc_smart_project.py
parentdbf1257b14582d5c6cabbed01ef1bf89860106fd (diff)
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.
Diffstat (limited to 'release/scripts/startup/bl_operators/uvcalc_smart_project.py')
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 7ad83525656..52e7b0e0ae4 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