This renaming script uses a 5 step process for renaming materials. 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 material named “My_Material_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 material name would now be “_Material_Na” Next the find and replace operation is applied. Lets say “a” should be replaced with “1” The material name would now be “_M1teri1l_N1” Next the edit name operation is applied. Lets say the prefix value is “Pre_” and the suffix value is “_Suf” The material name would now be “Pre_M1teri1l_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 material 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 material name would now be “Pre_M1teri1l_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.
Remove First: Remove the defined number of characters from the beginning of the material name.
Remove Last: Remove the defined number of characters from the end of the material 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 material name.
Base: Replaces the material name with the defined characters.
Suffix: Adds characters to the end of the material 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 material 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.
Show Sub Materials: When enabled sub materials will appear in the list. By default only root materials are in the list.
Force Unique Names: After the new name is complete it will be checked against all other material names to make sure it is unique. If it is a duplicate, numbers will be appended to the name to make it unique. NOTE: If you have sub materials showing, then the new name will be checked against the sub materials as well, otherwise it will only be tested against root materials.
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 Materials: Execute the script and renames the selected materials.
Materials (multilistbox): The list of all scene materials.
Filter: Applies a filter to the scene materials.
Select All: Select all materials.
Select None: Deselect all materials.