Scripts For 3D Artists

Rename Layers

This renaming script uses a 5 step process for renaming layers. The order of operation is the order of the rollout:

1. Remove,

2. Find and Replace,

3. Edit Name,

4. Increment,

5. Misc.

So, for example, lets say you have a layer named “My_Layer_Name” The first operation applied to that name will be to remove first and/or last characters. Lets pretend the first and last values are 2. The layer name would now be “_Layer_Na” Next the find and replace operation is applied. Lets say “a” should be replaced with “1” The layer name would now be “_L1yer_N1” Next the edit name operation is applied. Lets say the prefix value is “Pre_” and the suffix value is “_Suf”. The layer name would now be “Pre_L1yer_N1_Suf” NOTE: If the “Base” option has a value it will wipe out the original name. So if the base value was “NewName” the layer name would now be “Pre_NewName_Suf” Next the increment operation is applied. Lets say the numbered mode is active with a padding of 3. The layer name would now be “Pre_L1yer_N1_Suf001” Finally the misc operations are applied.

It might seem overly complicated at first, but trust me, once you get used to it you can perform complex renaming operations with minimal mouse clicks.

Rename layers UI preview

Remove First: Remove the defined number of characters from the beginning of the layer name.
Remove Last: Remove the defined number of characters from the end of the layer name.
Find: The characters to search for.
Replace: The characters to replace the find characters.
Match Case: The find character search will be case sensitive.
First Occurrence Only: Replace only the first occurrence of the find character string.
Prefix: Adds characters to the beginning of the layer name.
Base: Replaces the layer name with the defined characters.
Suffix: Adds characters to the end of the layer name.
Increment Mode (radiobutton): Enable to add characters to the end of the name, helping to create unique names. ‘Numbered’ mode appends numbers (e.g. ‘001’), ‘Lettered’ mode appends letters (e.g. ‘A’), ‘None’ will not append anything. NOTE: when ‘Lettered’ mode is active and the letter ‘Z’ is reached the letters will begin to append, so the next layer would receive ‘AA’, then ‘BB’, and so on.
Padding: The number of zero’s (0) to use for the ‘Numbered’ mode.
Casing: Change the case to upper or lower. Use ‘No Change’ to ignore.
Shorten Names More Than: Will shorten names that end up being longer than the defined value.
Reset All Fields After Rename: Resets all fields to default values after a rename.
Preview New Names (Print Only): Prints the new names for review by the user. No renaming will take place while this checkbox is checked.
Status: The status of the script.
Rename Selected Layers: Execute the script and renames the selected layers.
Layers (multilistbox): The list of all scene layers.
Filter: Applies a filter to the layer list.
Select All: Selects all layers.
Select None: Deselects all layers.