0

I'm poking around in PyMel and OpenMaya trying to convert some pymel code. I was wondering if there is an OpenMaya equivalent of polyListComponentConversion from Pymel?

Ultimately, I'm trying to convert my collected UV shells to faces like so. But PyMel is a bit slow on larger objects.

    for uv_shell in shells:
        # Get the faces as unicode
        faces = pm.polyListComponentConversion(
            mesh.map[shell],
            fromUV=True,
            toFace=True
        )

Thanks in advance

  • you might have better result with the cmds command, pymel is mostly an OpenMaya binding – DrWeeny Aug 04 '22 at 14:56
  • I've heard that there are performance benefits for writing OpenMaya over PyMel, is this not the case? I could probably find this method in cmds as well, but if it has the same performance as PyMel then it wouldn't matter. – Jonathan Sundberg Aug 05 '22 at 15:08
  • openMaya is fairly faster, Pymel has nodal attributes binding openMaya and is more heavy. Doing some perf comparison, most of the time the cmds python is 10-15 times faster than pymel and sometimes is even faster than openMaya (i.e : xform command) So if you are looking for performance, you can have a try with maya.cmds instead of pymel. Im not really proficient in openMaya writing so I can't really try to compare myself the three solutions – DrWeeny Aug 08 '22 at 10:33

0 Answers0