Skip to content

Commit

Permalink
Fixed error that could occur when exporting a mesh with vertex colors…
Browse files Browse the repository at this point in the history
… but no UV layer
  • Loading branch information
cmbasnett committed Sep 20, 2024
1 parent fa51768 commit 57a4cb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io_scene_ase/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ def build_ase_tree(ase: ASE) -> ASEFile:
cvert_list = mesh_node.push_child('MESH_CVERTLIST')
for i, vertex_color in enumerate(geometry_object.vertex_colors):
cvert_list.push_child('MESH_VERTCOL').push_datum(i).push_data(vertex_color)
parent_node.push_child('MESH_NUMCVFACES').push_datum(len(geometry_object.texture_vertex_faces))
texture_faces_node = parent_node.push_child('MESH_CFACELIST')
mesh_node.push_child('MESH_NUMCVFACES').push_datum(len(geometry_object.texture_vertex_faces))
texture_faces_node = mesh_node.push_child('MESH_CFACELIST')
for texture_face_index, texture_face in enumerate(geometry_object.texture_vertex_faces):
texture_face_node = texture_faces_node.push_child('MESH_CFACE')
texture_face_node.push_data([texture_face_index] + list(texture_face))
Expand Down

0 comments on commit 57a4cb5

Please sign in to comment.