Attribute Class

From Derivative
Jump to navigation Jump to 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.


Members

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.

Methods

destroy()None:

Destroy the attribute referenced by this object.

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

vals(delayed=False)list:

Returns the attribute values as a list.

  • delayed - (Keyword, Optional) If set to True, the download results will be delayed until the next call to vals(), avoiding stalling the GPU waiting for the result immediately.

Accessing Attributes[edit]

See Attributes for examples on how to access individual attributes.


TouchDesigner Build: