Operators

Further Reading
See Operators in the Arnold User Guide
The Arnold for Maya User Guide explains how to set up Arnold operators in the Maya user interface. The Arnold User Guide provides the full documentation for Arnold shaders and shader parameters. For example, the Arnold User Guide has all the information about the operator selection expressions.

Operator graph in the Node Editor

Operators allow advanced users to override any part of an Arnold scene and modify the Arnold universe at render time. Probably one of the most common use cases is to override parameters (e.g. shaders) inside a procedural (e.g. ASS or Alembic). To achieve this you must know the Arnold node and parameter names defined inside the procedural.

Note:

Tutorials about operators can be found here.

Operators can be created in the Render Settings, the Arnold menu, or in the Node Editor window

The following operators are available:

Examples

Figure 1: Create a custom collection from a larger collection

Figure 2: Define a collection of trees that should be excluded

Figure 3: Create a smaller collection using the exclusion collection in Figure 2

Set Parameter

Stand-in Example

set_parameter used to assign shader 'green' from a stand-in to objects in the scene

In this example, we want to assign a shader used inside a Procedural (Stand-in Maya/C4D) to objects in the scene. In the Procedural, there is a shader called 'green' that works for overrides on objects inside the ass file since this green shader is in the same Procedural. The full path for the shader is used inside the Procedural for it to work for both the shapes in the ass file and the ones coming from the scene:

 shader = "^/obj/arnold_procedural1/procedural^green" 

You could choose a namespace for the Procedural by setting the namespace parameter on the Arnold Procedural object node in the Arnold parameters (to foo for example). Then you can use the following shader override which is more intuitive and has the same effect.

 shader = "^foo^green"  

Green shader from Procedural assigned to the cube in the scene

Set Transform

Scale adjusted using set_transform

The above example scene file can be downloaded here.

String Replace

Note:

A tutorial that shows how to use the string_replace operator can be found here.

Switch Operator

Click here to see a video example on how to use the switch operator to switch between different looks for an asset, where each look is created by a separate operator.