You can use regular expressions in the Custom Render representation fields to create filters. For example, an expression can be used to traverse assembly reference hierarchies to activate and render representations in nested assembly references. Creating a filter with regular expressions lets you maintain typical production pipeline naming schemes for your assembly references hierarchies and still be able to specify which representations get activated and rendered.
To specify representations with a regular expression, in the Scene Assembly section of the Render Settings window (Common tab) select Custom from the Render representation list, then turn on Use Regular Expressions. Type your expressions in the Representation Name, Representation Label, and Representation Type fields.
If you want to match Scene representations with the .ma (Maya ASCII) file extension in a regular expression, use the following:
. matches any single character,
\ indicates the next character is interpreted literally, therefore directly matching the period character (.) only, rather than any single character.
This section provides an example of a regular expression being used to specify that representations with an_Collection or _render appended to their name activate and render at render time. More than one version of the assets are contained by Scene representations in the assembly reference hierarchy. Only the Scene representations with _render appended to their name contain the proper geometry and the shading materials for final render. The following diagram illustrates the assembly reference structure.
You can use the following expression to specify that representations (assets) belonging to the _Collections assembly reference hierarchy with an _render suffix on their representation name render at render time.
.*_Collection specifies that, at render time, representations with a name ending in _Collection activate, if they exist
.*_render specifies that, at render time, representations with a name ending in _render activate, if they exist.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License