To add a tool from the Tool Box:
Using the middle mouse button, drag the tool to the shelf.
This creates an editable tool on the shelf. If you select this tool from the shelf and change any settings in the Tool Settings window, the settings for the shelf item also change. These new settings become the default for the shelf tool.
To add a menu item to a shelf:
Press Ctrl-Shift-Alt (IRIX), Shift-Alt (Linux), or Ctrl-Shift (Windows), then select the item from the appropriate menu. Maya places the item on the current shelf. This adds the base tool to the shelf. Any changes you make to the tool settings will be reflected in the shelf tool also.
To add a MEL command to a shelf from the Script Editor:
In the Script Editor (Window > General Editors > Script Editor), highlight the MEL command text that you want to add to a shelf.
Using the middle mouse button, drag the selected text to the shelf and release. This places a MEL icon on the shelf. When you click the icon, Maya runs the command(s).
Open the Script Editor window (Window > General Editors > Script Editor).
Select Create > NURBS Primitives > Sphere. A sphere appears at the origin.
Select the Move Tool and drag a manipulator arrow to move the sphere.
The MEL command move -r 5.315 0 0; (with your own coordinates), appears in the upper pane of the Script Editor.
Highlight the MEL command text in the upper pane of the Script Editor.
Using the middle mouse button, drag the selected text to the shelf and release. This places a MEL icon on the shelf. When clicked, the icon executes the move -r 5.
Never Do Today What You Can Put Off Till Tomorrow..
My New Site MayaFx.com