The .spine file is binary for efficiency, small file size, and version compatibility, so it's not really feasible to edit.
It is perfectly reasonable to export to JSON, make modifications, and import back into Spine to get a .spine file again. It is true you will loose some minor information, but if Nonessential data
is checked when exporting to JSON, you won't lose anything that will break your project when reimported. We have a list somewhere, but I think it's bone icons that will be lost and maybe a few other minor things. We can get those fixed in 4.1.
Processing the JSON file can be relatively easy or somewhat difficult, mostly depending on what tools you use to parse/modify it. Our JsonRollback tool does that to convert JSON to older versions. It uses Java and libgdx and the code looks like this:
https://github.com/EsotericSoftware/spine-runtimes/blob/3.8/spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/JsonRollback.java
You could base your processing tool on this, or you may find it more productive to use whatever development tools you are most familiar with.
Note you can turn your JSON file into a Spine file using Spine's CLI with `
import(or
-r`). Eg:
spine -i /path/to/modified.json -o /path/to/project.spine
---
import
-r
is the same as `
import. You can also do multiple with one Spine execution, eg:
[code]
spine -i /path/to/modified1.json -o /path/to/project1.spine -r -i /path/to/modified2.json -o /path/to/project2.spine -r
[/code]
After the
importor
-r` parameter, you can specify a name for the skeleton, eg:
spine -i /path/to/modified.json -o /path/to/project.spine -r monster
You could also use the CLI to export to JSON, run your tool, then use the CLI again to turn the JSON back into a .spine file.