Token values
Tokens are case-sensitive. Spell them exactly as shown. Unknown tokens stay as typed text. A missing value becomes empty text.
| Token | Selected layers | Selected Project panel items |
|---|---|---|
{name} | Current layer name after find and replace. | Current item name after find and replace. |
{#} | Counter, assigned top to bottom by default. | Counter, in After Effects’ supplied selection order. |
{comp} | Name of the active composition containing the layer. | Empty, even for a selected comp. Use {name} for that comp’s own name. |
{type} | camera, light, text, shape, null, adjustment, precomp, solid, or footage. | comp, folder, solid, or footage. |
{source} | Source item name for precomp and footage layers. Empty for other layer types. | File display name for file-backed footage. Empty for comps, folders, and items without a file. |
{parent} | Immediate parent layer’s name, if parented. | Immediate containing folder’s name. Empty at the project root. |
{w} | Source width, when available, for precomp, footage, and solid layers. | Item width, when available, for comps and footage, including solids. Empty for folders. |
{h} | Source height, when available, for precomp, footage, and solid layers. | Item height, when available, for comps and footage, including solids. Empty for folders. |
The {w}x{h} button inserts both dimension tokens with a literal x between them. You can type either token separately. Dimensions are source pixels, without layer scaling or rotation. Text, shape, camera, light, null, and adjustment layers provide no dimensions. If both dimensions are missing, {w}x{h} produces the literal x.
Type detection checks camera, light, text, and shape first, then null and adjustment, then source type. For example, a solid used as an adjustment layer returns adjustment rather than solid.
How names are assembled
- Find and replace runs on the current name. With an empty Find, the name is kept.
- The pattern substitutes its recognized tokens. Case conversion affects
{name},{comp},{type},{source}, and{parent}. Text typed directly in the pattern keeps its case. - Runs of line breaks or tabs become a space. With Trim spaces on, repeated spaces collapse and outer whitespace is removed.
- If the result contains only whitespace, the original name is kept. The host limits applied names to 255 characters.
Token values are inserted once. A name containing the text {#} is not expanded again when it is inserted through {name}.
Pattern examples
| Pattern | Example result | Needs |
|---|---|---|
UI_{name} | UI_Button | A target named Button. |
{name}_final | Button_final | A target named Button. |
Shot {#} | Shot 01 | Start 1 and Pad 2. |
{comp}_{type}_{#} | Main_text_1 | A text layer inside Main. |
{parent}_{name} | Controls_Button | A layer parented to Controls, or an item inside that folder. |
{source} | Intro comp | A precomp layer using the source item Intro comp. |
{name}_{w}x{h} | Background_1920x1080 | A target with those source dimensions. |
Check the preview for empty values before applying a pattern to mixed layer or item types.