Difference between revisions of "Attribute Class"

From Derivative
Jump to navigation Jump to search
(Attribute Class Auto Create)
(Attribute Class Auto Create)
Line 10: Line 10:
 
     |class=Attribute
 
     |class=Attribute
 
     |name=default
 
     |name=default
     |returns=
+
     |type=
 
     |set=0
 
     |set=0
 
     |text=The default values associated with this attribute.  Dependent on the type of attribute, it may return a float, integer, string, tuple, Position, or Vector.
 
     |text=The default values associated with this attribute.  Dependent on the type of attribute, it may return a float, integer, string, tuple, Position, or Vector.
Line 17: Line 17:
 
     |class=Attribute
 
     |class=Attribute
 
     |name=size
 
     |name=size
     |returns=
+
     |type=
 
     |set=0
 
     |set=0
 
     |text=The number of values associated with this attribute.  For example, a normal attribute has a size of 3.
 
     |text=The number of values associated with this attribute.  For example, a normal attribute has a size of 3.
Line 24: Line 24:
 
     |class=Attribute
 
     |class=Attribute
 
     |name=type
 
     |name=type
     |returns=
+
     |type=
 
     |set=0
 
     |set=0
 
     |text=The type associated with this attribute:  float, integer or string.
 
     |text=The type associated with this attribute:  float, integer or string.
Line 31: Line 31:
 
     |class=Attribute
 
     |class=Attribute
 
     |name=name
 
     |name=name
     |returns=
+
     |type=
 
     |set=0
 
     |set=0
 
     |text=The name of this attribute.
 
     |text=The name of this attribute.
Line 38: Line 38:
 
     |class=Attribute
 
     |class=Attribute
 
     |name=owner
 
     |name=owner
     |returns=
+
     |type=
 
     |set=0
 
     |set=0
 
     |text=The OP to which this object belongs.
 
     |text=The OP to which this object belongs.

Revision as of 15:11, 15 September 2017

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[edit]

default(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.

size(Read Only):

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

type(Read Only):

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

name(Read Only):

The name of this attribute.

owner(Read Only):

The OP to which this object belongs.

Methods[edit]

destroy():

:

Destroy the attribute referenced by this object.

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

TouchDesigner Build: