Get all socket names returning all sockets and bones?

I am trying to find and easy was of finding how many sockets a character has to avoid having to hard code it for each one. Is this the way this node is meant to work? Returning all bones and sockets? Is there another node that can return only sockets?

As an example for my issue one of my skeletons has 4 bones and two sockets and using the “Get all socket names” node and printing the length a 6 is returned.

Cheers for any help.

Bones can be used as sockets for such functions as Attach to Component, etc., so they are returned by Get All Socket Names too.

What you can do, from the top of my head, is just sort them be name and save only genuine sockets into a separate array and use that array thereafter. Something like this:

2 Likes