Attribute Class

From TouchDesigner Documentation
Jump to: navigation, search

An Attribute describes a general geometric Attribute, associated with a Prim Class, Point Class, or Vertex Class. Specific values for each Prim, Point or Vertex are described with the AttributeData Class. Lists of attributes for the SOP are described with the Attributes Class.


ownerOP (Read Only):

The OP to which this object belongs.

namestr (Read Only):

The name of this attribute.

sizeint (Read Only):

The number of values associated with this attribute. For example, a normal attribute has a size of 3.

typetype object (Read Only):

The type associated with this attribute: float, integer or string.

defaultvalue (Read Only):

The default values associated with this attribute. Dependent on the type of attribute, it may return a float, integer, string, tuple, Position, or Vector.



Destroy the attribute referenced by this object.

n = scriptOP.pointAttribs['N'].destroy()

Accessing Attributes[edit]

See Attributes for examples on how to access individual attributes.

TouchDesigner Build:

Each SOP has a list of Points. Each point has an XYZ 3D position value plus other optional attributes. Each polygon Primitive is defined by a vertex list, which is list of point numbers.

A sequence of vertices form a Polygon in a SOP. Each vertex is an integer index into the Point List, and each Point holds an XYZ position and attributes like Normals and Texture Coordinates.

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.

Information associated with SOP geometry. Points and primitives (polygons, NURBS, etc.) can have any number of attributes - position (P) is standard, and optional are normals (N), texture coordinates (uv), color (Cd), etc.