On this page |
Overview ¶
VEX is Houdini’s programming language used for everything from deformers to shaders to solvers. As VEX is a SIMD language, its code/network snippets are designed to run on each ‘element’ being targeted. In LOPs this means primitives by default, meaning there is no need to add a loop to iterate over each target primitive; that happens automatically. Each attribute of the primitives is accessed using the @ syntax, or Bind VOPs.
Wrangle and VOP LOP also have a second mode, Run on Elements of Array Attributes. In this case, the elements over which the code will run are the elements of array properties on primitives. This allows for faster operations over PointInstancer or Points prims, or even the points of heavy meshes.
Build-in variables ¶
@primpath
Path of the prim, on the stage .
@elemnum
Current element number, whether prim or array element.
@numelem
Total number of prims or array elements.
@primtype
The prim type name.
@primkind
A prim’s kind if set.
@primname
The name of a primitive.
@primpurpose
The display purpose of the current prim.
@primdrawmode
The draw mode of the prim.
@primactive
Returns whether the current prim is active or deactivated.
@primvisible
Returns the visibility of the prim.
USD-specific functions ¶
-
Creates an attribute of a given type on a primitive.
-
Excludes an object from the collection
-
Includes an object in the collection
-
usd_addinversetotransformorder
Appends an inversed transform operation to the primitive’s transform order
-
Applies a quaternion orientation to the primitive
-
Creates a primitive of a given type.
-
Creates a primvar of a given type on a primitive.
-
Adds a target to the primitive’s relationship
-
Applies a rotation to the primitive
-
Applies a scale to the primitive
-
Creates an attribute of a given type on a primitive, and sets the custom metadata flag to False.
-
Appends a transform operation to the primitive’s transform order
-
Applies a transformation to the primitive
-
Applies a translation to the primitive
-
Apply an API schema to a primitive.
-
Reads the value of an attribute from the USD primitive.
-
Reads the value of an element from an array attribute.
-
Returns the length of the array attribute.
-
Returns the names of the attributes available on the primitive.
-
Returns the tuple size of the attribute.
-
Returns the time codes at which the attribute values are authored.
-
Returns the name of the attribute type.
-
Blocks the attribute.
-
Blocks the primvar.
-
Blocks the primvar.
-
Blocks the primitive’s relationship
-
Returns the material path bound to a given primitive.
-
Returns the names of the primitive’s children.
-
Clears the value of the metadata.
-
Clears the primitive’s transform order
-
Obtains the list of all objects that belong to the collection
-
Checks if an object path belongs to the collection
-
Obtains the object paths that are in the collection’s exclude list
-
Obtains the collection’s expansion rule
-
Obtains the object paths that are in the collection’s include list
-
Returns the primitive’s draw mode.
-
Retrurns primitive’s transform operation full name for given the transform operation suffix
-
Reads the value of a flattened primvar directly from the USD primitive or from USD primitive’s ancestor.
-
Reads an element value of a flattened array primvar directly from the USD primitive or from its ancestor.
-
Reads the value of an flattened primvar directly from the USD primitive.
-
Reads an element value of a flattened array primvar directly from a USD primitive.
-
Sets two vectors to the minimum and maximum corners of the bounding box for the primitive.
-
Returns the center of the bounding box for the primitive.
-
Returns the maximum of the bounding box for the primitive.
-
Returns the minimum of the bounding box for the primitive.
-
Returns the size of the bounding box for the primitive.
-
Obtains the primitive’s bounds
-
Obtains the primitive’s bounds
-
Checks if the primitive adheres to the given API.
-
Checks if the primitive adheres to the given API.
-
Reads the value of a primvar directly from the USD primitive or from USD primitive’s ancestor.
-
Reads the value of an element from the array primvar directly from the USD primitive or from USD primitive’s ancestor.
-
Returns the element size of the primvar directly from the USD primitive or from USD primitive’s ancestor.
-
Returns the index array of an indexed primvar directly on the USD primitive or on USD primitive’s ancestor.
-
Returns the element size of the primvar directly on the USD primitive or on USD primitive’s ancestor.
-
Returns the length of the array primvar directly on the USD primitive or on USD primitive’s ancestor.
-
Returns the names of the primvars available directly on the given USD primitive or on USD primitive’s ancestor.
-
Returns the tuple size of the primvar directly on the USD primitive or on USD primitive’s ancestor.
-
Returns the time codes at which the primvar values are authored directly on the given primitive or on its ancestor.
-
Returns the name of the primvar type found on the given primitive or its ancestor.
-
Checks if the primitive is abstract.
-
Checks if the primitive is active.
-
Checks if the attribute is an array.
-
Checks if there is an array primvar directly on the USD primitive or on USD primitive’s ancestor.
-
Checks if the given metadata is an array.
-
Checks if there is an array primvar directly on the USD primitive.
-
Checks if the primitive has an attribute by the given name.
-
Checks if the collection exists.
-
Checks if the path is a valid collection path.
-
Checks if there is an indexed primvar directly on the USD primitive or on USD primitive’s ancestor.
-
Checks if there is an indexed primvar directly on the USD primitive.
-
Checks if the primitive is an instance.
-
Checks if the primitive or its ancestor has a primvar of the given name.
-
Checks if the primitive is of a given kind.
-
Checks if the primitive has metadata by the given name.
-
Checks if the primitive is a model.
-
Checks if the path refers to a valid primitive.
-
Checks if the primitive has a primvar of the given name.
-
Checks if the primitive has a relationship by the given name.
-
Checks if the stage is valid.
-
Checks if the primitive transform is reset
-
Checks if the primitive is of a given type.
-
Checks if the primitive is visible.
-
Returns the primitive’s kind.
-
Obtains the primitive’s local transform
-
Constructs an attribute path from a primitive path and an attribute name.
-
Constructs a collection path from a primitive path and a collection name.
-
Constructs an property path from a primitive path and an property name.
-
Constructs an relationship path from a primitive path and a relationship name.
-
Forces a string to conform to the rules for naming USD primitives.
-
Forces a string to conform to the rules for paths to USD primitives.
-
Reads the value of metadata from the USD object.
-
Reads the value of an element from the array metadata.
-
Returns the length of the array metadata.
-
Returns the names of the metadata available on the object.
-
Returns the name of the primitive.
-
Returns the path of the primitive’s parent.
-
Sets two vectors to the minimum and maximum corners of the bounding box for the given instance inside point instancer.
-
usd_pointinstance_getbbox_center
Returns the center of the bounding box for the instance inside a point instancer primitive.
-
Returns the maximum position of the bounding box for the instance inside a point instancer primitive.
-
Returns the minimum position of the bounding box for the instance inside a point instancer primitive.
-
usd_pointinstance_getbbox_size
Returns the size of the bounding box for the instance inside a point instancer primitive.
-
Returns the relative position of the point given with respect to the bounding box of the geometry.
-
Obtains the transform for the given point instance
-
Reads the value of a primvar directly from the USD primitive.
-
Returns the namespaced attribute name for the given primvar.
-
Reads the value of an element from the array primvar directly from the USD primitive.
-
Returns the element size of the primvar directly from the USD primitive.
-
Returns the index array of an indexed primvar directly on the USD primitive.
-
Returns the element size of the primvar directly on the USD primitive.
-
Returns the length of the array primvar directly on the USD primitive.
-
Returns the names of the primvars available on the given USD primitive.
-
Returns the tuple size of the primvar directly on the USD primitive.
-
Returns the time codes at which the primvar values are authored directly on the given primitive.
-
Returns the name of the primvar type found on the given primitive.
-
Returns the primitive’s purpose.
-
usd_relationshipforwardedtargets
Obtains the relationship forwarded targets.
-
Returns the names of the relationships available on the primitive.
-
Obtains the relationship targets.
-
Returns the relative position of the point given with respect to the bounding box of the geometry.
-
Remove a target from the primitive’s relationship
-
Sets the primitive active state.
-
Sets the value of an attribute.
-
Sets the value of an element in an array attribute.
-
Sets the excludes list on the collection
-
usd_setcollectionexpansionrule
Sets the expansion rule on the collection
-
Sets the includes list on the collection
-
Sets the primitive’s draw mode.
-
Sets the primitive’s kind.
-
Sets the value of an metadata.
-
Sets the value of an element in an array metadata.
-
Sets the value of a primvar.
-
Sets the value of an element in an array primvar.
-
Sets the element size of a primvar.
-
Sets the indices for the given primvar.
-
Sets the interpolation of a primvar.
-
Sets the primitive’s purpose.
-
Sets the targets in the primitive’s relationship
-
Sets the primitive’s transform order
-
Sets/clears the primitive’s transform reset flag
-
Sets the selected variant in the given variant set.
-
Configures the primitive to be visible, invisible, or to inherit visibility from the parent.
-
Makes the primitive visible or invisible.
-
Returns the primitive’s specifier.
-
Constructs a full name of a transform operation
-
Obtains the primitive’s transform order
-
Extracts the transform operation suffix from the full name
-
Infers the transform operation type from the full name
-
Returns the name of the primitive’s type.
-
Constructs a unique full name of a transform operation
-
Returns the variants belonging to the given variant set on a primitive.
-
Returns the currently selected variant in a given variant set.
-
Returns the variant sets available on a primitive.
-
Obtains the primitive’s world transform