Most scenes will end up containing multiple lights, and controlling them all can get to be a real hassle. In this example, we'll be creating GUI that will present the user with an easy way to control the colors of all the lights in the scene.
Running the script with three lights in the scene would result in something like the following:
Make sure that you have at least a few lights in your scene. Alternatively, use the three-point lighting example above to quickly set up a system of lights.
Create a new file and add the following code:
import maya.cmds as cmds from functools import partial class LightBoard(): def __init__(self): self.lights = [] self.lightControls = [] self.lightNum = 0 if (cmds.window("ahLightRig", exists=True)): cmds.deleteUI("ahLightRig") self.win = cmds.window("ahLightRig", title="Light Board") cmds.columnLayout() lights = cmds.ls(lights...