- Düzenlendi
Merging two spine files into one
Hello Spine team! Is there any way to merge two spine files into one - to keep skins and animations from both files? I'm working on a big project and I need a support from my other colleague (and we don't have much time left ofc). The thing is that my spine project is quite complicated - it has two skeletons (for male and female), many different skins, meshed and linked graphics and lot of animations. We need to plan our work to make me and him able to add new skins and animations simultaneously and then somehow export it to our dev and see merged effect with all skins and animations. If there is no such thing implemented in the latest spine version - is there any other way to achieve it? We haven't found any working solution on the web
Not completely.
You can use import project to bring skeletons into the same project. You can drag some things across skeletons, like bones, slots, and attachments, but not everything. Moving something across skeletons is actually very complex under the covers, as there are many dependencies and corner cases to handle.
You can also use import project to bring an animation from a project to an existing skeleton, but many requirements must be met: the skeletons must have the same bones, slots, etc as described in the docs. This is ideal when you have a master project with the skeleton set up and you want to have multiple people create animations (but not bones, slots, etc).
One solution could be to export to JSON, then merge the JSON as you need. You'd probably want to write a tool to do the merging. FWIW, the JsonRollback tool shows one way to manipulate JSON data using libgdx (or JsonBeans). There are also many other JSON libraries. The important part is that the end result makes sense to Spine and the Spine Runtimes. Eg, if you have an animation that shows/hides attachments for a slot, you have to make sure that the skeleton has the slot and attachments. It's not a simple problem, but if you focus on just what you need, it may be worth the effort for you to build such a tool.
Otherwise you might consider a simpler approach, eg split your 2 skeleton project into separate projects with 1 skeleton each.
Ok, thank you Nate!