xSaber

it very time consuming go through 1 by 1, thank for your help. i wish to be able to open my sprites in latest version please.
my license: professional
xSaber
  • 전체글: 12

Nate

Adding your post from a different thread:
xSaber 작성:spine -u 3.7.94 -i old-data.skel -o new-project.spine --import

how to support batch?

spine -u 3.7.94 -i *.skel -o what to type here?.spine --import eg
spine -u 3.7.94 -i *.skel -o new-project.spine --import <-- will not work because it will keep overwriting project.spine

---

maybe *.skel wont work either, how to use this for batch files?
What OS are you using? Writing scripts is different on Windows/Mac/Linux. You write a batch (Windows) or shell (Mac/Linux) script that runs a command for each file.

You can see examples here for Mac/Linux:
https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/examples/export/export.sh
That can also be run on Windows if you install Cygwin.

Here is a user's project that may help you on Windows:
https://github.com/vhristov/spine-exporter

For your question about:
spine -u 3.7.94 -i *.skel -o new-project.spine --import
You can't use asterisk (*) here. In newer Spine versions you can specify a folder and Spine will import each file in the folder. I think 3.6 is too old for that, so you need to specify a single file. Eg:
spine -u 3.7.94 -i your-skeleton.skel -o new-project.spine --import
You can do that many times in one run of Spine, and you can use -r instead of --import:
spine -u 3.7.94 -i skeleton1.skel -o new-project.spine -r -i skeleton2.skel -o new-project.spine -r
You can write a script like the links above to build the command to run so you can easily process many files.

When the project file already exists, the imported skeleton is added to it. You may want a project file with many skeletons, or a project file for each skeleton, up to you.
사용자 아바타
Nate

Nate
  • 전체글: 11386

xSaber

how to create this file?
xSaber
  • 전체글: 12

Nate

xSaber 작성:but if this work maybe i can make python script, parse all .skel files, then make it paste this line for me
Sure, python would be good too. Whatever you are most comfortable with.
xSaber 작성:also yes i want 1 skeleton 1 project, what is the way to do that? me on windows
As I said, if the project file exists from a previous import, subsequent imports will add the skeleton to the existing project file.
xSaber 작성:that link you sent (https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/examples/export/export.sh) i have a hard time understanding it, if i installed cygwin, would it be simple to use it to export all my projects with 1 skeleton each in json?
Cygwin lets you run bash scripts on Windows. Is it simple? If you are not used to it, probably not. Bash and Windows batch scripts are a bit painful. Python may be easier if you are familiar with it.

Note the export script I linked exports many project files, which can be useful, but it's very similar to running Spine to import for many data files.
xSaber 작성:and note my version for sprites is 3.8 but yes i have afew on 3.7 but do 3.8 support it ?
I'm not sure what you are asking? I believe you can import with the CLI using 3.6+, though I don't remember the exact version that was added. Once you have created project files, you should keep them so you never need to do such imports again.

You then probably want to have a script that exports all your projects. That way you can work on your projects and when you go to build your game, export them all so you are your game has the latest data.

If you move to a newer version of Spine, you can just run your export script with the newer version -- easy!

---

xSaber 작성: how to create this file? https://i.imgur.com/2UtCdCh.png
It's just a text file. To run a .sh text file with Cygwin, open the Cygwin shell (or put the Cygwin bin folder on your path, reboot, and use Window's command.com) and then from a command prompt:
sh your-file.sh
사용자 아바타
Nate

Nate
  • 전체글: 11386

xSaber

import glob, os

i = 0
y = 1

os.chdir("../")
with open('Exported.txt', 'w') as f:
f.write('\n')
y = y + 1
xSaber
  • 전체글: 12

Nate

Cool, thanks for sharing!

You can use -Xmx1234m where 1234 is the number of megabytes to use for Spine's maximum memory usage. The default is 2048.

It is likely a bug in the older version of Spine. 4.0 should be able to handle any number of projects in one go, as it frees the memory between each project.
사용자 아바타
Nate

Nate
  • 전체글: 11386

xSaber

Nate 작성:Cool, thanks for sharing!

You can use -Xmx1234m where 1234 is the number of megabytes to use for Spine's maximum memory usage. The default is 2048.

It is likely a bug in the older version of Spine. 4.0 should be able to handle any number of projects in one go, as it frees the memory between each project.
where in the command do i enter that parameter
xSaber
  • 전체글: 12

Nate

Anywhere is fine, eg:
spine -Xmx4096m -u 3.7.94 ...
사용자 아바타
Nate

Nate
  • 전체글: 11386

xSaber

thanks
xSaber
  • 전체글: 12


다시 돌아감: Editor