OpenMaya.MNodeClass Class Reference
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.
OpenMaya.MNodeClass.__init__ |
( |
| ) |
|
x.__init__(...) initializes x; see help(type(x)) for signature
OpenMaya.MNodeClass.__repr__ |
( |
| ) |
|
x.__repr__() <==> repr(x)
OpenMaya.MNodeClass.__str__ |
( |
| ) |
|
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.
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. |
OpenMaya.MNodeClass.attributeCount |
|
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 |
|
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 |
|
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 |
|
static |
Type ID for the node class.
Name: | typeId |
Type: | MTypeId |
Access: | R |
Description: | Type ID for the node class. |
OpenMaya.MNodeClass.typeName |
|
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. |