[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12597] trunk/blender/source/blender/ blenkernel/intern/object.c: Proxy fix:
Ton Roosendaal
ton at blender.org
Thu Nov 15 13:15:28 CET 2007
Revision: 12597
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12597
Author: ton
Date: 2007-11-15 13:15:28 +0100 (Thu, 15 Nov 2007)
Log Message:
-----------
Proxy fix:
Armature Proxy: the 'free pose channel' didn't restore the custom shapes
when reloading file.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/object.c
Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c 2007-11-15 06:07:02 UTC (rev 12596)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2007-11-15 12:15:28 UTC (rev 12597)
@@ -1141,6 +1141,20 @@
/* *************** 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 @@
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);
}
}
More information about the Bf-blender-cvs
mailing list