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

This commit is contained in:
Colin Basnett
2023-08-04 16:27:50 -07:00
parent 38a8dab100
commit a73655fc98

View File

@@ -343,6 +343,11 @@ class PSA_OT_export(Operator, ExportHelper):
self.armature_object = context.view_layer.objects.active 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) update_actions_and_timeline_markers(context, self.armature_object.data)
# Populate bone groups list. # Populate bone groups list.