Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm.c
| Show First 20 Lines • Show All 335 Lines • ▼ Show 20 Lines | void WM_menutype_free(void) | ||||
| } | } | ||||
| BLI_ghash_free(menutypes_hash, NULL, MEM_freeN); | BLI_ghash_free(menutypes_hash, NULL, MEM_freeN); | ||||
| menutypes_hash = NULL; | menutypes_hash = NULL; | ||||
| } | } | ||||
| bool WM_menutype_poll(bContext *C, MenuType *mt) | bool WM_menutype_poll(bContext *C, MenuType *mt) | ||||
| { | { | ||||
| /* If we're tagged, only use compatible. */ | |||||
| if (mt->ui_tag[0] != '\0') { | |||||
| const WorkSpace *workspace = CTX_wm_workspace(C); | |||||
| if (BKE_workspace_ui_tags_check(workspace, mt->ui_tag) == false) { | |||||
| return false; | |||||
| } | |||||
| } | |||||
| if (mt->poll != NULL) { | if (mt->poll != NULL) { | ||||
| return mt->poll(C, mt); | return mt->poll(C, mt); | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| /* ****************************************** */ | /* ****************************************** */ | ||||
| ▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines | |||||