• Editor
  • Error while exporting projects through Spine CLI

Hello,

After some pressure from our art team, we've decided to upgrade our Spine Runtimes to version 4.1.
That required them to re-export all of the spines (1000+ projects) that were created in the previous version that our team was using (3.7.something).
And as it happens, a lot of the older project files (.spine) are missing, with the exports files (.JSON) being the only way for our artists to open such projects.
While going through the documentation, I came across this article, that recommended using Spine's CLI to automate most of the job.

Spine -u 3.7.xx -i input.json -o project.spine --import
Spine -u 4.1.xx -i project.spine -o path/to/exports --export json

The first part of the job runs fine, as we were able to re-create all of the project files that were missing. But when we try to export the JSONs to the newer version, all of the files present the same error:

One of our artists was able to open the .spine project and enable an animation. Then we were surprised by a second error:

This is the export.json that we used:
{
"class": "export-json",
"name": "JSON",
"open": false,
"extension": ".json",
"format": "JSON",
"prettyPrint": false,
"nonessential": true,
"cleanUp": false,
"packAtlas": null,
"packSource": "attachments",
"packTarget": "perskeleton",
"warnings": true
}

Are we missing something? If our art team opens the projects generated by the script they are able to export them in the newer version of the editor, but that's really not an option with the number of projects that we currently have.

Related Discussions
...

Both "Skeleton has no animation active" and "Skeleton has absolute audio path" happens because you are using --clean-examples. That is for our example projects, where those cases are an error that needs to be fixed manually. You probably don't want to use --clean-examples. We'll change the errors so it's clear they happened due to --clean-examples.

We have recently created some scripts that you may find useful:
EsotericSoftware/spine-scriptstree/master/export

    Nate
    Oooh, that makes sense.
    We removed the --clean-examples and everything worked out correctly this time.

    I will also check out the scripts you pointed.

    Thank you very much for the help!