Fix per vertex normals and colors import #6
@ -1958,7 +1958,7 @@ def importMesh_IndexedFaceSet(geom, ancestry):
|
||||
normal_index = index
|
||||
co = [co for f in processPerVertexIndex(normal_index)
|
||||
for v in f
|
||||
for co in vectors[v]]
|
||||
for co in mathutils.Vector(vectors[v]).normalized().to_tuple()]
|
||||
bpymesh.vertices.foreach_set("normal", co)
|
||||
|
||||
# Mesh must be validated before assigning normals, but validation might
|
||||
@ -1968,7 +1968,7 @@ def importMesh_IndexedFaceSet(geom, ancestry):
|
||||
else:
|
||||
co = [co for (i, f) in enumerate(faces)
|
||||
for j in f
|
||||
for co in vectors[normal_index[i] if normal_index else i]]
|
||||
for co in mathutils.Vector(vectors[normal_index[i] if normal_index else i]).normalized().to_tuple()]
|
||||
bpymesh.polygons.foreach_set("normal", co)
|
||||
|
||||
# Apply vertex/face colors
|
||||
|
Loading…
Reference in New Issue
Block a user