Datasheet
20
Chapter 1 Customization and MEL Scripting
Imbedded shelf buttons Shelf buttons are freed from shelves and integrated directly into the
layout. To create a single shelf button with a custom icon that creates a NURBS circle, the
following line is used:
shelfButton -image1 “MDMcircleY.bmp” -width 32
-height 32 -c CreateNURBSCircle;
Maya assumes that the custom icon BMP file is in the default icons folder. For example, the
path might be as follows:
C:\Program Files\Alias\Maya8.0\icons\
Tab layout To maximize the number of buttons and windows, six tabs are included. Tabs are
defined by the
tabLayout command:
string $tabs = ‘tabLayout -innerMarginWidth 3
-innerMarginHeight 3’;
The contents of each tab are preceded by the line similar to the following:
string $child1 = `columnLayout
-adjustableColumn true`;
The tabs are finally constructed with the following code:
tabLayout -edit
-tabLabel $child1 “Modeling”
-tabLabel $child2 “Dynamics”
-tabLabel $child3 “Animation”
-tabLabel $child4 “Rendering”
-tabLabel $child5 “Mel Scripting”
-tabLabel $child6 “Channel Box”
$tabs;
07405c01.indd 2007405c01.indd 20 1/17/07 8:30:58 PM1/17/07 8:30:58 PM