pymel.core.rendering.ambientLight

ambientLight(*args, **kwargs)

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.

Maya Bug Fix:
  • name flag was ignored
Flags:
Long name (short name) Argument Types Properties
ambientShade (ambientShade) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
ambientShade
discRadius (drs) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
radius of the disc around the light
exclusive (exc) bool ../../../_images/query.gif ../../../_images/edit.gif
   
intensity (i) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
intensity of the light (expressed as a percentage)
name (n) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
specify the name of the light
position (pos) float, float, float ../../../_images/query.gif ../../../_images/edit.gif
   
rgb (rgb) float, float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
color of the light (0-1)
rotation (rot) float, float, float ../../../_images/query.gif ../../../_images/edit.gif
   
shadowColor (sc) float, float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
the shadow color
shadowDither (sd) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
dither the shadowFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
shadowSamples (sh) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
number of shadow samples.
softShadow (ss) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
soft shadow
useRayTraceShadows (rs) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
ray trace shadows

Derived from mel command maya.cmds.ambientLight

Example:

import pymel.core as pm

# Create an ambientLight light
light = pm.ambientLight(intensity=0.8)

# Change the light intensity
pm.ambientLight( light, e=True, intensity=0.5 )

# Query it
pm.ambientLight( light, q=True, intensity=True )
# Result: 0.5 #

Previous topic

pymel.core.rendering.viewSet

Next topic

pymel.core.rendering.assignViewportFactories

Core

Core Modules

Other Modules

This Page