So, I'm writing a game that two parts of the character needs to be in a different skeleton to be animated differently during runtime.
For example, the arms has to be separated from the body, in a different skeleton, so the arm can be animated separately. If the character reloads the weapon, the arms starts the reloading animation, but the body doesn't. So when the character jumps, and starts reloading in the air, the body can continue its jumping animation, but the arm can starts its reloading animation independently.
The programming of this section is already done. Every frame, the arm skeleton is translated to the same position of the "arm_root" bone of the body skeleton.
The problem is, the arm needs to be animated within its parent inside Spine. Because I have to make sure it is synchronized with the body, and to make sure that the whole animation is consistent.
What do I do EVERYTIME I want to create or edit an animation?
- I have a Skeleton named "All", which has all the bones.
- I animate everything inside the "All" skeleton.
- When I'm done creating the animation, I duplicate the "All" skeleton twice.
- The first copy I rename to "Body"
- The second copy I rename to "Arms".
- Enter the "Body" skeleton and remove the "Arms" bone.
- Enter the "Arms" skeleton, move the "arms" bone inside the root bone and delete everything else.
- Translate the "arms" bone to local {x:0, y:0}
- Delete the "All" skeleton (so it can't be exported)
- Export normally ("Body" and "Arms" skeletons)
- Ctrl+z to recover "All" skeleton
- Delete both "Body" and "Arms" skeletons
This process of duplicating, renaming correctly, moving the bones and translating everything is the SAME PROCESS ALWAYS, and it takes about 4 minutes to do. Since I do it about 30 times a day for testing purposes, it takes about 2 hours per day just to manually do all these things, which is very time consuming.
Okay, now that I explained my problem, I wanted to ask if there is a way to make custom export scripts to make this process, which is basically:
- Duplicate a skeleton
- Rename a skeleton.
- Move bones inside the hierarchy
- Delete bones
- Translate bones
- Export normally
- Delete a skeleton
Anyway, your application is the best for animation. I'm using it for about two years and I'm LOVING it.
Thanks.