• Tutorials
  • [Request] Scripting using Spine's CLI

Hello,

I am new to scripting and am looking for a tutorial on how to get started with using Spine's CLI. I want to use Spine's CLI primarily to speed up my export process; I am exclusively exporting using the json exporter.

I currently have a project with 10 skeletons in them. I want to run Spine's CLI to export them in a way where it creates a folder for each of the skeleton before dumping the output into these folders.

I understand basic functions of the command lines available to spine (such as the syntax Spine [-i <path>] [-m] [-o <path>] -e <path>), but I am unsure where to even input these command lines. I understand that we have to run our computer's command prompt, but I am unsure what to do from there. I think the next step is to define an input and output path, but I am unsure how to do that.

Let me know if you can help

  • Kel likes this.
Related Discussions
...
  • تم التحرير

It sounds like you need to first understand using the command line to run programs, then how to apply that to Spine.

Trying opening a command line and running Spine from there. From the command line enter the path to Spine.com, press enter: the Spine UI should appear and you'll see the Spine log at the command line.

Next, close that and run Spine again, this time like:

C:\path\to\Spine.com 

---

input C:\path\to\project.spine

Of course replace my paths with your real paths. That is the simplest command, it dumps some information about the project. You can do the same with the "short" parameter -i instead of `


input`:

C:\path\to\Spine.com -i C:\path\to\project.spine

Short parameters always have a single dash and are a single character, while the long parameters are two dashes and can be a whole word. Short parameter are convenient but make the command harder to understand.

Once you can do that, running a JSON export is:

C:\path\to\Spine.com 

---

input C:\path\to\project.spine 

---

output C:\path\to\exports 

---

export C:\path\to\export-settings.json

Once you can do that we can help more with creating folders for your skeletons.