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 3 deletions
Showing only changes of commit 2b2738b392 - Show all commits

View File

@ -591,17 +591,17 @@ static void handle_armature_parent_orientation(const Scene *scene,
bPoseChannel *active_pchan = BKE_pose_channel_active(ob, false);
if (active_pchan->parent) {
// For child, show parent local regardlesss if "local location" is on for parent bone.
// 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->bone->arm_mat));
return;
}
// if root, and "Local Location", isn't set local transform of armature object.
// if root, and "Local Location" isn't set, use local transform of armature object.
if (active_pchan->bone->flag & BONE_NO_LOCAL_LOCATION) {
transform_orientations_create_from_axis(r_mat, UNPACK3(ob->object_to_world));
return;
}
// if root or child bone has "Local Location", is set, use bone local.
// if root or child bone has "Local Location" set, use bone local.
ED_getTransformOrientationMatrix(scene, view_layer, v3d, ob, obedit, pivot_point, r_mat);
return;
}