Python API 2.0 Reference
OpenMaya.MNodeClass Class Reference
+ Inheritance diagram for OpenMaya.MNodeClass:

Public Member Functions

def __init__ ()
 
def __repr__ ()
 
def __str__ ()
 
def addExtensionAttribute ()
 
def attribute ()
 
def getAttributes ()
 
def hasAttribute ()
 
def removeExtensionAttribute ()
 
def removeExtensionAttributeIfUnset ()
 

Static Public Member Functions

def __new__ ()
 

Properties

 attributeCount = property(...)
 
 classification = property(...)
 
 pluginName = property(...)
 
 typeId = property(...)
 
 typeName = property(...)
 

Detailed Description

A class for performing node class-level operations in the dependency graph.

Constructors

Signature Parameters Description
MNodeClass(nodeTypeName) nodeTypeName string

Returns a new MNodeClass object which will operate on the named node class.

MNodeClass(nodeTypeId) nodeTypeId - MTypeId

Returns a new MNodeClass object which will operate on the node class having the given nodeTypeId.

str() Support

Returns the node class name.

 


Constructor & Destructor Documentation

def OpenMaya.MNodeClass.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMaya.MNodeClass.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMaya.MNodeClass.__repr__ ( )
Return repr(self).
def OpenMaya.MNodeClass.__str__ ( )
Return str(self).
OpenMaya.MNodeClass.addExtensionAttribute ( )
Adds an extension attribute to the node class. An extension attribute is a class-level attribute which has been added dynamically to a node class. Because it is added at the class level, all nodes of that class will have the given attribute, and will only store the attribute's value if it differs from the default. Returns the type of the object at the end of the path.
Signature: addExtensionAttribute(attr)
Parameters: attr - MObject
Returns: Reference to self.
Description: Adds an extension attribute to the node class. An extension attribute is a class-level attribute which has been added dynamically to a node class. Because it is added at the class level, all nodes of that class will have the given attribute, and will only store the attribute's value if it differs from the default.
OpenMaya.MNodeClass.attribute ( )
If passed an int: Returns the node class's i'th attribute. Raises IndexError if index is out of bounds.  If passed a string, Returns the node class's attribute having the given name. Returns MObject.kNullObj if the class does not have an attribute with that name.
Signature: attribute(index)
Parameters: index - int
Returns: MObject
Description: Returns the node class's index'th attribute. Raises IndexError if index is out of bounds.
Signature: attribute(name)
Parameters: name - string
Returns: MObject
Description: Returns the node class's attribute having the given name. Returns MObject.kNullObj if the class does not have an attribute with that name.
OpenMaya.MNodeClass.getAttributes ( )
Returns an MObjectArray array containing all of the node class's attributes.
Signature: getAttributes()
Parameters:
Returns: MObjectArray
Description: Returns an MObjectArray array containing all of the node class's attributes.
OpenMaya.MNodeClass.hasAttribute ( )
Returns True if the node class has an attribute of the given name, False otherwise.
Signature: hasAttribute(name)
Parameters: name - string
Returns: bool
Description: Returns True if the node class has an attribute of the given name, False otherwise.
OpenMaya.MNodeClass.removeExtensionAttribute ( )
Removes an extension attribute from the node class. Raises ValueError if attr is not an extension attribute of this node class.
Signature: removeExtensionAttribute(attr)
Parameters: attr - MObject
Returns: Reference to self.
Description: Removes an extension attribute from the node class. Raises ValueError if attr is not an extension attribute of this node class.
OpenMaya.MNodeClass.removeExtensionAttributeIfUnset ( )
Removes an extension attribute from the node class, but only if there are no nodes in the graph with non-default values for this attribute. Returns True if the attribute was removed, False otherwise. Raises ValueError if attr is not an extension attribute of this node class.
Signature: removeExtensionAttributeIfUnset(attr)
Parameters: attr - MObject
Returns: bool
Description: Removes an extension attribute from the node class, but only if there are no nodes in the graph with non-default values for this attribute. Returns True if the attribute was removed, False otherwise. Raises ValueError if attr is not an extension attribute of this node class.

Property Documentation

OpenMaya.MNodeClass.attributeCount = property(...)
static
 Number of attributes the node class has. Includes extension attributes, since those are applied to the entire node class, but not dynamic attributes, since those are only applied to individual nodes.
Name: attributeCount
Type: int
Access: R
Description: Number of attributes the node class has. Includes extension attributes, since those are applied to the entire node class, but not dynamic attributes, since those are only applied to individual nodes.
OpenMaya.MNodeClass.classification = property(...)
static
 This is a string that is used in dependency nodes that are also shaders to provide more detailed type information to the rendering system.
Name: classification
Type: string
Access: R
Description: This is a string that is used in dependency nodes that are also shaders to provide more detailed type information to the rendering system.
OpenMaya.MNodeClass.pluginName = property(...)
static
 File path of the plug-in in which the node class is defined. The empty string is returned for Maya's built-in node types.
Name: pluginName
Type: string
Access: R
Description: File path of the plug-in in which the node class is defined. The empty string is returned for Maya's built-in node types.
OpenMaya.MNodeClass.typeId = property(...)
static
 Type ID for the node class.
Name: typeId
Type: MTypeId
Access: R
Description: Type ID for the node class.
OpenMaya.MNodeClass.typeName = property(...)
static
 Name of the node class. This is the name that is given to the createNode command to create nodes of this type.
Name: typeName
Type: string
Access: R
Description: Name of the node class. This is the name that is given to the createNode command to create nodes of this type.