I'm first time use spine command line, is it must use a json file when convert? I got a lots of .skel .atlas and .png file from older version and i'm now tring to convert it together to new version. i tried 'spine -i old.skel -o new.skel' but recive 'ERROR: Input and output specified without export, import, or pack.'. How should I use it? If i do this in GUI, I need first upack the png with higher version of spine which have texture unpacker feature, second downgrade to old version of spine and import data and set scale,third save as spine project and back to new version, last open the project then export and pack texture. Is such a big work to do like this for so many project.
Some question about spine command line
- Edited
If you only specify input and output files, Spine doesn't know what you want to do (export, import, pack, etc). The export settings JSON tells Spine what kind of export you want and what settings to use. If you are doing import (-r
/--import
) then you don't need an export settings JSON file. Also, it doesn't make sense to specify -i old.skel -o new.skel
, probably you want the output to be a .spine
file. If you want to convert from .skel
to .spine
use:
spine -i input.skel -o output.spine --import
You can use -r
instead of --import
(does the same). You can import multiple skeletons into the same .spine
file. You can do multiple imports with one run of Spine, eg:
spine -i input1.skel -o output1.spine --import -i input2.skel -o output2.spine --import -i input3.skel -o output3.spine
Note older versions of Spine may not support importing into a .spine
file via the command line. In that case you'd need to use the GUI, some shortcuts for that are explained here:
How to automate version migration of binary assets?
Unpacking your atlas files to individual PNG files can be done separately from converting your .skel
files to .spine.
files.
Once you have your .spine
files and image files organized, you can use the command line to export them all. In the future, keep the .spine
files and individual images, then when you need to export them all with a newer version of Spine it will be very easy!
Nate wroteIf you only specify input and output files, Spine doesn't know what you want to do (export, import, pack, etc). The export settings JSON tells Spine what kind of export you want and what settings to use. If you are doing import (
-r
/`
import
) then you don't need an export settings JSON file. Also, it doesn't make sense to specify
-i old.skel -o new.skel, probably you want the output to be a
.spinefile. If you want to convert from
.skelto
.spine` use:spine -i input.skel -o output.spine --- import
You can use
-r
instead of `
import
(does the same). You can import multiple skeletons into the same
.spine` file. You can do multiple imports with one run of Spine, eg:spine -i input1.skel -o output1.spine --- import -i input2.skel -o output2.spine --- import -i input3.skel -o output3.spine
Note older versions of Spine may not support importing into a
.spine
file via the command line. In that case you'd need to use the GUI, some shortcuts for that are explained here:
How to automate version migration of binary assets?Unpacking your atlas files to individual PNG files can be done separately from converting your
.skel
files to.spine.
files.Once you have your
.spine
files and image files organized, you can use the command line to export them all. In the future, keep the.spine
files and individual images, then when you need to export them all with a newer version of Spine it will be very easy!
Thanks, I tried and got the same with that post. It only open the spine UI and did nothing. Is true that spine 3.2 not support convert .skel to .spine with CLI. In this situation I can only do this with UI manuly one by one right?
Yes, I'm afraid 3.2 is too old, from before we added importing JSON/binary data into a project from the command line.
Nate wroteYes, I'm afraid 3.2 is too old, from before we added importing JSON/binary data into a project from the command line.
OK,thanks. I‘ll think about other way to deal with that.
Sorry, wish I had a better answer for you at this time. The tips (drag and drop) from that thread I linked help a bit when using the UI. It's still a bit tedious, but at least it's a one time thing. Using data import is not a workflow we suggest (please keep your .spine
files!) but I understand it happens. We have plans to reduce this pain in the future by supporting importing data from older versions. This is a ways off though, as we have some really big and really great improvements in the works that we need to get released. Likely we'll do our next big release, then after that stabilizes we'll do a "quality of life" update to address this and a number of other workflow snags. Having good workflows is super important!