• Bugs
  • Error reading animation

Our project are looking forward to update spine to 4.0. And I trying to export all data by using command line. Besides, I use json data which was 3.8.99 version as import data.

Here was the problem, program shutdown when reading some import data.
This was what I testing :

Spine -u 4.0.18 -i H:\spineC\wwww\test3.8-from-4.0.17.json

And here is the json data format:

My original json data have checked nonessential data, and I am using windows cmd.
Sorry for the pool English. Hope to solve this problem, very appreciate!!

Related Discussions
...

You can only import data into the same version that exported it. If you use 4.0.19 (or 4.0.xx for the latest 4.0) you'll get a slightly better error message.

You'll need to run Spine twice. I believe what you want is the following:

First, use 3.8.99 to import the 3.8 data into a Spine project file:

Spine -u 3.8.99 -i H:\spineC\wwww\skeleton-3.8.json -o H:\spineC\wwww\skeleton.spine 

---

import

Next, use 4.0 to export 4.0 data:

Spine -u 4.0.xx -i H:\spineC\wwww\skeleton.spine -o H:\spineC\wwww\exports 

---

export json

This uses the special `


export json` parameter, which exports using default JSON settings. Alternatively, you can specify an export settings file, see:
Command line interface - Spine User Guide: Export

Keep your project file somewhere safe so you don't need to repeat the first step in the future! Using the project file you can easily export a new JSON or binary data file, as shown in the second step above. For example, when you want to move to 4.1, you would just do:

Spine -u 4.1.xx -i H:\spineC\wwww\skeleton.spine -o H:\spineC\wwww\exports 

---

export json

Lastly, note that the input (-i) parameter for `


export` can be a folder. If you have all your project files in the same folder, you can export them all at once:

Spine -u 4.0.xx -i H:\spineC\wwww -o H:\spineC\wwww\exports 

---

export json

Otherwise you can specify multiple exports with one Spine invocation:

Spine -u 4.1.xx -i H:\spineC\wwww\skeleton1.spine -o H:\spineC\wwww\exports 

---

export json -i H:\spineC\wwww\skeleton2.spine -o H:\spineC\wwww\exports 

---

export json

Thanks for the reply! It's very helpful.

Now I face another question about export.

Nate a écrit

Lastly, note that the input (-i) parameter for `


export` can be a folder. If you have all your project files in the same folder, you can export them all at once:

Spine -u 4.0.xx -i H:\spineC\wwww -o H:\spineC\wwww\exports 

---

export json

I try to import by a folder but failed. :tear:

Oops, I mispoke, sorry! It's `


import/-rthat can be a path to a folder. We'll make


export/-e` support a folder path in the future.

Thanks!
Now everything is okay. I'll keep on updating.