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>2018-10-25 04:26:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-25 04:26:08 +0300
commit05f2caa2108f975f0ac1ed01d54e3602430562c2 (patch)
tree4efb01149309e4d216bc2cfc5b9f6312f55531ca /release/scripts/startup/bl_operators/uvcalc_smart_project.py
parent23fdac8672965aaa7c08bc8e2db416ceff875ee6 (diff)
parentc9e36e5434b380ed07dc2efc736aae62a05bb581 (diff)
Merge branch 'master' into blender2.8
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, 4 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index acef68730e6..1695b012108 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -143,9 +143,9 @@ def island2Edge(island):
unique_points = {}
for f in island:
- f_uvkey = map(tuple, f.uv)
+ f_uvkey = list(map(tuple, f.uv))
- for vIdx, edkey in enumerate(f.edge_keys):
+ for vIdx in range(len(f_uvkey)):
unique_points[f_uvkey[vIdx]] = f.uv[vIdx]
if f.v[vIdx].index > f.v[vIdx - 1].index:
@@ -158,18 +158,14 @@ def island2Edge(island):
try:
edges[f_uvkey[i1], f_uvkey[i2]] *= 0 # sets any edge with more than 1 user to 0 are not returned.
except:
- edges[f_uvkey[i1], f_uvkey[i2]] = (f.uv[i1] - f.uv[i2]).length,
+ edges[f_uvkey[i1], f_uvkey[i2]] = (f.uv[i1] - f.uv[i2]).length
# If 2 are the same then they will be together, but full [a,b] order is not correct.
# Sort by length
-
length_sorted_edges = [(Vector(key[0]), Vector(key[1]), value) for key, value in edges.items() if value != 0]
- try:
- length_sorted_edges.sort(key=lambda A: -A[2]) # largest first
- except:
- length_sorted_edges.sort(lambda A, B: cmp(B[2], A[2]))
+ length_sorted_edges.sort(key=lambda a: -a[2]) # largest first
# Its okay to leave the length in there.
# for e in length_sorted_edges: