Go to: Synopsis. Return value. Related. Flags. Python examples.

Synopsis

lightListEditor([add=boolean], [allShadingGroups=boolean], [mode=string], [multipleSelection=boolean], [remove=boolean], [singleSelection=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

lightListEditor is undoable, queryable, and editable.

This command created a light list editor. A light lister displays the lights that are illuminating the selected objects. As the active list changes, the information displayed in the light-lister changes.

You can add relationships by selecting a light and the object and pressing "ADD". Or you can drag-and-drop the light from a UI like the outliner onto the light lister.

You can remove relationships by selecting the lights in the editor and pressing "REMOVE".

Return value

stringName of the editor.

In query mode, return type is based on queried flag.

Related

ambientLight, directionalLight, exclusiveLightCheckBox, lightList, lightListPanel, lightlink, pointLight, spotLight, spotLightPreviewPort

Flags

add, allShadingGroups, mode, multipleSelection, remove, singleSelection
Long name (short name) Argument types Properties
add(add) boolean edit
If the editor is in light list mode, this will link the selected lights to the shading groups selected in the editor. If in shading group mode, will assign the currently selected renderable objects to the shading group selected in the editor.
remove(r) boolean edit
If the editor is in light list mode, this will unlink the selected lights to the shading groups selected in the editor. If in shading group mode, will unassign the currently selected renderable objects from the shading group selected in the editor.
mode(m) string queryedit
Specifies the operating mode for the editor. Valid values are: lightLists | shadingLists.
singleSelection(ss) boolean queryedit
Specifies if the editor is listing only one item on the active list. Using this listing technique the frame will be opened automatically and single clicks of rows in the editor will result in membership changes.
multipleSelection(ms) boolean queryedit
Specifies if the editor is listing all of the relevant things on the active list.
allShadingGroups(asg) boolean queryedit
Specifies if the editor is listing all of the shading groups.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Create a poly sphere and two pointLights
cmds.polySphere(r=3, n='pSphere1')
cmds.pointLight(pos=(6, 6, 0), rgb=(1.0, 1.0, 0.0), n='yellowLight')
cmds.pointLight(pos=(-6, 6, 0), rgb=(1.0, 0.0, 0.0), n='redLight')

# Select the poly sphere
cmds.select('pSphere1')

# Create a light list editor which displays the lights that illuminate poly sphere selected
cmds.window('lightListWindow1')
cmds.frameLayout(h=500)
llEditor = cmds.lightListEditor(m='lightLists', asg=True, ss=True)
cmds.showWindow('lightListWindow1')

# Click to select the initialShadingGroup in the light list editor

# Select the yellowLight
cmds.select('yellowLightShape')

# Link the yellowLight to the initialShadingGroup
cmds.lightListEditor(llEditor, e=True, add=True)