Skip to content

MannyC/mirror_spine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

spine_mirror

update: it turns out this will invert the bones, so although it will look and animate correctly the bones will be in the wrong position. The fix is to work your way up the bone chain so that you know the orientation of each bone but I'm not willing to rewrite it right now.

Node script to flip a spine file horizontally. Only tested to the "works for me" stage.

Simply inverts all x coordinates and rotation/angle properties

The instructions alter files in place, so run on a backup.

Instructions (linux based, should be easy enough to alter for Windows)

  1. You'll need git, imagemagick and node.
  2. Clone this repository git clone https://github.com/MannyC/mirror_spine.git
  3. In repository directory: npm install
  4. Use Spine to export the json for the file you want to flip
  5. node spine_mirror.js spine_export_file.json > output_file_name.json
  6. To use imagemagick to flip png asset images in place (this will overwrite the original images; change from png as appropriate) *for i in $( ls .png); do convert -flop $i $i; done
  7. If you place the output json file in the same location as your original spine project file then spine should be able to find the now altered images
  8. Open a new project in Spine and import the output json file.

About

Flips a spine json horizontally

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published