pymel.core.nodetypes.SpotLight

Inheritance diagram of SpotLight

class SpotLight(*args, **kwargs)

class counterpart of mel function spotLight

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.

MBarnDoor = Enum( EnumValue('MBarnDoor', 0, 'left'), EnumValue('MBarnDoor', 1, 'right'), EnumValue('MBarnDoor', 2, 'top'), EnumValue('MBarnDoor', 3, 'bottom'))
MDecayRegion = Enum( EnumValue('MDecayRegion', 0, 'first'), EnumValue('MDecayRegion', 1, 'second'), EnumValue('MDecayRegion', 2, 'third'))
getBarnDoorAngle(which_door)

Retrieves the value of the barn door angle for the specified barn door. The barn door angles are represented by the “leftBarnDoor”, “rightBarnDoor”, “topBarnDoor”, and “bottomBarnDoor” attributes. This function retrieves the value of the appropriate attribute.

Parameters :
which_door : SpotLight.MBarnDoor

which barn door to return.

values: ‘left’, ‘right’, ‘top’, ‘bottom’

Return type:

float

Derived from api method maya.OpenMaya.MFnSpotLight.barnDoorAngle

getBarnDoors()

Retrieves the value of the “barnDoors” attribute of a light node. This attribute determines whether or not the light uses barn doors.

Return type:bool

Derived from api method maya.OpenMaya.MFnSpotLight.barnDoors

getBottomBarnDoorAngle(**kwargs)

Derived from mel command maya.cmds.spotLight

getConeAngle()

Retrieves the value of the “coneAngle” attribute of a light node. This attribute represents the angle that the spotlight cone makes with the spotlight direction vector.

Return type:float

Derived from api method maya.OpenMaya.MFnSpotLight.coneAngle

getDiscRadius(**kwargs)

radius of the disc around the light

Derived from mel command maya.cmds.spotLight

getDropOff()

Retrieves the value of the “dropOff” attribute of a light node. This attribute represents the degree to which intensity of the light decreases with increasing angular distance from the light direction vector. Higher values represent more rapid intensity dropoff.

Return type:float

Derived from api method maya.OpenMaya.MFnSpotLight.dropOff

getEndDistance(which_region)

Retrieves the value of the end distance for the specified decay regions. The end distances for the spotlight’s 3 decay regions are represented by the “endDistance1”, “endDistance2”, and “endDistance3” attributes. This function retrieves the value of the appropriate attribute.

Parameters :
which_region : SpotLight.MDecayRegion

the decay region whose endDistance attribute is to be retrieved.

values: ‘first’, ‘second’, ‘third’

Return type:

float

Derived from api method maya.OpenMaya.MFnSpotLight.endDistance

getExclusive(**kwargs)

Derived from mel command maya.cmds.spotLight

getLeftBarnDoorAngle(**kwargs)

Derived from mel command maya.cmds.spotLight

getPenumbra()

Retrieves the value of the “penumbraAngle” attribute of a light node. This attribute represents the extra angle beyond the cone angle used in soft shadow computations.

Return type:float

Derived from api method maya.OpenMaya.MFnSpotLight.penumbraAngle

getRgb(**kwargs)

color of the light (0-1)

Derived from mel command maya.cmds.spotLight

getRightBarnDoorAngle(**kwargs)

Derived from mel command maya.cmds.spotLight

getShadowDither(**kwargs)

dither the shadowFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.spotLight

getShadowSamples(**kwargs)

number of shadow samples.

Derived from mel command maya.cmds.spotLight

getSoftShadow(**kwargs)

soft shadow

Derived from mel command maya.cmds.spotLight

getStartDistance(which_region)

Retrieves the value of the start distance for the specified decay regions. The start distances for the spotlight’s 3 decay regions are represented by the “startDistance1”, “startDistance2”, and “startDistance3” attributes. This function retrieves the value of the appropriate attribute.

Parameters :
which_region : SpotLight.MDecayRegion

the decay region whose startDistance attribute is to be retrieved.

values: ‘first’, ‘second’, ‘third’

Return type:

float

Derived from api method maya.OpenMaya.MFnSpotLight.startDistance

