Revision: 39517
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39517
Author:   jesterking
Date:     2011-08-18 09:14:27 +0000 (Thu, 18 Aug 2011)
Log Message:
-----------
Apply [#28287] COLLADA fix for inverse bind matrix of skin controller
Patch by Pelle Johnsen

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/collada/ArmatureExporter.cpp

Modified: branches/soc-2011-pepper/source/blender/collada/ArmatureExporter.cpp
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/ArmatureExporter.cpp        
2011-08-18 06:30:59 UTC (rev 39516)
+++ branches/soc-2011-pepper/source/blender/collada/ArmatureExporter.cpp        
2011-08-18 09:14:27 UTC (rev 39517)
@@ -368,17 +368,12 @@
 
                        bPoseChannel *pchan = get_pose_channel(pose, def->name);
 
-                       float pose_mat[4][4];
                        float mat[4][4];
                        float world[4][4];
                        float inv_bind_mat[4][4];
 
-                       // pose_mat is the same as pchan->pose_mat, but without 
the rotation
-                       unit_m4(pose_mat);
-                       translate_m4(pose_mat, pchan->pose_head[0], 
pchan->pose_head[1], pchan->pose_head[2]);
-
-                       // make world-space matrix, pose_mat is armature-space
-                       mul_m4_m4m4(world, pose_mat, ob_arm->obmat);
+                       // make world-space matrix, arm_mat is armature-space
+                       mul_m4_m4m4(world, pchan->bone->arm_mat, ob_arm->obmat);
                        
                        invert_m4_m4(mat, world);
                        converter.mat4_to_dae(inv_bind_mat, mat);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to