I just wanted to pass along a link that popped up on Rigging Dojo’s Twitter feed. Jason Parks from Sony Online Entertainment did what must have been a great talk at the GDC about MEL vs. Python and PyMEL. You can look at a PDF copy of his powerpoint here. He goes through a list of benefits you gain from using python over MEL, including powerful string functions, regular expressions, and system functions, and then goes on to sing the praises of PyMEL over regular Python in Maya. This is great, because as useful as PyMEL has been personally, I’ve noticed that some studios have been a bit reluctant to embrace it, seeing it as more of a sketchy third party plugin than a solid, supported library. I’m glad that I learned to deal with Maya’s Python the hard way, because it gave me a broader understanding of Python, and was an easier transition from MEL. But as Jason points out, Maya’s implementation of Python is really just MEL in disguise. In slide 27 he lists a few reasons why it’s ok to commit to using PyMEL:
- It’s blessed by Autodesk
- It’s not compiled
- It’s open source, so you can build on it or contribute
- and it’s free
Among all the benefits he mentions, there’s a few I didn’t know about, such as PyMEL’s logging. I had used logging before, but didn’t realize PyMEL had it built in:
from pymel.internal.plogging import pymelLogger pymelLogger.info('Regular user info here') pymelLogger.warning('Colored output')
He also talks about using Eclipse as an IDE for Maya scripting, which I’ll have to try. I’ve always just scripted in a text editor.
Finally, he talks about the benefit of object oriented programming for rigging, and creating rig components as an inherited class structure, which is exactly what I’ve been working on for my Devo project. The point is illustrated with this slide:
Which basically shows how you would write a base class, which has methods and member variables that are useful for every rig component, and then inherit everything from that so that each component gets the benefit of that generic starting point.
This has been really exciting for me, as I just recently got my first few rig components working correctly using this sort of structure. It is indeed a powerful way to rig, and hopefully I’ll have some time to report on my own experiments soon. I’m in a little bit of a vacuum, especially with object-oriented programming, and I suspect I’m not always doing things in the most efficient way. So seeing other people doing things like this gives me hope that I’m on the right track.