Default variables and point fields

Following variables are available in script scope:

  • Time – float variable representing value of time node attribute
  • StartTime – float variable representing value of startTime node attribute
  • Generation – int variable representing number of script evaluations. Generation is incremented every time when Maya DG node computation is triggered (usually when node output is pulled and input attribute flag is set to dirty).
    Generation resets to 0 when Time <= StartTime

vert variable by default declares following fields:

  • .position (vector)
  • .normal (vector)
  • .pointID (int)

Following code expands mesh along normal vector of vertices multiplied by time attribute value:

vert p = inMesh[0];
p.position += p.normal*Time;
outMesh[0] = p;


Previous: Data types | Language reference | Next: Scopes