Light(ID)

base classes — bpy_struct, ID

subclasses — AreaLight, PointLight, SpotLight, SunLight

class bpy.types.Light(ID)

Light data-block for lighting a scene

animation_data

Animation data for this data-block (readonly)

Type:

AnimData

color

Light color (array of 3 items, in [0, inf], default (1.0, 1.0, 1.0))

Type:

mathutils.Color

cutoff_distance

Distance at which the light influence will be set to 0 (in [0, inf], default 40.0)

Type:

float

diffuse_factor

Diffuse reflection multiplier (in [0, inf], default 1.0)

Type:

float

exposure

Scales the power of the light exponentially, multiplying the intensity by 2^exposure (in [-32, 32], default 0.0)

Type:

float

node_tree

Node tree for node based lights (readonly)

Type:

NodeTree

normalize

Normalize intensity by light area, for consistent total light output regardless of size and shape (default True)

Type:

bool

specular_factor

Specular reflection multiplier (in [0, inf], default 1.0)

Type:

float

temperature

Light color temperature in Kelvin (in [800, 20000], default 6500.0)

Type:

float

temperature_color

Color from Temperature (array of 3 items, in [0, inf], default (0.0, 0.0, 0.0), readonly)

Type:

mathutils.Color

transmission_factor

Transmission light multiplier (in [0, inf], default 1.0)

Type:

float

type

Type of light (default 'POINT')

Type:

Literal[Light Type Items]

use_custom_distance

Use custom attenuation distance instead of global light threshold (default False)

Type:

bool

use_nodes

Use shader nodes to render the light (default False)

Deprecated since version 5.10: removal planned in version 6.0

Unused but kept for compatibility reasons. Setting the property has no effect, and getting it always returns True.

Type:

bool

use_shadow

(default True)

Type:

bool

use_temperature

Use blackbody temperature to define a natural light color (default False)

Type:

bool

volume_factor

Volume light multiplier (in [0, inf], default 1.0)

Type:

float

area(*, matrix_world=((0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0)))

Compute light area based on type and shape. The normalize option divides light intensity by this area

Parameters:

matrix_world (mathutils.Matrix) – Object to world space transformation matrix (multi-dimensional array of 4 * 4 items, in [-inf, inf], optional)

Returns:

area, (in [-inf, inf])

Return type:

float

inline_shader_nodes()

Get the inlined shader nodes of this light. This preprocesses the node tree to remove nested groups, repeat zones and more.

Returns:

The inlined shader nodes.

Return type:

bpy.types.InlineShaderNodes

classmethod bl_rna_get_subclass(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (bpy.types.Struct | None) – The value to return when not found.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (type | None) – The value to return when not found.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References