Prims Class

From TouchDesigner Documentation
Jump to: navigation, search

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


ownerOP (Read Only):

The OP to which this object belongs.


No operator specific methods.

Special Functions[edit]


Returns the total number of prims.

a = len(op('box1').prims)


Get a specific prim given an integer index.

n = op('box1').prims[0]


Iterate over each prim.

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

TouchDesigner Build:

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.