You can save history as a button.
To create the shelf button
- Highlight all the text in the history window by clicking at the beginning of the history in the upper section of the and dragging the selection to the end of the history section.
- Release the mouse button. The selected text should read:
directionalLight -intensity 1; rename main_light; setAttr "main_lightShape.useDepthMapShadows" 1; setAttr "main_lightShape.dmapResolution" 1024; move 0 3 0; rotate -30 0 0; pointLight -intensity 2 -rgb .9 .9 1; rename back_light; move -r -1.5 1 -1.5; pointLight -intensity .5; rename fill_light; move -r 4 6 2;
- Middle-drag the selected text to the shelf.
A pop-up window asks you which type of shelf button you are saving.
- Click the MEL button on the pop-up window.
A button is created that executes the scripting commands you dragged to the shelf setting up three-point lighting for a scene.
To test the button
- Open the scene named Mel_cone.mb.
This file can be found in the GettingStarted directory that you set as your Maya project.
- Render the scene in the perspective view by selecting the render scene button on the .
- Save the rendered image by clicking the button in the .
- Click your newly created MEL button.
Three point lighting is applied to the scene.
- Render the scene again by selecting the render scene button on the .
- Compare the two images using the scroll bar at the bottom of the window.
To delete the button
- Middle-drag the Shelf button you want deleted to the trash can icon on the far right of the Shelf.
Note
The pointer icon changes to a icon when you are dragging a Shelf button.