Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_context_menu.c
| Show First 20 Lines • Show All 931 Lines • ▼ Show 20 Lines | if (treerow_but) { | ||||
| BLI_assert(treerow_but->but.type == UI_BTYPE_TREEROW); | BLI_assert(treerow_but->but.type == UI_BTYPE_TREEROW); | ||||
| UI_tree_view_item_context_menu_build( | UI_tree_view_item_context_menu_build( | ||||
| C, treerow_but->tree_item, uiLayoutColumn(layout, false)); | C, treerow_but->tree_item, uiLayoutColumn(layout, false)); | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| } | } | ||||
| } | } | ||||
| /* If the button represents an id, it can set the "id" context pointer. */ | /* If the button represents an id, it can set the "id" context pointer. */ | ||||
| if (U.experimental.use_extended_asset_browser && ED_asset_can_mark_single_from_context(C)) { | if (ED_asset_can_mark_single_from_context(C)) { | ||||
| ID *id = CTX_data_pointer_get_type(C, "id", &RNA_ID).data; | ID *id = CTX_data_pointer_get_type(C, "id", &RNA_ID).data; | ||||
| /* Gray out items depending on if data-block is an asset. Preferably this could be done via | /* Gray out items depending on if data-block is an asset. Preferably this could be done via | ||||
| * operator poll, but that doesn't work since the operator also works with "selected_ids", | * operator poll, but that doesn't work since the operator also works with "selected_ids", | ||||
| * which isn't cheap to check. */ | * which isn't cheap to check. */ | ||||
| uiLayout *sub = uiLayoutColumn(layout, true); | uiLayout *sub = uiLayoutColumn(layout, true); | ||||
| uiLayoutSetEnabled(sub, !id->asset_data); | uiLayoutSetEnabled(sub, !id->asset_data); | ||||
| uiItemO(sub, NULL, ICON_NONE, "ASSET_OT_mark"); | uiItemO(sub, NULL, ICON_NONE, "ASSET_OT_mark"); | ||||
| ▲ Show 20 Lines • Show All 338 Lines • Show Last 20 Lines | |||||