How to use with TexturePacker Pro?

The docs specifically mention TPP as an option but there doesn’t seem to be any method to use an atlas with Spine itself. Is this possible?

As it is, I’m assuming anyone using it right now is using this workflow:

  1. Use the raw images in Spine

  2. Export animation json

  3. Load the raw images into Texture Packer Pro

  4. Export once as Corona SDK (lua)

  5. Export once as Libgdx (.txt)

  6. Rename the .txt as .atlas?

Presumably then there is some code function (hard to say; the documentation is all JS only) for making Spine understand that the image uses an atlas?

Hi
 
You will need to overwrite the skeleton:createImage() function. This function takes the attachment that it needs the image for as an argument and you can use the attachments “name” field to find an image in your imageSheet.

Here is the workflow we use:

  1. Use image.png to set up spine character.

  2. Export spine json

  3. Use Texture Packer to export imageSheets of character images. (Make sure they are in the same folders as they are in the spine project.*)

  4. Use imageSheet in the skeletons createImage function to return an image.

* The attachment.name is the path it has in the spine project under “images” I think.

I don’t have easy access to my work right now so some of this might be a little off. I hope it helps some at least.

Alright, that makes sense, I think. I can make those edits once I can get an actual working character…

Hi
 
You will need to overwrite the skeleton:createImage() function. This function takes the attachment that it needs the image for as an argument and you can use the attachments “name” field to find an image in your imageSheet.

Here is the workflow we use:

  1. Use image.png to set up spine character.

  2. Export spine json

  3. Use Texture Packer to export imageSheets of character images. (Make sure they are in the same folders as they are in the spine project.*)

  4. Use imageSheet in the skeletons createImage function to return an image.

* The attachment.name is the path it has in the spine project under “images” I think.

I don’t have easy access to my work right now so some of this might be a little off. I hope it helps some at least.

Alright, that makes sense, I think. I can make those edits once I can get an actual working character…