Package mrv :: Package maya :: Package nt :: Module base :: Class Component
[hide private]
[frames] | no frames]

Class Component

source code

OpenMaya.MObject --+
                   |
                  Component

Represents a shape component - its derivates can be used to handle component lists to be used in object sets and shading engines
Nested Classes [hide private]
  _base_cls_
Represents a shape component - its derivates can be used to handle component lists to be used in object sets and shading engines
Instance Methods [hide private]
 
__new__(cls, *args, **kwargs)
Constructor for MObject derived types which only differ in a few parameters.
source code
 
addElements(self, *args)
Operates exactly as described in the MFn...IndexComponent documentation, but returns self to allow combined calls and on-the-fly component generation
source code
 
addElement(self, *args)
see addElements
source code
Class Methods [hide private]
 
create(cls, component_type)
Returns: A new component instance carrying data of the given component type
source code
 
getMFnType(cls)
Returns: mfn type of this class
source code
Class Variables [hide private]
  __metaclass__ = MetaClassCreatorNodes
  _mfnType = None
hash(x)
  _mfn_suffix_ = "Component"
Method Details [hide private]

__new__(cls, *args, **kwargs)

source code 

Constructor for MObject derived types which only differ in a few parameters. Requires _base_cls_ and _mfn_suffix_ to be set on the respective class

return an attribute class of the respective type for given MObject

Parameters:
  • args - arg[0] is attribute's MObject to be wrapped.

Note: Custom constructors are not possible as __init__ is automatically called afterwards - MObject does not support anything but no args or another MObject.

create(cls, component_type)
Class Method

source code 
Parameters:
  • component_type - MFn:: component type to be created.
Returns:
A new component instance carrying data of the given component type

Note: It is important that you call this function on the Component Class of a compatible type, or a RuntimeError will occour

getMFnType(cls)
Class Method

source code 
Returns:
mfn type of this class

Note: the type returned is not the type of the shape component

addElements(self, *args)

source code 
Operates exactly as described in the MFn...IndexComponent documentation, but returns self to allow combined calls and on-the-fly component generation
Returns:
self

addElement(self, *args)

source code 
see addElements
Returns:
self

Note: do not use this function as it will be really slow when handling many items, use addElements instead