Tokens

List of widely used tokens from carb.tokens plugin. Most paths in Kit configuration accept tokens.

  • ${kit} - path to Kit folder, where the Kit executable is (it is not always the same executable as was used to run currently, because someone could run from python.exe).

  • ${omni_documents} - system folder for user documents (Omniverse Wide).

  • ${omni_program_data} - system folder for app data (non user specific, e.g. %PROGRAMDATA%).

  • ${omni_config} - system folder with Omniverse configs, like omniverse.toml

  • ${omni_data} - system folder to store persistent data (Omniverse Wide).

  • ${omni_logs} - system folder to store logs (Omniverse Wide).

  • ${omni_cache} - system folder to be used for caching, can be cleaned up between runs (Omniverse Wide).

  • ${omni_global_config}, ${omni_global_data}, ${omni_global_logs}, ${omni_global_cache} - same folders as 4 above, but not influenced by running “portable mode” and still point globally.

  • ${data} - system folder to store persistent data (Kit Application specific).

  • ${logs} - system folder to store logs (Kit Application specific).

  • ${cache} - system folder to be used for caching, can be cleaned up between runs (Kit Application specific).

  • ${shared_documents} - system folder to store user’s data (shared between all apps, e.g. ${omni_documents}/Kit/shared).

  • ${app_documents} - system folder to store user’s data (per app, e.g. ${shared_documents}/[app name]).

  • ${shared_program_data} - system folder to store app data (shared between all apps, e.g. ${omni_program_data}/NVIDIA Corporation/Kit).

  • ${app_program_data} - system folder to store app data (per app e.g. ${shared_program_data}/[app name]).

  • ${app} - path to app, if loaded with --merge-config that will be a folder where this config is.

  • ${temp} - temp folder, will be cleaned up between runs.

  • ${python} - path to python interpreter executable.

  • ${config} - whether debug or release build is running.

  • ${platform} - target platform Kit is running on, e.g. windows-x86_64.

  • ${lib_ext} - .dll on Windows, .so on Linux, .dylib on Mac OS.

  • ${lib_prefix} - empty on Windows, lib on Linux and Mac OS.

  • ${bindings_ext} - .pyd on Windows, .so on Linux and Mac OS.

  • ${exe_ext} - .exe on Windows, empty on Linux and Mac OS.

  • ${shell_ext} - .bat on Windows, .sh on Linux and Mac OS.

Each extension sets a token with the extension name and extension folder path. See Extension Tokens.

Overriding Tokens

Some tokens can be overridden by using /app/tokens setting namespace. E.g.: --/app/tokens/data="C:/data".

Checking Token Values

Kit logs all tokens in INFO log level, search for Tokens:. Either look in a log file or run with -v.

You can also print all tokens using settings:

import carb.settings
settings = carb.settings.get_settings()
print(settings.get("/app/tokens"))

Resolving your path

To make your path (or string) support tokens you must resolve it before using it, like this:

path = carb::tokens::resolveString(carb::getCachedInterface<carb::tokens::ITokens>(), path);
import carb.tokens
path = carb.tokens.get_tokens_interface().resolve(path)