Prims Class

From TouchDesigner 099 Wiki

The Prims class describes the set of prim objects (primitives) owned by one SOP.

Members

owner (Read Only) The OP to which this object belongs.

Methods

Special Functions

len(Prims)int

Returns the total number of prims.
   a = len(op('box1').prims)

[index]Prim

Get specific prim, given an integer index.
   n = op('box1').prims[0]

Iterator

Iterate over each prim.
   for m in op('box1').prims:
       # do something with m, which is a Prim object.

__getstate__()dict

Returns a dictionary with persistent data about the object suitable for pickling and deep copies.

__setstate__(dict)

Reads the dictionary to update persistent details about the object, suitable for unpickling and deep copies.