Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2007-11-15 15:15:28 +0300
committerTon Roosendaal <ton@blender.org>2007-11-15 15:15:28 +0300
commit33e5520ab3e865be357e07afe42df8d6a90e249a (patch)
tree6c12dfebf055020ff754f70787f9d2f3efdd6ecc
parentcbceb9bf66df5b6b5ebe598ec5334be9ea0f8a7d (diff)
Proxy fix:
Armature Proxy: the 'free pose channel' didn't restore the custom shapes when reloading file.
-rw-r--r--source/blender/blenkernel/intern/object.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 7d707813c65..a08256eb4a0 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1141,6 +1141,20 @@ void make_local_object(Object *ob)
/* *************** PROXY **************** */
+/* when you make proxy, ensure the exposed layers are extern */
+void armature_set_id_extern(Object *ob)
+{
+ bArmature *arm= ob->data;
+ bPoseChannel *pchan;
+ int lay= arm->layer_protected;
+
+ for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
+ if(!(pchan->bone->layer & lay))
+ id_lib_extern((ID *)pchan->custom);
+ }
+
+}
+
/* proxy rule: lib_object->proxy_from == the one we borrow from, set temporally while object_update */
/* local_object->proxy == pointer to library object, saved in files and read */
/* local_object->proxy_group == pointer to group dupli-object, saved in files and read */
@@ -1186,6 +1200,8 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
copy_object_pose(ob, target); /* data copy, object pointers in constraints */
rest_pose(ob->pose); /* clear all transforms in channels */
armature_rebuild_pose(ob, ob->data); /* set all internal links */
+
+ armature_set_id_extern(ob);
}
}