getTopBarnDoorAngle(**kwargs)

Derived from mel command maya.cmds.spotLight

getUseDecayRegions()

Retrieves the value of the “useDecayRegions” attribute of a light node. This attribute determines whether or not the light uses decay regions.

Return type:bool

Derived from api method maya.OpenMaya.MFnSpotLight.useDecayRegions

setBarnDoorAngle(which_door, barn_door_angle)

Sets the value of the appropriate barn door angle attribute of a light node.

Parameters :
which_door : SpotLight.MBarnDoor

Which barn door to return.

values: ‘left’, ‘right’, ‘top’, ‘bottom’

barn_door_angle : float

New value for the barn door.

Derived from api method maya.OpenMaya.MFnSpotLight.setBarnDoorAngle

setBarnDoors(barn_doors)

Sets the value of the “barnDoors” attribute of a light node.

Parameters :
barn_doors : bool

value to which the attribute will be set.

Derived from api method maya.OpenMaya.MFnSpotLight.setBarnDoors

setBottomBarnDoorAngle(val=True, **kwargs)

Derived from mel command maya.cmds.spotLight

setConeAngle(cone_angle)

Sets the value of the “coneAngle” attribute of a light node.

Parameters :
cone_angle : float

value to which the attribute will be set.

Derived from api method maya.OpenMaya.MFnSpotLight.setConeAngle

setDiscRadius(val=True, **kwargs)

radius of the disc around the light

Derived from mel command maya.cmds.spotLight

setDropOff(drop_off)

Sets the value of the “dropOff” attribute of a light node.

Parameters :
drop_off : float

value to which the attribute will be set.

Derived from api method maya.OpenMaya.MFnSpotLight.setDropOff

setEndDistance(which_region, end_distance)

Sets the value of the appropriate decay region end distance attribute of a light node.

Parameters :
which_region : SpotLight.MDecayRegion

the decay region whose end distance is to be set.

values: ‘first’, ‘second’, ‘third’

end_distance : float

value to which the attribute will be set.

Derived from api method maya.OpenMaya.MFnSpotLight.setEndDistance

setExclusive(val=True, **kwargs)

Derived from mel command maya.cmds.spotLight

setLeftBarnDoorAngle(val=True, **kwargs)

Derived from mel command maya.cmds.spotLight

setPenumbra(penumbra_angle)

Sets the value of the “penumbraAngle” attribute of a light node.

Parameters :
penumbra_angle : float

value to which the attribute will be set.

Derived from api method maya.OpenMaya.MFnSpotLight.setPenumbraAngle

setRgb(val=True, **kwargs)

color of the light (0-1)

Derived from mel command maya.cmds.spotLight

setRightBarnDoorAngle(val=True, **kwargs)

Derived from mel command maya.cmds.spotLight

setRotation(val=True, **kwargs)

Derived from mel command maya.cmds.spotLight

setShadowDither(val=True, **kwargs)

dither the shadowFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.spotLight

setShadowSamples(val=True, **kwargs)

number of shadow samples.

Derived from mel command maya.cmds.spotLight

setSoftShadow(val=True, **kwargs)

soft shadow

Derived from mel command maya.cmds.spotLight

setStartDistance(which_region, start_distance)

Sets the value of the appropriate decay region start distance attribute of a light node.

Parameters :
which_region : SpotLight.MDecayRegion

the decay region whose start distance is to be set.

values: ‘first’, ‘second’, ‘third’

start_distance : float

value to which the attribute will be set.

Derived from api method maya.OpenMaya.MFnSpotLight.setStartDistance

setTopBarnDoorAngle(val=True, **kwargs)

Derived from mel command maya.cmds.spotLight

setUseDecayRegions(use_decay_regions)

Sets the value of the “useDecayRegions” attribute of a light node.

Parameters :
use_decay_regions : bool

value to which the attribute will be set.

Derived from api method maya.OpenMaya.MFnSpotLight.setUseDecayRegions

Previous topic

pymel.core.nodetypes.SpBirailSrf

Next topic

pymel.core.nodetypes.Spring

Core

Core Modules

Other Modules

This Page