Background¶
-
class
Background
¶ -
-
property
name
¶ The name of the background.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
group
¶ The group of the background.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
gradient
¶ Whether the gradient is enabled.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
gradient_start
¶ The start color of the gradient.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
gradient_end
¶ The end color of the gradient.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
gradient_orientation
¶ The orientation of the gradient in degrees (0 for vertical gradient).
- Type
- 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
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
map_enabled
¶ Whether the map is enabled.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
preserve_aspect
¶ Whether the map aspect ratio is kept.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
map_offset_u
¶ The texture offset in U direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
map_offset_v
¶ The texture offset in V direction, in meters.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
property
map_scale_u
¶ The texture scaling in U direction.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If trying to set a negative scale.
-
property
map_scale_v
¶ The texture scaling in V direction.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If trying to set a negative scale.
-
property
map_rotation
¶ The texture rotation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
duplicate
()¶ Duplicate this background.
- Returns
The duplicated background.
- Return type
- 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), useforce
to force deletion of used backgrounds.- Parameters
force (bool) -- Force the deletion of the background even if it is in use.
- Raises
InUseError -- If
force
isFalse
and the background is used.ReadOnlyError -- If
Database
is in read only mode.
-
property