|On this page|
This is a very powerful, low-level node that lets experts who are familiar with VEX tweak point attributes using code.
This node corresponds to the VOP SOP, but uses a textual VEX snippet instead of a VOP network.
This node requires that you understand the vex language. It is very easy to write incorrect code using this node.
This node runs the snippet on every point in the input geometry. The snippet can edit the input geometry by changing attributes. It can access information from other geometry using attributes and VEX functions.
Press on the node to see any error output from the snippet.
You can use the VEX function
chto evaluate parameters. The path is relative to this node (
ch("parm")will evaluate the parameter
parmon this node). This evaluation will be done at the current time.
Unlike the Point SOP, this does not use local variables. Further, all backtick expressions and
$Fvariables will be evaluated at frame 1, not the current time. Use
You can create temporary VEX variables.
Normal VEX variables do not have a
For example, the following code swaps
vector temp = @P; @P = @Cd; @Cd = temp;
sop context provides several global variables you can access,
P, that correspond to attributes.
While you can access these directly, we recommend you use the
The following global variables do not correspond to attributes and may be useful in snippets.
Total number of points.
Current time in seconds.
Current time in frames.
Time increment between frames, in seconds.
A string that can be used to refer to the corresponding input of this SOP in vex operations that take file parameters.
A subset of points in the input geometry to run the program on. Leave this blank to affect all points in the input.
A snippet of VEX code that will manipulate the point attributes.
You can use
@variable_name syntax to access geometry attributes.
Attributes to Create
Only create attributes if their names match this pattern. The default pattern allows any attribute to be created.
You can restrict the created attributes by replacing the
* with a list of allowed names.
Global attributes, such as
id, will be created even if they are not in this list.