Correctly handle multiple vertices sharing a UV coordinate.

Need to use both UV coordinate and vertex index to find unique
combinations. This should fix leileilol's broken meshes.
This commit is contained in:
Bill Currie 2012-08-07 10:26:35 +09:00
parent 78bfd30648
commit a4da11cdb5

View file

@ -119,7 +119,7 @@ def build_tris(mesh):
uv.reverse()
tv = []
for v, u in map(lambda a,b: (a,b), fv, uv):
k = tuple(u)
k = v, tuple(u)
if k not in uvdict:
uvdict[k] = len(stverts)
vertmap.append(v)