Maya Node Editor and Attributes

The Node Editor takes a number of features that were previously divided between Maya's Hypershade, the Hypergraph and the Connection Editor, and merges them into a single user-friendly workspace. The Node Editor gives us a much simpler way of making advanced connections between any nodes or attributes in your Maya scene.

Node-Editor
With the Node Editor you can graph, pin and clear nodes from the Node Editor… create nodes directly within the Node Editor, create / connect node attributes…

But while the interface is more modern, more powerfull and saves time. When it comes to custom node, you may get in trouble to have your custom node attributes to show-up in the default mode. Here are some tips for getting attributes to show-up in the Maya Node Editor.

There is an algorithm that determines if an attribute is “Interesting”. It is essentially a set of “If Then” statements testing aspects of an attribute. To make an attribute appear interesting you should:

  • Make sure that the attribute is NOT hidden.
  • Make the attribute is writeable (If output OR input)
  • If the attribute is still not showing up:
    • Make the attribute keyable
    • Make the attribute dynamic

There are currently 4 modes in the Node Editor determining how attributes get displayed:

  • No Attributes
  • Connected Attributes
  • “Interesting Attributes”
  • All Attributes (using the RMB)

 


Comments

2 responses to “Maya Node Editor and Attributes”

  1. Hello Cyrille,
    Thanks for the great note.
    As you briefly talked about Custom Node attributes here that made me curious about
    if there is any way of listing all the plugs/attributes attached to a dependency graph node using API command.
    eg: using MFnDependencyNode() we can access a particular plug if we know its name.
    mFnDN = OpenMaya.MFnDependencyNode(mObj_node)
    visibility_plug = mFnDN.findPlug(“visibility”)
    In this case a single plug is accessed and we know its name.
    Is there any command which can list all the plugs of a dependency graph node (if we don’t know that names of all the plugs) ?
    Thanks,
    Chayan

  2. Hi Chayan,
    yes, you can list plugs using: MFnDependencyNode::attributeCount() / MFnDependencyNode::attribute()
    but in case you want the connected plugs, you will need: MFnDependencyNode::getConnections()
    Plugs on a node found in this way can come and go based on a number of internal optimization reasons so the list you are asking for is not necessarily going to be consistent each time you ask.
    Hope that helps,
    -cyrille

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading