From e750be474ac3341516f14dfc2de7a69dcbef260f 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 a5ee85e..407d144 100644 --- a/io_scene_psk_psa/psa/export/operators.py +++ b/io_scene_psk_psa/psa/export/operators.py @@ -338,6 +338,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.