Go to: Synopsis. Return value. Related. Flags. MEL examples.
spotLight [-barnDoors boolean] [-bottomBarnDoorAngle angle] [-coneAngle angle] [-decayRate int] [-discRadius linear] [-dropOff float] [-exclusive boolean] [-intensity float] [-leftBarnDoorAngle angle] [-name string] [-penumbra angle] [-position linear linear linear] [-rgb float float float] [-rightBarnDoorAngle angle] [-rotation angle angle angle] [-shadowColor float float float] [-shadowDither float] [-shadowSamples int] [-softShadow boolean] [-topBarnDoorAngle angle] [-useRayTraceShadows boolean]
spotLight is undoable, queryable, and editable.
TlightCmd is the base class for other light commands.
TnonAmbientLightCmd is a class that looks like a command but
is not. It is a base class for the extended/nonExtended
lights.
TnonExtendedLightCmd is a base class and not a real command. It is inherited by several
lights: TpointLight, TdirectionalLight, TspotLight etc.
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.
string | Light shape name
boolean Barn door enabled state
angle Left barn door angle
angle Right barn door angle
angle Top barn door angle
angle Bottom barn door angle
angle Cone angle
angle Penumbra angle
float Dropoff value |
double[] | when querying the rgb or shadowColor flags
double when querying the intensity flag
boolean when querying the useRayTraceShadows or exclusive flags
linear[] when querying the position flag
angle[] when querying the rotation flag
string when querying the name flag |
int | rate of light decay, when querying the decayRate flag |
int | Number of shadow samples, when querying the shadowSamples flag
boolean True if soft shadows are enabled, when querying the softShadow flag
float Shadow dithering value, when querying the shadowDither flag
float Disc radius value, when querying the discRadius flag |
In query mode, return type is based on queried flag.
ambientLight, directionalLight, exclusiveLightCheckBox, lightList, lightlink, pointLight, spotLightPreviewPort
barnDoors, bottomBarnDoorAngle, coneAngle, decayRate, discRadius, dropOff, exclusive, intensity, leftBarnDoorAngle, name, penumbra, position, rgb, rightBarnDoorAngle, rotation, shadowColor, shadowDither, shadowSamples, softShadow, topBarnDoorAngle, 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 be used more than once in a command.
|
// Create a spot light
string $light = `spotLight -coneAngle 45`;
// Change the cone angle value
spotLight -e -coneAngle 33 $light;
// Query it
spotLight -q -coneAngle $light;
// Result:33//