Blender V4.3
AssetShelfType Struct Reference

#include <BKE_screen.hh>

Public Attributes

char idname [BKE_ST_MAXNAME]
 
int space_type
 
std::string activate_operator
 
AssetShelfTypeFlag flag
 
short default_preview_size
 
bool(* poll )(const bContext *C, const AssetShelfType *shelf_type)
 
bool(* asset_poll )(const AssetShelfType *shelf_type, const blender::asset_system::AssetRepresentation *asset)
 
void(* draw_context_menu )(const bContext *C, const AssetShelfType *shelf_type, const blender::asset_system::AssetRepresentation *asset, uiLayout *layout)
 
const AssetWeakReference *(* get_active_asset )(const AssetShelfType *shelf_type)
 
ExtensionRNA rna_ext
 

Detailed Description

Definition at line 541 of file BKE_screen.hh.

Member Data Documentation

◆ activate_operator

std::string AssetShelfType::activate_operator

Operator to call when activating a grid view item.

Definition at line 547 of file BKE_screen.hh.

Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and blender::ed::asset::shelf::AssetViewItem::on_activate().

◆ asset_poll

bool(* AssetShelfType::asset_poll) (const AssetShelfType *shelf_type, const blender::asset_system::AssetRepresentation *asset)

Determine if an individual asset should be visible or not. May be a temporary design, visibility should first and foremost be controlled by asset traits.

Definition at line 558 of file BKE_screen.hh.

Referenced by blender::ed::asset::shelf::AssetView::build_items().

◆ default_preview_size

short AssetShelfType::default_preview_size

Definition at line 551 of file BKE_screen.hh.

◆ draw_context_menu

void(* AssetShelfType::draw_context_menu) (const bContext *C, const AssetShelfType *shelf_type, const blender::asset_system::AssetRepresentation *asset, uiLayout *layout)

Asset shelves can define their own context menu via this layout definition callback.

Definition at line 562 of file BKE_screen.hh.

Referenced by blender::ed::asset::shelf::AssetViewItem::build_context_menu().

◆ flag

◆ get_active_asset

const AssetWeakReference *(* AssetShelfType::get_active_asset) (const AssetShelfType *shelf_type)

◆ idname

char AssetShelfType::idname[BKE_ST_MAXNAME]

Definition at line 542 of file BKE_screen.hh.

Referenced by blender::ed::asset::shelf::get_shelf_for_popup().

◆ poll

bool(* AssetShelfType::poll) (const bContext *C, const AssetShelfType *shelf_type)

Determine if asset shelves of this type should be available in current context or not.

Definition at line 554 of file BKE_screen.hh.

Referenced by blender::ed::asset::shelf::type_poll_no_spacetype_check().

◆ rna_ext

ExtensionRNA AssetShelfType::rna_ext

Definition at line 570 of file BKE_screen.hh.

◆ space_type

int AssetShelfType::space_type

Definition at line 544 of file BKE_screen.hh.

Referenced by blender::ed::asset::shelf::type_poll_for_non_popup().


The documentation for this struct was generated from the following file: