Go to: Synopsis. Return value. Related. Flags. Python examples.
spotLight([coneAngle=angle], [decayRate=int], [discRadius=linear], [dropOff=float], [intensity=float], [name=string], [penumbra=angle], [rgb=[float, float, float]], [shadowColor=[float, float, float]], [shadowDither=float], [shadowSamples=int], [softShadow=boolean], [useRayTraceShadows=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
spotLight is undoable, queryable, and editable.
The spotLight command is used to edit the parameters of
existing spotLights, or to create new ones. The default
behaviour is to create a new spotlight.
In query mode, return type is based on queried flag.
ambientLight, directionalLight, exclusiveLightCheckBox, lightList, lightListEditor, lightListPanel, lightlink, pointLight, spotLightPreviewPort
coneAngle, decayRate, discRadius, dropOff, intensity, name, penumbra, rgb, shadowColor, shadowDither, shadowSamples, softShadow, useRayTraceShadows
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.
|
import maya.cmds as cmds
# Create a spot light
light = cmds.spotLight(coneAngle=45)
# Change the cone angle value
cmds.spotLight( light, e=True, coneAngle=33 )
# Query it
cmds.spotLight( light, q=True, coneAngle=True )
# Result:33#