AbstractWidgetDelegate#
Bases:
ABCA base class for creating custom widgets in camera button and camera menu item.
Methods
build_widget(parent_id, viewport_api, ...)Builds widget.
destroy()Release resources.
on_camera_path_changed(parent_id, camera_path)Callback when the tracked camera has changed.
on_parent_destroyed(parent_id)Called before the destroy of the parent widget to release the bound resources specific to the parent.
Attributes
The order of the widget relative to the right of camera label.
- parent_id: int,
- viewport_api: ViewportAPI,
- camera_path: Path,
Builds widget. This must be overridden to provide the layout.
- Parameters:
parent_id (int) – It’s unique id of the camera item, with which you can use to manage the camera widget.
viewport_api (ViewportAPI) – Viewport interface.
camera_path (Sdf.Path) – The camera path to build widget for.
Release resources.
- parent_id: int,
- camera_path: Path,
Callback when the tracked camera has changed.
- Parameters:
parent_id (int) – It’s unique id of the camera item, with which you can use to manage the camera widget.
camera_path (Sdf.Path) – The new camera path.
Called before the destroy of the parent widget to release the bound resources specific to the parent.
- Parameters:
parent_id (int) – It’s unique id of the camera item, with which you can use to manage the camera widget.
The order of the widget relative to the right of camera label. The lower the order number, the closer the widget to the camera label.