How to hide pannel in a standalone application?

Hi, I am following this tutorial 3. Hello World — Omniverse Robotics documentation and wondering if there are any ways to hide every properties panels when I run the application? I only want to see the viewport.
Here is my expectation:

I found a solution, however it is hard-coded. If there are another way to do it I am gladly to know.

from omni.ui import Workspace
Workspace.show_window("Stage", False)
Workspace.show_window("Layer", False)
Workspace.show_window("Property", False)
Workspace.show_window("Render Settings", False)
Workspace.show_window("Console", False)
Workspace.show_window("Content", False)

Hi @hoanggiang

You can also use the following keyboard shortcuts:

F7 Enables and disables the visibility of the UI
F11 Toggles full screen mode

Check the viewport control docs for more details

1 Like

F7 works well with a normal stage, but not with a standalone version.

But thanks to your answer, I found a better way to do it

import carb.settings
settings = carb.settings.get_settings()
settings.set("/app/window/hideUi", True)

But then I couldn’t press F7 to enable the visibility of the UI again :)

1 Like

Nice…

Now, if you want to toggle the UI visibility you can try:

import omni
import carb.settings
settings = carb.settings.get_settings()

def keyboard_event(event, *args, **kwargs):
    if event.type == carb.input.KeyboardEventType.KEY_PRESS:
        if event.input == carb.input.KeyboardInput.F7:
            settings.set("/app/window/hideUi", not settings.get("/app/window/hideUi"))

appwindow = omni.appwindow.get_default_app_window()
input = carb.input.acquire_input_interface()
input.subscribe_to_keyboard_events(appwindow.get_keyboard(), keyboard_event)

1 Like

I’ve filed a bug for F7 not working in standalone mode, that should work in theory. The extension that handles that might not be enabled with standalone python.kit by default.

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