From 26932c21ebca087ad7b71f1cfa2f7f9e16328a44 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 1 Mar 2010 05:19:07 +0000 Subject: Bugfix #21384: Bone Driven Shapekeys Child Evaluation Problem Transform channel drivers for bones in 'localspace' was using the wrong matrix when getting the transforms. I had been assuming that pchan->chan_mat always contained only the matrix-ised transform values stored in the pchan (which is true while constraints are being evaluated, but not afterwards). Changes: - Added a new function to calculate this matrix instead of directly writing it on the pchan->chan_matrix field. - Also, made the normalisation of the quaternion values during this process be done on a temp var instead of on the stored value. This was a constant source of confusion in the past, so let's see if we can do without it now :) Unrelated to this commit, I've also fixed a compiler warning with previous commit that I missed (missing include). --- source/blender/blenkernel/BKE_armature.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/BKE_armature.h') diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index e142fceebda..7e3d7f2a2ce 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -106,6 +106,7 @@ void armature_loc_pose_to_bone(struct bPoseChannel *pchan, float *inloc, float * void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]); void pchan_apply_mat4(struct bPoseChannel *pchan, float mat[][4]); +void pchan_to_mat4(struct bPoseChannel *pchan, float chan_mat[4][4]); /* Rotation Mode Conversions - Used for PoseChannels + Objects... */ void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode); -- cgit v1.2.3