Display text on the render viewport

How could I display text on the render viewport and update it via python api?
(Similar to how the menu and viewport settings are displayed).

Thank you

Hi ,

Although the Viewport is still based on our Previous UI platform that is not as extensible as Omni.UI

We have a feature that enable you to “Layer” omni.ui widgets directly in the viewport

for that you simply create a new window call “Viewport”

window = ui.Window("Viewport)

and that Window Content ( build using Omni.UI ) will be rendered Layer on top of the viewport UI

it is quite easy to do but in case you are encontering some issue just ping here and we can help further or send some sample

What are you trying to display ?


Hi Damien,

Thank you for your answer!
I managed to show the text as overlay:

import omni.ui as ui
window = ui.Window("Viewport")
with window.frame:
    with ui.VStack():
        f = ui.Label("text to display")
        f.visible = True
        f.set_style({"background_color": 0x00000000, "font_size": 24}) # transparent background

But if I make the render viewport fullscreen with F11, the label is not visible anymore… How could I suppress that?