Spine Batch Export command line export

Source: Internet
Author: User


1. Preparatory work and introduction


Time is a little tense, write not very detailed, please forgive me.



The current version is more than 2.2, purchased version. Trial Version cannot be tried command line



Both Spine and the Spine launcher must is 2.1.00 or higher to perform command line export. To update the Spine launcher, download and reinstall Spine.



Set the spine installation directory to the system environment variable (my Computer, right-click, properties, advanced system Properties, environment variables, system variables added in path) \



After the configuration is successful, you can enter spine-h on the cmd command line to export help. As below:


Editor:
-h, --help       Print this help message and exit.
-v, --version    Print version information and exit.
-l, --logout     Logout, removing activation code.
-k, --keys       Enable hotkey popups by default.
-n, --notimeout  Disable timeout when checking for and downloading updates.
-x, --proxy      Proxy server to use when checking for and downloading updates.
-s, --scale      Experimental: UI scale, default is 1.0.
project.spine    Path to Spine project file to open.

Export:
-i, --input   Path to Spine project file, overrides export settings JSON.
-o, --output  Path to write export file(s), overrides export settings JSON.
-e, --export  Path to export settings JSON file.

Pack:
-i, --input   Path to folder of images to be packed.
-o, --output  Path to write texture atlas files.
-p, --pack    Texture atlas name or path to pack settings JSON file.

Examples:
Spine --export /path/to/export.json
Spine --export "/path/with spaces/to/export.json"
Spine --input /path/to/project.spine --output /path/to/output/
      --export /path/to/export.json
Spine -i /path/to/project.spine -o /path/to/output/ -e /path/to/export.json
Spine -e /path/to/export1.json -e /path/to/export2.json
Spine -i /path/to/images/ -o /path/to/output/ --pack /path/to/pack.json
Spine -i /path/to/images/ -o /path/to/output/ -p /path/to/pack.json
Spine -i /path/to/project1.spine -o /path/to/output/ -e /path/to/export1.json
      -i /path/to/project2.spine -e /path/to/export2.json -i /path/to/images/
      -o /path/to/output/ -p /path/to/pack.json


-I need to export the Xx.spine path



-O Export Path



-E Set JSON note: We can set in spine software, spine->export, and then click Save to save a JSON file, which is the file you need to export. I have a name for Spinesetting.json here.


-I spine path-o export path-e Setting.json path
In the tool, according to our requirements after the setup is complete, and then click Save, Save a JSON file, is the JSON file we need 


The other is-i-o-p


-P Texture Atlas name or path to pack settings JSON file.
2. Using bat, Bulk operations


Here is a bat command I wrote. Copy it, then create a new test.bat, copy it, and then modify it. BAT command I am not familiar with, please forgive me ...

@echo off
set DIR =% ~ dp0

echo-cleanup
if exist "% DIR% SpineExport" rmdir / s / q "% DIR% SpineExport"
mkdir "% DIR% SpineExport"

echo -spineExport
for / f "delims =" %% i in ('dir / b / ad / s% DIR% SpineSource \ *. spine') do Spine -i %% i -o "% DIR% SpineExport" -e "% DIR % spinesetting.json "
echo -exportEnd
pause
set DIR =% ~ dp0: set the DIR variable to the current absolute path
for / f "delims =" %% i in (‘dir / b / a-d / s% DIR% SpineSource \ *. spine’): Iterates through the .spine type files under the folder and subfolders, and executes the export command.


Official website document http://en.esotericsoftware.com/spine-export



Spine Batch Export command line export


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.