Created
October 7, 2013 22:22
-
-
Save robomojo/6876031 to your computer and use it in GitHub Desktop.
some code to access maya shelves using pymel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
import maya.mel as mel | |
topLevelShelf = mel.eval('string $m = $gShelfTopLevel') | |
shelves = pm.shelfTabLayout(topLevelShelf, query=True, tabLabelIndex=True) | |
for index, shelf in enumerate(shelves): | |
pm.optionVar(stringValue=('shelfName%d' % (index+1), str(shelf))) | |
# print shelf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment