skarasuko

There are images I use in the Editor as reference, so they should not be exported in the Texture pages. I can place the reference images in a new skeleton if they have no animations, but I also want to preview animations in various contexts and interactions. For example, my character is able to hold different objects or is interacting with animated devices.

Currently, there's no customization when it comes to packing (in 4.0). I would like a way for the Texture Packer to exclude specific folders. Maybe detecting a specific image folder named like "null" and ignoring it during Texture Packing.
skarasuko
  • Messaggi: 120

Nate

You can customize texture packing settings per folder:
Texture packing - Spine User Guide: JSON Configuration

Place a pack.json file (it's just a text file) in the folder you want to not be packed with this content:
{
ignore: true
}
You can also customize other settings of course. One of the most common ones I use is to enable Combine subdirectories only for a particular folder (and all its subdirectories):
{
combineSubdirectories: true
}
Avatar utente
Nate

Nate
  • Messaggi: 11943

skarasuko

I placed the .json file in the folder I want ignored, but it doesn't work for some reason. Is there something else I have to consider, like do I need to use the Texture Packer instead of Export JSON?
skarasuko
  • Messaggi: 120

Misaki

pack.json can also be used for JSON export, but it is useless unless the Image folder is selected in the Pack setting.
Screen Shot 2022-06-29 at 11.48.41.png
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
Avatar utente
Misaki

Misaki
  • Messaggi: 769

skarasuko

I've already set that. So I am simply not sure why it still exported the undesired images in the folder.
skarasuko
  • Messaggi: 120

Misaki

We need to see the actual file to determine the cause. Could you send us the files that can reproduce the problem for us?
Avatar utente
Misaki

Misaki
  • Messaggi: 769

Nate

The pack.json files are not used when using Pack [Attachments]. You either need to choose Image folder or run the texture packer separately from the JSON/binary export.
Avatar utente
Nate

Nate
  • Messaggi: 11943

skarasuko

Misaki ha scritto:We need to see the actual file to determine the cause. Could you send us the files that can reproduce the problem for us?
Uploaded. Image folder has already been toggled, so I just don't know what's wrong. This is in 4.0.64 official, not 4.1 beta.

It might be nice to have a UI in the Editor to mark a folder as ignored and generate a .json automatically (if it works).
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
skarasuko
  • Messaggi: 120

Nate

You've named your file .pack.json. It needs to be pack.json (no leading .).

The UI can be used to save a pack settings JSON file, which can be named pack.json and placed in a folder. There are some settings though, like ignore, that aren't available in the UI.
Avatar utente
Nate

Nate
  • Messaggi: 11943

warmanw

Nate ha scritto:You can customize texture packing settings per folder:
Texture packing - Spine User Guide: JSON Configuration

Place a pack.json file (it's just a text file) in the folder you want to not be packed with this content:
\
ignore: true
}
You can also customize other settings of course. One of the most common ones I use is to enable Combine subdirectories only for a particular folder (and all its subdirectories):
{
combineSubdirectories: true
}
Whaaat? I did not know :D
Avatar utente
warmanw

Kickstarter Backer
  • Messaggi: 334

skarasuko

Nate ha scritto:You've named your file .pack.json. It needs to be pack.json (no leading .).

The UI can be used to save a pack settings JSON file, which can be named pack.json and placed in a folder. There are some settings though, like ignore, that aren't available in the UI.
Oh. I see. I'll simply have to keep this in mind.
skarasuko
  • Messaggi: 120

Nate

warmanw ha scritto:Whaaat? I did not know :D
Yep, it's neat! You can set most texture packing properties per folder. For example you might want to strip whitespace or duplicate padding on some folders, but not others.

Note if you use Combine subdirectories then any pack.json files in those subdirectories won't be used, because the packer will try to place all the images found in the subdirectories in the same atlas page.
Avatar utente
Nate

Nate
  • Messaggi: 11943


Torna a Editor