Fix per vertex normals and colors import #6
@ -2071,8 +2071,8 @@ def importMesh_IndexedFaceSet(geom, ancestry):
|
||||
if colors and color_per_vertex:
|
||||
cco2 = [0.0 for x in range(int(len(bpymesh.attributes["temp_custom_colors"].data)*4))]
|
||||
bpymesh.attributes["temp_custom_colors"].data.foreach_get("color", cco2)
|
||||
bpymesh.color_attributes.new('ColorPerCoin', 'FLOAT_COLOR', 'CORNER')
|
||||
bpymesh.color_attributes["ColorPerCoin"].data.foreach_set("color", cco2)
|
||||
bpymesh.color_attributes.new('ColorPerCorner', 'FLOAT_COLOR', 'CORNER')
|
||||
bpymesh.color_attributes["ColorPerCorner"].data.foreach_set("color", cco2)
|
||||
bpymesh.attributes.remove(bpymesh.attributes["temp_custom_colors"])
|
||||
|
||||
bpymesh.update()
|
||||
@ -2748,7 +2748,7 @@ def appearance_CreateMaterial(vrmlname, mat, ancestry, is_vcol):
|
||||
if is_vcol:
|
||||
node_vertex_color = bpymat.node_tree.nodes.new("ShaderNodeVertexColor")
|
||||
node_vertex_color.location = (-200, 300)
|
||||
node_vertex_color.layer_name = "ColorPerCoin"
|
||||
node_vertex_color.layer_name = "ColorPerCorner"
|
||||
|
||||
bpymat.node_tree.links.new(
|
||||
bpymat_wrap.node_principled_bsdf.inputs["Base Color"],
|
||||
|
Loading…
Reference in New Issue
Block a user