Hidden features

Why are they hidden? These features would require additional space in the user interface but are only used by a small numbers of users.

You can enable these features by opening the .tps file with a text editor. It's XML.

Ignoring files and directories

TexturePacker adds all image files it finds from a folder. Sometimes you might not want this behaviour — e.g. to exclude .psd files.

Locate the following section in the .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

Replacing parts of file names or complete paths, removing directory prefixes can be done with the following change to the .tps file:

Locate the following section

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

and 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 of the replacements is: REGEXP=STRING . The replacement uses perl regexp.

Heuristic mask

Heuristic mask replaces solid color in the sprite's background with transparency. Works im most cases ;-)

To enable it locate the following section in the .tps file

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

and replace it with

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