AppMenu

class omni.kit.menu.utils.app_menu.AppMenu(get_instance: Optional[callable] = None, menu_bar: Optional[MenuBar] = None)

Bases: object

Methods

__init__([get_instance, menu_bar])

Create app menu for menu bar.

add_hook(callback)

add_layout(layout)

add_menu_items(menu, name, menu_index, ...)

build_menus_after_loading()

clear_menu_data()

create_menu()

destroy()

get_fn_result(menu_entry, name[, default])

get_menu_data()

get_menu_layout()

get_merged_menus()

merge_menus(menu_keys, menu_defs, menu_order)

prebuild_menu(menus, prefix_name, ...)

rebuild_menus()

refresh_menu_items(name[, action_path])

remove_hook(callback)

remove_layout(layout)

remove_menu_items(menu, name, can_rebuild_menus)

replace_menu_items(new_menu, old_menu, name)

set_default_menu_priority(name, menu_index)

set_default_menu_proirity(**kwargs)

set_right_padding(padding)

sort_menu_hook(merged_menu)

__init__(get_instance: Optional[callable] = None, menu_bar: Optional[MenuBar] = None)

Create app menu for menu bar.

Parameters
  • get_instance (Optional[callable]) – Callback to get extension instance, defaults to None. Deprecated.

  • menu_bar (Optional[ui.MenuBar]) – Menu bar to create menus, defaults to None which means use menu bar in main window.