Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/viser/_scene_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2643,6 +2643,17 @@ def add_3d_gui_container(
)
return Gui3dContainerHandle(node_handle._impl, gui_api, container_id)

def handle_by_name(self, name: str) -> SceneNodeHandle | None:
"""Get the scene node handle for the given `name`, if it exists.

Args:
name: Name of the scene node.

Returns:
Scene node handle, or None if no such node exists.
"""
return self._handle_from_node_name.get(name, None)

def remove_by_name(self, name: str) -> None:
"""Helper to call `.remove()` on the scene node handles of the `name`
element or any of its children."""
Expand Down