Moka Studio
Centre du parc
Rue Marconi, 19
1920 Martigny
SWITZERLAND
Tel: 0041 27 566 70 17
Mail: dev@mokastudio.tv
[Maya Python] Create and Edit a Shelf Button
Here is a simple example creating and editing a shelf button.
Example:
#========================================================================= # This script creates and edits a shelf button in Maya #========================================================================= # Import PyMel 0.9.2 import pymel as pm # Create ShelfLyout PyNode for TEST Maya shelf myShelf = pm.ShelfLayout('TEST') # Create a ShelfButton myShelfButton = pm.ShelfButton(parent = myShelf, enable = 1, annotation = "Create a sphere", label = "Create a sphere", image1 = "sphere.xpm", style = "iconOnly", command = "pm.polySphere()") # Edit a ShelfButton myShelfButton.setCommand("pm.sphere()")
Best regards,
Benoît
- Login to post comments
