I give an exemple in Python but is a same way for c++ API
mfn_node = OpenMaya.MFnDependencyNode(self.thisMObject())
mfn_node.name()
You want to get node connected to your node in input ? You try to get node
name for use cmds ? it's possible to get with API.
get plug with findPlug function of MFnDependencyNode:
mplug = mfn_node.findPlug(MObject_Attribute)
And use connectedTo of MPlug
mplug.connectedTo(yourPlugArray, True, False) # for get input
mplug.connectedTo(yourPlugArray, False, True) # for get output
mplug.connectedTo(yourPlugArray, True, True) # for get both
You must prefere to get this data in connectionMade function of your
MPxNode rather than the compute.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/ff8cebe9-c919-4d06-88ec-3392ed6ec913%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.