Is it possible to disable the context menu on the viewport when user right click on the viewport?

Hello, I am new to Omniverse Create. However, I am developing something that requires the disabling of the context menu on the viewport when I right clicks on it. Does anyone knows how to get this done?

1 Like

Hi @TYJ_Code. Welcome to the forums! Please consider joining us on Discord too: NVIDIA Omniverse .

Let me see what I can find on this.

Hi @TYJ_Code. Here’s what the dev team shared:


import omni.kit.viewport.utility
# Hold onto the object returned so keep the context menu disabled.
disabled = omni.kit.viewport.utility.disable_context_menu()

# When object is deleted, the context menu is restored.
del disabled

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