Merge pull request #6165 from ynput/bugfix/blender-fix_blend_update_missing_animation_data

Blender: Fix missing animation data when updating blend assets
This commit is contained in:
Simone Barbieri 2024-01-25 14:13:58 +00:00 committed by GitHub
commit a37f2948fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -220,6 +220,8 @@ class BlendLoader(plugin.AssetLoader):
# Restore the actions
for obj in asset_group.children_recursive:
if obj.name in actions:
if not obj.animation_data:
obj.animation_data_create()
obj.animation_data.action = actions[obj.name]
# Restore the old data, but reset memebers, as they don't exist anymore