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>2012-04-30 09:45:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-30 09:45:01 +0400
commit0f4966164ab9cd64d2b8c676615d16bcda1064dd (patch)
tree5c6e46feb686082e365438f80f0c5b1495abb81d /release/scripts
parentcf0a7e2a4d8cf95e91a38c78651b96f10a14dfd6 (diff)
fix [#31181] Lightmap UV unwrap still broken
raised python error with triangles.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index 3bd0d6fa4cc..b184c81d6a7 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -157,18 +157,17 @@ class prettyface(object):
angles_co.sort()
I = [i for a, i in angles_co]
- #~ fuv = f.uv
uv_layer = f.id_data.uv_layers.active.data
- fuv = [uv_layer[i].uv for i in f.loops] # XXX25
+ fuv = [uv_layer[i].uv for i in f.loop_indices]
if self.rot:
- fuv[I[2]] = p1
- fuv[I[1]] = p2
- fuv[I[0]] = p3
+ fuv[I[2]][:] = p1
+ fuv[I[1]][:] = p2
+ fuv[I[0]][:] = p3
else:
- fuv[I[2]] = p1
- fuv[I[0]] = p2
- fuv[I[1]] = p3
+ fuv[I[2]][:] = p1
+ fuv[I[0]][:] = p2
+ fuv[I[1]][:] = p3
f, lens, lensord = uv[0]
@@ -179,10 +178,10 @@ class prettyface(object):
set_uv(f, (x2, y2), (x2, y1 + margin_h), (x1 + margin_w, y2))
else: # 1 QUAD
- uv[1][0], uv[1][1] = x1, y1
- uv[2][0], uv[2][1] = x1, y2
- uv[3][0], uv[3][1] = x2, y2
- uv[0][0], uv[0][1] = x2, y1
+ uv[1][:] = x1, y1
+ uv[2][:] = x1, y2
+ uv[3][:] = x2, y2
+ uv[0][:] = x2, y1
def __hash__(self):
# None unique hash