Nearly everything you need can be accessed by importing pymel.core
When running this:

myname = "loop_anim_v001:master_ctrl"
pmc.objExists(myname)
# True

You're passing the string name to the PyMel command.  Note most of their 
commands take either strings, or PyNodes.
The reason your getPosition method is failing is that myname is a string, 
not a PyNode.
Do this to convert to a PyNode from string:

mynode = pmc.PyNode(myname)

However, I'm not sure what the "getPosition" function\method your calling 
lives.  You could do something like:

restPos = mynode.getRestPosition()

Since that's a method of a PyNode Transform (presuming myname was a 
transform).

The reason this works: (and I added the pmc, I presume you left that off)

myobj = pmc.polySphere()

Is that PyMel returns PyNodes when nodes are created, rather than strings, 
so all the methods are available.



-- 
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/328c9d7c-a9eb-49ae-83ac-6a3315a7bd06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to