set Parent Socket with python

Hey there,

Is it possible to change the Parent Socket in a Static Mesh Component inside a Blueprint Class using a Python script?

I’m making a script that parents a bunch of nanite meshes onto bones of a Skeletal Mesh. I want to do it in a Blueprint Class so that I end up with one blueprint actor that I can place around in my scene.

I figured out how to spawn all the objects in the scene and then attach the objects to a bone with the “attach_to_actor” function, but this leaves a messy outliner, especially when many objects are attached. And since the SkeletalMeshComponent contains all the animation and the position of the parented meshes, I only want to deal with that actor.

image

Once the Static Mesh Component is created and parented under the Skeletal Mesh Component I can easily change all the other parameters in the unreal.StaticMeshComponent, but I cant find a way to set the “Parent Socket”.

Any help would be highly appreciated!

Hi, Havard. Did you get this?
I’m totaly frustrated with this…
It seems that there are no ways to get this…

I have been searching for a couple days for this answer. This is one of the last pieces I need to dynamically build characters in the editor using Python.

I have a NiagaraComponent that I want to attach to a skeletal mesh socket in the blueprint.

Can anyone please explain how to do this with Python. I can’t find a single function that will pair a Niagara component to a skeletal mesh socket with a blueprint. Everything is setup to attach actors to sockets in the world not from within a blueprint.

Unfortunately I newer found the solution.

how can you solve it?