can anyone tell me the difference between these two commands, one in pymel and the other in python. I thought they both just returned the Transform name of the object selected. But apparently not.
if you create a poly sphere and run this
###########################################
import maya.cmds as cmds
import pymel.core as pm
mesh=pm.selected()[0]
print "mesh1: ", mesh
mesh=(cmds.ls(selection=True)[0])
print "mesh2: ", mesh
############################################
they return the same name but can't be used interchangeably it seems, can anyone help?
thanks,
Sam
The native Maya cmds module deals in terms of string paths as the identifiers. pymel is an abstraction layer that creates a node object with methods.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ef3776e8-0e39-414b-addf-e24dd649c636%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
thanks,
Sam
thanks,
Sam
Not anything that is exactly similar. You have the option of either working with the Python commands module, which mirrors the way MEL works, or you can use the Python API which mirrors how the C++ API works. PyMel is its own separate 3rd party abstraction.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f99a3618-e445-493c-9a8b-d700b46df354%40googlegroups.com.