Good day,
I recently made a custom tool to export my spine projects with, as I wanted to easily export different types of maps (normal, emission, etc.) for the same spine project.
My Spine image folders always follow this structure:
Images
|
---
Color (These are the only files the spine project uses)
|
---
Normals (Unused by spine, but has normal images with the same structure and same dimensioned images like on the Color folder)
|
---
Mask (Similar to Normals)
|
---
etc.
So the short version of what my tool does, is that it removes all pack.json files within my spine images folders and subfolders, and then adds pack.json files as needed, and runs the cmd version of Spine to pack the "Images" folder.
This way, with custom suffixes and other packer settings, I end up with images such as "face.png", "face_normals.png", and so on. And on that regard, it works as expected:
However, I ran into the issue that the files on the NON "Color" folder, are added a number suffix so as to not to overwrite an existing image of the same name. A short example with a test project:
If I run my tool once, this is the whole export:
Now for the sake of making it obvious, I'll set my tool to ignore adding some folders.
This would be a second run with the new configuration:
As you can see, face.png (the image that is generated with the pack.json on the root of "Images", attached below), overwrites its old file appropriately, while the rest keep making new files.
Did I mess up on my setup? Or am I supposed to do run the command for each main subfolder (Normals, Masks, etc.) or something?
This is the pack.json I used on the root of "Images":
pack.json
On the main subfolders (normals, etc.) I just added a pack.json with:
{"combineSubdirectories":true,"scaleSuffix":["_normals"]}
And there are some ignored folders here and there that just have:
{"ignore":true}