Database¶
-
class
Database
¶ -
-
property
active_material_group
¶ The active material group.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
save
(clean_database = False)¶ Save the database.
- Parameters
clean_database (bool) -- Whether to shrink the database to minimum size.
- Returns
True
if successful.- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
save_as
(filename)¶ Save the database to another file.
- Parameters
filename (str) -- The new database filename.
- Returns
True
if successful.- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
close
()¶ Close the database
-
find_camera
(id)¶ Find a camera by id.
-
list_cameras
(recursive = True)¶ List the cameras of the database.
-
create_camera
(group = None)¶ Create a camera.
- Parameters
group (CameraGroup or None) -- Group of the new camera, or
None
to put the camera at the root of the hierarchy.- Returns
The new camera.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
find_camera_group
(id)¶ Find a camera group by id.
- Parameters
id (str) -- Camera group id to find.
- Returns
The camera group found or
None
if not found.- Return type
CameraGroup or None
-
list_camera_groups
(recursive = True)¶ List the camera groups of the database.
-
create_camera_group
(name, parent_group = None)¶ Create a camera group.
- Parameters
name (str) -- Name of the new group.
parent_group (CameraGroup or None) -- Parent group of the new group, or
None
to put the group at the root of the hierarchy.
- Returns
The new group.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
find_model
(id)¶ Find a model by id.
-
list_models
()¶ List the models of the database.
-
create_material_group
(name)¶ Create a new material group.
- Parameters
name (str) -- Name of the group.
- Returns
The newly created group.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
-
find_material_group
(id)¶ Find a material group by id.
-
list_material_groups
()¶ List the material groups of the database.
- Returns
The list of material groups in the database.
- Return type
-
property