Fix for rare error if vertex colors were somehow not active

This commit is contained in:
Colin Basnett
2024-02-28 18:49:00 -08:00
parent 7b417ae425
commit a3e350e96e

View File

@@ -133,6 +133,7 @@ class ASEBuilder(object):
# Vertex Colors # Vertex Colors
if len(mesh_data.vertex_colors) > 0: if len(mesh_data.vertex_colors) > 0:
if mesh_data.vertex_colors.active is not None:
vertex_colors = mesh_data.vertex_colors.active.data vertex_colors = mesh_data.vertex_colors.active.data
for color in map(lambda x: x.color, vertex_colors): for color in map(lambda x: x.color, vertex_colors):
geometry_object.vertex_colors.append(tuple(color[0:3])) geometry_object.vertex_colors.append(tuple(color[0:3]))