pacabi

Hello! I would like to convert my old json spine 2.1.27 files to a newer version of spine. Is there any place where I can find deprecated documentation for old versions of spine? To be more precise I'm searching for the json documentation for spine 2.1.27 files. Any help would be highly appreciated :)
pacabi
  • Posts: 2

Mario

You can still run Spine Editor version 2.1.27, import your .json file, then save the .spine project. Next, start a newer Spine Editor version an open the .spine project you just saved. Fix up a few things (flip x/y doesn't exist anymore for example), save, and export a new .json file. That is a much less error prone workflow than trying to convert the old .json files to new .json files, which is usually not possible automatically.
User avatar
Mario

Mario
  • Posts: 3089

pacabi

Thank you so much for that solution. But I'm trying to work on a script that will convert the json spine files from one version to the new one. Your solution probably would require a lot of manual work, that it's not ideal for me. I'm working with a lot of files.
So if I have the old documentation it would be supper useful. Is the flipX/Y the only breaking change between versions?
pacabi
  • Posts: 2

Nate

You can try to do the inverse of JsonRollback.java:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.1-beta/spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/JsonRollback.java
It will be very difficult in some cases, for example to go from 3.8 to 4.0+.

The right way to do it is to use Spine as Mario described. You can use Spine's CLI to automate some of the work. Old versions of Spine don't have import from the command line, so you will have to manually import the data into the Spine editor and save a project file. Once you have that, you can write a script that uses Spine's CLI to export with any version of Spine.
User avatar
Nate

Nate
  • Posts: 11943


Return to Runtimes