[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14787] trunk/blender/source/blender/src/ editarmature.c: Bugfix:

Joshua Leung aligorith at gmail.com
Sun May 11 14:17:53 CEST 2008


Revision: 14787
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14787
Author:   aligorith
Date:     2008-05-11 14:17:52 +0200 (Sun, 11 May 2008)

Log Message:
-----------
Bugfix:

Found a little bug in the Armature Joining code due to the 'imat' var being defined twice and used for two different things. This was brought to light by Valgrind output (thanks Campbell) 

Modified Paths:
--------------
    trunk/blender/source/blender/src/editarmature.c

Modified: trunk/blender/source/blender/src/editarmature.c
===================================================================
--- trunk/blender/source/blender/src/editarmature.c	2008-05-11 11:53:12 UTC (rev 14786)
+++ trunk/blender/source/blender/src/editarmature.c	2008-05-11 12:17:52 UTC (rev 14787)
@@ -549,7 +549,7 @@
 	bPoseChannel *pchan, *pchann;
 	ListBase ebbase, eblist;
 	EditBone *curbone;
-	float	mat[4][4], imat[4][4];
+	float	mat[4][4], oimat[4][4];
 	
 	/*	Ensure we're not in editmode and that the active object is an armature*/
 	/* if(G.obedit) return; */ /* Alredy checked in join_menu() */
@@ -579,8 +579,8 @@
 				opose= base->object->pose;
 				
 				/* Find the difference matrix */
-				Mat4Invert(imat, ob->obmat);
-				Mat4MulMat4(mat, base->object->obmat, imat);
+				Mat4Invert(oimat, ob->obmat);
+				Mat4MulMat4(mat, base->object->obmat, oimat);
 				
 				/* Copy bones and posechannels from the object to the edit armature */
 				for (pchan=opose->chanbase.first; pchan; pchan=pchann) {
@@ -826,8 +826,8 @@
 	// 31 Mar 08 \ 11 May 08 - Aligorith:
 	// currently, this is still too unstable to be enabled for general consumption.
 	// remove the following two lines to test this tool... you have been warned!
-		okee("Not implemented (WIP)");
-		return;
+	//	okee("Not implemented (WIP)");
+	//	return;
 	
 	if ( G.vd==0 || (G.vd->lay & G.obedit->lay)==0 ) return;
 	if ( okee("Separate")==0 ) return;





More information about the Bf-blender-cvs mailing list