From 57a4cb5170ba2c4a02e57595a5b07a169bfbe8d5 Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Fri, 20 Sep 2024 16:12:49 -0700 Subject: [PATCH] Fixed error that could occur when exporting a mesh with vertex colors but no UV layer --- io_scene_ase/writer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))