Batch rename layers
batch_rename_layersRename many After Effects layers at once with find/replace, pattern tokens, prefix/suffix, and case changes. Preview changes safely with a dry run before applying.
Instructions
Rename many layers of one comp at once. Order of operations: find/replace -> pattern (tokens) -> prefix/suffix -> case. Locked layers are renamed too (temporarily unlocked). Use dryRun=true to preview. Returns the from -> to list.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "batch_rename_layers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| case | No | Change letter case (applied last). | |
| comp | No | Composition name, 'Folder/Name' path, or item id. Omit to use the active composition. | |
| find | No | Text to find in the name (literal unless regex=true). Replaced by 'replace'. | |
| step | No | {n} increment (default 1). | |
| regex | No | Treat 'find' as a JavaScript regular expression (default false). | |
| start | No | First {n} value (default 1). | |
| dryRun | No | Only preview the from -> to list, change nothing (default false). | |
| filter | No | Only rename names containing this text (case-insensitive), or matching '/regex/flags', e.g. '/^BG/i'. | |
| layers | No | Layers: array of layer refs, or 'selected' (default) or 'all'. | |
| prefix | No | Text added before the name. | |
| suffix | No | Text added after the name. | |
| pattern | No | New-name template. Tokens: {name} (current name after find/replace), {orig} (original name), {n} counter, {n:3} zero-padded counter, {type}, {id}; layers also {comp} and {index}; items also {folder}. Example: '{comp}_{type}_{n:2}'. | |
| replace | No | Replacement for 'find' (default ''). With regex=true you can use $1, $2 groups. | |
| caseSensitive | No | Case-sensitive find (default true). |