â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