[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28569] branches/render25/source/blender: proxy rigs now properly recall the active bone correctly on file load

Joseph Eagar joeedh at gmail.com
Tue May 4 13:54:44 CEST 2010


Revision: 28569
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28569
Author:   joeedh
Date:     2010-05-04 13:54:44 +0200 (Tue, 04 May 2010)

Log Message:
-----------
proxy rigs now properly recall the active bone correctly on file load

Modified Paths:
--------------
    branches/render25/source/blender/blenloader/intern/readfile.c
    branches/render25/source/blender/blenloader/intern/writefile.c
    branches/render25/source/blender/makesdna/DNA_action_types.h
    branches/render25/source/blender/makesdna/DNA_modifier_types.h

Modified: branches/render25/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/render25/source/blender/blenloader/intern/readfile.c	2010-05-04 11:30:21 UTC (rev 28568)
+++ branches/render25/source/blender/blenloader/intern/readfile.c	2010-05-04 11:54:44 UTC (rev 28569)
@@ -2221,6 +2221,12 @@
 	/* 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);
 		
@@ -11664,7 +11670,6 @@
 	PartEff *paf;
 	int a;
 
-
 	expand_doit(fd, mainvar, ob->data);
 	
 	for (md=ob->modifiers.first; md; md=md->next) {

Modified: branches/render25/source/blender/blenloader/intern/writefile.c
===================================================================
--- branches/render25/source/blender/blenloader/intern/writefile.c	2010-05-04 11:30:21 UTC (rev 28568)
+++ branches/render25/source/blender/blenloader/intern/writefile.c	2010-05-04 11:54:44 UTC (rev 28569)
@@ -1268,6 +1268,14 @@
 			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);

Modified: branches/render25/source/blender/makesdna/DNA_action_types.h
===================================================================
--- branches/render25/source/blender/makesdna/DNA_action_types.h	2010-05-04 11:30:21 UTC (rev 28568)
+++ branches/render25/source/blender/makesdna/DNA_action_types.h	2010-05-04 11:54:44 UTC (rev 28569)
@@ -344,6 +344,7 @@
 	void *ikparam;				/* IK solver parameters, structure depends on iksolver */ 
 	
 	bAnimVizSettings avs;		/* settings for visualisation of bone animation */
+	char proxy_act_bone[32];           /*proxy active bone name*/
 } bPose;
 
 

Modified: branches/render25/source/blender/makesdna/DNA_modifier_types.h
===================================================================
--- branches/render25/source/blender/makesdna/DNA_modifier_types.h	2010-05-04 11:30:21 UTC (rev 28568)
+++ branches/render25/source/blender/makesdna/DNA_modifier_types.h	2010-05-04 11:54:44 UTC (rev 28569)
@@ -83,6 +83,7 @@
 	struct ModifierData *next, *prev;
 
 	int type, mode;
+	int stackindex, pad;
 	char name[32];
 	
 	/* XXX for timing info set by caller... solve later? (ton) */





More information about the Bf-blender-cvs mailing list