scroll-lock
unread,Apr 10, 2009, 5:45:48 AM4/10/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python_inside_maya
I didn't find similar posts to this so I`m making a new one.
I am trying to get the value of an attribute of a node, inside the
same node.
In C++ It's done with referencing the node first, then the plug of the
node I'm interested in, and then using the myPlug.getValue function...
this function is not available in Python and the Maya Help says this:
"This method is not available from Python. See asMObject method
instead."
so I`m simply doing this:
node = OpenMayaMPx.MPxNode.thisMObject(self)
myPlug = OpenMaya.MPlug(node, myAttribute)
test = myPlug.asMObject()
print test
and I get this error inside Maya:
RuntimeError: (kFailure): Object does not exist
It's like the plug I`m using is not existing.... I can't get it to
work. Any tips ? How are you guys getting the values of a plug in
Python ?
Thanks!