Fix #108707: Parent space Transform ignores armature objects rotation

Seems like an oversight in 5c4b0c98d3.

Child bones would calculate their orientation from the parent bone local
alone, now multiply take the armature objects world transform into account as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/108755
This commit is contained in:
Philipp Oeser
2023-06-12 09:59:14 +02:00
committed by Philipp Oeser
parent 99931a5154
commit d75aeb03e5

View File

@@ -588,6 +588,9 @@ static void handle_armature_parent_orientation(Object *ob, float r_mat[3][3])
if (active_pchan && active_pchan->parent) {
/* For child, show parent local regardless if "local location" is set for parent bone. */
transform_orientations_create_from_axis(r_mat, UNPACK3(active_pchan->parent->pose_mat));
float ob_orientations_mat[3][3];
transform_orientations_create_from_axis(ob_orientations_mat, UNPACK3(ob->object_to_world));
mul_m3_m3_pre(r_mat, ob_orientations_mat);
return;
}