The Dynamic Rules interface allows you to dynamically bind shaders to geometry and modify shading parameters by setting up a series of rules. The Dynamic Rules window is accessed via the RenderMan menu:

RenderMan > Dynamic Rules

 

Creating Rules

A rule maps objects to a payload. The objects can be geometry, sets of geometry, or shader parameters, and the payload is a chunk of data that can be inserted into a RIB stream for the object. For example, a rule could map a specific shader (the payload) to all the geometry in your scene that has a name beginning with "buzz". The payload gets applied to objects that match the XPath expression in the rule.

A new rule can be created using the Add Rule button at the bottom of the window, or by right-clicking the empty table and selecting Insert Rule or Import Rule.

Each rule has a set of properties in the table:

 

Managing Rules

Once created, an entire rule can be selected by clicking on the rule number in the table (the vertical header in the table). Multiple rules can be selected using Shift+click or Ctrl+click. Once rules are selected, you can cut, copy, paste, and duplicate the rules by right-clicking the vertical header in the table and selecting one of the menu items. You can also drag and drop rules to change their order.

 

Filtering Rules

You can control the rules that are displayed in the Dynamic Rules table by changing the selected scope with the Scope button at the top of the table. The text box to the right of the Scope button allows you to filter the rules. You can type a regular expression in the filter text box, and only the rules that have a NoteXPath, or Payload value that match the expression will be displayed in the table.