Archive for September, 2010

Maya python snippets

Posting these for my (and anybody else’s) edification – the help docs only get you so far, especially when the nitty gritty of actually *doing* something is more complicated.

Get current shelf:

import maya.cmds as cmds
import maya.mel as mel

gShelfTopLevel = mel.eval('$temp1=$gShelfTopLevel')
print cmds.tabLayout(gShelfTopLevel, query=True, st=True)

Install a menu in the main window menubar:

import maya.cmds as cmds
import maya.mel as mel

gMainWindow = maya.mel.eval('$temp1=$gMainWindow')
oMenu=, tearOff = True, label = 'MyLabel')
subMenu= cmds.menuItem(parent=oMenu, label='mySubMenu', subMenu=True)
cmds.menuItem(parent=subMenu, label='MenuItem1', c='somePythonProc()')

This is quite handy.

Showreel Updates

New showreels posted! Yes, I have been doing stuff.

Character Animation Showreel

Download movie: chrisg_animationReel_2010

TVC Showreel

Download movie: chrisg_generalistReel_2010

Return top