::pymel::

December 20th, 2009 by hamish download the zooToolBox

I’ve been impressed by what I’ve read about pymel from day 1. but i don’t use it. and here’s why, and I’d be interested in hearing people’s thoughts on how silly I am for passing it by.

first up – its yet another layer of abstraction, and more to the point, one which I did not write. Hence tracking down bugs is just going to be that much harder.  honestly, this argument is becoming weaker and weaker as I get more familiar with both python as a language (the pymel guys are shit hot programmery type people, so their code uses some pretty advanced python), and debugging python code.

secondly it doesn’t really save me THAT much does it?  i mean for someone like me who is super familiar with mel, using python vs mel is literally learning a few simple rules for transposing command arguments and bam.  in all but the rarest of exceptions, the python code for a command is identical in calling structure to its equivalent mel. so i would make my code slightly less verbose.  more readable code is important, but honestly, I usually abstract the calls to maya by objectifying data structures anyway.  zooTriggered for example, there is a Trigger class which provides high level access to manipulate the trigger object.  using pymel the class might contain 20% less code.  meh.

the most interesting thing seems to be the api hybridization that they’re doing which does indeed sound great, and could result in some awesome functionality. and their representation of nodes using the api instead of strings is awesome, and indeed I’ve thought about doing this myself many times, but I imagine the pymel guys have done this way better than I ever would have been able to.

lastly its not supported by autodesk so its longevity isn’t guaranteed – last time I peeked at it, it was parsing documentation to generate a bunch of code – presumably to get all the flag names.  its probably pretty unlikely that this would be a problem,  after all invalidating the pymel project would also invalidate anything that relied on the maya api, or most mel scripts, and I don’t think thats in autodesk’s best interest.

so am I high? if you’re super familiar with mel, does it really add much value?  does anyone have an example of some functionality that would have been impossible/difficult without something like pymel?

either way – pymel is a super impressive project, and a huge kudos goes to the developers, least of all because they’re giving their work over to the community, which is a huge win for everyone – especially autodesk.


This entry was posted on Sunday, December 20th, 2009 at 15:02 and is filed under main. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “pymel”

  1. Erkan Ozgur Yilmaz says:

    I don’t know if you can read this without being a group member:

    http://groups.google.com/group/python_inside_maya/browse_thread/thread/4e57855e72a78ffa#

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image