Hello,
I am testing the omni.ui.scene
extension using the following script, an adaptation from the documentation:
from omni.kit.viewport.utility import get_active_viewport_and_window
import omni.ui.scene as sc
viewport, window = get_active_viewport_and_window()
scene_view = sc.SceneView()
with window.get_frame("test123"):
with scene_view.scene:
sc.Line([-0.5,-0.5,0], [-0.5, 0.5, 0])
sc.Line([-0.5,-0.5,0], [0.5, -0.5, 0])
sc.Arc(0.5)
viewport.add_scene_view(scene_view)
I was hoping to see something on the viewport, but I was unable to see anything. I am aware that there is a GH repository with some examples (GitHub - NVIDIA-Omniverse/kit-extension-sample-ui-scene: Sample Repository to create Kit Extension using the ui.scene API), but the examples on that repository is a bit too complex and fail to run for various reasons.
Is there a simple example which I could see omni.ui.scene
extension in action?
Thanks!