Skip to content

Scene Controller

Scenes: named, organisable views of element subsets.

Manages the collection of saved scenes in the project — their creation and removal, their membership of elements, their grouping into folders/tabs, and their activation. Scenes are persistent named selections; transient visibility belongs to visualization_controller.

activate_scene(name: str) -> bool

Activates a scene.

Parameters:

Name Type Description Default
name str

The scene name.

required

Returns:

Type Description
bool

True if the operation succeeded, false otherwise.

add_elements_to_scene(name: str, element_id_list: list[ElementId]) -> bool

Adds elements to a scene.

Parameters:

Name Type Description Default
name str

The scene name.

required
element_id_list list[ElementId]

: The element id list.

required

Returns:

Type Description
bool

True if the operation succeeded, false otherwise.

add_scene(name: str) -> bool

Adds a new scene.

Parameters:

Name Type Description Default
name str

The scene name.

required

Returns:

Type Description
bool

True if the operation succeeded, false otherwise.

clear_errors() -> None

Clears all errors.

delete_scene(name: str) -> bool

Deletes a scene.

Parameters:

Name Type Description Default
name str

The scene name.

required

Returns:

Type Description
bool

True if the operation succeeded, false otherwise.

get_elements_from_scene(name: str) -> list[ElementId]

Gets the elements from a scene.

Parameters:

Name Type Description Default
name str

The scene name.

required

Returns:

Type Description
list[ElementId]

The element id list.

get_group_index_by_name(scene_group_name: str) -> UnsignedInt

Gets the index of a scene group by its name.

Parameters:

Name Type Description Default
scene_group_name str

The group name.

required

Returns:

Type Description
UnsignedInt

The index of the group, or a maximum uint64_t if not found.

get_scene_list() -> list[str]

Gets the list of scenes.

Returns:

Type Description
list[str]

The list of scene names.

group_scences(scene_names: list[str]) -> UnsignedInt

Groups the scenes to a scene group.

Parameters:

Name Type Description Default
scene_names list[str]

The scene names.

required

Returns:

Type Description
UnsignedInt

The index of the new group.

group_scences_with_name(scene_names: list[str], group_name: str) -> UnsignedInt

Groups the scenes to a scene group and sets the name of the new group.

Parameters:

Name Type Description Default
scene_names list[str]

The scene names to group.

required
group_name str

The name of the new group.

required

Returns:

Type Description
UnsignedInt

The index of the new group.

is_scene_present(name: str) -> bool

Checks if a scene is present.

Parameters:

Name Type Description Default
name str

The name of the scene to check.

required

Returns:

Type Description
bool

True if the scene is present, false otherwise.

remove_elements_from_scene(name: str, element_id_list: list[ElementId]) -> bool

Removes elements from a scene.

Parameters:

Name Type Description Default
name str

The scene name.

required
element_id_list list[ElementId]

: The element id list.

required

Returns:

Type Description
bool

True if the operation succeeded, false otherwise.

rename_scene(old_name: str, new_name: str) -> bool

Renames a scene.

Parameters:

Name Type Description Default
old_name str

The old scene name.

required
new_name str

The new scene name.

required

Returns:

Type Description
bool

True if the operation succeeded, false otherwise.

rename_scene_group(old_name: str, new_name: str) -> None

Renames a scene group.

Parameters:

Name Type Description Default
old_name str

The old scene group name.

required
new_name str

The new scene group name.

required

rename_scene_group_by_index(group_index: UnsignedInt, new_name: str) -> None

Renames a scene group by its index.

Parameters:

Name Type Description Default
group_index UnsignedInt

The index of the group.

required
new_name str

The new scene group name.

required

set_group_tab_color(scene_group_name: str, red: int, green: int, blue: int, alpha: int) -> None

Sets the group tab color.

Parameters:

Name Type Description Default
scene_group_name str

The name of the scene group.

required
red int

Red component.

required
green int

Green component.

required
blue int

Blue component.

required

ungroup_scences(group_index: UnsignedInt) -> None

Deletes the group of scenes.

Parameters:

Name Type Description Default
group_index UnsignedInt

The index of the group.

required