omni.kit.app module

This module contains bindings to C++ omni::kit::IApp interface, core C++ part of Omniverse Kit.

All the function are in omni.kit.editor.IApp class, to get it use get_app_interface method, which caches acquire interface call:

>>> import omni.kit.app
>>> a = omni.kit.app.get_app()
class omni.kit.app.IApp

Bases: pybind11_builtins.pybind11_object

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_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_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
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 = '')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::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)