mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T31598: smart UV failed for small faces
previous fixes only tweaked epsilon, but logic for skipping zero area boxes was still wrong.
This commit is contained in:
parent
a47137a2db
commit
22873eaeba
1 changed files with 5 additions and 5 deletions
|
|
@ -23,7 +23,7 @@ import bpy
|
||||||
from bpy.types import Operator
|
from bpy.types import Operator
|
||||||
|
|
||||||
DEG_TO_RAD = 0.017453292519943295 # pi/180.0
|
DEG_TO_RAD = 0.017453292519943295 # pi/180.0
|
||||||
SMALL_NUM = 0.000001 # see bug [#31598] why we dont have smaller values
|
SMALL_NUM = 0.00000001 # see bug [#31598] why we dont have smaller values
|
||||||
|
|
||||||
global USER_FILL_HOLES
|
global USER_FILL_HOLES
|
||||||
global USER_FILL_HOLES_QUALITY
|
global USER_FILL_HOLES_QUALITY
|
||||||
|
|
@ -594,10 +594,10 @@ def packIslands(islandList):
|
||||||
# recalc width and height
|
# recalc width and height
|
||||||
w, h = maxx-minx, maxy-miny
|
w, h = maxx-minx, maxy-miny
|
||||||
|
|
||||||
if w < 0.00001 or h < 0.00001:
|
if w < SMALL_NUM:
|
||||||
del islandList[islandIdx]
|
w = SMALL_NUM
|
||||||
islandIdx -=1
|
if h < SMALL_NUM:
|
||||||
continue
|
h = SMALL_NUM
|
||||||
|
|
||||||
"""Save the offset to be applied later,
|
"""Save the offset to be applied later,
|
||||||
we could apply to the UVs now and allign them to the bottom left hand area
|
we could apply to the UVs now and allign them to the bottom left hand area
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue