diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-04-29 17:18:59 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-04-29 17:18:59 +0400 |
commit | d47528b2f49d092120fbb32e3d1695aa6ecae391 (patch) | |
tree | 5daa2bbf7647e90b60e248b63f06a149c7aa7054 /source/blender/editors | |
parent | b7a59f52b8918ffd40aeaecdc93224a8a7863d2f (diff) |
Pose armature cleanup: remove old commented code replaced by use of new generic pchan_to_pose_mat().
After two months, think we can get rid of it, it’s in svn anyway if we ever need it!
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 859ae1e1b1b..c4edeefa598 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -424,51 +424,6 @@ static short apply_targetless_ik(Object *ob) bone= parchan->bone; bone->flag |= BONE_TRANSFORM; /* ensures it gets an auto key inserted */ - /* XXX Old code. Will remove it later. */ -#if 0 - if (parchan->parent) { - Bone *parbone= parchan->parent->bone; - float offs_bone[4][4]; - - /* offs_bone = yoffs(b-1) + root(b) + bonemat(b) */ - copy_m4_m3(offs_bone, bone->bone_mat); - - /* The bone's root offset (is in the parent's coordinate system) */ - copy_v3_v3(offs_bone[3], bone->head); - - /* Get the length translation of parent (length along y axis) */ - offs_bone[3][1]+= parbone->length; - - /* pose_mat(b-1) * offs_bone */ - if (parchan->bone->flag & BONE_HINGE) { - /* the rotation of the parent restposition */ - copy_m4_m4(rmat, parbone->arm_mat); /* rmat used as temp */ - - /* the location of actual parent transform */ - copy_v3_v3(rmat[3], offs_bone[3]); - offs_bone[3][0]= offs_bone[3][1]= offs_bone[3][2]= 0.0f; - mul_m4_v3(parchan->parent->pose_mat, rmat[3]); - - mult_m4_m4m4(tmat, rmat, offs_bone); - } - else if (parchan->bone->flag & BONE_NO_SCALE) { - mult_m4_m4m4(tmat, parchan->parent->pose_mat, offs_bone); - normalize_m4(tmat); - } - else - mult_m4_m4m4(tmat, parchan->parent->pose_mat, offs_bone); - - invert_m4_m4(imat, tmat); - } - else { - copy_m4_m3(tmat, bone->bone_mat); - - copy_v3_v3(tmat[3], bone->head); - invert_m4_m4(imat, tmat); - } - /* result matrix */ - mult_m4_m4m4(rmat, imat, parchan->pose_mat); -#endif armature_mat_pose_to_bone(parchan, parchan->pose_mat, rmat); /* apply and decompose, doesn't work for constraints or non-uniform scale well */ @@ -599,48 +554,6 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr mul_serie_m3(td->mtx, pmat, omat, NULL, NULL,NULL,NULL,NULL,NULL); } - /* XXX Old code. Will remove it later. */ -#if 0 - if (ELEM(t->mode, TFM_TRANSLATION, TFM_RESIZE) && (pchan->bone->flag & BONE_NO_LOCAL_LOCATION)) - unit_m3(bmat); - else - copy_m3_m3(bmat, pchan->bone->bone_mat); - - if (pchan->parent) { - if (pchan->bone->flag & BONE_HINGE) { - copy_m3_m4(pmat, pchan->parent->bone->arm_mat); - if (!(pchan->bone->flag & BONE_NO_SCALE)) { - float tsize[3], tsmat[3][3]; - mat4_to_size(tsize, pchan->parent->pose_mat); - size_to_mat3(tsmat, tsize); - mul_m3_m3m3(pmat, tsmat, pmat); - } - } - else { - copy_m3_m4(pmat, pchan->parent->pose_mat); - if (pchan->bone->flag & BONE_NO_SCALE) - normalize_m3(pmat); - } - - if (constraints_list_needinv(t, &pchan->constraints)) { - copy_m3_m4(tmat, pchan->constinv); - invert_m3_m3(cmat, tmat); - mul_serie_m3(td->mtx, bmat, pmat, omat, cmat, NULL,NULL,NULL,NULL); - } - else - mul_serie_m3(td->mtx, bmat, pmat, omat, NULL,NULL,NULL,NULL,NULL); - } - else { - if (constraints_list_needinv(t, &pchan->constraints)) { - copy_m3_m4(tmat, pchan->constinv); - invert_m3_m3(cmat, tmat); - mul_serie_m3(td->mtx, bmat, omat, cmat, NULL,NULL,NULL,NULL,NULL); - } - else - mul_m3_m3m3(td->mtx, omat, bmat); - } -# endif - invert_m3_m3(td->smtx, td->mtx); /* exceptional case: rotate the pose bone which also applies transformation |