WaypointCard#
- class omni.kit.waypoint.core.WaypointCard(type: str, path: str, name: str = None)#
Bases:
PlaylistCardA class for displaying a waypoint as a playlist card in omni.kit.waypoint.core. This class retrieves the waypoint from the WAYPOINT_EXTENSION_INSTANCE using the provided prim path and sets the card name and path based on the actual waypoint data. It exposes properties for menu text, the camera prim reference, and the icon file location. The active method recalls the waypoint to make it current, while the clean method is an alias that triggers the active method.
- Parameters:
type (str) – A string denoting the card type for the waypoint.
path (str) – A file path or identifier used to locate the waypoint prim.
name (str) – A user-friendly name for the waypoint. If the waypoint does not exist, a default label is assigned.
Methods
__init__(type, path[, name])Initializes the PlaylistCard with type, path, and an optional name.
accept(camera_path)Determines whether the provided camera_path corresponds to a waypoint prim using the waypoint extension instance.
active([without_camera])Activates the corresponding waypoint by invoking recall_waypoint on the waypoint extension instance.
clean([without_camera])Activates the waypoint by calling active with the specified without_camera flag.
Attributes
Identifies the waypoint playlist card type.
Holds the waypoint extension instance for operations.
Gets the camera prim associated with the waypoint if it exists.
Gets the file path for the waypoint icon.
Gets the menu text label for the waypoint card.
- __init__(type: str, path: str, name: str = None)#
Initializes the PlaylistCard with type, path, and an optional name.
- classmethod accept(camera_path: str) bool#
Determines whether the provided camera_path corresponds to a waypoint prim using the waypoint extension instance.
- Parameters:
camera_path (str) – The camera path to verify as a waypoint prim.
- Returns:
True if camera_path is a waypoint prim; otherwise, False.
- Return type:
bool
- active(without_camera=False)#
Activates the corresponding waypoint by invoking recall_waypoint on the waypoint extension instance. Logs an error if the waypoint is not found.
- Parameters:
without_camera (bool) – Flag to recall the waypoint without the camera if True.
- clean(without_camera=False)#
Activates the waypoint by calling active with the specified without_camera flag.
- Parameters:
without_camera (bool) – Flag to activate the waypoint without the camera if True.
- PLAYLIST_CARD_TYPE_WAYPOINT = 'waypoint'#
Identifies the waypoint playlist card type.
- Type:
str
- WAYPOINT_EXTENSION_INSTANCE = None#
Holds the waypoint extension instance for operations.
- Type:
object
- property camera_prim#
Gets the camera prim associated with the waypoint if it exists.
- Returns:
The camera prim or None if not available.
- Return type:
object
- property icon#
Gets the file path for the waypoint icon.
- Returns:
The icon file path string.
- Return type:
str
Gets the menu text label for the waypoint card.
- Returns:
The displayed menu text.
- Return type:
str