Difference between revisions of "Attribute Class"

From Derivative
Jump to navigation Jump to search
(Attribute Class Auto Create)
(Attribute Class Auto Create)
Line 2: Line 2:
 
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 are described with the Attributes Class.}}
<section begin=HELPBODY />
+
{{HelpbodyBegin}}
{{ClassMemberSection|empty=}}
+
{{ClassMemberSection|empty=
 +
|Sectionsummary=
 +
|items=
 +
 
{{ClassMember
 
{{ClassMember
 
     |class=Attribute
 
     |class=Attribute
Line 38: Line 41:
 
     |set=0
 
     |set=0
 
     |text=The OP to which this object belongs.
 
     |text=The OP to which this object belongs.
}}
+
}}}}
{{ClassMethodSection|empty=}}
+
{{ClassMethodSection|empty=
 +
|Sectionsummary=
 +
|items=
 +
 
{{ClassMethod
 
{{ClassMethod
 
     |class=Attribute
 
     |class=Attribute
Line 48: Line 54:
 
Destroy the attribute referenced by this object.
 
Destroy the attribute referenced by this object.
 
n = scriptOP.pointAttribs['N'].destroy()
 
n = scriptOP.pointAttribs['N'].destroy()
}}
+
}}}}
<section end=HELPBODY />
+
{{{{HelpbodyEnd}}}}
<taggedhistory/>
+
{{{{History}}}}
 
 
 
{{{{#invoke:Category|list|Python Reference}}}}
 
{{{{#invoke:Category|list|Python Reference}}}}

Revision as of 14:51, 14 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()

{{{{HelpbodyEnd}}}} {{{{History}}}} {list}