Fix per vertex normals and colors import #6
@ -1,7 +1,7 @@
|
||||
schema_version = "1.0.0"
|
||||
id = "web3d_x3d_vrml2_format"
|
||||
name = "Web3D X3D/VRML2 format"
|
||||
version = "2.3.3"
|
||||
version = "2.3.4"
|
||||
tagline = "Import-Export X3D, Import VRML2"
|
||||
maintainer = "Community"
|
||||
type = "add-on"
|
||||
|
@ -1997,6 +1997,12 @@ def importMesh_IndexedFaceSet(geom, ancestry):
|
||||
for j in f
|
||||
for cco in rgb[color_index[i]]]
|
||||
bpymesh.vertex_colors.new().data.foreach_set('color', cco) # deprecated
|
||||
elif len(faces) > len(rgb): # Static color per face without index, when all faces have the same color.
|
||||
# Exported from SOLIDWORKS, see: `blender/blender-addons#105398`.
|
||||
cco = [cco for (i, f) in enumerate(faces)
|
||||
for j in f
|
||||
for cco in rgb[0]]
|
||||
bpymesh.vertex_colors.new().data.foreach_set('color', cco) # deprecated
|
||||
else: # Color per face without index
|
||||
cco = [cco for (i, f) in enumerate(faces)
|
||||
for j in f
|
||||
|
Loading…
Reference in New Issue
Block a user