Zookeeper provides a special built-in tool to allow for quick and easy object selection and renaming. This tool can be brought up by selecting one or more objects and then clicking Select/Rename... in the right-click menu.
Select and rename dialog contains many useful options to help you batch-rename your objects on the fly:
- Find what - The main text to search for in object names. Depending on Find options setting this has different behaviour:
- By default it will match text anywhere inside an object's name. For example, if you have two objects "Sphere01" and "Sphere01" and type in "sphere" in Find what textbox it will select both those objects. It will not, however, select an object named "Box01" because that doesn't have "sphere" in its name.
- If Wildcards method is selected this will match specified text and allow * character to represent any text within the name. For example, "sphere*" will match "Sphere01" and "Sphere02", but "Sph*01" will only match "Sphere01".
- If Regular Expressions method is used a regular expression pattern is expected. For example, "Sphere\d+" will match "Sphere01", "Sphere02" but not "SphereTwo"
- Replace with - Specifies text string to replace the token matched in previous field. This, like Find what, depends on the used method:
- By default the typed in text will replace the matched search text. For example, if "sphere" is typed in Find what field and "Box" is typed in Replace with then "Sphere01" will be renamed "Box01", "Sphere02" to "Box02", etc.
- When Wildcards method is used the behaviour is similar to above except that the whole string is replaced instead of a part of it.
- When Regular Expressions are used the replace text is a regular expressions replace pattern. For example, if "(Sphere)(\d+)" is the find text and "My_$1_Object_$2" is replace text then "Sphere01" will be renamed to "My_Sphere_Object_01". More information about regular expressions is readily available on the internet.
- A list of supported Replace with tokens are accessible through an arrow button to the left of Replace with field. These are symbols that can be insterted into replace text that will be substituted by Zookeeper with appropriate per-object information. For example, consider these tokens:
- {name} simply uses the object's existing name. Replacing "Sphere01" with "{name}02" produces "Sphere0102"
- {index} is the 0-based index of objects being replaced. Using above example, "Sphere01" with "{name}_{index}" produces "Sphere01_0", and the second item in the list would give "Sphere01_1"
- {type} is replaced with object type. For example, "Material" for all materials, "Helper" for helper objects, "Light" for lights, etc.
- {sideX} produces "Left" or "Right" based on which side of X axis a node is located
- Many tokens are available and added all the time for use; their tooltips should be consulted for detailed information on their behaviour
- Look in option allows you to specify the scope of where text matching is performed. You can search only currently selected objects, the currently open view, all views, or even the entire scene with all objects in it.
- If Match case is checked the Find what field text becomes case-sensitive. So "sphere" will no longer match "Sphere01" but "Sphere" will.
- If Match whole word is checked the search string using default method is no longer a part of the name but rather assumed to be the complete name. So "sphere" will no longer match "Sphere01" but "sphere01" will.
- Next come the three different searching methods. Bu default Use button is unchecked. If it is checked, however, you can use Wildcards or Regular Expressions to define how you want to search through name text and do the renaming. The behaviour of these options has been previously covered.
- Rename options contain a number of useful parameters. For example, you can prefix or suffix your object's name with a custom string. You can also choose to remove a number of characters from beginning or end of each object's name. This is useful when trying to get rid of common components of each object without having to write out long regular expressions.
- Presets box allows you to save the while select and rename configuration so that it can be reused later without having to re-enter all parameters. Just enter a name for your current configuration and either "Select All" or "Rename All". This will create a preset for your configuration which will be available in the drop down box. Once selected, all parameters will be restored to their state.
- Before rename and After rename allow you to interactively see the changes you're making to the currently affected objects. These can be used to tweak your renaming options before committing any changes.
- Select All option will look through the current objects and only select the ones that match the "find" text. This is analogous to using the selection text filter in tree views.
- Rename All performs the actual renaming of objects. It will commit any changes present inside the "after" preview box.