sop
VEX context
Define a custom SOP operator with a program that edits geometry point attributes.
The SOP context has the same variables and functions as the POP context. Both of these contexts allow processing of point attribute data. With the POP context, the points are typically used in a particle system, however, this is not a requirement of the context. In general, a function written for POPs will work as a SOP or vice versa.
Export variables in the POP/SOP contexts will cause new attributes to be created on the geometry. The attribute will have the name and size of the export variable.
Globals
|
Cd |
Color (RGB) of the current point. |
|
Time (read-only) |
Current time (in seconds). |
|
accel |
Acceleration of the current point. |
|
Pw |
Point weight. |
|
life |
Expected lifetime (in seconds) of the current point. |
|
P |
Position of the current point. |
|
id |
ID attribute. |
|
v |
Velocity of the current point. |
|
ptnum (read-only) |
Point number of the point being processed. |
|
pstate |
State of the current particle. |
|
Npt (read-only) |
Total number of points geometry. |
|
age |
Age of the current point (how many seconds a particle has been alive). |
|
TimeInc (read-only) |
Time increment between frames (SOP context)/Time increment for particle simulations (POP context). |
|
N |
Point normal. |
|
Frame (read-only) |
Current frame. This may not be an integer value. |