• Editor
  • Upgrade spine skeleton to 4.1

Related Discussions
...

I just upgraded to 4.1 and re-exported all my skeletons using the cli with the 4.1 version.
This worked like a charm, but now I am facing another "problem" every time I try to manually export a skeleton from the editor itself it always tries to use 4.0.

Is there a command line option so I can upgrade all my files to use 4.1 instead of doing this manually for each file?

Please make sure you select 4.1 when exporting JSON:

Image removed due to the lack of support for HTTPS. | Show Anyway

Note that you should almost always be using binary export. It's smaller and faster to load. The only reason to use JSON is if you need to read the data yourself or process it with other tools.

Nate wrote

Please make sure you select 4.1 when exporting JSON:

Sorry if I wasn't clear enough the first time - this is the settings I am talking about, but it seems to be on a per spine file setting. My question was if there is an automatic way (cli or something) to move all of the files to use the new version, instead of manually to remember to do it every time I open a "non-modified" skeleton (and to spend time debugging what is going on, when I forget to do so).

Nate wrote

Note that you should almost always be using binary export. It's smaller and faster to load. The only reason to use JSON is if you need to read the data yourself or process it with other tools.

While that might be true, I prefer the JSON as I can review (at least partially) the changes when doing "git diff" and similar, so I can know if there is an unexpected modification (it has already happened a few times that I have moved some bones completely in the wrong place, and didn't noticed it in the editor, but have seen it in the diff).

On the same note would it be necessary to migrate the skeleton to 4.2 (when the times come) if I am using binary and everything is already exported as a binary?

Ah, I see. Exporting for an older version should be a conscious choice and is rarely needed every time a project is export. We should keep the setting if export settings are loaded from a file, but set it to the latest when Spine remembers the last export settings.

Regarding JSON exports, that makes some sense. I don't usually commit exported files, only project files, unless the exports change rarely. Even then I commit binary.

Any time you change the major.minor version of the Spine Runtimes you should re-export from that version. The runtimes don't attempt to load older data, which reduces the runtimes' complexity. Instead that compatibility is done by the editor. If older data does load without side effects, as in the case sometimes with JSON but almost never with binary, it is by coincidence only and isn't officially supported.

Something does not feel right here.
I just found out there are two different behaviors and cannot find a correlation between them.
Some of my skeletons want to export themselves with 4.1 version and some with 4.0 version.
And there are some other small differences from what I believe to have been the settings previously.

I have sent an email with two of the files that a difference was noticed, so you could check why is it behaving like this.

19 dana kasnije

Thanks for the files, and sorry for the long delay. We've had hurricane Fiona and a number of other things going on.

In 4.1.10 the UI no longer remembers the JSON export version from the last export. This prevents the version from getting set once and then never updating to the latest version. Users should not be using this setting very often, so needing to set it manually should be acceptable. Note the version is still set from an export settings file when choosing such a file or when doing a CLI export, just it is not set in the UI when loading the last used export settings.

You mentioned one project file should use an atlas scale of 0.2 and the other 1.0. I assume you meant the texture packer settings when doing JSON export? We looked in both project files and the texture packer scale for both was stored as 0.2. From what we can tell, it is working correctly and loading the values stored in the project files.

It may be there is a bug that caused the wrong scale value to be saved in your project. If you do an export with 1.0 then save the project, it will store that scale in the project. If you can then find a way that the scale gets set to 0.2 when it should not, then we would be very happy to fix it!

Nate wrote

Thanks for the files, and sorry for the long delay. We've had hurricane Fiona and a number of other things going on.

No problems. I hope everyone is all right.

Nate wrote

In 4.1.10 the UI no longer remembers the JSON export version from the last export. This prevents the version from getting set once and then never updating to the latest version. Users should not be using this setting very often, so needing to set it manually should be acceptable. Note the version is still set from an export settings file when choosing such a file or when doing a CLI export, just it is not set in the UI when loading the last used export settings.

Thanks, I believe that would be perfect for most of us (and I hope everyone is pinning the proper version of the editor so it would not cause you any troubles)

Nate wrote

You mentioned one project file should use an atlas scale of 0.2 and the other 1.0. I assume you meant the texture packer settings when doing JSON export? We looked in both project files and the texture packer scale for both was stored as 0.2. From what we can tell, it is working correctly and loading the values stored in the project files.

It may be there is a bug that caused the wrong scale value to be saved in your project. If you do an export with 1.0 then save the project, it will store that scale in the project. If you can then find a way that the scale gets set to 0.2 when it should not, then we would be very happy to fix it!

That's right. The scale for the texture packer should be 1.0. With emphasizes on "should" as in "it is supposed to be". This does not mean I have not managed to screw it somehow. I just noticed that my export changed from 2048x1024 down to 512x128. It is highly possible that I have not saved the proper settings after changing it to 1.0. Let's assume this is the case and there is no bug. I'll monitor the export sizes, but as I have only 2 or 3 skeletons that I export at 1.0 (everything else being 0.2) and this was the only one having 0.2, I am pretty confident the issue is on my side.