Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_context_menu.c
| Show First 20 Lines • Show All 1,251 Lines • ▼ Show 20 Lines | void ui_popup_context_menu_for_panel(bContext *C, ARegion *region, Panel *panel) | ||||
| const bool any_item_visible = has_panel_category; | const bool any_item_visible = has_panel_category; | ||||
| if (!any_item_visible) { | if (!any_item_visible) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (panel->type->parent != NULL) { | if (panel->type->parent != NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (!UI_panel_can_be_pinned(panel)) { | |||||
| return; | |||||
| } | |||||
| PointerRNA ptr; | PointerRNA ptr; | ||||
| RNA_pointer_create(&screen->id, &RNA_Panel, panel, &ptr); | RNA_pointer_create(&screen->id, &RNA_Panel, panel, &ptr); | ||||
| uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Panel"), ICON_NONE); | uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Panel"), ICON_NONE); | ||||
| uiLayout *layout = UI_popup_menu_layout(pup); | uiLayout *layout = UI_popup_menu_layout(pup); | ||||
| if (has_panel_category) { | if (has_panel_category) { | ||||
| Show All 19 Lines | |||||