LightingLayer

class LightingLayer
property id

The id of the layer.

Type

str, read-only

property name

The name of the layer.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property model

The parent model of this layer.

Type

Model, read-only

property visible

The layer visibility.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property exposure

The layer exposure.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property gamma

The layer gamma.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property format

The layer format.

Type

LightingFormat

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this lighting layer.

Returns

The duplicated layer.

Return type

LightingLayer

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this lighting layer.

Raises

ReadOnlyError -- If Database is in read only mode.

find_color(id)

Find a color by id.

Parameters

id (str) -- Color id to find.

Returns

The color found or None if not found.

Return type

LightingColor or None

Raises

InvalidIdFormat -- If id is not in GUID format.

list_colors()

List the colors of the layer.

Returns

The list of colors of the layer.

Return type

list(LightingColor)

create_color(name)

Create a new color in this layer.

Parameters

name (str) -- Name of the color.

Returns

The newly created color.

Return type

LightingColor

Raises

ReadOnlyError -- If Database is in read only mode.

find_light_group(id)

Find a light group by id.

Parameters

id (str) -- Light group id to find.

Returns

The light group found or None if not found.

Return type

LightGroup or None

Raises

InvalidIdFormat -- If id is not in GUID format.

list_light_groups(recursive = True)

List the light groups of this layer.

Parameters

recursive (bool) -- If True, list all light groups in the layer, otherwise only the root groups are returned.

Returns

The list of light groups in the layer.

Return type

list(LightGroup)

create_light_group(name, group = None)

Create a new light group.

Parameters
  • name (str) -- The name of the group.

  • group (LightGroup or None) -- Parent group of the new group, or None to put the group at the root of the hierarchy.

Returns

The newly created group.

Return type

LightGroup

Raises

ReadOnlyError -- If Database is in read only mode.

find_light(id)

Find a light by id.

Parameters

id (str) -- Light id to find.

Returns

The light found or None if not found.

Return type

Light or None

Raises

InvalidIdFormat -- If id is not in GUID format.

list_lights(recursive = True)

List the lights of this layer.

Parameters

recursive (bool) -- If True, list all lights in the layer, otherwise only the root lights are returned.

Returns

The list of lights in the layer.

Return type

list(Light)

create_spot_light(name, group = None)

Create a new spot light.

Parameters
  • name (str) -- The name of the light.

  • group (LightGroup or None) -- Group of the new light, or None to put the light at the root of the hierarchy.

Returns

The newly created light.

Return type

SpotLight

Raises

ReadOnlyError -- If Database is in read only mode.

create_omni_light(name, group = None)

Create a new omni light.

Parameters
  • name (str) -- The name of the light.

  • group (LightGroup or None) -- Group of the new light, or None to put the light at the root of the hierarchy.

Returns

The newly created light.

Return type

OmniLight

Raises

ReadOnlyError -- If Database is in read only mode.

create_sun_light(name, group = None)

Create a new sun light.

Parameters
  • name (str) -- The name of the light.

  • group (LightGroup or None) -- Group of the new light, or None to put the light at the root of the hierarchy.

Returns

The newly created light.

Return type

SunLight

Raises

ReadOnlyError -- If Database is in read only mode.

create_sky_light(name, group = None)

Create a new sky light.

Parameters
  • name (str) -- The name of the light.

  • group (LightGroup or None) -- Group of the new light, or None to put the light at the root of the hierarchy.

Returns

The newly created light.

Return type

SkyLight

Raises

ReadOnlyError -- If Database is in read only mode.

create_mesh_area_light(name, group = None)

Create a new mesh area light.

Parameters
  • name (str) -- The name of the light.

  • group (LightGroup or None) -- Group of the new light, or None to put the light at the root of the hierarchy.

Returns

The newly created light.

Return type

MeshAreaLight

Raises

ReadOnlyError -- If Database is in read only mode.

create_plane_area_light(name, group = None)

Create a new plane area light.

Parameters
  • name (str) -- The name of the light.

  • group (LightGroup or None) -- Group of the new light, or None to put the light at the root of the hierarchy.

Returns

The newly created light.

Return type

PlaneAreaLight

Raises

ReadOnlyError -- If Database is in read only mode.

create_cylinder_area_light(name, group = None)

Create a new cylinder area light.

Parameters
  • name (str) -- The name of the light.

  • group (LightGroup or None) -- Group of the new light, or None to put the light at the root of the hierarchy.

Returns

The newly created light.

Return type

CylinderAreaLight

Raises

ReadOnlyError -- If Database is in read only mode.