Use our new shell scripts to export all your projects at once! The scripts search for .spine project files and export each project found. Each project can use different export settings by placing an export settings file next to the project file.
Using a script to export has many advantages:
Export any number of project files all at once.
Your exports always use the correct settings. No need to rely on animators to use the right settings each time.
Your software's build process can run the export scripts, ensuring every build always has the latest exports. Animators don't need to remember to perform exports after every change to the project files.
When updating to a newer Spine version, all your projects must be exported again. When you have export scripts setup, this is very easy!
When you open the script with a text editor you'll find a Customization Section at the top. Here is an excerpt from spine-export.bat (spine-export.sh is very similar):
The first three settings should be reviewed before running the script:
SPINE_EXE The path to the Spine executable file. If Spine cannot be found here, the script will look in other common installation locations.
VERSION The version of the Spine editor that to use for performing the exports. Keeping your Spine editor and runtime versions that same is very important.
DEFAULT_EXPORT The script looks for an export settings JSON file in the same folder as the Spine project. If that is not found, the export settings specified here are used. There are 4 shortcuts for common default settings: json, json+pack, binary, or binary+pack. Alternatively, you can specify a path to an export settings file (see below for more about that).
On macOS or Linux, before running spine-export.sh you must first grant it the execute permission. Open Terminal, navigate to the directory where the script is located, then grant execute permission with this command:
To run the script, specify ./spine-export.sh and the path to the directory containing the Spine projects you wish to export. For example:
To export a Spine project with different settings, prepare an .export.json file with the settings and save it in the same folder as the Spine project. For example, the filesystem hierarchy could look like this:
To export a project multiple times with different export settings, prepare and include that many .export.json files. For example, to export the skeleton data both in binary format and as a PNG sequence, your filesystem hierarchy could look like this:
You are welcome to write your own scripts using Spine's command line interface or modify our scripts to meet your needs. We have written comments in the script to describe everything it does and the README file goes into greater detail about how it works.
Have you found this tutorial helpful? We would love to hear your feedback in the Spine forum!
We are happy to share a new Spine Tips tutorial video! This time we will make an FK arm setup with an IK constraint to mimic the muscle contraction. We will use a few tools and techniques that are the basis for any character setup in Spine. The result is a simple and fast setup that can add a subtle lifelike quality to our rigs, without complicating the animation process.
Try to follow along and create the skeleton yourself using the project files found in the video's description.
Whether you are new to Spine or looking to improve your skills, you should find some valuable tips here. Stop by the Spine forum and discuss your setups and different ways to automate your characters!