diff --git a/io_scene_ase/writer.py b/io_scene_ase/writer.py index bef1562..ccfa73a 100644 --- a/io_scene_ase/writer.py +++ b/io_scene_ase/writer.py @@ -182,8 +182,8 @@ class ASEWriter(object): 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))