Bugfix #34046
authorTon Roosendaal <ton@blender.org>
Wed, 6 Feb 2013 12:16:53 +0000 (12:16 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 6 Feb 2013 12:16:53 +0000 (12:16 +0000)
Linked Armature with local proxy, using feature "Custom shape at other bone" stopped working
on undo/redo.

It was actually a bug in the original commit (r26600, april 2010), storing a pointer from
the library bone into the local proxy bone.
That's strictly forbidden in Blender, but it never showed up because on every undo-redo a
complete proxy-sync was called again. To allow undo/redo I had to disable this syncing,
except for file load. Hence the feature got lost :)

The fix is simple; just store the pointer to its own local bone instead.

source/blender/blenkernel/intern/armature.c

index b678ef6..480814a 100644 (file)
@@ -1655,7 +1655,8 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
                else {
                        /* always copy custom shape */
                        pchan->custom = pchanp->custom;
-                       pchan->custom_tx = pchanp->custom_tx;
+                       if (pchanp->custom_tx)
+                               pchan->custom_tx = BKE_pose_channel_find_name(pose, pchanp->custom_tx->name);
 
                        /* ID-Property Syncing */
                        {