/Engine/Source/Runtime/Engine/Classes/Components/SkinnedMeshComponent.h
First this function gets rotation of current, and rotation of ref pose in local space, and And gets twist/swing angle value from refpose aligned.
true if succeed. False otherwise. Often due to incorrect bone name.
bool GetTwistAndSwingAngleOfDeltaRotationFromRefPose ( [FName](API\Runtime\Core\UObject\FName) BoneName, float & OutTwistAngle, float & OutSwingAngle ) const