Tokens

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

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

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

  • ${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 inbetween 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 in between runs (Kit Application specific).

  • ${app_documents} - system folder to store user’s data (per app).

  • ${shared_documents} - system folder to store user’s data (shared between all apps).

  • ${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.

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

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

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

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

Each extension sets a token with extension name to extension folder path. See extensions doc: Tokens

Resolving your path

To make your path 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)