Scene

class compas_ui.scene.Scene(*args, **kwargs)[source]

Bases: Singleton

The scene singleton keeps track of the view objects of an app.

Parameters:

settings (dict[str, Any], optional) – Visualization settings of the scene.

Attributes:
  • state (dict[str, Any]) – The current state of the scene, containing the objects and the scene settings.

  • objects (list[compas_ui.objects.Object]) – The objects in the scene.

  • settings (dict[str, Any]) – The visualization settings.

  • active_object (compas_ui.objects.Object) – The active object that is currently being operated on.

Methods

add

Add a COMPAS data item to the scene.

clear

Clear the scene.

get

Get all scene objects with a given name.

get_by_guid

Get a scene object by its guid.

highlight_objects

Highlight objects in the scene.

remove

update

Update the scene.