Technically, it's possible.
Since it's part of the runtime, you should be able to implement findAllChildSlots(
).
Note the following relevant information:
The Skeleton holds the Bones as a list and as a bidirectional tree. Skeleton.bones
and Skeleton.rootBone
. The bones are arranged from parent to child starting from the root bone.
The Bone class/struct has a parent
and a children
field.
Bones aren't aware of their slots. The Bone class/struct doesn't have a slots list.
The Skeleton holds the list of Slots. Skeleton.slots
. This list is arranged according to default draw order.
Slots are aware of their parent bones. The Slot class/struct has a bone
field.
Pseudocode for findAllChildSlots would be
(1) find the parent bone using skeleton.findBone()
(2) prepare a collection for keeping a list of bones.
(3) traverse the bone.children starting from the bone you found, until all its children have no more children, adding each bone to the list.
(4) prepare a collection for keeping a list of slots.
(5) go through all the slots in skeleton.slots
. If the slot.bone exists in your collection of bones, add that slot to the list.
(6) return your collection of slots