omni.kit.notification_manager: Notification Manager Extension

Notification Manager

class omni.kit.notification_manager.NotificationButtonInfo(text, on_complete=None)

Bases: object

Constructor for notification button.

text (str): The button text. on_complete (Callable[]): The handler to handle button click.

property handler
property text
class omni.kit.notification_manager.NotificationInfo(text, hide_after_timeout=True, duration=3, status=1, button_infos=[])

Bases: object

property button_infos
property duration
property hide_after_timeout
property status
property text
class omni.kit.notification_manager.NotificationManager

Bases: object

static on_shutdown()
static on_startup()
static post_notification(notification_info: omni.kit.notification_manager.notification_info.NotificationInfo)
static remove_notification(notification: omni.kit.notification_manager.manager.Notification)
class omni.kit.notification_manager.NotificationManagerExtension(self: omni.ext._extensions.IExt)None

Bases: omni.ext._extensions.IExt

post_notification(notification_info: omni.kit.notification_manager.notification_info.NotificationInfo)
class omni.kit.notification_manager.NotificationStatus

Bases: object

INFO = 1
WARNING = (0,)
class omni.kit.notification_manager.partial

Bases: object

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.


tuple of arguments to future partial calls


function object to use in future partial calls


dictionary of keyword arguments to future partial calls

omni.kit.notification_manager.post_notification(text, hide_after_timeout=True, duration=3, status=1, button_infos=[])

Post notification. If viewport is visible, it will be docked to the right-button of viewport. Otherwise, it will be docked to main window.

  • text (str) – The notification text.

  • hide_after_timeout (bool) – If the notification will hide after duration.

  • it's False (If) –

  • button_details are not provided (and) –

  • will display a default (it) –

  • button. (dismiss) –

  • duration (int) – The duration (in seconds) after which the notification will be hidden.

  • duration only works if hide_after_timeout is True. (This) –

  • status (NotificationStatus) – The notification type.

  • button_infos ([NotificationButtonInfo]) – Array of buttons.


Notification handler.


>>> import omni.kit.notification_manager as nm
>>> ok_button = nm.NotificationButtonInfo("OK", on_complete=None)
>>> cancel_button = nm.NotificationButtonInfo("CANCEL", on_complete=None)
>>> notification = nm.post_notification(
            "Notification Example", hide_after_timeout=False, duration=0,
            status=nm.NotificationStatus.WARNING, button_infos=[ok_button, cancel_button])