From a73655fc98e05ea640e81be2280131532a39c907 Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Fri, 4 Aug 2023 16:27:50 -0700 Subject: [PATCH] Fixed a bug where the action list would not be populated for PSA export if the armature had not had it's animation data initialized --- io_scene_psk_psa/psa/export/operators.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/io_scene_psk_psa/psa/export/operators.py b/io_scene_psk_psa/psa/export/operators.py index 2bbf937..3d7d275 100644 --- a/io_scene_psk_psa/psa/export/operators.py +++ b/io_scene_psk_psa/psa/export/operators.py @@ -343,6 +343,11 @@ class PSA_OT_export(Operator, ExportHelper): self.armature_object = context.view_layer.objects.active + if self.armature_object.animation_data is None: + # This is required otherwise the action list will be empty if the armature has never had its animation + # data created before (i.e. if no action was ever assigned to it). + self.armature_object.animation_data_create() + update_actions_and_timeline_markers(context, self.armature_object.data) # Populate bone groups list.