Reloading library breaks animated proxy
Closed, ResolvedPublic

Description

System Information
Kubuntu 16.04

Blender Version
Broken: master, 49c2dbc5dbaefd3a2

Short description of error

When there is an animated proxied armature, the armature is of course stored in a library. When reloading that library & saving the main blend file, reopening the main blend file produces an error and the proxy is broken.

Exact steps for others to reproduce the error

  • Unzip
  • Open shot_file.blend
  • In the outliner, right-click "dependent_files/armature.blend" and choose "Reload"
  • Save the file to shot_file_saved.blend
  • Re-open shot_file_saved.blend
  • See the error:
Pose copy error, pose to:0x7fc5f522c208 from:(nil)
Proxy copy error, lib Object: Armature proxy Object: group_rig_proxy
Sybren A. Stüvel (sybren) triaged this task as Normal priority.Oct 14 2016, 11:42 AM

Datablocks in file saved before reloading the lib:

845: Object          @ 107408543944840 id.name='OBgroup_rig_proxy'
   b'id' = '<ID>'
   b'adt' = 106309031058728
   ...
   b'parent' = 0
   b'proxy' = 107408544059528
   b'proxy_group' = 107408543946632
   b'proxy_from' = 0
   b'ipo' = 0
   b'bb' = 0
   b'action' = 0
   b'poselib' = 0
   b'pose' = 106721357388040
   b'data' = 106790068298952

951: ID              @ 106790068298952 name='ARArmature' @//dependent_files/armature.blend
   b'next' = 0
   b'prev' = 0
   b'newid' = 0
   b'lib' = 107545988024456
   b'name' = b'ARArmature'
   b'flag' = 0
   b'tag' = 1
   b'pad_s1' = 0
   b'us' = 2
   b'icon_id' = 0
   b'properties' = 0

And in the file after reloading the library & saving:

845: Object          @ 139823217226248 id.name='OBgroup_rig_proxy'
   b'id' = '<ID>'
   b'adt' = 139823197982904
   b'sculpt' = 0
   b'type' = 25
   b'partype' = 0
   b'par1' = 0
   b'par2' = 0
   b'par3' = 0
   b'parsubstr' = b''
   b'parent' = 0
   b'track' = 0
   b'proxy' = 139823205889032
   b'proxy_group' = 139823217224712
   b'proxy_from' = 0
   b'ipo' = 0
   b'bb' = 0
   b'action' = 0
   b'poselib' = 0
   b'pose' = 139823202171496
   b'data' = 139823204617288

But no block name='ARArmature' for pose pointer 139823202171496 is saved.

Any idea how to avoid this or work around it? Running into this problem repeatedly in various productions, losing lots of animation work.

For anyone googling this, here's my current workaround:

When you open the scene and notice the animation is gone, it's kind of not. What's actually missing is the proxy, the animation data (the action) is still there, but probably only so long as you don't save the file again and reopen it.

So create another proxy from the same rig, and then link the old animation data to it using python:

# With the new proxy object as the active (last selected) object:
bpy.context.object.animation_data_create()
bpy.context.object.animation_data = bpy.data.actions["Whatever the name of the action for the old proxy was, probably the name of the armature and '_proxy' in it"]

That's worked for me so far.