|On this page|
This node is similar to the Attribute VOP SOP.
This node contains a VOP subnet you can use to build a network that creates/edits attributes on selected USD prims.
Building the VOP network
The USD Globals node in the VOP subnet provides the built-in variables.
elemnumis the index of the current prim in the list of selected prims from Primitives.
numelemis the total number of selected prims. (The meanings of these variables are different when Run on elements of array attributes is on.)
primpathis the scene graph path of the current prim.
To bind an attribute (for example,
primvars:displayColor), create a Parameter VOP and set it to the name of the USD attribute. If you want to write to the attribute, set the Parameter node to Export "Always" and wire a value into its input.
This node can run the network over each prim, or over each element in each array attribute on each prim. See the Run On Elements of Array Attributes parameter.
For simple changes, it’s usually easier to write a VEX snippet in an Attribute Wrangle LOP than set up a VOP network.
Usually you will set up a VOP network in this node’s CVEX VOP subnet. However, expert users can instead point it to some other node that generates CVEX, or to a compiled
.vexfile on disk containing a
The primitive(s) the node should operate on. You can drag primitives from the scene graph tree pane into this textbox to add their paths, or click the Reselect button beside the text box to select the primitives in the viewer, or ⌃ Ctrl-click the Reselect button to choose prims from a pop-up tree window. You can also use primitive patterns for advanced matching, including matching all prims in a collection (using
Run On Elements of Array Attributes
When this is on, the node evaluates the VOP network for each array element of array attributes, on each prim. In this mode, the built-in
elemnum refers to the array index, and
numelem refers to the length of the largest array. (When this is off, array attributes are available in the network as array-type variables.)
If some array attributes have shorter length, their elements are padded with the last element.
This mode may be useful for running over geometry-related attributes such as
Where to get the VEX to run. You should usually leave this set to "Myself" and build a VOP network inside this node, unless you have a good reason to choose one of the other options.
Use the CVEX VOP network inside this node.
Specify another node that generates VEX code.
Specify a compiled
.vex file on disk.
When Vex source is "other node", the node path of the node that generates the VEX code.
When Vex source is "script", the file path to the compiled
Re-load VEX Functions
When Vex source is "script", click this to force reload all
.vex files on disk.
The VEX compiler command to use to compile the VOP network inside this node. You should not change this unless you really have a good reason to do so.
Clear the cached VEX code generated from the children VOPs, forcing it to be generated and compiled again. Normally the node should automatically recompile whenever the network changes, but this may be useful when debugging problems.
Evaluation Node Path
Certain VEX functions, like
ch(), evaluate parameters on this node.
In some cases you want these functions to be relative to a different node (for example, with nodes inside a digital asset, you often want to evaluate functions relative to the parent asset). This is a relative node path to the node to use as "the current node" in the program.
Autobind by Name
Number of Bindings
The number of USD attributes to bind to VEX variables.
The USD datatype of the attribute. You should usually leave this set to
Auto, so the node will use the known type of an existing attribute. If you are going to create the attribute, and node doesn’t translate the VEX type into the correct USD type (for example, it becomes
string but you want a
token), you can change this to the type you want.
The name of the VEX parameter bound to the attribute.