Fix for rare error if vertex colors were somehow not active
This commit is contained in:
@@ -133,9 +133,10 @@ class ASEBuilder(object):
|
|||||||
|
|
||||||
# Vertex Colors
|
# Vertex Colors
|
||||||
if len(mesh_data.vertex_colors) > 0:
|
if len(mesh_data.vertex_colors) > 0:
|
||||||
vertex_colors = mesh_data.vertex_colors.active.data
|
if mesh_data.vertex_colors.active is not None:
|
||||||
for color in map(lambda x: x.color, vertex_colors):
|
vertex_colors = mesh_data.vertex_colors.active.data
|
||||||
geometry_object.vertex_colors.append(tuple(color[0:3]))
|
for color in map(lambda x: x.color, vertex_colors):
|
||||||
|
geometry_object.vertex_colors.append(tuple(color[0:3]))
|
||||||
|
|
||||||
# Update data offsets for next iteration
|
# Update data offsets for next iteration
|
||||||
geometry_object.texture_vertex_offset += len(mesh_data.loops)
|
geometry_object.texture_vertex_offset += len(mesh_data.loops)
|
||||||
|
|||||||
Reference in New Issue
Block a user