• Editor
  • Importing skeleton into another, existing skeleton ?

Hello,

Is it possible to import skeleton with bones and frames into another skeleton?
I am thinking about a system where I have skeleton with a spell and characters with different weapons. I would like to share spell animation between characters using their weapons. It would let me keep character textues with their weapons on their own atlases instead to pack all weapons into the skill's atlas and load them all when only one character will use spell.

Does anyone have idea how I could do this? :think:

Have a great day ! 🙂

Related Discussions
...
  • تم التحرير

Hi Wedrownik, you actually can, with some recommendations.

You can first export a json from the project you want to bring into the other. Then import it using import data, and choosing the same skeleton:
Import - Spine User Guide: Data

Image removed due to the lack of support for HTTPS. | Show Anyway

Next you can import the spine file and choose the animations you want to import. (you can use ctrl or shift to select them all at once)
Import - Spine User Guide: Animation

BUT you need to be careful: the bones of both projects need to have unique names that don't overlap across the two skeletons. The same goes for images, slots, etc. or the import may go wrong. The same goes for the animations.

But let's rediscuss this idea first: perhaps you don't need to import the spells for each character, you could simply import them as two separate skeletons in the same project to ease the animation syncing of the effects, but just match their roots at runtime overlapping the vfx on the characters. Otherwise you may be needlessly repeating identical data across all the projects.

Hi Erika !

Thank you for reply. I am working on the 3.7.94 version and thus didn't see this option. Hope we will upgrade project to the newer version asap.

In turn referring to your proposal. You are right about repeating data and in that case I was thinking about this idea to keep weapon textures with the characters (weapon per character in the character's atlas png). My idea was to have one skeleton with a character and character's weapons (one atlas here) and second skeleton with all weapon/skill effects which I keep in the one place.

I am thinking also about skins in the skeleton, with the sub-skeletons, where each skin would be weapon like Skin 1 - dagger, Skin 2 - sword etc. Thank of that I could keep in the one skeleton, several weapons, animation for them and textures could be packed per folder.

Another idea and the most simple, is to make skeleton per weapon.

If you can upgrade to Spine 3.8, definitely do so, especially since we've released skin bones and constraints, which would be just about perfect for your use case: Blog: Spine 3.8 released: Skin bones and constraints

They allow you to have everything in the same skeleton, with only the necessary bones and constraints for the selected skins being calculated at runtime.
This would also make managing your project to edit it and re-export it later much more easier.

3 أشهر لاحقا

Hi Erika !
I've managed to make it work for bones but I was not able to export/import constraints 😢

Am I doing something wrong, is there any way to do it ?

:think: