PyMEL 1.0 (beta)

Chad and team has done some great work and have a pretty stable beta released.

It is very nice, especially w/ the hand-tooled IDE auto-completion that works very nicely with Eclipse, at least.

Chad’s announcement at the main discussion area for PyMel users: Python Inside Maya Google Groups thread

Code Download HERE

The iPython demo and setup is very cool. The debugging and stack trace in there is very handy. And the auto-complete for everything is very cool. If I did not already have awesome real-time debugging w/ WingIDE Pro and auto-complete w/ Eclipse, I’d use it, for sure. But I find those two packages are a pretty stellar way to code python/pymel for Maya.

If you are not a user already, you should consider joining the big-leagues and commit to this code expansion for Maya. It is truely pro.

Sigh… I would if we were one version of maya ahead…

-L

Lane,

Think we get upgrades soon. Be prepared to get stoked and use PyMel 1.0!

Honeyed words my friend, honeyed words.

But seriously. I will be thrilled when we bump forward to current.

-L

We’re running into some trouble with the new deployment scheme for 1.0. Specifically, pymel now needs to be imported prior to the maya libs, which means it needs to appear before those maya libs in sys.path.

This is actually tricky to accomplish if you already have PYTHONPATH defined as an environment variable, and aren’t in a position to change it. This is because if PYTHONPATH is defined, adding it to the maya.env does nothing (i’m using maya 2008 and carefully verified this).

I can move the 2 necessary PyMel folders into the folder that’s currently defined in PYTHONPATH, but that’s pretty ugly since our maya tools are supposed to live elsewhere (not to mention the confusion of having those 2 folders piled in with a bunch of other modules).

So my question for you guys is does anyone know another way to get PyMel added to the system paths before the standard maya libs, without relying on PYTHONPATH (or hacking the maya install itself).

Drew,

Chad’s reply via Python_Inside_Maya Google Groups thread:

http://bit.ly/7j5y8t

"
we know this ordering can be a bit tricky to accomplish for those who are not using the “easy” install method, especially on a windows machine where PYTHONPATH might be set as a system environment variable that the user cannot override. to help out in these situations, we’ve added a third install option to the 1.0 docs, for those who have write access to their maya site-packages directory: http://www.luma-pictures.com/tools/pymel/docs/1.0/install.html#manual

let us know if that does not solve the problem. there is another variant to this 3rd option that we haven’t fully explored, but it would only work for maya 2010, since .pth location restrictions were relaxed in python 2.6.

-chad
"

Ahhh - thanks for posting that Jason, there are still a couple tricky bits with that 3rd method but i’ll post over there directly and report back.

Got some great help on the pymel forums: using sitecustomize.py is a flexible and painless way to get the pymel libraries loaded in the right order.

A temp version of this solution can be found below, but Chad’s goona roll this into the pymel documentation soon and then this link will die. See Manual Method 4: sitecustomize.

http://www.google.com/url?sa=D&q=http://github.com/shrtcww/pymel/blob/1e4d2fbab671445b21e89c0c7a6f2b7d2dd8538e/docs/source/install.rst&usg=AFQjCNFgSdm7adVQsaafmh9LDrQsVZhJEQ