From this topic:
How do I know exactly the index of the target bone? I’m using Blender.
You have a getBoneIndexByName(name) method on the skeleton object.
getBoneIndexByName(name)