diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 7 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 8 |
2 files changed, 14 insertions, 1 deletions
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); |