I just started developing on Omniverse. I am creating an extension but I have a problem with the Viewport command in Code app.
In 2022.2.0 version, there is not anymore Window->New Viewport Window moreover if I run the command: omni.kit.commands.execute('SetActiveViewportCameraCommand',new_active_cam_path=Sdf.Path('/World/Camera')) nothing happens.
In contrary, in 2022.1.3 version, Window->New Viewport Window exist and the previous command work.
However, I got a message: [Info] [omni.kit.renderer.plugin] Switch to the same render queue is requested.
Is this a bug, or did I miss something between the version 2022.1.3 and 2022.2.0 ?
Hi @Felix1234. 2022.2 moved the Viewport 2.0. The “New Viewport Window” menu item was removed with plans for an improved workflow in the next version.
The command you’re using is actually tied to the Legacy Viewport. The new way is like this:
import omni.kit.commands
from pxr import Sdf
import omni.kit.viewport.utility as vp_utils
vp_win = vp_utils.get_active_viewport_window()
omni.kit.commands.execute('SetViewportCameraCommand', camera_path=Sdf.Path('/World/Camera'), viewport_api=vp_win.viewport_api)
Furthermore, do you know where I can find documentation about the changes that are made from one version to another to keep me informed of commands and features that are changed/removed/added? Because I can’t find the release notes of the latest version of Code (2022.2.0). Thanks a lot!