Honestly you should learn maya.cmds and PyMEL. You need to know both because studios use both. and you can't get away with just knowing one. Then learn the Python API
PyMEL saves you coding time not cycles. if you're writing a deformer or iterating over the verts in a poly mesh you'd want to use the Python API. if you're rigging I prefer PyMEL. PyMEL is object-oriented. It's a framework wrapper that wraps MEL, maya.cmds and the Python API. Which ever route returns the fastest most-complete data is what PyMEL will use. for rigging or general scripts PyMEL is great! I've used it for years. For code that needs to be super fast and deals with gigantic data sets, use the Python API or C++ API. RE the ls command being 40x slower in PyMEL is a faulty comparison. Here's why: the pymel selected() command is slower because each item it returns is converted to a pynode object instead of a string (maya.cmds). What is returned is more useful, but you have to wait a millionth of a second longer to get it. if you are a python coder, PyMEL will behave as you would expect. Like other python modules in the python universe. It is more pythonic as it passes around objects with function sets related to the object. instead of strings that force you to search for the right methods. therefore you can run help on any PyMEL object and see a list of methods. This is pythonic. help(pynode) or help(pynode.__class__) the Python API 2.0 is not as complete as the 1.0 API and is incompatible with the 1.0 API. Perhaps soon the 2.0 API will be fully functional. On Thu, Sep 18, 2014 at 4:52 AM, Hans Baldzuhn <hans.baldz...@gmail.com> wrote: > PyMel is far slower than mel or default python. > > As Jeremy YK, pyMel is a wrapper of the python and maya api. > If you are using api calls on a single object (like querying vertex > position etc), it will as fast as the python API. > > But for everything accessible through mel, like the "ls" command, pymel > can be up to 40 times slower on huge scene (from my experience). There is a > big overhead of wrapping all returned strings to PyMel nodes. > > For me it's only a way to write faster and in a more pythonic way. But > it's going to be always slower than mel, python or API. And it's HUGE to > load. > I personally just need it to be fast so pymel is useless to me. > > In my codes, I finally removed all pymel call with default python command, > and I made a simple node wrapper to keep a few pymel functionality. > > Le jeudi 18 septembre 2014 11:58:11 UTC+2, Srinivasan Samuel a écrit : >> >> Hi pyGeeks & pyNERDS out there :) >> >> I salute you all. Knowing Python(an OK scripter) I have started learning >> Maya scripting from MEL and now gravitating towards pyMEL as I feel thats >> the way to go. >> >> I also want to know the cons of pyMEL over Python in Maya & MEL ofcourse. >> Please refer the following link and this gentleman says pyMEL is slower >> than MEL. >> >> http://jeremyyk.com/tutorials/maya-s-python-api-2-0- >> >> Could somebody motivate and justify me that pyMEL is the future & the way >> to go :) >> >> I appreciate your time. >> >> Solomon. >> >> -- > 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_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/07319b50-d8d6-4830-8576-17baf3a328e6%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/07319b50-d8d6-4830-8576-17baf3a328e6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABPXW4iNz1ONpHBQ9NBxTnJAtQVEszm9SxaacyZj5Pi3x55sxQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.