Go to: Synopsis. Flags. Return value. Related. Python examples.
spotLight([coneAngle=float], [decayRate=int], [discRadius=float], [dropOff=float], [edit=boolean], [intensity=float], [name=string], [penumbra=float], [query=boolean], [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.
coneAngle, decayRate, discRadius, dropOff, edit, intensity, name, penumbra, query, rgb, shadowColor, shadowDither, shadowSamples, softShadow, useRayTraceShadows
Long name (short name) |
[argument types] |
Properties |
edit(e)
|
boolean
|
|
|
edit the parameters of an existing light
|
|
query(q)
|
boolean
|
|
|
Puts the command in query mode so that it will return the value of
the specified flag.
In query mode, this flag needs a value.
|
|
coneAngle(ca)
|
float
|
 
|
|
angle of the spotLight
In query mode, this flag needs a value.
|
|
decayRate(d)
|
int
|
 
|
|
decay rate of the light (0-no decay, 1-slow, 2-realistic, 3-fast)
In query mode, this flag needs a value.
|
|
discRadius(drs)
|
float
|
 
|
|
radius of the disc around the light
In query mode, this flag needs a value.
|
|
dropOff(do)
|
float
|
 
|
|
dropOff of the spotLight
In query mode, this flag needs a value.
|
|
intensity(i)
|
float
|
 
|
|
intensity of the light (expressed as a percentage)
In query mode, this flag needs a value.
|
|
name(n)
|
string
|
 
|
|
specify the name of the light
In query mode, this flag needs a value.
|
|
penumbra(p)
|
float
|
 
|
|
specify penumbra region
In query mode, this flag needs a value.
|
|
rgb(rgb)
|
[float, float, float]
|
 
|
|
color of the light (0-1)
In query mode, this flag needs a value.
|
|
useRayTraceShadows(rs)
|
boolean
|
 
|
|
ray trace shadows
In query mode, this flag needs a value.
|
|
shadowColor(sc)
|
[float, float, float]
|
 
|
|
the shadow color
In query mode, this flag needs a value.
|
|
softShadow(ss)
|
boolean
|
 
|
|
soft shadow
In query mode, this flag needs a value.
|
|
shadowSamples(sh)
|
int
|
 
|
|
number of shadow samples.
In query mode, this flag needs a value.
|
|
shadowDither(sd)
|
float
|
 
|
|
dither the shadow
In query mode, this flag needs a value.
|
|
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.
|
string (light name)
ambientLight, directionalLight, exclusiveLightCheckBox, lightList, lightListEditor, lightListPanel, lightlink, pointLight, spotLightPreviewPort
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#