Hidden features

Some features are tucked away to keep the interface clean and easy to use. They don’t fit into the UI without adding clutter and are only needed by a small number of users.

Good news: you can still use them by editing your .tps file (it’s a simple XML file) in any text editor.

Important note TexturePacker does not automatically reload the .tps file. After editing, close the window and re-open the file to apply your changes.

Ignoring files and directories

By default, TexturePacker adds all image files it finds in a folder. Sometimes you might want to exclude certain files — for example, .psd files.

Locate the following section in your .tps file:

<key>ignoreFileList</key>
<array/>

This example ignores all files in a folder called test, and all files ending with .psd:

<key>ignoreFileList</key>
<array>
    <string>*.psd</string>
    <string>*/test/*</string>
</array>

Create one <string>...</string> for each entry. The expressions support Unix wildcards.

Replacing file names and removing full path

You can replace parts of file names or remove directory prefixes by adjusting the following section in your .tps file.

Locate this section:

<key>replaceList</key>
<array/>

Replace it with these lines to remove all path segments from the sprite names:

<key>replaceList</key>
<array>
    <string>.*/=</string>
</array>

You can add multiple replacements — make a separate <string>...</string> for each.

The format is REGEXP=STRING. Replacements use Perl-style regular expressions.

Heuristic mask

The heuristic mask replaces a solid background color in a sprite with transparency. It works well in most cases.

To enable it, locate the following section in your .tps file:

<key>heuristicMask</key>
<false/>

…and replace it with:

<key>heuristicMask</key>
<true/>