|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
When using the sampling parameters on this node, be aware that only the setting of attributes are applied to the USD stage after the first sample is evaluated. Other operations such as the creation of primitives or setting metadata (which cannot vary over time) will only run for the first sample.
Cooking multiple samples may require cooking other nodes multiple times. If your VEX code refers to a SOP network, for example, that SOP network may be cooked for each time sample. If a LOP node connected to the input of this node is time dependent, this input node will also be recooked for each time sample on this node.
Cooking this node can generate many USD time samples, rather than just a single time sample at the current time. This can be equivalent to having a Cache LOP following this node, but it will evaluate much faster, and does not cache data from any other nodes. This allows animated data to be authored to USD without introducing a node time dependency which would then cause all following nodes to also be time dependent. This can vastly improve playback performance of some LOP Networks.
In all sampling modes, if a parameter on this node does not vary with time, and does not rely on other time sampled data from the stage, only a single default value will be generated in USD for the corresponding attribute. USD time samples are only generated for parameters that may vary over time.
Sample Current Frame
A single time sample will be generated for the current time.
Sample Frame Range If Input Is Not Time Dependent
If the input to this node is time dependent, this node behaves as if it is in
Sample current frame mode. Otherwise it behaves as if it is in
Sample frame range mode.
Sample Frame Range
The Start/End/Inc parameter is used to generate multiple times at which this node’s parameters are evaluated, and a USD time sample is created for each attribute at each one of these times.
When the Sampling behavior is
Sample frame range, this parameter controls the number and spacing of base time samples to be generated by this node. The default values of this parameter are
@finc. These values correspond to the start, end, and step size of the global Houdini animation settings when interacting with Houdini. When using a ROP node to generate a range of frames, these values correspond to the start, end, and increment values specified on the ROP node being executed. This default ensures that a USD file written to disk will contain time samples for exactly the frame range requested by the ROP (regardless of the Houdini animation settings).
For each primary sample generated by this node, these parameters can cause additional samples to be generated aroudn that primary sample time. This is most often used to ensure that accurate data exists at exactly the camera shutter open and close times, as well as at the primary sample time.
Controls the method used to specify the shutter open and close times relative to the primary sample times.
The Shutter open/close parameter values provide exact offset values relative to the primary sample time.
Use Camera Prim
The Camera prim parameter provides the scene graph path of a camera primitive from which the shutter open and close times are extracted to provide the offset values relative to the primary time sample.
When the Shutter mode is
Specify Manually, these two offset values are added to the primary sample time to indicate the shutter open and close times. The open time should be less than or equal to zero, and the close time should be greater than or equal to zero.
Scene graph path of a camera prim on the input node’s stage. The shutter open and close attribute values are read from this primitive.
The number of subframe samples to create for each primary sample. These samples are evenly distributed between the shutter open and close times. Note that such an even distribution may or may not create a sample at exactly the primary sample time.
Always Include Frame Sample
Enable this option to force a sample to be created at exactly the primary sample time. If the Samples values together with the shutter open and close times already place a sample at the primary sample time, turning on this option will have no effect. Otherwise, this option will cause an addition sample to be added. This means that the actual number of samples per primary sample may in fact be one more than the number specified in the Samples parameter.
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
Allow Instance Proxy Primitives
When this is on, the pattern in the Primitives parameter will be allowed to match instance proxy primitives (instanced ancestors of a primitive marked as instanceable). Since instance proxy primitives cannot be directly modified in USD, this mode is primarily used to allow the VEX code to pull data from the instance proxy primitives, and apply values to some non-instanced ancestor primitive.
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.