omni.warp.menu registers its sub-menus as tuples, crashing the core omni.kit.menu.utils sorter.
@athos.sampaio
Do you also have the issue same as KAT (110.2) menu bar disabled while enabling Warp Menu ?
did you find some workaround other than composing a new KIT-template ?
Hi, Preethampai (Preet Hampai?).
I found a temporary workaround with the help of Antigravity (Google Gemini’s agentic IDE) assistant by temporarily patching the Warp menu with a tiny startup script that monkeypatches omni.kit.menu.utils at runtime when your editor boots. This ensures the fix is applied dynamically regardless of clean builds or SDK updates.
In your core extension to omniverse kit, for instance (in [your_code_base]/source/extensions/your.editor.core/your/editor/core/extension.py (or wherever path is your extension python file extension.py), add the function to patch the warp menu inside your class declaration, like (part of the code below is for logs, feel free to strip the log parts):
import carb
import omni.ext
class YourCoreExtension(omni.ext.IExt):
def on_startup(self, ext_id):
carb.log_info(“[your.editor.core] Startup…”)
self._patch_menu_utils()
def on_shutdown(self):
carb.log_info(“[your.editor.core] Shutdown…”)
def _patch_menu_utils(self):
try:
import omni.kit.menu.utils.app_menu as app_menu
Save original method just in case
self._original_sort_menu_hook = app_menu.AppMenu.sort_menu_hook
@staticmethod
def patched_sort_menu_hook(merged_menu):
from omni.kit.menu.utils.builder_utils import MenuItemDescription
def priority_sort(menu_entry):
if hasattr(menu_entry, “priority”):
return menu_entry.priority
return 0
def sort_sub_menu(menu_entry, max_depth=MenuItemDescription.MAX_DEPTH):
for item in menu_entry:
if item.sub_menu:
if isinstance(item.sub_menu, tuple):
carb.log_warn(f"[your.editor.core] Extension menu item ‘{item.name}’ has sub_menu as a tuple. Converting to list.")
item.sub_menu = list(item.sub_menu)
item.sub_menu.sort(key=priority_sort)
if max_depth:
sort_sub_menu(item.sub_menu, max_depth - 1)
else:
carb.log_warn(“Recursive sub_menu, aborting sorting”)
for name in merged_menu:
sort_sub_menu(merged_menu[name])
app_menu.AppMenu.sort_menu_hook = patched_sort_menu_hook
carb.log_info(“[your.editor.core] Successfully monkeypatched AppMenu.sort_menu_hook to protect against tuple sub_menus.”)
except Exception as e:
carb.log_error(f"[your.editor.core] Failed to monkeypatch omni.kit.menu.utils: {e}")
@athos.sampaio .. super helpful thanks for sharing.
Hope the above, in the next Kit patch, is taken care by the KIT release team.
PS : it is preetham-pai :)
You’re welcome Preetham. I hope too.
Thank you for this important bug issue. I will let the WARP team know about this.
What exact version of Kit App Template are you using? I just tried with 110.3 and it did not break anything
You’re welcome, Richard.
I just wanted to confirm that this was a bug with 110.2 and it has been fixed in the latest 110.3
Thanks, Richard.