|
Blender V5.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 199 of file asset_shelf.cc.
References activate_shelf(), blender::RegionAssetShelf::active_shelf, blender::BLI_addhead(), blender::BLI_assert(), blender::BLI_findindex(), blender::BLI_remlink(), and blender::RegionAssetShelf::shelves.
Referenced by activate_shelf(), and update_active_shelf().
| AssetShelf * blender::ed::asset::shelf::active_shelf_from_area | ( | const ScrArea * | area | ) |
Definition at line 723 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, active_shelf_from_area(), blender::BKE_area_find_region_type(), blender::ARegion::flag, blender::RGN_FLAG_POLL_FAILED, and blender::RGN_TYPE_ASSET_SHELF.
Referenced by active_shelf_from_area(), context(), and show_catalog_in_visible_shelves().
| AssetShelf * blender::ed::asset::shelf::active_shelf_from_context | ( | const bContext * | C | ) |
Definition at line 811 of file asset_shelf.cc.
References active_shelf_from_context(), active_shelf_ptr_from_context(), C, and blender::PointerRNA::data.
Referenced by active_shelf_from_context(), and catalog_selector_panel_draw().
|
static |
Definition at line 806 of file asset_shelf.cc.
References active_shelf_ptr_from_context(), C, and blender::CTX_data_pointer_get_type().
Referenced by active_shelf_from_context(), active_shelf_ptr_from_context(), and asset_shelf_header_draw().
|
static |
Definition at line 849 of file asset_shelf.cc.
References add_catalog_tabs(), add_tab_button(), blender::ui::Layout::block(), C, IFACE_, blender::asset_system::AssetCatalogPath::name(), send_redraw_notifier(), blender::ui::Layout::separator(), settings_foreach_enabled_catalog_path(), settings_is_active_catalog(), settings_is_all_catalog_active(), settings_set_active_catalog(), and settings_set_all_catalog_active().
Referenced by add_catalog_tabs(), and asset_shelf_header_draw().
|
static |
Definition at line 823 of file asset_shelf.cc.
References add_tab_button(), blender::ui::BUT_ALIGN_DOWN, blender::ui::BUT_UNDO, blender::StringRefNull::c_str(), blender::ui::fontstyle_string_width(), blender::ui::style_get_dpi(), blender::ui::Tab, TIP_, UI_UNIT_X, UI_UNIT_Y, and uiStyle::widget.
Referenced by add_catalog_tabs(), and add_tab_button().
|
static |
Definition at line 551 of file asset_shelf.cc.
References asset_shelf_default_tile_height(), ASSET_SHELF_PREVIEW_SIZE_DEFAULT, and blender::ui::preview_tile_size_x().
Referenced by asset_shelf_default_tile_height(), current_tile_draw_height(), region_init(), and region_prefsizey().
|
static |
Definition at line 890 of file asset_shelf.cc.
References active_shelf_ptr_from_context(), add_catalog_tabs(), asset_shelf_header_draw(), blender::ui::Layout::block(), C, blender::CTX_wm_asset_library_ref(), blender::PointerRNA::data, blender::ui::Emboss, blender::Header::layout, blender::ui::None, blender::ui::Layout::popover(), blender::ui::Layout::prop(), blender::ui::Layout::row(), blender::ui::Layout::separator(), blender::ui::Layout::separator_spacer(), blender::ed::asset::list::storage_fetch(), UI_ITEM_NONE, and blender::ui::Layout::ui_units_x_set().
Referenced by asset_shelf_header_draw(), and header_regiontype_register().
|
static |
Definition at line 327 of file asset_shelf.cc.
References asset_shelf_region_listen(), blender::wmNotifier::category, blender::wmNotifier::data, blender::ED_region_tag_redraw(), ELEM, NC_ASSET, NC_SCENE, NC_SPACE, ND_MODE, ND_REGIONS_ASSET_SHELF, blender::wmRegionListenerParams::notifier, and blender::wmRegionListenerParams::region.
Referenced by asset_shelf_region_listen(), 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 310 of file asset_shelf.cc.
References asset_shelf_space_poll(), C, blender::SpaceLink::spacetype, static_shelf_types(), and type_poll_for_non_popup().
Referenced by asset_shelf_space_poll(), header_regiontype_register(), and regions_poll().
| void blender::ed::asset::shelf::build_asset_view | ( | ui::Layout & | layout, |
| const AssetLibraryReference & | library_ref, | ||
| const AssetShelf & | shelf, | ||
| const bContext & | C ) |
Definition at line 422 of file asset_shelf_asset_view.cc.
References blender::BLI_assert(), blender::ui::Layout::block(), build_asset_view(), blender::ui::GridViewBuilder::build_grid_view(), C, catalog_filter_from_shelf_settings(), blender::ui::Layout::column(), filter_string_get(), blender::ui::AbstractGridView::get_item_count(), blender::ui::AbstractGridView::get_item_count_filtered(), blender::ui::Layout::label(), blender::ed::asset::list::library_get_once_available(), blender::OnlyOffline, blender::OnlyOnline, blender::ui::Layout::row(), RPT_, blender::ui::Layout::separator(), blender::ui::AbstractView::set_context_menu_title(), blender::ed::asset::list::storage_fetch(), tile_height(), tile_width(), and blender::U.
Referenced by build_asset_view(), popover_panel_draw(), and region_layout().
|
static |
How many rows fit into the region (accounting for padding).
Definition at line 463 of file asset_shelf.cc.
References calculate_row_count_from_tile_draw_height(), and main_region_padding_y().
Referenced by calculate_row_count_from_tile_draw_height(), region_on_user_resize(), region_resize_to_preferred(), and region_snap().
|
static |
Definition at line 469 of file asset_shelf.cc.
References calculate_scaled_region_height_from_row_count(), and main_region_padding_y().
Referenced by calculate_scaled_region_height_from_row_count(), region_resize_to_preferred(), and region_snap().
|
static |
Definition at line 176 of file asset_shelf_asset_view.cc.
References blender::AssetShelfSettings::active_catalog_path, catalog_filter_from_shelf_settings(), and blender::asset_system::AssetCatalog::catalog_id.
Referenced by build_asset_view(), and catalog_filter_from_shelf_settings().
|
static |
Definition at line 201 of file asset_shelf_catalog_selector.cc.
References active_shelf_from_context(), blender::ui::Layout::block(), blender::ui::TreeViewBuilder::build_tree_view(), C, catalog_selector_panel_draw(), blender::Panel::layout, blender::ed::asset::list::library_get_once_available(), library_selector_draw(), blender::ui::AbstractView::set_context_menu_title(), and settings_ensure_valid_library_ref().
Referenced by catalog_selector_panel_draw(), and catalog_selector_panel_register().
| void blender::ed::asset::shelf::catalog_selector_panel_register | ( | ARegionType * | region_type | ) |
Definition at line 229 of file asset_shelf_catalog_selector.cc.
References blender::ed::asset::list::asset_reading_region_listen_fn(), blender::BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, catalog_selector_panel_draw(), catalog_selector_panel_register(), blender::PanelType::description, blender::PanelType::draw, blender::PanelType::idname, blender::PanelType::label, blender::PanelType::listener, blender::MEM_new_zeroed(), N_, blender::ARegionType::paneltypes, STRNCPY_UTF8, blender::PanelType::translation_context, blender::WM_paneltype_add(), and blender::WM_paneltype_find().
Referenced by catalog_selector_panel_register(), and types_register().
|
static |
Definition at line 185 of file asset_shelf_popover.cc.
References blender::ui::Layout::block(), blender::ui::TreeViewBuilder::build_tree_view(), C, catalog_tree_draw(), and blender::ed::asset::list::library_get_once_available().
Referenced by catalog_tree_draw(), and popover_panel_draw().
| int blender::ed::asset::shelf::context | ( | const bContext * | C, |
| const char * | member, | ||
| bContextDataResult * | result ) |
Definition at line 745 of file asset_shelf.cc.
References active_shelf_from_area(), C, context(), blender::CTX_data_dir(), blender::CTX_data_dir_set(), blender::CTX_data_equals(), blender::CTX_data_pointer_set(), blender::CTX_data_pointer_set_ptr(), blender::CTX_RESULT_MEMBER_NOT_FOUND, blender::CTX_RESULT_NO_DATA, blender::CTX_RESULT_OK, blender::CTX_store_ptr_lookup(), blender::CTX_wm_area(), blender::CTX_wm_region(), blender::CTX_wm_screen(), blender::bScreen::id, blender::ui::region_views_find_active_item_but(), blender::result, blender::AssetShelf::settings, and settings_ensure_valid_library_ref().
Referenced by context(), blender::ED_spacetype_image(), blender::ED_spacetype_node(), and blender::ED_spacetype_view3d().
|
static |
Needs freeing with WM_operator_properties_free() (will be done by button if passed to that) and #MEM_delete().
Definition at line 210 of file asset_shelf_asset_view.cc.
References blender::StringRefNull::c_str(), create_asset_operator_params(), blender::wm::InvokeRegionWin, blender::blender::StringRefBase::is_empty(), blender::ed::asset::operator_asset_reference_props_set(), blender::WM_operator_properties_create_ptr(), and blender::WM_operatortype_find().
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), create_asset_operator_params(), 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 175 of file asset_shelf.cc.
References blender::asset_system::all_library_reference(), ASSET_SHELF_PREVIEW_SIZE_DEFAULT, create_shelf_from_type(), blender::AssetShelfType::default_preview_size, blender::AssetShelfType::idname, blender::dna::shallow_zero_initialize(), and STRNCPY_UTF8.
Referenced by create_shelf_from_type(), get_shelf_for_popup(), and update_active_shelf().
|
static |
Definition at line 446 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, asset_shelf_default_tile_height(), blender::BLI_rctf_size_y(), blender::BLI_rcti_size_y(), blender::View2D::cur, current_tile_draw_height(), IS_EQF, blender::View2D::mask, blender::AssetShelf::settings, tile_height(), and blender::ARegion::v2d.
Referenced by current_tile_draw_height(), 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, ensure_asset_library_fetched(), lookup_shelf_for_popup(), and blender::ed::asset::list::storage_fetch().
Referenced by ensure_asset_library_fetched(), and blender::ui::template_asset_shelf_popover().
| AssetShelfType * blender::ed::asset::shelf::ensure_shelf_has_type | ( | AssetShelf & | shelf | ) |
Definition at line 159 of file asset_shelf.cc.
References ensure_shelf_has_type(), static_shelf_types(), and STREQ.
Referenced by ensure_shelf_has_type(), lookup_shelf_for_popup(), and update_active_shelf().
|
static |
Definition at line 413 of file asset_shelf_asset_view.cc.
References blender::BLI_strncpy_ensure_pad(), filter_string_get(), and blender::AssetShelfSettings::search_string.
Referenced by build_asset_view(), and filter_string_get().
|
static |
Definition at line 149 of file asset_shelf_settings.cc.
References get_enabled_catalog_path_list().
|
static |
Definition at line 138 of file asset_shelf_settings.cc.
References blender::BKE_preferences_asset_shelf_settings_get(), blender::bUserAssetShelfSettings::enabled_catalog_paths, get_enabled_catalog_path_list(), blender::U, and use_enabled_catalogs_from_prefs().
Referenced by get_enabled_catalog_path_list(), 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, blender::ASSETSHELF_SHOW_NAMES, C, create_shelf_from_type(), blender::AssetShelfSettings::display_flag, get_shelf_for_popup(), lookup_shelf_for_popup(), blender::AssetShelfSettings::preview_size, blender::AssetShelf::settings, blender::ed::asset::shelf::StaticPopupShelves::shelves(), and type_poll_for_popup().
Referenced by get_shelf_for_popup(), and popover_panel_draw().
Definition at line 683 of file asset_shelf.cc.
References blender::ui::Bottom, C, blender::ED_region_header_with_button_sections(), and header_region().
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and header_region().
| void blender::ed::asset::shelf::header_region_init | ( | wmWindowManager * | wm, |
| ARegion * | region ) |
Definition at line 676 of file asset_shelf.cc.
References blender::ARegion::alignment, blender::ED_region_header_init(), blender::ARegion::flag, header_region_init(), blender::RGN_FLAG_RESIZE_RESPECT_BUTTON_SECTIONS, and blender::RGN_SPLIT_SCALE_PREV.
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and header_region_init().
| void blender::ed::asset::shelf::header_region_listen | ( | const wmRegionListenerParams * | params | ) |
Definition at line 671 of file asset_shelf.cc.
References asset_shelf_region_listen(), and header_region_listen().
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and header_region_listen().
| int blender::ed::asset::shelf::header_region_size | ( | ) |
Definition at line 688 of file asset_shelf.cc.
References header_region_size(), UI_BUTTON_SECTION_SEPERATOR_LINE_WITH, and UI_UNIT_Y.
Referenced by header_region_size(), and blender::region_rect_recursive().
|
static |
Definition at line 918 of file asset_shelf.cc.
References asset_shelf_header_draw(), asset_shelf_space_poll(), blender::BLI_addtail(), C, blender::CTX_wm_space_data(), blender::HeaderType::draw, header_regiontype_register(), blender::ARegionType::headertypes, blender::HeaderType::idname, blender::MEM_new_zeroed(), blender::HeaderType::poll, blender::HeaderType::region_type, blender::RGN_TYPE_ASSET_SHELF_HEADER, blender::HeaderType::space_type, and STRNCPY_UTF8.
Referenced by header_regiontype_register(), and types_register().
|
static |
Ensure the popover width fits into the window: Clamp width by the window width, minus some padding.
Definition at line 218 of file asset_shelf_popover.cc.
References layout_width_units_clamped(), LEFT_COL_WIDTH_UNITS, RIGHT_COL_WIDTH_UNITS_DEFAULT, UI_UNIT_X, and blender::WM_window_native_pixel_x().
Referenced by layout_width_units_clamped(), and popover_panel_draw().
| void blender::ed::asset::shelf::library_selector_draw | ( | const bContext * | C, |
| ui::Layout & | layout, | ||
| AssetShelf & | shelf ) |
Definition at line 186 of file asset_shelf_catalog_selector.cc.
References blender::ASSET_LIBRARY_LOCAL, C, blender::CTX_wm_screen(), blender::wm::InvokeDefault, library_selector_draw(), blender::ui::Layout::op(), blender::ui::Layout::operator_context_set(), blender::ui::Layout::prop(), blender::RNA_boolean_set(), blender::RNA_pointer_create_discrete(), blender::ui::Layout::row(), and UI_ITEM_NONE.
Referenced by catalog_selector_panel_draw(), library_selector_draw(), and popover_panel_draw().
|
static |
Definition at line 62 of file asset_shelf_popover.cc.
References C, ensure_shelf_has_type(), blender::AssetShelfType::idname, lookup_shelf_for_popup(), blender::ed::asset::shelf::StaticPopupShelves::shelves(), STREQ, and type_poll_for_popup().
Referenced by ensure_asset_library_fetched(), get_shelf_for_popup(), and lookup_shelf_for_popup().
|
static |
Definition at line 202 of file asset_shelf_popover.cc.
References C, blender::CTX_data_string_get(), lookup_type_from_idname_in_context(), and type_find_from_idname().
Referenced by lookup_type_from_idname_in_context(), popover_panel_draw(), and popover_panel_poll().
|
static |
Definition at line 440 of file asset_shelf.cc.
References main_region_padding_x(), and main_region_padding_y().
Referenced by main_region_padding_x(), and region_layout().
|
static |
Definition at line 434 of file asset_shelf.cc.
References uiStyle::buttonspacey, main_region_padding_y(), and blender::ui::style_get_dpi().
Referenced by calculate_row_count_from_tile_draw_height(), calculate_scaled_region_height_from_row_count(), main_region_padding_x(), main_region_padding_y(), region_layout(), and region_prefsizey().
Definition at line 224 of file asset_shelf_popover.cc.
References blender::BLI_assert(), BLI_assert_msg, BLI_assert_unreachable, build_asset_view(), C, catalog_tree_draw(), blender::ui::Layout::column(), blender::ui::Layout::context_ptr_set(), blender::CTX_wm_screen(), blender::CTX_wm_window(), blender::ui::Item::fixed_size_set(), get_shelf_for_popup(), blender::bScreen::id, blender::ui::ITEM_R_TEXT_BUT_FORCE_SEMI_MODAL_ACTIVE, blender::Panel::layout, layout_width_units_clamped(), LEFT_COL_WIDTH_UNITS, library_selector_draw(), lookup_type_from_idname_in_context(), popover_panel_draw(), blender::ui::Layout::prop(), blender::RNA_pointer_create_discrete(), blender::ui::Layout::row(), settings_ensure_valid_library_ref(), and blender::ui::Layout::ui_units_x_set().
Referenced by popover_panel_draw(), and popover_panel_register().
Definition at line 273 of file asset_shelf_popover.cc.
References C, lookup_type_from_idname_in_context(), popover_panel_poll(), and type_poll_for_popup().
Referenced by popover_panel_poll(), and popover_panel_register().
| void blender::ed::asset::shelf::popover_panel_register | ( | ARegionType * | region_type | ) |
Definition at line 283 of file asset_shelf_popover.cc.
References blender::ed::asset::list::asset_reading_region_listen_fn(), blender::BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, blender::PanelType::description, blender::PanelType::draw, blender::PanelType::idname, blender::PanelType::label, LEFT_COL_WIDTH_UNITS, blender::PanelType::listener, blender::MEM_new_zeroed(), N_, blender::PanelType::offset_units_xy, blender::ARegionType::paneltypes, blender::PanelType::poll, popover_panel_draw(), popover_panel_poll(), popover_panel_register(), STRNCPY_UTF8, blender::PanelType::translation_context, blender::WM_paneltype_add(), and blender::WM_paneltype_find().
Referenced by popover_panel_register(), and types_register().
| void blender::ed::asset::shelf::region_blend_read_data | ( | BlendDataReader * | reader, |
| ARegion * | region ) |
Definition at line 698 of file asset_shelf.cc.
References region_blend_read_data(), blender::ARegion::regiondata, and regiondata_blend_read_data().
Referenced by blender::direct_link_region(), and region_blend_read_data().
| void blender::ed::asset::shelf::region_blend_write | ( | BlendWriter * | writer, |
| ARegion * | region ) |
Definition at line 708 of file asset_shelf.cc.
References region_blend_write(), and regiondata_blend_write().
Referenced by region_blend_write(), and blender::write_region().
Definition at line 611 of file asset_shelf.cc.
References blender::ui::blocklist_draw(), blender::ui::blocklist_update_window_matrix(), C, blender::ED_region_clear(), region_draw(), blender::ARegion::runtime, blender::TH_BACK, blender::bke::ARegionRuntime::uiblocks, blender::ARegion::v2d, blender::ui::view2d_scrollers_draw(), blender::ui::view2d_view_ortho(), and blender::ui::view2d_view_restore().
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_draw().
| 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 287 of file asset_shelf.cc.
References region_duplicate(), and regiondata_duplicate().
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_duplicate().
| void blender::ed::asset::shelf::region_free | ( | ARegion * | region | ) |
Definition at line 297 of file asset_shelf.cc.
References region_free(), blender::ARegion::regiondata, and regiondata_free().
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_free().
| void blender::ed::asset::shelf::region_init | ( | wmWindowManager * | wm, |
| ARegion * | region ) |
Definition at line 406 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, asset_shelf_default_tile_height(), BLI_assert_msg, blender::View2D::flag, blender::bke::ARegionRuntime::handlers, blender::View2D::keepofs, blender::View2D::keepzoom, blender::View2D::page_size_y, region_init(), blender::RGN_TYPE_WINDOW, blender::ARegion::runtime, blender::View2D::scroll, blender::AssetShelf::settings, blender::SPACE_EMPTY, tile_height(), blender::ARegion::v2d, blender::ui::V2D_COMMONVIEW_PANELS_UI, blender::V2D_KEEPOFS_Y, blender::V2D_LOCKZOOM_X, blender::V2D_LOCKZOOM_Y, blender::V2D_SCROLL_RIGHT, blender::V2D_SCROLL_VERTICAL_HIDE, blender::V2D_SNAP_TO_PAGESIZE_Y, blender::ui::view2d_offset_y_snap_to_closest_page(), blender::ARegion::winx, blender::ARegion::winy, blender::WM_event_add_keymap_handler(), and blender::WM_keymap_ensure().
Referenced by blender::image_asset_shelf_region_init(), blender::ed::space_node::node_asset_shelf_region_init(), region_init(), and blender::view3d_asset_shelf_region_init().
Definition at line 562 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, blender::AssetShelfSettings::asset_library_reference, blender::BLI_assert(), BLI_assert_msg, blender::ui::block_layout(), blender::ui::block_layout_resolve(), blender::ui::blocklist_update_window_matrix(), build_asset_view(), C, blender::CTX_wm_area(), blender::ui::Emboss, main_region_padding_x(), main_region_padding_y(), blender::ui::Panel, region_layout(), region_resize_to_preferred(), blender::ARegion::runtime, blender::AssetShelf::settings, settings_ensure_valid_library_ref(), blender::ui::style_get_dpi(), blender::bke::ARegionRuntime::uiblocks, blender::ARegion::v2d, blender::ui::Vertical, blender::ui::view2d_curRect_validate(), blender::ui::view2d_totRect_set(), blender::ui::view2d_view_ortho(), and blender::ARegion::winx.
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_layout().
| void blender::ed::asset::shelf::region_listen | ( | const wmRegionListenerParams * | params | ) |
Definition at line 350 of file asset_shelf.cc.
References asset_shelf_region_listen(), blender::ED_region_tag_redraw_no_rebuild(), blender::ed::asset::list::listen(), blender::wmRegionListenerParams::notifier, blender::wmRegionListenerParams::region, and region_listen().
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_listen().
| void blender::ed::asset::shelf::region_message_subscribe | ( | const wmRegionMessageSubscribeParams * | params | ) |
Definition at line 361 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, blender::AssetShelfSettings::asset_library_reference, C, blender::ed::asset::list::clear(), blender::ED_region_do_msg_notify_tag_redraw(), blender::WorkSpace::id, blender::asset_system::is_or_contains_remote_libraries(), blender::wmRegionMessageSubscribeParams::message_bus, blender::wmMsgSubscribeValue::notify, blender::wmMsgSubscribeValue::owner, blender::wmRegionMessageSubscribeParams::region, region_message_subscribe(), blender::AssetShelf::settings, blender::U, blender::wmMsgSubscribeValue::user_data, WM_msg_subscribe_rna_prop, and blender::wmRegionMessageSubscribeParams::workspace.
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_message_subscribe().
Definition at line 629 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, blender::ASSETSHELF_REGION_IS_HIDDEN, BLI_assert_unreachable, C, blender::CTX_wm_area(), blender::ED_region_visibility_change_update(), blender::ARegion::flag, blender::AssetShelf::instance_flag, region_on_poll_success(), blender::RGN_FLAG_HIDDEN, blender::RGN_FLAG_HIDDEN_BY_USER, SET_FLAG_FROM_TEST, blender::ScrArea::spacetype, and update_active_shelf().
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_on_poll_success().
| void blender::ed::asset::shelf::region_on_user_resize | ( | const ARegion * | region | ) |
Definition at line 525 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, calculate_row_count_from_tile_draw_height(), current_tile_draw_height(), blender::AssetShelf::preferred_row_count, region_on_user_resize(), blender::ARegion::sizey, tile_height(), and UI_SCALE_FAC.
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_on_user_resize().
| int blender::ed::asset::shelf::region_prefsizey | ( | ) |
Definition at line 556 of file asset_shelf.cc.
References asset_shelf_default_tile_height(), main_region_padding_y(), and region_prefsizey().
Referenced by region_prefsizey(), and blender::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 499 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, blender::AE_TOP_TO_BOTTOMRIGHT, blender::BLI_assert(), calculate_row_count_from_tile_draw_height(), calculate_scaled_region_height_from_row_count(), current_tile_draw_height(), blender::ED_area_max_regionsize(), blender::ED_area_tag_region_size_update(), blender::AssetShelf::preferred_row_count, region_resize_to_preferred(), blender::ARegion::sizey, tile_height(), and UI_SCALE_FAC.
Referenced by region_layout(), and region_resize_to_preferred().
| int blender::ed::asset::shelf::region_snap | ( | const ARegion * | region, |
| int | size, | ||
| int | axis ) |
Definition at line 475 of file asset_shelf.cc.
References calculate_row_count_from_tile_draw_height(), calculate_scaled_region_height_from_row_count(), current_tile_draw_height(), region_snap(), tile_height(), and UI_SCALE_FAC.
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and region_snap().
| void blender::ed::asset::shelf::regiondata_blend_read_data | ( | BlendDataReader * | reader, |
| RegionAssetShelf ** | shelf_regiondata ) |
Definition at line 83 of file asset_shelf_regiondata.cc.
References BLO_read_struct_list, BLO_read_struct_nonnull, regiondata_blend_read_data(), and settings_blend_read_data().
Referenced by region_blend_read_data(), and regiondata_blend_read_data().
| void blender::ed::asset::shelf::regiondata_blend_write | ( | BlendWriter * | writer, |
| const RegionAssetShelf * | shelf_regiondata ) |
Definition at line 74 of file asset_shelf_regiondata.cc.
References regiondata_blend_write(), settings_blend_write(), blender::RegionAssetShelf::shelves, and blender::BlendWriter::write_struct().
Referenced by region_blend_write(), and regiondata_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 45 of file asset_shelf_regiondata.cc.
References blender::RegionAssetShelf::active_shelf, blender::BLI_addtail(), regiondata_duplicate(), blender::AssetShelf::settings, blender::dna::shallow_copy(), and blender::RegionAssetShelf::shelves.
Referenced by region_duplicate(), and regiondata_duplicate().
| void blender::ed::asset::shelf::regiondata_free | ( | RegionAssetShelf * | shelf_regiondata | ) |
Frees the contained data and shelf_regiondata itself.
Definition at line 66 of file asset_shelf_regiondata.cc.
References regiondata_free(), and blender::RegionAssetShelf::shelves.
Referenced by region_free(), and regiondata_free().
| bool blender::ed::asset::shelf::regions_poll | ( | const RegionPollParams * | params | ) |
Definition at line 322 of file asset_shelf.cc.
References blender::RegionPollParams::area, asset_shelf_space_poll(), blender::RegionPollParams::context, regions_poll(), and blender::ScrArea::spacedata.
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and regions_poll().
| void blender::ed::asset::shelf::send_redraw_notifier | ( | const bContext & | C | ) |
Definition at line 53 of file asset_shelf.cc.
References C, NC_SPACE, ND_REGIONS_ASSET_SHELF, send_redraw_notifier(), and blender::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(), blender::ed::asset::shelf::AssetCatalogTreeView::build_tree(), and send_redraw_notifier().
| void blender::ed::asset::shelf::settings_blend_read_data | ( | BlendDataReader * | reader, |
| AssetShelfSettings & | settings ) |
Definition at line 86 of file asset_shelf_settings.cc.
References blender::AssetShelfSettings::active_catalog_path, blender::BKE_asset_catalog_path_list_blend_read_data(), blender::BLO_read_string(), blender::AssetShelfSettings::enabled_catalog_paths, and settings_blend_read_data().
Referenced by regiondata_blend_read_data(), and settings_blend_read_data().
| void blender::ed::asset::shelf::settings_blend_write | ( | BlendWriter * | writer, |
| const AssetShelfSettings & | settings ) |
Definition at line 78 of file asset_shelf_settings.cc.
References blender::AssetShelfSettings::active_catalog_path, blender::BKE_asset_catalog_path_list_blend_write(), blender::AssetShelfSettings::enabled_catalog_paths, settings_blend_write(), blender::BlendWriter::write_string(), and blender::BlendWriter::write_struct().
Referenced by regiondata_blend_write(), and settings_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 155 of file asset_shelf_settings.cc.
References blender::BKE_asset_catalog_path_list_free(), blender::BLI_assert(), get_enabled_catalog_path_list(), and settings_clear_enabled_catalogs().
Referenced by settings_clear_enabled_catalogs(), and blender::ed::asset::shelf::AssetCatalogSelectorTree::update_shelf_settings_from_enabled_catalogs().
| AssetLibraryReference & blender::ed::asset::shelf::settings_ensure_valid_library_ref | ( | AssetShelfSettings & | settings | ) |
Important: Must be called before #AssetShelfSettings.asset_library_reference is used. It will make sure to fall back to the "All" library if the reference refers to a deleted library. An invalid reference would make loading the asset listing fail.
The library reference in settings will be updated and returned (for convenience).
Definition at line 92 of file asset_shelf_settings.cc.
References blender::asset_system::all_library_reference(), blender::ASSET_LIBRARY_CUSTOM, blender::AssetShelfSettings::asset_library_reference, blender::BKE_preferences_asset_library_find_index(), blender::BKE_preferences_asset_library_is_available(), blender::AssetLibraryReference::custom_library_index, settings_ensure_valid_library_ref(), blender::AssetLibraryReference::type, and blender::U.
Referenced by catalog_selector_panel_draw(), context(), popover_panel_draw(), region_layout(), and settings_ensure_valid_library_ref().
| 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 194 of file asset_shelf_settings.cc.
References get_enabled_catalog_path_list(), and settings_foreach_enabled_catalog_path().
Referenced by add_catalog_tabs(), and settings_foreach_enabled_catalog_path().
| bool blender::ed::asset::shelf::settings_is_active_catalog | ( | const AssetShelfSettings & | settings, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 122 of file asset_shelf_settings.cc.
References blender::AssetShelfSettings::active_catalog_path, settings_is_active_catalog(), and blender::asset_system::AssetCatalogPath::str().
Referenced by add_catalog_tabs(), blender::ed::asset::shelf::AssetCatalogTreeView::build_catalog_items_recursive(), and settings_is_active_catalog().
| bool blender::ed::asset::shelf::settings_is_all_catalog_active | ( | const AssetShelfSettings & | settings | ) |
Definition at line 128 of file asset_shelf_settings.cc.
References blender::AssetShelfSettings::active_catalog_path, and settings_is_all_catalog_active().
Referenced by add_catalog_tabs(), blender::ed::asset::shelf::AssetCatalogTreeView::build_tree(), and settings_is_all_catalog_active().
| bool blender::ed::asset::shelf::settings_is_catalog_path_enabled | ( | const AssetShelf & | shelf, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 164 of file asset_shelf_settings.cc.
References blender::BKE_asset_catalog_path_list_has_path(), blender::asset_system::AssetCatalogPath::c_str(), get_enabled_catalog_path_list(), and settings_is_catalog_path_enabled().
Referenced by blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::Item(), and settings_is_catalog_path_enabled().
| void blender::ed::asset::shelf::settings_set_active_catalog | ( | AssetShelfSettings & | settings, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 109 of file asset_shelf_settings.cc.
References blender::AssetShelfSettings::active_catalog_path, blender::BLI_strdupn(), blender::asset_system::AssetCatalogPath::c_str(), blender::asset_system::AssetCatalogPath::length(), and settings_set_active_catalog().
Referenced by add_catalog_tabs(), blender::ed::asset::shelf::AssetCatalogTreeView::build_catalog_items_recursive(), and settings_set_active_catalog().
| void blender::ed::asset::shelf::settings_set_all_catalog_active | ( | AssetShelfSettings & | settings | ) |
Definition at line 116 of file asset_shelf_settings.cc.
References blender::AssetShelfSettings::active_catalog_path, and settings_set_all_catalog_active().
Referenced by add_catalog_tabs(), blender::ed::asset::shelf::AssetCatalogTreeView::build_tree(), and settings_set_all_catalog_active().
| void blender::ed::asset::shelf::settings_set_catalog_path_enabled | ( | AssetShelf & | shelf, |
| const asset_system::AssetCatalogPath & | path ) |
Definition at line 176 of file asset_shelf_settings.cc.
References blender::BKE_asset_catalog_path_list_add_path(), blender::BKE_asset_catalog_path_list_has_path(), blender::BKE_preferences_asset_shelf_settings_ensure_catalog_path_enabled(), blender::asset_system::AssetCatalogPath::c_str(), settings_set_catalog_path_enabled(), blender::U, and use_enabled_catalogs_from_prefs().
Referenced by settings_set_catalog_path_enabled(), 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 984 of file asset_shelf.cc.
References active_shelf_from_area(), blender::bScreen::areabase, C, blender::StringRefNull::c_str(), blender::CTX_wm_manager(), settings_set_catalog_path_enabled(), show_catalog_in_visible_shelves(), and blender::WM_window_get_active_screen().
Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::animrig::create_pose_asset_local(), blender::ed::animrig::create_pose_asset_user_library(), and show_catalog_in_visible_shelves().
|
static |
Definition at line 62 of file asset_shelf.cc.
References static_shelf_types().
Referenced by asset_shelf_space_poll(), ensure_shelf_has_type(), static_shelf_types(), 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 544 of file asset_shelf.cc.
References blender::ASSETSHELF_SHOW_NAMES, blender::AssetShelfSettings::display_flag, blender::AssetShelfSettings::preview_size, blender::ui::preview_tile_size_y(), blender::ui::preview_tile_size_y_no_label(), and tile_height().
Referenced by build_asset_view(), blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), current_tile_draw_height(), region_init(), region_on_user_resize(), region_resize_to_preferred(), region_snap(), and tile_height().
| int blender::ed::asset::shelf::tile_width | ( | const AssetShelfSettings & | settings | ) |
Definition at line 539 of file asset_shelf.cc.
References blender::AssetShelfSettings::preview_size, blender::ui::preview_tile_size_x(), and tile_width().
Referenced by build_asset_view(), and tile_width().
| bool blender::ed::asset::shelf::type_asset_poll | ( | const AssetShelfType & | shelf_type, |
| const asset_system::AssetRepresentation & | asset ) |
Definition at line 131 of file asset_shelf.cc.
References blender::AssetShelfType::asset_poll, blender::BKE_idtype_idcode_to_idfilter(), blender::AssetShelfType::id_types_prefilter, and type_asset_poll().
Referenced by blender::ed::asset::shelf::AssetView::build_items(), and type_asset_poll().
| AssetShelfType * blender::ed::asset::shelf::type_find_from_idname | ( | StringRef | idname | ) |
Definition at line 149 of file asset_shelf.cc.
References static_shelf_types(), and type_find_from_idname().
Referenced by blender::ui::asset_shelf_popover_invoke(), lookup_type_from_idname_in_context(), blender::ui::template_asset_shelf_popover(), and type_find_from_idname().
|
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 117 of file asset_shelf.cc.
References C, blender::AssetShelfType::space_type, type_poll_for_non_popup(), and type_poll_no_spacetype_check().
Referenced by asset_shelf_space_poll(), type_poll_for_non_popup(), 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 106 of file asset_shelf.cc.
References C, type_poll_for_popup(), and type_poll_no_spacetype_check().
Referenced by blender::ui::asset_shelf_popover_invoke(), get_shelf_for_popup(), lookup_shelf_for_popup(), popover_panel_poll(), and type_poll_for_popup().
|
static |
Definition at line 87 of file asset_shelf.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), BLI_assert_msg, C, blender::Vector< T, InlineBufferCapacity, Allocator >::end(), blender::AssetShelfType::poll, static_shelf_types(), and type_poll_no_spacetype_check().
Referenced by type_poll_for_non_popup(), type_poll_for_popup(), and type_poll_no_spacetype_check().
| 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(), and type_popup_unlink().
Referenced by type_popup_unlink(), and type_unlink().
| void blender::ed::asset::shelf::type_register | ( | std::unique_ptr< AssetShelfType > | type | ) |
Definition at line 68 of file asset_shelf.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), static_shelf_types(), and type_register().
Referenced by type_register().
| void blender::ed::asset::shelf::type_unlink | ( | const Main & | bmain, |
| const AssetShelfType & | shelf_type ) |
Definition at line 945 of file asset_shelf.cc.
References blender::RegionAssetShelf::active_shelf, blender::bScreen::areabase, blender::BLI_assert(), blender::ScrArea::regionbase, blender::SpaceLink::regionbase, blender::RGN_TYPE_ASSET_SHELF, blender::Main::screens, blender::RegionAssetShelf::shelves, blender::ScrArea::spacedata, blender::AssetShelf::type, type_popup_unlink(), and type_unlink().
Referenced by type_unlink().
| void blender::ed::asset::shelf::type_unregister | ( | const AssetShelfType & | shelf_type | ) |
Definition at line 74 of file asset_shelf.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), blender::BLI_assert(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove(), static_shelf_types(), and type_unregister().
Referenced by type_unregister().
| void blender::ed::asset::shelf::types_register | ( | ARegionType * | region_type, |
| const int | space_type ) |
Definition at line 932 of file asset_shelf.cc.
References catalog_selector_panel_register(), header_regiontype_register(), popover_panel_register(), and types_register().
Referenced by blender::ED_spacetype_image(), blender::ED_spacetype_node(), blender::ED_spacetype_view3d(), and types_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 228 of file asset_shelf.cc.
References activate_shelf(), blender::RegionAssetShelf::active_shelf, blender::BLI_addhead(), blender::BLI_assert(), C, create_shelf_from_type(), ensure_shelf_has_type(), blender::RegionAssetShelf::shelves, static_shelf_types(), type_poll_for_non_popup(), and update_active_shelf().
Referenced by region_on_poll_success(), and update_active_shelf().
|
static |
Definition at line 133 of file asset_shelf_settings.cc.
References blender::ASSET_SHELF_TYPE_FLAG_STORE_CATALOGS_IN_PREFS, and use_enabled_catalogs_from_prefs().
Referenced by get_enabled_catalog_path_list(), settings_set_catalog_path_enabled(), and use_enabled_catalogs_from_prefs().
|
constexpr |
Definition at line 211 of file asset_shelf_popover.cc.
Referenced by layout_width_units_clamped(), popover_panel_draw(), and popover_panel_register().
|
constexpr |
Definition at line 212 of file asset_shelf_popover.cc.
Referenced by layout_width_units_clamped().