Selection Modes Manipulation Through Code

Title: Force Selection Mode in Isaac Sim 4.5.0 via Code & Detect Viewport-only Selection Events

Details:
Isaac Sim Version: 4.5.0
Operating System: Ubuntu 22.04

I was reviewing the Selection Modes documentation in Isaac Sim and wondered if the selection mode can be programmatically enforced instead of the user having to manually choose it from the UI.

In my extension, I want to restrict the user so they can only select the root prim of a model when clicking in the viewport. Is there a way to force this behavior through code?

I tried handling it using the selection_changed event, but ran into an issue:

  • The event fires for selections made both in the viewport and the Stage window.
  • I need this restriction to apply only when the user clicks in the viewport, not when selecting from the Stage window.

Is there any API or recommended approach to:

  1. Force a specific selection mode in Isaac Sim.
  2. Distinguish between selection events triggered from the viewport vs. the Stage window.

Any guidance or examples would be greatly appreciated.

I haven’t looked into this in detail, but a wild guess is that the omni.kit.manipulator.selection documentation might be helpful for what you are trying to achieve. You can find it here: omni.kit.manipulator.selection Module Overview — Omniverse Kit. I hope this points you in the right direction!

Hello!

We noticed that this topic hasn’t received any recent responses, so we are closing it for now to help keep the forum organized.

If you’re still experiencing this issue or have additional questions, please feel free to create a new topic with updated details. When doing so, we recommend mentioning or linking to this original topic in your new post—this helps provide context and makes it easier for others to assist you.

Thank you for being part of the NVIDIA Isaac Sim community.

Best regards,
The NVIDIA Isaac Sim Forum Team