pymel.core.rendering.spotLight¶
- spotLight(*args, **kwargs)¶
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.
- Maya Bug Fix:
- name flag was ignored
Flags:
Long Name / Short Name Argument Types Properties barnDoors / bd bool bottomBarnDoorAngle / bbd float coneAngle / ca float angle of the spotLight 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 dropOff / do float dropOff of the spotLight exclusive / exc bool intensity / i float intensity of the light (expressed as a percentage) leftBarnDoorAngle / lbd float name / n unicode specify the name of the light penumbra / p float specify penumbra region position / pos float, float, float rgb / rgb float, float, float color of the light (0-1) rightBarnDoorAngle / rbd float 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 topBarnDoorAngle / tbd float 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.spotLight
Example:
import pymel.core as pm # Create a spot light light = pm.spotLight(coneAngle=45) # Change the cone angle value pm.spotLight( light, e=True, coneAngle=33 ) # Query it pm.spotLight( light, q=True, coneAngle=True ) # Result: 33.0 # # Result:33#