::ok fine!::
December 21st, 2009 by hamish download the zooToolBoxI had already half convinced myself that I should probably try out pymel… in fact the very act of writing my previous post pushed me right to the brink (I know, it didn’t sound like it). after talking to a few very useful fellows, I decided what the hell. pymel 0.9.2 is now officially in our tree, and I’ll probably start tooling around with it in the new year.
more specifically, if you’re interested, I want to do a bunch of work porting the rigging code in CST over to python for a few reasons. first up its easier to write extensible code in python. if you’re at all familiar with CST code you’ll see all the horrible horrible things I’ve done using mel that mel was never intended to do – like arbitrary option parsing. at the top of every single rig primitive is no less than 20 lines of code (and quite often more like 30) just parsing options from an “option string”. this is where you can specify optional overrides to default functionality, and also allows me to easily extend the code without having to invalidate existing calls to the code. its great that I could do this in mel, but honestly, its a hack around a fundamental hole in the language itself, plus the possible options is completely hidden from anyone not looking at the code. so it was impossible to enumerate the optional args in a UI without duplicating code (ok not impossible – I could have written a function to parse the mel and extract the data that way… but holy bawlz)
but more importantly I think the model CST uses is fundamentally flawed in terms of creating arbitrary rigs. anyhoo, I won’t bore you with the details (unless you really want me to) but suffice to say it will involve a bunch of code, most of which I imagine will be framework code. I figure I may as well fold the python port into said code churn so I can move on with life.
thanks to those who provided input!
This entry was posted on Monday, December 21st, 2009 at 17:24 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.





December 22nd, 2009 at 01:29
Hey Hamish,
If I can help convert to python /pymel the CST stuff let me know what I can do…
I don’t know how much help I will be though being a python newb still, going through your svn I realise there is still a lot differences in python to mel and my understanding of the language.
The option flags in MEL were always a good work around though, I’ve used zooFlags in all my other scripts (which I am trying to port to python the right way
December 22nd, 2009 at 08:43
heya dave! sure, if I can think of something I’ll ping ya. honestly to start with it’ll be just straight up python code. I want to develop more of a framework for the rig primitives first.
CST kinda does this already using the primitive registration mechanism thats in there, but obviously I’m pretty limited when it comes to abstraction in mel, so it ended up becoming quite burdensome actually.
I’ve since written a system for building skeletons using the primitive paradigm, and it has a really neat framework that enables you to just focus on important coding issues, and not have to think about registration, hooking up stuff properly – its all handled for you by the framework. which also means its harder to screw up, things are more consistent etc… in fact, these skeleton parts already know how to rig themselves, but CST doesn’t take into account skeleton topology when building out rig primitives, so building arbitrary creatures is possible, but kludgy.
anyhoo, I’ll let you know though!
December 27th, 2009 at 19:01
hamish,
be sure to post any issues you have at our google code page: http://code.google.com/p/pymel/issues/list
more importantly, send us any ideas you have for new features or usability improvements. seeing how far you’ve pushed MEL, python is going to be a huge breath of fresh air for you.
one last thing, a beta of version 1.0 is being tested right now.
download here: http://code.google.com/p/pymel/downloads/list
find out what’s new here: http://www.luma-pictures.com/tools/pymel/docs/1.0/whats_new.html
-chad
December 29th, 2009 at 21:42
thanks chad. python certainly has been a breath of fresh air. hopefully pymel will enhance the freshness.
the biggest bummer i’ve had so far with it has been the lack of knowledge about what is wrapped and how, and i have no idea how the code works so its kinda hard to discover stuff. anyway i’ll keep poking away
January 7th, 2010 at 00:49
I’ve been doing as much of my coding in Python as possible (though I don’t do that much). I like it and I like the fact that it is not a proprietary language. I haven’t looked into pymel, though once again, I’d rather avoid a proprietary language (if it is one).
Just my 2c.
January 7th, 2010 at 11:23
I get this message when I try to run zooXferAnim
Please help
zooXferAnim;
import xferAnimUI; xferAnimUI.load()
# Error: No module named xferAnimUI
# Traceback (most recent call last):
# File “”, line 1, in
# ImportError: No module named xferAnimUI #
March 2nd, 2010 at 14:31
Hey y a Hamish,
Def something up with the install/setup for the new version of zootools re the switch to pymel, tried it in Ubuntun 9.10 Maya 2008 ext 2 and on two sep setups various aspects of CST don’t work, on one setup it totally borked maya’s prefs and windows / loads. Was most interesting. And I think I need to spend an extra wad of time figuring out the pymel install properly again. I think it is installed but I can’t be sure because I have nfi what how when where :\
Anyways I’m happy to help test this / write a how to once I’m done testing/setting up to help out – I know I owe you a lot more than just my time for releasing these tools to the GPublic and supporting them so well for so many years, you have my eternal gratitude and if you ever need anything that I can accommodate just ask, click the donate button you say? hehe yes I’ve been slack getting to that one
*wink* But I have paypal now! So…
James