You can’t achieve this only in BP, but it’s easy in Cpp : in a library class you just have to add :
library.h
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "LibraryC")
static void GetSocketLocalLocRot(const USkeletalMeshComponent* Mesh, FVector& LocalLocation, FRotator& LocalRotation, FName SocketName);
Library.cpp
void YourLibraryClass::GetSocketLocalLocRot(const USkeletalMeshComponent* Mesh, FVector& LocalLocation, FRotator& LocalRotation, FName SocketName)
{
FTransform LocalTransform = Mesh->GetSocketTransform(SocketName, RTS_Component);
LocalLocation = LocalTransform.GetLocation();
LocalRotation = LocalTransform.Rotator();
}
And you can use it in any blueprint