Skip to content

Commit

Permalink
Fix: No animation data (ynput#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tilix4 committed Jun 9, 2023
1 parent a2dbc10 commit 70939cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openpype/hosts/blender/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
get_children_recursive,
get_parent_collection,
get_root_datablocks,
get_used_datablocks,
link_to_collection,
transfer_stack,
unlink_from_collection,
Expand Down Expand Up @@ -780,7 +781,7 @@ def _load_library_datablocks(

# Override armature
if isinstance(d, bpy.types.Object) and d.type == "ARMATURE":
d.data = d.data.override_create()
d.data.override_create(remap_local_usages=True)

# Add override datablocks to datablocks
datablocks.update(override_datablocks)
Expand Down Expand Up @@ -1238,8 +1239,10 @@ def replace_container(
isinstance(old_datablock, bpy.types.Object)
and hasattr(new_datablock.data, "shape_keys")
and new_datablock.data.shape_keys
and new_datablock.data.shape_keys.animation_data
and old_datablock.data
and old_datablock.data.shape_keys
and old_datablock.data.shape_keys.animation_data
):
for i, driver in enumerate(
new_datablock.data.shape_keys.animation_data.drivers
Expand Down

0 comments on commit 70939cb

Please sign in to comment.