• Editor
  • Spine asset workflow and paths in JSON files

Hi there guys. We have a problem in our company, as we're creating the animations using your PRO version of the software, I got a few questions about the workflow.

  1. When our designers create animations with image subdirectories (subdirectories for each animation, like ANIM1, is using subdirectory SUB1, and it's contained inside the animation), the JSON animation files are exported with "PATH" properties inside, those properties cause us errors inside spine JavaScript integrations. The errors are like that: „Error: Could not find a texture with ID: "SUBDIRECTORY/ID".

So we told our designers to create a single directory with all the images for all the animations in the project file. Is that a proper way to animate many animations in a single project?

In my opinion, it doesn't matter as the directories are just the way to organize files, so it should not matter if the file has a "subdirectory/some_images" or a global directory for all the images. However, it affects the JSONs, while all your Spine Team examples from Spine PRO have one single directory for images, and then the exported JSONs works ok, so I assume that's they way to organize assets for multiple animations in single project.

What do you think about that? And also, is there any way to get rid of these "path" properties inside exported JSON files?

Many thanks, Jakub.

Related Discussions
...

See here for image paths and how lookup is done:
http://esotericsoftware.com/spine-images

A simple project could put all the images in one folder. A larger project or one with skins probably doesn't want to do that. The subfolders are for organization but they also make the image paths unique. Eg, head/red and chest/red are different paths. If you put all the images in the same folder, you can't have two images with the same name red so you'd need to name them eg head-red and chest-red. You might as well just use folders.

The real question is why are folders causing you problems? Regions in the atlas should be packed using the same root folder, so the head/red path will find the head/red atlas region. If that is not the case, you are either packing the wrong folder or using the flatten paths packing option, which you probably don't want.

As Nate said, the paths in the JSON should never give your problems. What runtime are you using? Can you send us a set of exported files and original Spine project files plus images (contact@esotericsoftware.com).