# MNodeClass

## Base Class

None.

## Constants

None.

## Static Methods

None.

## 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.

## Virtual Methods

None.

## Object Methods

Signature | Parameters | Returns | Description
--- | --- | --- | ---
addExtensionAttribute(attr) | attr - MObject | Reference to self. | 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.
attribute(index) | index - int | MObject | Returns the node class's index'th attribute. Raises IndexError if index is out of bounds.
attribute(name) | name - string | MObject | Returns the node class's attribute having the given name. Returns MObject.kNullObj if the class does not have an attribute with that name.
getAttributes() |  | MObjectArray | Returns an MObjectArray array containing all of the node class's attributes.
hasAttribute(name) | name - string | bool | Returns True if the node class has an attribute of the given name, False otherwise.
removeExtensionAttribute(attr) | attr - MObject | Reference to self. | Removes an extension attribute from the node class. Raises ValueError if attr is not an extension attribute of this node class.
removeExtensionAttributeIfUnset(attr) | attr - MObject | bool | 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.

## Object Attributes

Name | Type | Access | Description
--- | --- | --- | ---
attributeCount | int | R | 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.
classification | string | R | This is a string that is used in dependency nodes that are also shaders to provide more detailed type information to the rendering system.
pluginName | string | R | 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.
typeId | MTypeId | R | Type ID for the node class.
typeName | string | R | Name of the node class. This is the name that is given to the createNode command to create nodes of this type.

## Sequence Support

None.

## Number Support

None.

## Comparison Support

None.

## str() Support

Returns the node class name.

## repr() Support

© 2011 Autodesk, Inc. All rights reserved.