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

Synopsis

ambientLight [-ambientShade float] [-discRadius float] [-edit] [-intensity float] [-name string] [-query] [-rgb float float float] [-shadowColor float float float] [-shadowDither float] [-shadowSamples int] [-softShadow boolean] [-useRayTraceShadows boolean]

ambientLight is undoable, queryable, and editable.

The ambientLight command is used to edit the parameters of existing ambientLights, or to create new ones. The default behaviour is to create a new ambientlight.

Flags

ambientShade, discRadius, edit, intensity, name, query, rgb, shadowColor, shadowDither, shadowSamples, softShadow, useRayTraceShadows
Long name (short name) [argument types] Properties
-edit(-e) edit
edit the parameters of an existing light
-query(-q) query
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.

-ambientShade(-as) float createqueryedit
ambientShade

In query mode, this flag needs a value.

-discRadius(-drs) float createqueryedit
radius of the disc around the light

In query mode, this flag needs a value.

-intensity(-i) float createqueryedit
intensity of the light (expressed as a percentage)

In query mode, this flag needs a value.

-rgb(-rgb) float float float createqueryedit
color of the light (0-1)

In query mode, this flag needs a value.

-name(-n) string createqueryedit
specify the name of the light

In query mode, this flag needs a value.

-useRayTraceShadows(-rs) boolean createqueryedit
ray trace shadows

In query mode, this flag needs a value.

-shadowColor(-sc) float float float createqueryedit
the shadow color

In query mode, this flag needs a value.

-softShadow(-ss) boolean createqueryedit
soft shadow

In query mode, this flag needs a value.

-shadowSamples(-sh) int createqueryedit
number of shadow samples.

In query mode, this flag needs a value.

-shadowDither(-sd) float createqueryedit
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 be used more than once in a command

Return value


[string] (light name)

Related

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

MEL examples

// Create an ambient light
string $light = `ambientLight -intensity 0.8`;

// Change the light intensity
ambientLight -e -intensity 0.5 $light;

// Query it
ambientLight -q -intensity $light;
// Result:0.5 //