From ea6905ec74246027ffede1e3e11c10348d1281dc Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Sun, 23 Jan 2022 00:56:44 -0800 Subject: [PATCH] Errors emitted from PskExporter::export will not be displayed more gracefully. --- io_scene_psk_psa/psk/exporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io_scene_psk_psa/psk/exporter.py b/io_scene_psk_psa/psk/exporter.py index c9fdf90..860c20f 100644 --- a/io_scene_psk_psa/psk/exporter.py +++ b/io_scene_psk_psa/psk/exporter.py @@ -127,11 +127,11 @@ def execute(self, context): options.bone_group_indices = [x.index for x in property_group.bone_group_list if x.is_selected] try: psk = builder.build(context, options) + exporter = PskExporter(psk) + exporter.export(self.filepath) except RuntimeError as e: self.report({'ERROR_INVALID_CONTEXT'}, str(e)) return {'CANCELLED'} - exporter = PskExporter(psk) - exporter.export(self.filepath) return {'FINISHED'}