From c7c034fedb87e0ff3cf80f4f388bacad51434617 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 24 Nov 2010 14:05:53 +0000 Subject: Fix #24782: proxy armature Layer state not saved with file. Was in 2.4x but not ported to 2.5x, implemented a bit different now to fit RNA better. --- source/blender/blenloader/intern/readfile.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 0e1bd6cc5e6..419ef90ab3a 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2213,13 +2213,21 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose) if (!pose || !arm) return; + /* always rebuild to match proxy or lib changes */ rebuild= ob->proxy || (ob->id.lib==NULL && arm->id.lib); - if (ob->proxy && pose->proxy_act_bone[0]) { - Bone *bone = get_named_bone(arm, pose->proxy_act_bone); - if (bone) - arm->act_bone = bone; + if(ob->proxy) { + /* sync proxy layer */ + if(pose->proxy_layer) + arm->layer = pose->proxy_layer; + + /* sync proxy active bone */ + if(pose->proxy_act_bone[0]) { + Bone *bone = get_named_bone(arm, pose->proxy_act_bone); + if (bone) + arm->act_bone = bone; + } } for (pchan = pose->chanbase.first; pchan; pchan=pchan->next) { -- cgit v1.2.3