Extension: omni.kit.viewport.window-107.0.8 |
Documentation Generated: Dec 17, 2024 |
Overview#
Introduction#
A high level implementation of a Window that contains a Viewport and variety of menus and manipulators for interacting
and controlling a pxr.usd.UsdStage
attached to a specific omni.usd.UsdContext
.
How to create a new ViewportWindow#
Python#
Import the class from the package:
from omni.kit.viewport.window import ViewportWindow
Create a ViewportWindow instance named “Demo”, attached to the default UsdContext
viewport_window = ViewportWindow("Demo", width=640, height=480)
Get the active ViewportAPI attached to the ViewportWindow and inspect some properties.
viewport_api = viewport_window.viewport_api
usd_context = viewport_api.usd_context
usd_context_name = viewport_api.usd_context_name
usd_stage = viewport_api.stage
camera_path = viewport_api.camera_path
resolution = viewport_api.resolution