Bugfix for crazyspace correction of childof constraint on bones.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 22 Jan 2008 20:59:45 +0000 (20:59 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 22 Jan 2008 20:59:45 +0000 (20:59 +0000)
source/blender/blenkernel/intern/constraint.c
source/blender/src/transform_conversions.c

index 6300d88287998084c9153d62e9badf6f28425d98..7d7180da27103650bb43116d1c1e2a0659826956 100644 (file)
@@ -295,7 +295,7 @@ void constraints_clear_evalob (bConstraintOb *cob)
        
        /* calculate delta of constraints evaluation */
        Mat4Invert(imat, cob->startmat);
-       Mat4MulMat4(delta, cob->matrix, imat);
+       Mat4MulMat4(delta, imat, cob->matrix);
        
        /* copy matrices back to source */
        switch (cob->type) {
index de3e9988f8d335317a75dfdfa54f51a2ebc0615d..12419c94c0f2f2ae65f8e8e3805bda6f4ae289c2 100644 (file)
@@ -560,7 +560,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
                if (constraints_list_needinv(t, &pchan->constraints)) {
                        Mat3CpyMat4(tmat, pchan->constinv);
                        Mat3Inv(cmat, tmat);
-                       Mat3MulSerie(td->mtx, pchan->bone->bone_mat, pmat, cmat, omat, 0,0,0,0);    // dang mulserie swaps args
+                       Mat3MulSerie(td->mtx, pchan->bone->bone_mat, pmat, omat, cmat, 0,0,0,0);    // dang mulserie swaps args
                }
                else
                        Mat3MulSerie(td->mtx, pchan->bone->bone_mat, pmat, omat, 0,0,0,0,0);    // dang mulserie swaps args
@@ -569,7 +569,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
                if (constraints_list_needinv(t, &pchan->constraints)) {
                        Mat3CpyMat4(tmat, pchan->constinv);
                        Mat3Inv(cmat, tmat);
-                       Mat3MulSerie(td->mtx, pchan->bone->bone_mat, cmat, omat, 0, 0,0,0,0);    // dang mulserie swaps args
+                       Mat3MulSerie(td->mtx, pchan->bone->bone_mat, omat, cmat, 0,0,0,0,0);    // dang mulserie swaps args
                }
                else 
                        Mat3MulMat3(td->mtx, omat, pchan->bone->bone_mat);  // Mat3MulMat3 has swapped args!