A class for performing node class-level operations in the dependency graph.
MNodeClass allows the manipulation of dependency graph node classes. Operations specific to a particular node should instead use MFnDependencyNode.
#include <MNodeClass.h>
Public Member Functions |
|
MNodeClass (const MString &nodeClassName) | |
Construct an
MNodeClass object based on the given class name. |
|
MNodeClass (const MTypeId &nodeTypeId) | |
Construct an
MNodeClass object based on the given MTypeId. |
|
MTypeId | typeId () const |
Returns the type id of this node class.
|
|
MString | typeName () const |
Returns the type name of this node class.
|
|
MString | classification () const |
Retrieves the classification string
for a node class. |
|
MString | pluginName (MStatus *ReturnStatus=NULL) const |
Returns the name of the plug-in this node
class was defined in. |
|
MStatus | addExtensionAttribute (const MObject &attr) const |
Adds an extension attribute to the node
class. |
|
MStatus | removeExtensionAttribute (const MObject &attr) const |
Removes an extension attribute from the node
class. |
|
MStatus | removeExtensionAttributeIfUnset (const MObject &attr) const |
Removes an extension attribute from the
given dependency node type but only if there are no nodes in the
graph with non-default values for this attribute. |
|
MStatus | getAttributes (MObjectArray &attr) const |
Get the list of attributes for the node
class. |
|
unsigned int | attributeCount (MStatus *ReturnStatus=NULL) const |
Get the number of attributes for the node
class. |
|
MObject | attribute (unsigned int index, MStatus *ReturnStatus=NULL) const |
Finds the attribute of this node class at
the given index. |
|
MObject | attribute (const MString &attrName, MStatus *ReturnStatus=NULL) const |
Finds the attribute of this node class that
has the given name. |
|
bool | hasAttribute (const MString &attrName, MStatus *ReturnStatus=NULL) const |
Returns true if the node class already has
an attribute with the given name. |
|
Static Public Member Functions |
|
static const char * | className () |
Returns the name of this class. |
MNodeClass | ( | const MString & | nodeClassName | ) |
Construct an MNodeClass object based on the given class name.
If the name cannot be resolved as a known class, the MNodeClass will refer to an MFn::kInvalid api type.
[in] | nodeClassName | class name of the node type to wrap |
MNodeClass | ( | const MTypeId & | nodeTypeId | ) |
Construct an MNodeClass object based on the given MTypeId.
This can then be used to perform class-level operations.
[in] | nodeTypeId | id of the node type to wrap |
MTypeId typeId | ( | ) | const |
Returns the type id of this node class.
The type is is the 4 byte code that is used in the binary file format to identify the type of this node.
MString typeName | ( | ) | const |
Returns the type name of this node class.
The string returned is the name of the node type as it is used in the ascii file format.
MString classification | ( | ) | const |
Retrieves the classification string for a node class.
This is a string that is used in dependency nodes that are also shaders to provide more detailed type information to the rendering system. See the documentation for the MEL commands getClassification and listNodeTypes for information on the strings that can be provided.
User-defined nodes set this value through a parameter to MFnPlugin::registerNode.
Returns the name of the plug-in this node class was defined in.
The name returned is the name of the plug-in on disk, and may contain pathname separators (such as `/') and drive letters (e.g. C:).
[out] | ReturnStatus | return status |
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.
[in] | attr | The attribute to add |
Removes an extension attribute from 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.
[in] | attr | The attribute to remove |
Removes an extension attribute from the given dependency node type but only if there are no nodes in the graph with non-default values for this attribute.
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. This method will only remove the attribute if any of its node values differs from the default.
[in] | attr | The attribute to remove |
MStatus getAttributes | ( | MObjectArray & | attr | ) | const |
Get the list of attributes for the node class.
[out] | attr | The list of attributes |
unsigned int attributeCount | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Get the number of attributes for the node class.
[out] | ReturnStatus | return status |
Finds the attribute of this node class at the given index.
Index order is based on the order in which the attributes were added to the class.
[in] | index | the index of the attribute |
[out] | ReturnStatus | return status |
Finds the attribute of this node class that has the given name.
[in] | attrName | name of the attribute to find |
[out] | ReturnStatus | return status |
Returns true if the node class already has an attribute with the given name.
[in] | attrName | Name of attribute to be checked. |
[out] | ReturnStatus | return status |
const char * className | ( | ) | [static] |