This project is a template for developing extensions for Omniverse Kit.
C:\projects\kit-extension-template
exts
subfolder there as another search path: C:\projects\kit-extension-template\exts
omni.hello.world
extension in the top left search bar. Select and enable it.exts
folder was added to the search you can add new extensions to this folder and they will be automatically found by the App..bat
with .sh
and \
with /
.exts
folder, in this example: omni.hello.world
. extension.toml
, take a peek.To get a better understanding and learn a few other things, we recommend following next steps:
code C:\projects\kit-extension-template
. It will suggest installing a few extensions to improve python experience.link_app.bat
(more in Linking with an Omniverse app section).exts
folder added as an extensions search path and new extension enabled:> app\omni.code.bat --ext-folder exts --enable omni.hello.world
--ext-folder [path]
- adds new folder to the search path--enable [extension]
- enables an extension on startup.Use -h
for help:
> app\omni.code.bat -h
After the App started you should see:
If you look inside omni.code.bat
or any other Omniverse App, they all run Omniverse Kit (kit.exe
). Omniverse Kit is the Omniverse Application runtime that powers Apps build out of extensions.
Think of it as python.exe
. It is a small runtime, that enables all the basics, like settings, python, logging and searches for extensions. Everything else is an extension. You can run only this new extension without running any big App like Code:
> app\kit\kit.exe --ext-folder exts --enable omni.hello.world
It starts much faster and will only have extensions enabled that are required for this new extension (look at [dependencies]
section of extension.toml
). You can enable more extensions: try adding --enable omni.kit.window.extensions
to have extensions window enabled (yes, extension window is an extension too!):
> app\kit\kit.exe --ext-folder exts --enable omni.hello.world --enable omni.kit.window.extensions
You should see a menu in the top left. From here you can enable more extensions from the UI.
To run tests we run a new process where only the tested extension (and it's dependencies) is enabled. Like in example above + testing system (omni.kit.test
extension). There are 2 ways to run extension tests:
app\kit\test_ext.bat omni.hello.world --ext-folder exts
That will run a test process with all tests and exit. For development mode pass --dev
: that will open test selection window. As everywhere, hotreload also works in this mode, give it a try by changing some code!
For more information about testing refer to: testing doc.
For a better developer experience, it is recommended to create a folder link named app
to the Omniverse Kit app installed from Omniverse Launcher. A convenience script to use is included.
Run:
> link_app.bat
If successful you should see app
folder link in the root of this repo.
If multiple Omniverse apps is installed script will select recommended one. Or you can explicitly pass an app:
> link_app.bat --app create
You can also just pass a path to create link to:
> link_app.bat --path "C:/Users/bob/AppData/Local/ov/pkg/create-2021.3.4"
Adding a new extension is as simple as copying and renaming existing one:
exts/omni.hello.world
to exts/[new extension name]
exts/[new extension name]/omni/hello/world
to exts/[new extension name]/[new python module]
exts/[new extension name]/config/extension.toml
, most importantly specify new python module to load:[[python.module]]
name = "[new python module]"
No restart is needed, you should be able to find and enable [new extension name]
in extension manager.
To make extension available to other users use Github Releases.
extension.toml
) and update the changelog (in docs/CHANGELOG.md
). Semantic versionning must be used to express severity of API changes.The source code for this repository is provided as-is and we are not accepting outside contributions.