diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-25 21:48:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-25 21:48:29 +0300 |
commit | 2b121e65991763fc9631e466be885fe0755a4087 (patch) | |
tree | a359f23dc94f7b519e041efc64e947ebf2ebd959 /source/blender/editors/transform/transform_conversions.c | |
parent | 323aa656715f9f40e151acd0b61305384ae0970d (diff) |
Pose Bone Local Location: now also works for non-connected bones with parents.
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 0a678b30764..403d8449a67 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -604,6 +604,11 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr /* proper way to get parent transform + own transform + constraints transform */ copy_m3_m4(omat, ob->obmat); + if (t->mode==TFM_TRANSLATION && (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); @@ -613,17 +618,12 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr if (constraints_list_needinv(t, &pchan->constraints)) { copy_m3_m4(tmat, pchan->constinv); invert_m3_m3(cmat, tmat); - mul_serie_m3(td->mtx, pchan->bone->bone_mat, pmat, omat, cmat, 0,0,0,0); // dang mulserie swaps args + mul_serie_m3(td->mtx, bmat, pmat, omat, cmat, 0,0,0,0); // dang mulserie swaps args } else - mul_serie_m3(td->mtx, pchan->bone->bone_mat, pmat, omat, 0,0,0,0,0); // dang mulserie swaps args + mul_serie_m3(td->mtx, bmat, pmat, omat, 0,0,0,0,0); // dang mulserie swaps args } else { - if (t->mode==TFM_TRANSLATION && (pchan->bone->flag & BONE_NO_LOCAL_LOCATION)) - unit_m3(bmat); - else - copy_m3_m3(bmat, pchan->bone->bone_mat); - if (constraints_list_needinv(t, &pchan->constraints)) { copy_m3_m4(tmat, pchan->constinv); invert_m3_m3(cmat, tmat); |