In this example, we'll be building a script to quickly and easily set up a simple three-point lighting setup via script.
This will end up providing us with a nice overview of creating different types of lights with script, as well as leaving us with a handy tool.
For best results, make sure that you have an object with a decent level of detail in your scene before running the script.
Create a new file and add the following code:
import maya.cmds as cmds def createLightRig(): offsetAmount = 10 lightRotation = 30 newLight = cmds.spotLight(rgb=(1, 1, 1), name="KeyLight") lightTransform = cmds.listRelatives(newLight, parent=True) keyLight = lightTransform[0] newLight = cmds.spotLight(rgb=(0.8, 0.8, 0.8), name="FillLight") lightTransform = cmds.listRelatives(newLight, parent=True) fillLight = lightTransform[0] newLight...