Small tweak in the new "Relative Parent" option for Bones that have Object-children:

- Transform now is relative to the bone root.

For backwards compatibility this transform was set to the tip for parenting... 

Now the new parenting option uses the root, the old one still the tip.
I've noted in the code to check on a version patch, to make it consistent.
This commit is contained in:
Ton Roosendaal
2012-12-22 11:08:25 +00:00
parent babbed1adc
commit 39a6af35f5

View File

@@ -1839,15 +1839,19 @@ static void ob_parbone(Object *ob, Object *par, float mat[4][4])
}
/* get bone transform */
if (pchan->bone->flag & BONE_RELATIVE_PARENTING)
if (pchan->bone->flag & BONE_RELATIVE_PARENTING) {
/* the new option uses the root - expected bahaviour, but differs from old... */
/* XXX check on version patching? */
copy_m4_m4(mat, pchan->chan_mat);
else
}
else {
copy_m4_m4(mat, pchan->pose_mat);
/* but for backwards compatibility, the child has to move to the tail */
copy_v3_v3(vec, mat[1]);
mul_v3_fl(vec, pchan->bone->length);
add_v3_v3(mat[3], vec);
/* but for backwards compatibility, the child has to move to the tail */
copy_v3_v3(vec, mat[1]);
mul_v3_fl(vec, pchan->bone->length);
add_v3_v3(mat[3], vec);
}
}
static void give_parvert(Object *par, int nr, float vec[3])