From d2230fb9757a86937833b72629e87d029b793fa2 Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Fri, 20 Sep 2024 11:24:11 -0700 Subject: [PATCH] Minor formatting fix --- io_scene_ase/builder.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/io_scene_ase/builder.py b/io_scene_ase/builder.py index 7de0767..22c33a3 100644 --- a/io_scene_ase/builder.py +++ b/io_scene_ase/builder.py @@ -191,12 +191,15 @@ def build_ase(context: Context, options: ASEBuildOptions, objects: Iterable[Obje # Vertex Colors if options.should_export_vertex_colors and options.has_vertex_colors: - color_attribute = None match options.vertex_color_mode: case 'ACTIVE': - color_attribute = mesh_data.color_attributes.get(active_color_name, None) + color_attribute_name = active_color_name case 'EXPLICIT': - color_attribute = mesh_data.color_attributes.get(options.vertex_color_attribute, None) + color_attribute_name = options.vertex_color_attribute + case _: + raise ASEBuildError('Invalid vertex color mode') + + color_attribute = mesh_data.color_attributes.get(color_attribute_name, None) if color_attribute is not None: # Make sure that the selected color attribute is on the CORNER domain.