Difference between revisions of "Attribute Class"

From Derivative
Jump to navigation Jump to search
m
Tags: 2018.28070 2021.10000
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{TDClassSummary|label=Attribute|summary=An Attribute describes a general geometric Attribute, associated with a Prim Class, Point Class, or Vertex Class.
+
{{TDClassSummary|label=Attribute|summary=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.
+
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.}}
+
Lists of attributes for the [[SOP Class|SOP]] are described with the [[Attributes Class]].}}
 
<section begin=HELPBODY />
 
<section begin=HELPBODY />
 
{{ClassMemberSection|empty=
 
{{ClassMemberSection|empty=
 
|Sectionsummary=
 
|Sectionsummary=
 
|items=
 
|items=
 
 
{{ClassMember
 
{{ClassMember
 
     |class=Attribute
 
     |class=Attribute
     |name=default
+
     |name=owner
     |type=value
+
     |type=OP
 +
    |set=0
 +
    |text=The [[OP Class|OP]] to which this object belongs.}}
 +
{{ClassMember
 +
    |class=Attribute
 +
    |name=name
 +
    |type=str
 
     |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 name of this attribute.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
Line 30: Line 35:
 
{{ClassMember
 
{{ClassMember
 
     |class=Attribute
 
     |class=Attribute
     |name=name
+
     |name=default
     |type=str
+
     |type=value
    |set=0
 
    |text=The name of this attribute.
 
}}
 
{{ClassMember
 
    |class=Attribute
 
    |name=owner
 
    |type=OP
 
 
     |set=0
 
     |set=0
     |text=The OP to which this object belongs.
+
     |text=The default values associated with this attribute. Dependent on the type of attribute, it may return a float, integer, string, tuple, [[Position Class|Position]], or [[Vector Class|Vector]].}}}}
}}}}
 
 
{{ClassMethodSection|empty=
 
{{ClassMethodSection|empty=
 
|Sectionsummary=
 
|Sectionsummary=

Latest revision as of 13:51, 11 January 2019

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]

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

destroy()None:

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: