|
Blender V4.3
|
Classes | |
| class | AssetCatalogSelectorTree |
| class | AssetCatalogTreeView |
| class | AssetDragController |
| class | AssetView |
| class | AssetViewItem |
| class | StaticPopupShelves |
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 176 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 664 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 blender::ed::sculpt_paint::show_catalog_in_asset_shelf().
| AssetShelf * blender::ed::asset::shelf::active_shelf_from_context | ( | const bContext * | C | ) |
Definition at line 756 of file asset_shelf.cc.
References active_shelf_ptr_from_context(), and PointerRNA::data.
Referenced by catalog_selector_panel_draw().
|
static |
Definition at line 751 of file asset_shelf.cc.
References CTX_data_pointer_get_type().
Referenced by active_shelf_from_context(), and asset_shelf_header_draw().
|
static |
Definition at line 795 of file asset_shelf.cc.
References add_tab_button(), IFACE_, blender::asset_system::AssetCatalogPath::name(), send_redraw_notifier(), AssetShelf::settings, 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(), UI_but_func_set(), uiItemS(), and uiLayoutGetBlock().
Referenced by asset_shelf_header_draw().
|
static |
Definition at line 768 of file asset_shelf.cc.
References TIP_, UI_BTYPE_TAB, 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 492 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 836 of file asset_shelf.cc.
References active_shelf_ptr_from_context(), add_catalog_tabs(), CTX_wm_asset_library_ref(), PointerRNA::data, Header::layout, blender::ed::asset::list::storage_fetch(), UI_block_emboss_set(), UI_EMBOSS, UI_EMBOSS_NONE, UI_ITEM_NONE, uiItemPopoverPanel(), uiItemR(), uiItemS(), uiItemSpacer(), uiLayoutGetBlock(), uiLayoutRow(), and uiLayoutSetUnitsX().
Referenced by header_regiontype_register().
|
static |
Definition at line 305 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 287 of file asset_shelf.cc.
References 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, | ||
| const ARegion & | region ) |
Definition at line 345 of file asset_shelf_asset_view.cc.
References BLI_assert, blender::ui::GridViewBuilder::build_grid_view(), catalog_filter_from_shelf_settings(), filter_string_get(), blender::ed::asset::list::library_get_once_available(), blender::ed::asset::list::previews_fetch(), blender::ui::AbstractView::set_context_menu_title(), AssetShelf::settings, blender::ed::asset::list::storage_fetch(), tile_height(), tile_width(), UI_block_add_view(), and uiLayoutGetBlock().
Referenced by popover_panel_draw(), and region_layout().
|
static |
How many rows fit into the region (accounting for padding).
Definition at line 411 of file asset_shelf.cc.
References main_region_padding_y().
Referenced by region_on_user_resize(), and region_snap().
|
static |
Definition at line 417 of file asset_shelf.cc.
References main_region_padding_y().
Referenced by region_resize_to_preferred(), and region_snap().
|
static |
Definition at line 166 of file asset_shelf_asset_view.cc.
References AssetShelfSettings::active_catalog_path, 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().
|
static |
Definition at line 195 of file asset_shelf_catalog_selector.cc.
References active_shelf_from_context(), AssetShelfSettings::asset_library_reference, blender::ui::TreeViewBuilder::build_tree_view(), Panel::layout, blender::ed::asset::list::library_get_once_available(), library_selector_draw(), blender::ui::AbstractView::set_context_menu_title(), AssetShelf::settings, UI_block_add_view(), and uiLayoutGetBlock().
Referenced by catalog_selector_panel_register().
| void blender::ed::asset::shelf::catalog_selector_panel_register | ( | ARegionType * | region_type | ) |
Definition at line 221 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, N_, ARegionType::paneltypes, STRNCPY, PanelType::translation_context, WM_paneltype_add(), and WM_paneltype_find().
Referenced by types_register().
|
static |
Definition at line 158 of file asset_shelf_popover.cc.
References AssetShelfSettings::asset_library_reference, blender::ui::TreeViewBuilder::build_tree_view(), blender::ed::asset::list::library_get_once_available(), AssetShelf::settings, UI_block_add_view(), and uiLayoutGetBlock().
Referenced by popover_panel_draw().
| int blender::ed::asset::shelf::context | ( | const bContext * | C, |
| const char * | member, | ||
| bContextDataResult * | result ) |
Definition at line 686 of file asset_shelf.cc.
References active_shelf_from_area(), AssetShelfSettings::asset_library_reference, 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(), AssetShelf::settings, UI_but_context_get(), and UI_region_views_find_active_item_but().
|
static |
Needs freeing with WM_operator_properties_free() (will be done by button if passed to that) and MEM_freeN().
Definition at line 201 of file asset_shelf_asset_view.cc.
References blender::StringRefNull::c_str(), blender::StringRefBase::is_empty(), blender::ed::asset::operator_asset_reference_props_set(), ot, WM_OP_INVOKE_REGION_WIN, WM_operator_properties_create_ptr(), and WM_operatortype_find().
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and blender::ed::asset::shelf::AssetViewItem::on_activate().
| AssetShelf * blender::ed::asset::shelf::create_shelf_from_type | ( | AssetShelfType & | type | ) |
Definition at line 152 of file asset_shelf.cc.
References blender::asset_system::all_library_reference(), AssetShelfSettings::asset_library_reference, ASSET_SHELF_PREVIEW_SIZE_DEFAULT, AssetShelf::idname, AssetShelf::preferred_row_count, AssetShelfSettings::preview_size, AssetShelf::settings, STRNCPY, and AssetShelf::type.
Referenced by get_shelf_for_popup(), and update_active_shelf().
Definition at line 394 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, asset_shelf_default_tile_height(), BLI_rctf_size_y(), BLI_rcti_size_y(), IS_EQF, AssetShelf::settings, and tile_height().
Referenced by region_on_user_resize(), region_resize_to_preferred(), and region_snap().
| AssetShelfType * blender::ed::asset::shelf::ensure_shelf_has_type | ( | AssetShelf & | shelf | ) |
Definition at line 136 of file asset_shelf.cc.
References AssetShelf::idname, static_shelf_types(), STREQ, and AssetShelf::type.
Referenced by get_shelf_for_popup(), and update_active_shelf().
|
static |
Definition at line 336 of file asset_shelf_asset_view.cc.
References BLI_strncpy_ensure_pad(), AssetShelfSettings::search_string, and AssetShelf::settings.
Referenced by build_asset_view().
|
static |
Definition at line 118 of file asset_shelf_settings.cc.
References get_enabled_catalog_path_list().
|
static |
Definition at line 108 of file asset_shelf_settings.cc.
References BKE_preferences_asset_shelf_settings_get(), AssetShelfSettings::enabled_catalog_paths, bUserAssetShelfSettings::enabled_catalog_paths, AssetShelf::idname, AssetShelf::settings, 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 58 of file asset_shelf_popover.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ASSET_SHELF_PREVIEW_SIZE_DEFAULT, ASSETSHELF_SHOW_NAMES, create_shelf_from_type(), AssetShelfSettings::display_flag, ensure_shelf_has_type(), AssetShelfType::idname, AssetShelfSettings::preview_size, AssetShelf::settings, blender::ed::asset::shelf::StaticPopupShelves::shelves(), STREQ, and type_poll_for_popup().
Referenced by popover_panel_draw().
Definition at line 624 of file asset_shelf.cc.
References Bottom, and ED_region_header_with_button_sections().
| void blender::ed::asset::shelf::header_region_init | ( | wmWindowManager * | wm, |
| ARegion * | region ) |
Definition at line 617 of file asset_shelf.cc.
References ED_region_header_init(), RGN_FLAG_RESIZE_RESPECT_BUTTON_SECTIONS, and RGN_SPLIT_SCALE_PREV.
| void blender::ed::asset::shelf::header_region_listen | ( | const wmRegionListenerParams * | params | ) |
Definition at line 612 of file asset_shelf.cc.
References asset_shelf_region_listen(), and params.
| int blender::ed::asset::shelf::header_region_size | ( | ) |
Definition at line 629 of file asset_shelf.cc.
References UI_BUTTON_SECTION_SEPERATOR_LINE_WITH, and UI_UNIT_Y.
|
static |
Definition at line 864 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, HeaderType::poll, HeaderType::region_type, RGN_TYPE_ASSET_SHELF_HEADER, HeaderType::space_type, and STRNCPY.
Referenced by types_register().
Ensure the popover width fits into the window: Clamp width by the window width, minus some padding.
Definition at line 191 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 182 of file asset_shelf_catalog_selector.cc.
References ASSET_LIBRARY_LOCAL, AssetShelfSettings::asset_library_reference, CTX_wm_screen(), RNA_pointer_create(), AssetShelf::settings, AssetLibraryReference::type, UI_ITEM_NONE, uiItemO(), uiItemR(), uiLayoutRow(), uiLayoutSetOperatorContext(), and WM_OP_INVOKE_DEFAULT.
Referenced by catalog_selector_panel_draw(), and popover_panel_draw().
|
static |
Definition at line 175 of file asset_shelf_popover.cc.
References CTX_data_string_get(), and type_find_from_idname().
Referenced by popover_panel_draw(), and popover_panel_poll().
|
static |
Definition at line 388 of file asset_shelf.cc.
References main_region_padding_y().
Referenced by region_layout().
|
static |
Definition at line 382 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().
|
static |
Definition at line 197 of file asset_shelf_popover.cc.
References AssetShelfSettings::asset_library_reference, BLI_assert, BLI_assert_msg, BLI_assert_unreachable, build_asset_view(), catalog_tree_draw(), CTX_wm_region(), CTX_wm_region_popup(), CTX_wm_screen(), CTX_wm_window(), get_shelf_for_popup(), Panel::layout, layout_width_units_clamped(), LEFT_COL_WIDTH_UNITS, library_selector_draw(), lookup_type_from_idname_in_context(), RNA_pointer_create(), AssetShelf::settings, UI_ITEM_R_TEXT_BUT_FORCE_SEMI_MODAL_ACTIVE, uiItemR(), uiLayoutColumn(), uiLayoutRow(), uiLayoutSetContextPointer(), uiLayoutSetFixedSize(), and uiLayoutSetUnitsX().
Referenced by popover_panel_register().
|
static |
Definition at line 247 of file asset_shelf_popover.cc.
References 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 257 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, N_, PanelType::offset_units_xy, ARegionType::paneltypes, PanelType::poll, popover_panel_draw(), popover_panel_poll(), STRNCPY, 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 639 of file asset_shelf.cc.
References regiondata_blend_read_data().
Referenced by direct_link_region().
| void blender::ed::asset::shelf::region_blend_write | ( | BlendWriter * | writer, |
| ARegion * | region ) |
Definition at line 649 of file asset_shelf.cc.
References regiondata_blend_write().
Referenced by write_region().
Definition at line 552 of file asset_shelf.cc.
References ED_region_clear(), TH_BACK, UI_blocklist_draw(), UI_blocklist_update_window_matrix(), UI_view2d_scrollers_draw(), UI_view2d_view_ortho(), and UI_view2d_view_restore().
| 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 264 of file asset_shelf.cc.
References regiondata_duplicate().
| void blender::ed::asset::shelf::region_free | ( | ARegion * | region | ) |
Definition at line 274 of file asset_shelf.cc.
References regiondata_free().
| void blender::ed::asset::shelf::region_init | ( | wmWindowManager * | wm, |
| ARegion * | region ) |
Definition at line 353 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, asset_shelf_default_tile_height(), BLI_assert_msg, wmWindowManager::defaultconf, RGN_TYPE_WINDOW, AssetShelf::settings, SPACE_EMPTY, tile_height(), UI_view2d_offset_y_snap_to_closest_page(), UI_view2d_region_reinit(), 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, WM_event_add_keymap_handler(), and WM_keymap_ensure().
Definition at line 503 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, AssetShelfSettings::asset_library_reference, BLI_assert, BLI_assert_msg, build_asset_view(), CTX_wm_area(), main_region_padding_x(), main_region_padding_y(), region_resize_to_preferred(), AssetShelf::settings, UI_block_begin(), UI_block_end(), UI_block_layout(), UI_block_layout_resolve(), UI_blocklist_update_window_matrix(), UI_EMBOSS, UI_LAYOUT_PANEL, UI_LAYOUT_VERTICAL, UI_style_get_dpi(), UI_view2d_curRect_validate(), UI_view2d_totRect_set(), and UI_view2d_view_ortho().
| void blender::ed::asset::shelf::region_listen | ( | const wmRegionListenerParams * | params | ) |
Definition at line 328 of file asset_shelf.cc.
References asset_shelf_region_listen(), ED_region_tag_redraw_no_rebuild(), blender::ed::asset::list::listen(), and params.
| void blender::ed::asset::shelf::region_message_subscribe | ( | const wmRegionMessageSubscribeParams * | params | ) |
Definition at line 339 of file asset_shelf.cc.
References ED_region_do_msg_notify_tag_redraw(), WorkSpace::id, wmMsgSubscribeValue::owner, params, and WM_msg_subscribe_rna_prop.
Definition at line 570 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, ASSETSHELF_REGION_IS_HIDDEN, BLI_assert_unreachable, CTX_wm_area(), ED_region_visibility_change_update(), AssetShelf::instance_flag, RGN_FLAG_HIDDEN, RGN_FLAG_HIDDEN_BY_USER, SET_FLAG_FROM_TEST, and update_active_shelf().
| void blender::ed::asset::shelf::region_on_user_resize | ( | const ARegion * | region | ) |
Definition at line 466 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, calculate_row_count_from_tile_draw_height(), current_tile_draw_height(), AssetShelf::preferred_row_count, tile_height(), and UI_SCALE_FAC.
| int blender::ed::asset::shelf::region_prefsizey | ( | ) |
Definition at line 497 of file asset_shelf.cc.
References asset_shelf_default_tile_height(), and main_region_padding_y().
|
static |
Ensure the region height matches the preferred row count (see AssetShelf.preferred_row_count). In any case, this will ensure the region height is snapped to a multiple of the row count (plus region padding).
Definition at line 447 of file asset_shelf.cc.
References RegionAssetShelf::active_shelf, BLI_assert, calculate_scaled_region_height_from_row_count(), current_tile_draw_height(), ED_area_tag_region_size_update(), AssetShelf::preferred_row_count, tile_height(), and UI_SCALE_FAC.
Referenced by region_layout().
Definition at line 423 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.
| 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, 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 299 of file asset_shelf.cc.
References asset_shelf_space_poll(), and params.
| void blender::ed::asset::shelf::send_redraw_notifier | ( | const bContext & | C | ) |
Definition at line 48 of file asset_shelf.cc.
References 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 73 of file asset_shelf_settings.cc.
References BKE_asset_catalog_path_list_blend_read_data(), and BLO_read_string().
Referenced by regiondata_blend_read_data().
| void blender::ed::asset::shelf::settings_blend_write | ( | BlendWriter * | writer, |
| const AssetShelfSettings & | settings ) |
Definition at line 65 of file asset_shelf_settings.cc.
References BKE_asset_catalog_path_list_blend_write(), BLO_write_string(), and BLO_write_struct.
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 124 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 162 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 92 of file asset_shelf_settings.cc.
References 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 98 of file asset_shelf_settings.cc.
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 133 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().
| void blender::ed::asset::shelf::settings_set_active_catalog | ( | AssetShelfSettings & | settings, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 79 of file asset_shelf_settings.cc.
References 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 86 of file asset_shelf_settings.cc.
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 144 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(), AssetShelfSettings::enabled_catalog_paths, AssetShelf::idname, AssetShelf::settings, and use_enabled_catalogs_from_prefs().
Referenced by blender::ed::asset::shelf::AssetCatalogSelectorTree::update_shelf_settings_from_enabled_catalogs().
|
static |
Definition at line 57 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 485 of file asset_shelf.cc.
References ASSETSHELF_SHOW_NAMES, 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 480 of file asset_shelf.cc.
References UI_preview_tile_size_x().
Referenced by build_asset_view().
| AssetShelfType * blender::ed::asset::shelf::type_find_from_idname | ( | const StringRef | idname | ) |
Definition at line 126 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 112 of file asset_shelf.cc.
References 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 101 of file asset_shelf.cc.
References type_poll_no_spacetype_check().
Referenced by blender::ui::asset_shelf_popover_invoke(), get_shelf_for_popup(), and popover_panel_poll().
|
static |
Definition at line 82 of file asset_shelf.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), BLI_assert_msg, 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 49 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 63 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 891 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 878 of file asset_shelf.cc.
References catalog_selector_panel_register(), header_regiontype_register(), and popover_panel_register().
|
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 205 of file asset_shelf.cc.
References activate_shelf(), RegionAssetShelf::active_shelf, BLI_addhead(), BLI_assert, 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 103 of file asset_shelf_settings.cc.
References ASSET_SHELF_TYPE_FLAG_STORE_CATALOGS_IN_PREFS, AssetShelfType::flag, and AssetShelf::type.
Referenced by get_enabled_catalog_path_list(), and settings_set_catalog_path_enabled().
|
constexpr |
Definition at line 184 of file asset_shelf_popover.cc.
Referenced by layout_width_units_clamped(), popover_panel_draw(), and popover_panel_register().
|
constexpr |
Definition at line 185 of file asset_shelf_popover.cc.
Referenced by layout_width_units_clamped().