We've Moved


The blog has been retired - it's up for legacy reasons, but these days I'm blogging at blog.theodox.com. All of the content from this site has been replicated there, and that's where all of the new content will be posted. The new feed is here . I'm experimenting with crossposting from the live site, but if you want to keep up to date use blog.theodox.com or just theodox.com

Thursday, January 16, 2014

Mighty Morphin Maya Module Manager

For folks who are interested in fiddling with Maya modules as per the last post, I've tossed a quickie class to manage Maya modules onto my Gist account.

This is a bare bones bit of code. The main class is the ModuleManager which can find any .mod files on the MAYA_MODULE_PATH of the current Maya environment. It's primary use is to find and list all the modules; secondarily it can be used to toggle them on and off (by changing the leading + which Maya uses to id a module to a -, or vice-versa). It's pretty dumb (no accounting for file permissions, incorrectly formatted .mod files, etc) but it's handy for quickly testing out configs.

 Also included is a GUI class, ModuleManagerDialog, which finds provides a simple GUI for listing, enabling, and disabling .mod files. Again, pretty simple stuff, but people may find it useful.


As will all code I put up here, it's BSD licensed. Use away with attribution - and if you have any bug fixes, let me know and we'll fix the Gist version.

PS, hat tip to the gang at TAO  for the idea of using a context manager to get out of all those stupid setParent("..") calls in Maya GUI work. I could not find the original post where somebody mentioned it - but whoever you are, sir or madam, thank you ever so much.


No comments:

Post a Comment