is possible to add socket to skeletal mesh using python ?

in unreal.StaticMesh has method to add socket to static mesh

and I don’t found any method to add socket to skeletal mesh.

is somebody know how to add socket to skeletal mesh using python ??

The cpp USkeletalMesh doesn’t have any method for adding sockets either, it seem to be done in FEditableSkeleton

https://docs.unrealengine.com/en-US/…esh/index.html


USkeletalMeshSocket* FEditableSkeleton::AddSocket(const FName& InBoneName)
{
  USkeletalMeshSocket* NewSocket = HandleAddSocket(InBoneName);
  OnTreeRefresh.Broadcast();
  return NewSocket;
}

USkeletalMeshSocket* FEditableSkeleton::HandleAddSocket(const FName& InBoneName)
{
  const FScopedTransaction Transaction(LOCTEXT("AddSocket", "Add Socket to Skeleton"));
  Skeleton->Modify();

  USkeletalMeshSocket* NewSocket = NewObject<USkeletalMeshSocket>(Skeleton);
  check(NewSocket);

  NewSocket->BoneName = InBoneName;
  FString SocketName = NewSocket->BoneName.ToString() + LOCTEXT("SocketPostfix", "Socket").ToString();
  NewSocket->SocketName = GenerateUniqueSocketName(*SocketName, nullptr);

  Skeleton->Sockets.Add(NewSocket);
  return NewSocket;
}

I assume that add socket method wasn’t implement yet in python for skeletal mesh, i hope next update will be implemented

Hi, Anas Rin
Yeah socket implement for skeletal mesh was removed when the addon switch to Unreal Python API. I need wait the integration in Unreal Python API