pymel.core.rendering.directionalLight¶
- directionalLight(*args, **kwargs)¶
The directionalLight command is used to edit the parameters of existing directionalLights, or to create new ones. The default behaviour is to create a new directionallight.
- Maya Bug Fix:
- name flag was ignored
Flags:
Long Name / Short Name Argument Types Properties decayRate / d int decay rate of the light (0-no decay, 1-slow, 2-realistic, 3-fast) discRadius / drs float radius of the disc around the light exclusive / exc bool intensity / i float intensity of the light (expressed as a percentage) name / n unicode specify the name of the light position / pos float, float, float rgb / rgb float, float, float color of the light (0-1) rotation / rot float, float, float shadowColor / sc float, float, float the shadow color shadowDither / sd float dither the shadow shadowSamples / sh int number of shadow samples. softShadow / ss bool soft shadow useRayTraceShadows / rs bool ray trace shadows Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.directionalLight
Example:
import pymel.core as pm # Create a directional light light = pm.directionalLight(rotation=(45, 30, 15)) # Change the light intensity pm.directionalLight( light, e=True, intensity=0.5 ) # Query it pm.directionalLight( light, q=True, intensity=True ) # Result: 0.5 # # Result:0.5#