In order to make a shelf button, you need to create Script Editor history to copy to the shelf. In this procedure, you create a three-point lighting system for the current geometry using MEL, copy the script history, and apply the created three-point lighting to an existing scene.
directionalLight -intensity 1;
Certain commands require that you to refer to the light by name.
rename main_light;
setAttr "main_lightShape.useDepthMapShadows" 1;
The setAttr command allows you to set attributes of a node. In the above command, you are enabling depth map shadows on the main light.
setAttr "main_lightShape.dmapResolution" 2048;
In the above command, you are increasing the resolution of the depth map shadows to 2048.
move 0 3 0; rotate -30 0 0;
Next, you create a rim light for the scene to help differentiate the torus from its background.
pointLight -intensity 2 -rgb 0.9 0.9 1;
The intensity flag has been used to set the brightness of the light. The -rgb flag sets the color and takes three values: red, green and blue. The red and green values are less than the blue value, so the light has a blue tint.
rename back_light;
move -relative -1.5 1 -1.5;
Next, you create a fill light for the scene to soften the main lighting, fill the shadowed part of the torus and decrease the overall contrast of the lighting in the scene.
pointLight -intensity 0.5;
rename fill_light;
move -relative 4 6 2;