Running scripts in scripts subfolder under kit

Hi,

I noticed there are standalone scripts in scripts folder. Perhaps I’m wrong, but I assumed I can run them using the python.sh (which sets up all the env and paths). However, they do not seem to work. For example

<kit_root>$ ./python.sh scripts/settings-list.py

Gives error:
RuntimeError: Failed to acquire interface: carb::settings::ISettings (pluginName: nullptr)

Other scripts also fail with various errors.

@bart.sekura You can’t simply run them with python interpreter by setting only the env to point to the libraries of Kit. Those scripts still need to be executed in Kit env (with all extension been initialized correctly) as
./kit --exec xxxxx.py

While the above piece of command line will still run it with full extensions enabled in the kit app config (including viewport), if you want to run it by customizing the loading list for your scripts, you can execute it like:

./kit --empty --enable omni.usd --enable omni.kit.loop --enable xxxx_other_extension xxxx.py

--empty means to nullify all loading list.
--enable can be used to specify the extension you want to enable.

You can get those help by ./kit -h also.

By the way, you can execution those scripts inside Console window of Kit UI. It has an input box that allows to execute those scripts, like settings-list.py /app/viewport. Don’t forget to add “.py” extension since it’s “.lst” by default.

Hope this helps.

Thanks!

Yes, I’ve been running everything under kit so far, but in order to learn the architecture and various low level layers I wanted to have minimal scripts and thought these can be run standalone from the look of it. Thanks for clarifying!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.