Animation: Add in Parent space alignment option to the Transform Orientation gizmo #104724

Merged
Nate Rupsis merged 47 commits from nrupsis/blender:parent-space into main 2023-04-20 17:40:31 +02:00
1 changed files with 3 additions and 11 deletions
Showing only changes of commit f3e4fd0ff4 - Show all commits

View File

@ -496,17 +496,9 @@ static void handle_armature_parent_orientation(const Scene *scene,
bPoseChannel *active_pchan = BKE_pose_channel_active(ob, false);
if (active_pchan->parent) {
if (active_pchan->parent->bone->flag & BONE_NO_LOCAL_LOCATION) {
transform_orientations_create_from_axis(r_mat, UNPACK3(active_pchan->parent->bone->arm_mat));
return;
}
else {
bArmature *armature = ob->data;
armature->act_bone = active_pchan->parent->bone;
ED_getTransformOrientationMatrix(scene, view_layer, v3d, ob, obedit, pivot_point, r_mat);
armature->act_bone = active_pchan->bone;
return;
}
// For child, show parent local regardlesss if "local location" is on for parent bone.
transform_orientations_create_from_axis(r_mat, UNPACK3(active_pchan->parent->bone->arm_mat));
return;
}
// if root, and "Local Location", isn't set local transform of armature object.
if (active_pchan->bone->flag & BONE_NO_LOCAL_LOCATION) {