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!
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to