Accessing Plugin Nodes




Accessing your own plugin nodes is something that sooner or later you will want to know how to do. Unfortunately, there is no simple way of doing this. Insetad, you will need to access the attributes manually using MPlug's as described here





Finding your custom plugin nodes within a scene.

When you create any custom node which you add into Maya via a plugin, you need to specify a unique MTypeId so that Maya can distinguish your plugin node type from other node types.

When we wish to find a specific node type that we have added into maya, we need to use the typeId() member of MFnDependencyNode to check the node type against the TypeId we assigned to the node.

In this example, MyNodeType is the custom plugin node that would have been derived from MPxNode.



// create an iterator to go through all curves
MItDependencyNodes it(MFn::kInvalid);


MFnDependencyNode fn(it.item());

if( fn.typeId() == MyNodeType::typeid ) {

  cout << << endl;





What Next?

Accessing Attributes

Traversing The Scene

Accessing Attribute Connections


Rob Bateman [2004]