Background

class Background
property id

The id of the background.

Type

str, read-only

property name

The name of the background.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of the background.

Type

BackgroundGroup

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient

Whether the gradient is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_start

The start color of the gradient.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_end

The end color of the gradient.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property gradient_orientation

The orientation of the gradient in degrees (0 for vertical gradient).

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property map

The map of the background or None if there is no map assigned.

Type

Texture or None

Raises

ReadOnlyError -- If Database is in read only mode.

property map_enabled

Whether the map is enabled.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property preserve_aspect

Whether the map aspect ratio is kept.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property map_offset_u

The texture offset in U direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property map_offset_v

The texture offset in V direction, in meters.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

property map_scale_u

The texture scaling in U direction.

Type

float

Raises
property map_scale_v

The texture scaling in V direction.

Type

float

Raises
property map_rotation

The texture rotation, in degrees.

Type

float

Raises

ReadOnlyError -- If Database is in read only mode.

duplicate()

Duplicate this background.

Returns

The duplicated background.

Return type

Background

Raises

ReadOnlyError -- If Database is in read only mode.

remove(force = False)

Delete this background

Note

By default, only not used background can be deleted (InUseError is raised otherwise), use force to force deletion of used backgrounds.

Parameters

force (bool) -- Force the deletion of the background even if it is in use.

Raises