From a7cbd5008e830224e73e2e55f89d0783ded422e5 Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Tue, 4 May 2010 12:31:24 +0000 Subject: merging revisions 28564-28569 from render branch into trunk --- source/blender/blenloader/intern/readfile.c | 7 ++++++- source/blender/blenloader/intern/writefile.c | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index be19f7bfc18..fad679bc9f3 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2221,6 +2221,12 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose) /* 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; + } + for (pchan = pose->chanbase.first; pchan; pchan=pchan->next) { lib_link_constraints(fd, (ID *)ob, &pchan->constraints); @@ -11579,7 +11585,6 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob) PartEff *paf; int a; - expand_doit(fd, mainvar, ob->data); for (md=ob->modifiers.first; md; md=md->next) { diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 98b3300ce4c..5f2ee73e129 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1266,6 +1266,14 @@ static void write_objects(WriteData *wd, ListBase *idbase) write_sensors(wd, &ob->sensors); write_controllers(wd, &ob->controllers); write_actuators(wd, &ob->actuators); + + if (ob->type == OB_ARMATURE) { + bArmature *arm = ob->data; + if (arm && ob->pose && arm->act_bone) { + strcpy(ob->pose->proxy_act_bone, arm->act_bone->name); + } + } + write_pose(wd, ob->pose); write_defgroups(wd, &ob->defbase); write_constraints(wd, &ob->constraints); -- cgit v1.2.3