|
Blender V5.0
|
Classes | |
| class | AssetView |
| class | AssetViewItem |
| class | AssetDragController |
| class | AssetCatalogSelectorTree |
| class | StaticPopupShelves |
| class | AssetCatalogTreeView |
Variables | |
| constexpr int | LEFT_COL_WIDTH_UNITS = 10 |
| constexpr int | RIGHT_COL_WIDTH_UNITS_DEFAULT = 50 |
|
static |
Activating a shelf means assigning it to RegionAssetShelf.active_shelf and (re-)inserting it at the beginning of the RegionAssetShelf.shelves list. This implies that after calling this, shelf is guaranteed to be owned by the shelves list.
Definition at line 179 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, BLI_addhead(), BLI_assert, BLI_findindex(), BLI_remlink(), and RegionAssetShelf::shelves.
Referenced by update_active_shelf().
| AssetShelf * blender::ed::asset::shelf::active_shelf_from_area | ( | const ScrArea * | area | ) |
Definition at line 672 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, BKE_area_find_region_type(), ARegion::flag, RGN_FLAG_POLL_FAILED, and RGN_TYPE_ASSET_SHELF.
Referenced by context(), and show_catalog_in_visible_shelves().
| AssetShelf * blender::ed::asset::shelf::active_shelf_from_context | ( | const bContext * | C | ) |
Definition at line 763 of file asset_shelf.cc.
References active_shelf_ptr_from_context(), C, and PointerRNA::data.
Referenced by catalog_selector_panel_draw().
|
static |
Definition at line 758 of file asset_shelf.cc.
References C, and CTX_data_pointer_get_type().
Referenced by active_shelf_from_context(), and asset_shelf_header_draw().
|
static |
Definition at line 802 of file asset_shelf.cc.
References add_tab_button(), uiLayout::block(), C, IFACE_, blender::asset_system::AssetCatalogPath::name(), send_redraw_notifier(), uiLayout::separator(), settings_foreach_enabled_catalog_path(), settings_is_active_catalog(), settings_is_all_catalog_active(), settings_set_active_catalog(), settings_set_all_catalog_active(), UI_but_func_pushed_state_set(), and UI_but_func_set().
Referenced by asset_shelf_header_draw().
|
static |
Definition at line 775 of file asset_shelf.cc.
References name, Tab, TIP_, UI_BUT_ALIGN_DOWN, UI_but_drawflag_enable(), UI_but_flag_disable(), UI_BUT_UNDO, UI_fontstyle_string_width(), UI_style_get_dpi(), UI_UNIT_X, UI_UNIT_Y, uiDefBut(), and uiStyle::widget.
Referenced by add_catalog_tabs().
|
static |
Definition at line 502 of file asset_shelf.cc.
References ASSET_SHELF_PREVIEW_SIZE_DEFAULT, and UI_preview_tile_size_x().
Referenced by current_tile_draw_height(), region_init(), and region_prefsizey().
|
static |
Definition at line 843 of file asset_shelf.cc.
References active_shelf_ptr_from_context(), add_catalog_tabs(), uiLayout::block(), C, CTX_wm_asset_library_ref(), PointerRNA::data, blender::ui::Emboss, Header::layout, blender::ui::None, uiLayout::popover(), uiLayout::prop(), uiLayout::row(), uiLayout::separator(), uiLayout::separator_spacer(), blender::ed::asset::list::storage_fetch(), UI_block_emboss_set(), UI_ITEM_NONE, and uiLayout::ui_units_x_set().
Referenced by header_regiontype_register().
|
static |
Definition at line 308 of file asset_shelf.cc.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ELEM, NC_ASSET, NC_SCENE, NC_SPACE, ND_MODE, ND_REGIONS_ASSET_SHELF, and params.
Referenced by header_region_listen(), and region_listen().
|
static |
Check if there is any asset shelf type in this space returning true in its poll. If not, no asset shelf region should be displayed.
Definition at line 290 of file asset_shelf.cc.
References C, SpaceLink::spacetype, static_shelf_types(), and type_poll_for_non_popup().
Referenced by header_regiontype_register(), and regions_poll().
| void blender::ed::asset::shelf::build_asset_view | ( | uiLayout & | layout, |
| const AssetLibraryReference & | library_ref, | ||
| const AssetShelf & | shelf, | ||
| const bContext & | C ) |
Definition at line 343 of file asset_shelf_asset_view.cc.
References BLI_assert, uiLayout::block(), blender::ui::GridViewBuilder::build_grid_view(), C, catalog_filter_from_shelf_settings(), filter_string_get(), blender::ed::asset::list::library_get_once_available(), blender::ui::AbstractView::set_context_menu_title(), blender::ed::asset::list::storage_fetch(), tile_height(), tile_width(), and UI_block_add_view().
Referenced by popover_panel_draw(), and region_layout().
|
static |
How many rows fit into the region (accounting for padding).
Definition at line 414 of file asset_shelf.cc.
References main_region_padding_y().
Referenced by region_on_user_resize(), region_resize_to_preferred(), and region_snap().
|
static |
Definition at line 420 of file asset_shelf.cc.
References main_region_padding_y().
Referenced by region_resize_to_preferred(), and region_snap().
|
static |
Definition at line 169 of file asset_shelf_asset_view.cc.
References AssetShelfSettings::active_catalog_path, catalog_filter_from_shelf_settings(), blender::asset_system::AssetCatalog::catalog_id, blender::asset_system::AssetLibrary::catalog_service(), blender::asset_system::AssetCatalogService::create_catalog_filter(), and blender::asset_system::AssetCatalogService::find_catalog_by_path().
Referenced by build_asset_view(), and catalog_filter_from_shelf_settings().
|
static |
Definition at line 199 of file asset_shelf_catalog_selector.cc.
References active_shelf_from_context(), uiLayout::block(), blender::ui::TreeViewBuilder::build_tree_view(), C, Panel::layout, blender::ed::asset::list::library_get_once_available(), library_selector_draw(), blender::ui::AbstractView::set_context_menu_title(), and UI_block_add_view().
Referenced by catalog_selector_panel_register().
| void blender::ed::asset::shelf::catalog_selector_panel_register | ( | ARegionType * | region_type | ) |
Definition at line 225 of file asset_shelf_catalog_selector.cc.
References blender::ed::asset::list::asset_reading_region_listen_fn(), BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, catalog_selector_panel_draw(), PanelType::description, PanelType::draw, PanelType::idname, PanelType::label, PanelType::listener, MEM_callocN(), N_, ARegionType::paneltypes, STRNCPY_UTF8, PanelType::translation_context, WM_paneltype_add(), and WM_paneltype_find().
Referenced by types_register().
|
static |
Definition at line 184 of file asset_shelf_popover.cc.
References uiLayout::block(), blender::ui::TreeViewBuilder::build_tree_view(), C, blender::ed::asset::list::library_get_once_available(), and UI_block_add_view().
Referenced by popover_panel_draw().
| int blender::ed::asset::shelf::context | ( | const bContext * | C, |
| const char * | member, | ||
| bContextDataResult * | result ) |
Definition at line 694 of file asset_shelf.cc.
References active_shelf_from_area(), AssetShelfSettings::asset_library_reference, C, CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_pointer_set(), CTX_data_pointer_set_ptr(), CTX_RESULT_MEMBER_NOT_FOUND, CTX_RESULT_NO_DATA, CTX_RESULT_OK, CTX_store_ptr_lookup(), CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), bScreen::id, result, AssetShelf::settings, UI_but_context_get(), and UI_region_views_find_active_item_but().
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
|
static |
Needs freeing with WM_operator_properties_free() (will be done by button if passed to that) and MEM_freeN().
Definition at line 203 of file asset_shelf_asset_view.cc.
References blender::StringRefNull::c_str(), blender::wm::InvokeRegionWin, blender::StringRefBase::is_empty(), blender::ed::asset::operator_asset_reference_props_set(), ot, WM_operator_properties_create_ptr(), and WM_operatortype_find().
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), blender::ed::asset::shelf::AssetViewItem::on_activate(), and blender::ed::asset::shelf::AssetDragController::on_drag_start().
| AssetShelf * blender::ed::asset::shelf::create_shelf_from_type | ( | AssetShelfType & | type | ) |
Definition at line 155 of file asset_shelf.cc.
References blender::asset_system::all_library_reference(), ASSET_SHELF_PREVIEW_SIZE_DEFAULT, AssetShelfType::default_preview_size, AssetShelfType::idname, and STRNCPY_UTF8.
Referenced by get_shelf_for_popup(), and update_active_shelf().
|
static |
Definition at line 397 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, asset_shelf_default_tile_height(), BLI_rctf_size_y(), BLI_rcti_size_y(), View2D::cur, IS_EQF, View2D::mask, AssetShelf::settings, tile_height(), and ARegion::v2d.
Referenced by region_on_user_resize(), region_resize_to_preferred(), and region_snap().
| void blender::ed::asset::shelf::ensure_asset_library_fetched | ( | const bContext & | C, |
| const AssetShelfType & | shelf_type ) |
Definition at line 98 of file asset_shelf_popover.cc.
References blender::asset_system::all_library_reference(), C, lookup_shelf_for_popup(), and blender::ed::asset::list::storage_fetch().
Referenced by blender::ui::template_asset_shelf_popover().
| AssetShelfType * blender::ed::asset::shelf::ensure_shelf_has_type | ( | AssetShelf & | shelf | ) |
Definition at line 139 of file asset_shelf.cc.
References static_shelf_types(), and STREQ.
Referenced by lookup_shelf_for_popup(), and update_active_shelf().
|
static |
Definition at line 334 of file asset_shelf_asset_view.cc.
References BLI_strncpy_ensure_pad(), and AssetShelfSettings::search_string.
Referenced by build_asset_view().
|
static |
Definition at line 128 of file asset_shelf_settings.cc.
References get_enabled_catalog_path_list().
|
static |
Definition at line 118 of file asset_shelf_settings.cc.
References BKE_preferences_asset_shelf_settings_get(), bUserAssetShelfSettings::enabled_catalog_paths, U, and use_enabled_catalogs_from_prefs().
Referenced by get_enabled_catalog_path_list(), settings_clear_enabled_catalogs(), settings_foreach_enabled_catalog_path(), and settings_is_catalog_path_enabled().
|
static |
Definition at line 78 of file asset_shelf_popover.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ASSET_SHELF_PREVIEW_SIZE_DEFAULT, ASSETSHELF_SHOW_NAMES, C, create_shelf_from_type(), AssetShelfSettings::display_flag, lookup_shelf_for_popup(), AssetShelfSettings::preview_size, AssetShelf::settings, blender::ed::asset::shelf::StaticPopupShelves::shelves(), and type_poll_for_popup().
Referenced by popover_panel_draw().
Definition at line 632 of file asset_shelf.cc.
References Bottom, C, and ED_region_header_with_button_sections().
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::header_region_init | ( | wmWindowManager * | wm, |
| ARegion * | region ) |
Definition at line 625 of file asset_shelf.cc.
References ARegion::alignment, ED_region_header_init(), ARegion::flag, RGN_FLAG_RESIZE_RESPECT_BUTTON_SECTIONS, and RGN_SPLIT_SCALE_PREV.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::header_region_listen | ( | const wmRegionListenerParams * | params | ) |
Definition at line 620 of file asset_shelf.cc.
References asset_shelf_region_listen(), and params.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| int blender::ed::asset::shelf::header_region_size | ( | ) |
Definition at line 637 of file asset_shelf.cc.
References UI_BUTTON_SECTION_SEPERATOR_LINE_WITH, and UI_UNIT_Y.
Referenced by region_rect_recursive().
|
static |
Definition at line 871 of file asset_shelf.cc.
References asset_shelf_header_draw(), asset_shelf_space_poll(), BLI_addtail(), C, CTX_wm_space_data(), HeaderType::draw, ARegionType::headertypes, HeaderType::idname, MEM_callocN(), HeaderType::poll, HeaderType::region_type, RGN_TYPE_ASSET_SHELF_HEADER, HeaderType::space_type, and STRNCPY_UTF8.
Referenced by types_register().
|
static |
Ensure the popover width fits into the window: Clamp width by the window width, minus some padding.
Definition at line 217 of file asset_shelf_popover.cc.
References LEFT_COL_WIDTH_UNITS, RIGHT_COL_WIDTH_UNITS_DEFAULT, UI_UNIT_X, and WM_window_native_pixel_x().
Referenced by popover_panel_draw().
| void blender::ed::asset::shelf::library_selector_draw | ( | const bContext * | C, |
| uiLayout * | layout, | ||
| AssetShelf & | shelf ) |
Definition at line 185 of file asset_shelf_catalog_selector.cc.
References ASSET_LIBRARY_LOCAL, C, CTX_wm_screen(), blender::wm::InvokeDefault, uiLayout::op(), uiLayout::operator_context_set(), uiLayout::prop(), RNA_pointer_create_discrete(), uiLayout::row(), and UI_ITEM_NONE.
Referenced by catalog_selector_panel_draw(), and popover_panel_draw().
|
static |
Definition at line 62 of file asset_shelf_popover.cc.
References C, ensure_shelf_has_type(), AssetShelfType::idname, blender::ed::asset::shelf::StaticPopupShelves::shelves(), STREQ, and type_poll_for_popup().
Referenced by ensure_asset_library_fetched(), and get_shelf_for_popup().
|
static |
Definition at line 201 of file asset_shelf_popover.cc.
References C, CTX_data_string_get(), and type_find_from_idname().
Referenced by popover_panel_draw(), and popover_panel_poll().
|
static |
Definition at line 391 of file asset_shelf.cc.
References main_region_padding_y().
Referenced by region_layout().
|
static |
Definition at line 385 of file asset_shelf.cc.
References uiStyle::buttonspacey, and UI_style_get_dpi().
Referenced by calculate_row_count_from_tile_draw_height(), calculate_scaled_region_height_from_row_count(), main_region_padding_x(), region_layout(), and region_prefsizey().
Definition at line 223 of file asset_shelf_popover.cc.
References BLI_assert, BLI_assert_msg, BLI_assert_unreachable, build_asset_view(), C, catalog_tree_draw(), uiLayout::column(), uiLayout::context_ptr_set(), CTX_wm_screen(), CTX_wm_window(), uiItem::fixed_size_set(), get_shelf_for_popup(), bScreen::id, Panel::layout, layout_width_units_clamped(), LEFT_COL_WIDTH_UNITS, library_selector_draw(), lookup_type_from_idname_in_context(), uiLayout::prop(), RNA_pointer_create_discrete(), uiLayout::row(), UI_ITEM_R_TEXT_BUT_FORCE_SEMI_MODAL_ACTIVE, and uiLayout::ui_units_x_set().
Referenced by popover_panel_register().
Definition at line 270 of file asset_shelf_popover.cc.
References C, lookup_type_from_idname_in_context(), and type_poll_for_popup().
Referenced by popover_panel_register().
| void blender::ed::asset::shelf::popover_panel_register | ( | ARegionType * | region_type | ) |
Definition at line 280 of file asset_shelf_popover.cc.
References blender::ed::asset::list::asset_reading_region_listen_fn(), BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, PanelType::description, PanelType::draw, PanelType::idname, PanelType::label, LEFT_COL_WIDTH_UNITS, PanelType::listener, MEM_callocN(), N_, PanelType::offset_units_xy, ARegionType::paneltypes, PanelType::poll, popover_panel_draw(), popover_panel_poll(), STRNCPY_UTF8, PanelType::translation_context, WM_paneltype_add(), and WM_paneltype_find().
Referenced by types_register().
| void blender::ed::asset::shelf::region_blend_read_data | ( | BlendDataReader * | reader, |
| ARegion * | region ) |
Definition at line 647 of file asset_shelf.cc.
References ARegion::regiondata, and regiondata_blend_read_data().
Referenced by direct_link_region().
| void blender::ed::asset::shelf::region_blend_write | ( | BlendWriter * | writer, |
| ARegion * | region ) |
Definition at line 657 of file asset_shelf.cc.
References regiondata_blend_write().
Referenced by write_region().
Definition at line 560 of file asset_shelf.cc.
References C, ED_region_clear(), ARegion::runtime, TH_BACK, UI_blocklist_draw(), UI_blocklist_update_window_matrix(), UI_view2d_scrollers_draw(), UI_view2d_view_ortho(), UI_view2d_view_restore(), and ARegion::v2d.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void * blender::ed::asset::shelf::region_duplicate | ( | void * | regiondata | ) |
Only needed for RGN_TYPE_ASSET_SHELF (not RGN_TYPE_ASSET_SHELF_HEADER).
Definition at line 267 of file asset_shelf.cc.
References regiondata_duplicate().
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::region_free | ( | ARegion * | region | ) |
Definition at line 277 of file asset_shelf.cc.
References ARegion::regiondata, and regiondata_free().
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::region_init | ( | wmWindowManager * | wm, |
| ARegion * | region ) |
Definition at line 356 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, asset_shelf_default_tile_height(), BLI_assert_msg, View2D::flag, View2D::keepofs, View2D::keeptot, View2D::keepzoom, View2D::page_size_y, RGN_TYPE_WINDOW, ARegion::runtime, View2D::scroll, AssetShelf::settings, SPACE_EMPTY, tile_height(), UI_view2d_offset_y_snap_to_closest_page(), UI_view2d_region_reinit(), ARegion::v2d, V2D_COMMONVIEW_PANELS_UI, V2D_KEEPOFS_Y, V2D_KEEPTOT_STRICT, V2D_LOCKZOOM_X, V2D_LOCKZOOM_Y, V2D_SCROLL_RIGHT, V2D_SCROLL_VERTICAL_HIDE, V2D_SNAP_TO_PAGESIZE_Y, ARegion::winx, ARegion::winy, WM_event_add_keymap_handler(), and WM_keymap_ensure().
Referenced by image_asset_shelf_region_init(), blender::ed::space_node::node_asset_shelf_region_init(), and view3d_asset_shelf_region_init().
Definition at line 513 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, AssetShelfSettings::asset_library_reference, BLI_assert, BLI_assert_msg, blender::ui::block_layout(), blender::ui::block_layout_resolve(), build_asset_view(), C, CTX_wm_area(), blender::ui::Emboss, main_region_padding_x(), main_region_padding_y(), blender::ui::Panel, region_resize_to_preferred(), ARegion::runtime, AssetShelf::settings, UI_block_begin(), UI_block_end(), UI_blocklist_update_window_matrix(), UI_style_get_dpi(), UI_view2d_curRect_validate(), UI_view2d_totRect_set(), UI_view2d_view_ortho(), ARegion::v2d, blender::ui::Vertical, and ARegion::winx.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::region_listen | ( | const wmRegionListenerParams * | params | ) |
Definition at line 331 of file asset_shelf.cc.
References asset_shelf_region_listen(), ED_region_tag_redraw_no_rebuild(), blender::ed::asset::list::listen(), and params.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::region_message_subscribe | ( | const wmRegionMessageSubscribeParams * | params | ) |
Definition at line 342 of file asset_shelf.cc.
References ED_region_do_msg_notify_tag_redraw(), WorkSpace::id, wmMsgSubscribeValue::notify, wmMsgSubscribeValue::owner, params, wmMsgSubscribeValue::user_data, and WM_msg_subscribe_rna_prop.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
Definition at line 578 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, ASSETSHELF_REGION_IS_HIDDEN, BLI_assert_unreachable, C, CTX_wm_area(), ED_region_visibility_change_update(), ARegion::flag, AssetShelf::instance_flag, RGN_FLAG_HIDDEN, RGN_FLAG_HIDDEN_BY_USER, SET_FLAG_FROM_TEST, ScrArea::spacetype, and update_active_shelf().
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::region_on_user_resize | ( | const ARegion * | region | ) |
Definition at line 476 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, calculate_row_count_from_tile_draw_height(), current_tile_draw_height(), AssetShelf::preferred_row_count, ARegion::sizey, tile_height(), and UI_SCALE_FAC.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| int blender::ed::asset::shelf::region_prefsizey | ( | ) |
Definition at line 507 of file asset_shelf.cc.
References asset_shelf_default_tile_height(), and main_region_padding_y().
Referenced by region_rect_recursive().
|
static |
Ensure the region height matches the preferred row count (see AssetShelf.preferred_row_count) as closely as possible while still fitting within the area. In any case, this will ensure the region height is snapped to a multiple of the row count (plus region padding).
Definition at line 450 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, AE_TOP_TO_BOTTOMRIGHT, BLI_assert, calculate_row_count_from_tile_draw_height(), calculate_scaled_region_height_from_row_count(), current_tile_draw_height(), ED_area_max_regionsize(), ED_area_tag_region_size_update(), AssetShelf::preferred_row_count, ARegion::sizey, tile_height(), and UI_SCALE_FAC.
Referenced by region_layout().
| int blender::ed::asset::shelf::region_snap | ( | const ARegion * | region, |
| int | size, | ||
| int | axis ) |
Definition at line 426 of file asset_shelf.cc.
References calculate_row_count_from_tile_draw_height(), calculate_scaled_region_height_from_row_count(), current_tile_draw_height(), size(), tile_height(), and UI_SCALE_FAC.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::regiondata_blend_read_data | ( | BlendDataReader * | reader, |
| RegionAssetShelf ** | shelf_regiondata ) |
Definition at line 81 of file asset_shelf_regiondata.cc.
References BLO_read_struct, BLO_read_struct_list, LISTBASE_FOREACH, and settings_blend_read_data().
Referenced by region_blend_read_data().
| void blender::ed::asset::shelf::regiondata_blend_write | ( | BlendWriter * | writer, |
| const RegionAssetShelf * | shelf_regiondata ) |
Definition at line 72 of file asset_shelf_regiondata.cc.
References BLO_write_struct, LISTBASE_FOREACH, settings_blend_write(), and RegionAssetShelf::shelves.
Referenced by region_blend_write().
| RegionAssetShelf * blender::ed::asset::shelf::regiondata_duplicate | ( | const RegionAssetShelf * | shelf_regiondata | ) |
Deep-copies shelf_regiondata into newly allocated memory. Must be freed using regiondata_free().
Definition at line 43 of file asset_shelf_regiondata.cc.
References RegionAssetShelf::active_shelf, BLI_addtail(), BLI_listbase_clear(), LISTBASE_FOREACH, MEM_callocN(), AssetShelf::settings, and RegionAssetShelf::shelves.
Referenced by region_duplicate().
| void blender::ed::asset::shelf::regiondata_free | ( | RegionAssetShelf * | shelf_regiondata | ) |
Frees the contained data and shelf_regiondata itself.
Definition at line 64 of file asset_shelf_regiondata.cc.
References LISTBASE_FOREACH_MUTABLE, MEM_freeN(), and RegionAssetShelf::shelves.
Referenced by region_free().
| bool blender::ed::asset::shelf::regions_poll | ( | const RegionPollParams * | params | ) |
Definition at line 302 of file asset_shelf.cc.
References asset_shelf_space_poll(), and params.
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
| void blender::ed::asset::shelf::send_redraw_notifier | ( | const bContext & | C | ) |
Definition at line 51 of file asset_shelf.cc.
References C, NC_SPACE, ND_REGIONS_ASSET_SHELF, and WM_event_add_notifier().
Referenced by add_catalog_tabs(), blender::ed::asset::shelf::AssetCatalogTreeView::build_catalog_items_recursive(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), and blender::ed::asset::shelf::AssetCatalogTreeView::build_tree().
| void blender::ed::asset::shelf::settings_blend_read_data | ( | BlendDataReader * | reader, |
| AssetShelfSettings & | settings ) |
Definition at line 83 of file asset_shelf_settings.cc.
References AssetShelfSettings::active_catalog_path, BKE_asset_catalog_path_list_blend_read_data(), BLO_read_string(), and AssetShelfSettings::enabled_catalog_paths.
Referenced by regiondata_blend_read_data().
| void blender::ed::asset::shelf::settings_blend_write | ( | BlendWriter * | writer, |
| const AssetShelfSettings & | settings ) |
Definition at line 75 of file asset_shelf_settings.cc.
References AssetShelfSettings::active_catalog_path, BKE_asset_catalog_path_list_blend_write(), BLO_write_string(), BLO_write_struct, and AssetShelfSettings::enabled_catalog_paths.
Referenced by regiondata_blend_write().
| void blender::ed::asset::shelf::settings_clear_enabled_catalogs | ( | AssetShelf & | shelf | ) |
Clears the list of enabled catalogs in either the Preferences (if any) or the asset shelf settings (if any), depending on the ASSET_SHELF_TYPE_FLAG_STORE_CATALOGS_IN_PREFS flag.
Definition at line 134 of file asset_shelf_settings.cc.
References BKE_asset_catalog_path_list_free(), BLI_assert, BLI_listbase_is_empty(), and get_enabled_catalog_path_list().
Referenced by blender::ed::asset::shelf::AssetCatalogSelectorTree::update_shelf_settings_from_enabled_catalogs().
| void blender::ed::asset::shelf::settings_foreach_enabled_catalog_path | ( | const AssetShelf & | shelf, |
| FunctionRef< void(const asset_system::AssetCatalogPath &catalog_path)> | fn ) |
Definition at line 172 of file asset_shelf_settings.cc.
References get_enabled_catalog_path_list(), and LISTBASE_FOREACH.
Referenced by add_catalog_tabs().
| bool blender::ed::asset::shelf::settings_is_active_catalog | ( | const AssetShelfSettings & | settings, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 102 of file asset_shelf_settings.cc.
References AssetShelfSettings::active_catalog_path, and blender::asset_system::AssetCatalogPath::str().
Referenced by add_catalog_tabs(), and blender::ed::asset::shelf::AssetCatalogTreeView::build_catalog_items_recursive().
| bool blender::ed::asset::shelf::settings_is_all_catalog_active | ( | const AssetShelfSettings & | settings | ) |
Definition at line 108 of file asset_shelf_settings.cc.
References AssetShelfSettings::active_catalog_path.
Referenced by add_catalog_tabs(), and blender::ed::asset::shelf::AssetCatalogTreeView::build_tree().
| bool blender::ed::asset::shelf::settings_is_catalog_path_enabled | ( | const AssetShelf & | shelf, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 143 of file asset_shelf_settings.cc.
References BKE_asset_catalog_path_list_has_path(), blender::asset_system::AssetCatalogPath::c_str(), and get_enabled_catalog_path_list().
Referenced by blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::Item().
| void blender::ed::asset::shelf::settings_set_active_catalog | ( | AssetShelfSettings & | settings, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 89 of file asset_shelf_settings.cc.
References AssetShelfSettings::active_catalog_path, BLI_strdupn(), blender::asset_system::AssetCatalogPath::c_str(), and blender::asset_system::AssetCatalogPath::length().
Referenced by add_catalog_tabs(), and blender::ed::asset::shelf::AssetCatalogTreeView::build_catalog_items_recursive().
| void blender::ed::asset::shelf::settings_set_all_catalog_active | ( | AssetShelfSettings & | settings | ) |
Definition at line 96 of file asset_shelf_settings.cc.
References AssetShelfSettings::active_catalog_path.
Referenced by add_catalog_tabs(), and blender::ed::asset::shelf::AssetCatalogTreeView::build_tree().
| void blender::ed::asset::shelf::settings_set_catalog_path_enabled | ( | AssetShelf & | shelf, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 154 of file asset_shelf_settings.cc.
References BKE_asset_catalog_path_list_add_path(), BKE_asset_catalog_path_list_has_path(), BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled(), blender::asset_system::AssetCatalogPath::c_str(), U, and use_enabled_catalogs_from_prefs().
Referenced by show_catalog_in_visible_shelves(), and blender::ed::asset::shelf::AssetCatalogSelectorTree::update_shelf_settings_from_enabled_catalogs().
| void blender::ed::asset::shelf::show_catalog_in_visible_shelves | ( | const bContext & | C, |
| const StringRefNull | catalog_path ) |
Enable catalog path in all shelves visible in all windows.
Definition at line 936 of file asset_shelf.cc.
References active_shelf_from_area(), bScreen::areabase, C, blender::StringRefNull::c_str(), CTX_wm_manager(), LISTBASE_FOREACH, settings_set_catalog_path_enabled(), and WM_window_get_active_screen().
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::animrig::create_pose_asset_local(), and blender::ed::animrig::create_pose_asset_user_library().
|
static |
Definition at line 60 of file asset_shelf.cc.
Referenced by asset_shelf_space_poll(), ensure_shelf_has_type(), type_find_from_idname(), type_poll_no_spacetype_check(), type_register(), type_unregister(), and update_active_shelf().
| int blender::ed::asset::shelf::tile_height | ( | const AssetShelfSettings & | settings | ) |
Definition at line 495 of file asset_shelf.cc.
References ASSETSHELF_SHOW_NAMES, AssetShelfSettings::display_flag, AssetShelfSettings::preview_size, UI_preview_tile_size_y(), and UI_preview_tile_size_y_no_label().
Referenced by build_asset_view(), current_tile_draw_height(), region_init(), region_on_user_resize(), region_resize_to_preferred(), and region_snap().
| int blender::ed::asset::shelf::tile_width | ( | const AssetShelfSettings & | settings | ) |
Definition at line 490 of file asset_shelf.cc.
References AssetShelfSettings::preview_size, and UI_preview_tile_size_x().
Referenced by build_asset_view().
| AssetShelfType * blender::ed::asset::shelf::type_find_from_idname | ( | StringRef | idname | ) |
Definition at line 129 of file asset_shelf.cc.
References static_shelf_types().
Referenced by blender::ui::asset_shelf_popover_invoke(), lookup_type_from_idname_in_context(), and blender::ui::template_asset_shelf_popover().
|
static |
Poll an asset shelf type for display as a permanent region in a space of a given type (the type's #bl_space_type).
Popup asset shelves should use type_poll_for_popup() instead.
Definition at line 115 of file asset_shelf.cc.
References C, AssetShelfType::space_type, and type_poll_no_spacetype_check().
Referenced by asset_shelf_space_poll(), and update_active_shelf().
| bool blender::ed::asset::shelf::type_poll_for_popup | ( | const bContext & | C, |
| const AssetShelfType * | shelf_type ) |
Poll an asset shelf type for display as a popup. Doesn't check for space-type (the type's #bl_space_type) since popups should ignore this to allow displaying in any space.
Permanent/non-popup asset shelf regions should use #type_poll_for_space_type() instead.
Definition at line 104 of file asset_shelf.cc.
References C, and type_poll_no_spacetype_check().
Referenced by blender::ui::asset_shelf_popover_invoke(), get_shelf_for_popup(), lookup_shelf_for_popup(), and popover_panel_poll().
|
static |
Definition at line 85 of file asset_shelf.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), BLI_assert_msg, C, blender::Vector< T, InlineBufferCapacity, Allocator >::end(), AssetShelfType::poll, and static_shelf_types().
Referenced by type_poll_for_non_popup(), and type_poll_for_popup().
| void blender::ed::asset::shelf::type_popup_unlink | ( | const AssetShelfType & | shelf_type | ) |
Definition at line 53 of file asset_shelf_popover.cc.
References blender::ed::asset::shelf::StaticPopupShelves::shelves().
Referenced by type_unlink().
| void blender::ed::asset::shelf::type_register | ( | std::unique_ptr< AssetShelfType > | type | ) |
Definition at line 66 of file asset_shelf.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), and static_shelf_types().
| void blender::ed::asset::shelf::type_unlink | ( | const Main & | bmain, |
| const AssetShelfType & | shelf_type ) |
Definition at line 898 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, BLI_assert, LISTBASE_FOREACH, RGN_TYPE_ASSET_SHELF, Main::screens, RegionAssetShelf::shelves, AssetShelf::type, and type_popup_unlink().
| void blender::ed::asset::shelf::type_unregister | ( | const AssetShelfType & | shelf_type | ) |
| void blender::ed::asset::shelf::types_register | ( | ARegionType * | region_type, |
| const int | space_type ) |
Definition at line 885 of file asset_shelf.cc.
References catalog_selector_panel_register(), header_regiontype_register(), and popover_panel_register().
Referenced by ED_spacetype_image(), ED_spacetype_node(), and ED_spacetype_view3d().
|
static |
Determine and set the currently active asset shelf, creating a new shelf if needed.
The heuristic works as follows: 1) If the currently active shelf is still valid (poll succeeds), keep it active. 2) Otherwise, check for previously activated shelves in shelf_regiondata and activate the first valid one (first with a succeeding poll). 3) If none is valid, check all shelf-types available for space_type, create a new shelf for the first type that is valid (poll succeeds), and activate it. 4) If no shelf-type is valid, RegionAssetShelf.active_shelf is set to null.
When activating a shelf, it is moved to the beginning of the RegionAssetShelf.shelves list, so that recently activated shelves are also the first ones to be reactivated.
The returned shelf is guaranteed to have its AssetShelf.type pointer set.
| on_create | Function called when a new asset shelf is created (case 3). |
Definition at line 208 of file asset_shelf.cc.
References activate_shelf(), RegionAssetShelf::active_shelf, BLI_addhead(), BLI_assert, C, create_shelf_from_type(), ensure_shelf_has_type(), ListBase::first, LISTBASE_FOREACH, RegionAssetShelf::shelves, static_shelf_types(), and type_poll_for_non_popup().
Referenced by region_on_poll_success().
|
static |
Definition at line 113 of file asset_shelf_settings.cc.
References ASSET_SHELF_TYPE_FLAG_STORE_CATALOGS_IN_PREFS.
Referenced by get_enabled_catalog_path_list(), and settings_set_catalog_path_enabled().
|
constexpr |
Definition at line 210 of file asset_shelf_popover.cc.
Referenced by layout_width_units_clamped(), popover_panel_draw(), and popover_panel_register().
|
constexpr |
Definition at line 211 of file asset_shelf_popover.cc.
Referenced by layout_width_units_clamped().