“I’m still so confused as to why there is two… PyMel sounds better but I keep getting told it’s slower.”
PyMel casts into PyNode objects so that you get tons of utility methods attached to anything cast in Maya. It is incredibly powerful and most often you will not “feel” the casting.
If you are going to iterate through a ton of vertices, you will start noticing the casting and it might be time to turn to OpenMaya.
There are 2 options because AD didn’t make a very pythonic implementation in Maya. maya.cmds is not object oriented. Chad Dombrova spearheaded PyMel and tons of people adopted it. AD recognized the adoption and started bundling it in with Maya.
import pymel.core.general
selectedTransform = pymel.core.general.selected()[0]
for vert in selectedTransform.getShape().verts:
if vert.isOnBoundary():
doSomething()
Simple example, but it illustrates how fast you are able to do things when using PyMel and how readable it is.
This is an outdated article, but scroll down to the “The Languages Of Maya” to give you a better overview…
http://christianakesson.com/python-art-pipelines/ - search for “The Languages Of Maya”
Hope that helps somewhat,
/Christian Akesson