omni.kit.app module

class omni.kit.app.IApp

Bases: pybind11_builtins.pybind11_object

delay_app_ready(self: omni.kit.app._app.IApp, requester_name: str)None
get_build_version(self: omni.kit.app._app.IApp)str
get_extension_manager(self: omni.kit.app._app.IApp)omni.ext._extensions.ExtensionManager
get_log_event_stream(self: omni.kit.app._app.IApp)carb.events._events.IEventStream

Log event stream.

get_message_bus_event_stream(self: omni.kit.app._app.IApp, runloop_name: str = 'main')carb.events._events.IEventStream
get_platform_info(self: omni.kit.app._app.IApp)dict
get_post_update_event_stream(self: omni.kit.app._app.IApp, runloop_name: str = 'main')carb.events._events.IEventStream
get_pre_update_event_stream(self: omni.kit.app._app.IApp, runloop_name: str = 'main')carb.events._events.IEventStream
get_python_scripting(self: omni.kit.app._app.IApp)omni::kit::IAppScripting
get_shutdown_event_stream(self: omni.kit.app._app.IApp)carb.events._events.IEventStream
get_startup_event_stream(self: omni.kit.app._app.IApp)carb.events._events.IEventStream
get_time_since_start_ms(self: omni.kit.app._app.IApp)float
get_time_since_start_s(self: omni.kit.app._app.IApp)float
get_update_event_stream(self: omni.kit.app._app.IApp, runloop_name: str = 'main')carb.events._events.IEventStream
get_update_number(self: omni.kit.app._app.IApp)int
is_app_ready(self: omni.kit.app._app.IApp)bool
is_debug_build(self: omni.kit.app._app.IApp)bool
is_running(self: omni.kit.app._app.IApp)bool
async next_update_async()float

Wait for next update of Omniverse Kit. Return delta time in seconds

post_quit(self: omni.kit.app._app.IApp, return_code: int = 0)None
post_uncancellable_quit(self: omni.kit.app._app.IApp, return_code: int = 0)None
async post_update_async()float
async pre_update_async()float

Wait for next update of Omniverse Kit. Return delta time in seconds

print_and_log(self: omni.kit.app._app.IApp, message: str)None
replay_log_messages(self: omni.kit.app._app.IApp, arg0: carb::logging::Logger)None

Replays recorded log messages for the specified target.

run(self: omni.kit.app._app.IApp, app_name: str, app_path: str, argv: List[str] = [])int
shutdown(self: omni.kit.app._app.IApp)int
startup(self: omni.kit.app._app.IApp, app_name: str, app_path: str, argv: List[str] = [])None
toggle_log_message_recording(self: omni.kit.app._app.IApp, arg0: bool)None

Toggles log message recording.

try_cancel_shutdown(self: omni.kit.app._app.IApp, reason: str = '')bool
update(self: omni.kit.app._app.IApp)None
class omni.kit.app.IAppScripting

Bases: pybind11_builtins.pybind11_object

add_search_script_folder(self: omni.kit.app._app.IAppScripting, path: str)bool
execute_file(self: omni.kit.app._app.IAppScripting, path: str, args: List[str])bool
execute_string(self: omni.kit.app._app.IAppScripting, str: str, source_file: str = '', execute_as_file: bool = '')bool
get_event_stream(self: omni.kit.app._app.IAppScripting)carb.events._events.IEventStream
remove_search_script_folder(self: omni.kit.app._app.IAppScripting, path: str)bool
class omni.kit.app.SettingChangeSubscription(path: str, on_change: Callable)

Bases: object

Setting change subscription wrapper to make it scoped (auto unsubscribe on del)

class omni.kit.app.StdErrInterceptor(stream, log_std)

Bases: object

shutdown()
write(msg)
class omni.kit.app.StdOutInterceptor(stream, log_std, max_stdout_message_len)

Bases: object

shutdown()
write(msg)
omni.kit.app.acquire_app_interface(plugin_name: str = None, library_path: str = None)omni.kit.app._app.IApp
omni.kit.app.crash()None
omni.kit.app.deprecated(message='')

Decorator which can be used to mark functions as deprecated. It will result in warn log when the function is used.

omni.kit.app.get_app()omni.kit.app._app.IApp

Returns cached omni.kit.app.IApp interface. (shorthand)

omni.kit.app.get_app_interface()omni.kit.app._app.IApp

Returns cached omni.kit.app.IApp interface

omni.kit.app.lru_cache(maxsize=128, typed=False)

Least-recently-used cache decorator.

If maxsize is set to None, the LRU features are disabled and the cache can grow without bound.

If typed is True, arguments of different types will be cached separately. For example, f(3.0) and f(3) will be treated as distinct calls with distinct results.

Arguments to the cached function must be hashable.

View the cache statistics named tuple (hits, misses, maxsize, currsize) with f.cache_info(). Clear the cache and statistics with f.cache_clear(). Access the underlying function with f.__wrapped__.

See: http://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)

omni.kit.app.send_telemetry_event(event_type: str, duration: float = 0, data1: str = '', data2: str = '', value1: float = 0.0, value2: float = 0.0)

Send generic telemetry event.

It is a helper, so that just one liner: omni.kit.app.send_telemetry_event can be used anywhere instead of checking for telemetry being enabled at each call site.

If telemetry is not enabled this function does nothing.

Parameters
  • event_type (str) – A string describing the event that occurred. There is no restriction on the content or formatting of this value. This should neither be nullptr nor an empty string.

  • duration (float) – A generic duration value that can be optionally included with the event.

  • data1 (str) – A string data value to be sent with the event. The interpretation of this string depends on event_type.

  • data2 (str) – A string data value to be sent with the event. The interpretation of this string depends on event_type.

  • value1 (float) – A float data value to be sent with the event. The interpretation of this string depends on event_type.

  • value2 (float) – A float data value to be sent with the event. The interpretation of this string depends on event_type.