Viewport issues from 2022.1.3 version to 2022.2.0


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)
1 Like

Hi @mati-nvidia,

Thank you for your answer, this is what I needed!

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!


Hi @Felix1234. We didn’t publish release notes for Code 2022.2, but Create has similar release notes:

We should get back on track with release notes for Code 2022.3

Hi @mati-nvidia,

That’s good to know, thanks again for your help!

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