• EditorBugs
  • Packing messy image folders

Is texture packer supposed to pack and export only used images in given project file? If there are unused or external media files in the folder or subfolders of project file destination- will they be exported as well?
I’m using your Spine.com script.

Related Discussions
...

There are 2 ways to pack:
https://esotericsoftware.com/spine-texture-packer#Packing

When packing during data export, the Attachments setting only packs used images. Otherwise, all images in the input folder given to the texture packer are packed -- often that is done when packing images for multiple skeletons together in a single atlas.

Ideally you keep your images folders clean, so they don't contain images you don't need. If you have very messy image folders and you are packing the image folders, you could temporarily use Attachments packing, then unpack your atlas to get individual files again so you have only images that are used. You can do that for each skeleton to rebuild your images folders so they only contain images that are actually used. When doing that, don't pack with PMA, else unpacking can have data loss in some cases.

I'm not able to pass

"packSource": "attachments"

to texture pack settings - only to data export.
Exporting, importing and then packing makes 2 extra step.

I'm receiving very messy folder from designers. There could be errors also (duplicated image folders etc.) which can break the packing script.
I think that packing step must processes only used images (if *.spine project file is presented).
You can't rely on clean working directories kept by creators and designers. If there are more than one *.spine project file in same directory, but with different images subfolders (e.g.images, images_2, images_n).

I've split your posts to a new topic, as it does not seem related to the discussion you posted in.

Yes, it is multiple steps to clean up the image folders in the way I described. It's not something you should need to do every time you pack, only to clean up a terrible project. Designers should really keep their projects tidy, else they create work for you.

You're right that data export is the only way to pack Attachments. You can pack Attachments as part of data export, then delete the data.