|
Blender V4.3
|
Classes | |
| class | AssetList |
| class | FileListWrapper |
| class | PreviewTimer |
Typedefs | |
| using | AssetListHandleIterFn = FunctionRef<bool(AssetHandle)> |
| using | AssetListIterFn = FunctionRef<bool(asset_system::AssetRepresentation &)> |
Runtime asset list cache | |
| using | AssetListMap = Map<AssetLibraryReference, AssetList> |
| using | is_new_t = bool |
| void | storage_tag_main_data_dirty () |
| void | storage_id_remap (ID *id_old, ID *id_new) |
| static AssetListMap & | global_storage () |
| static AssetList * | lookup_list (const AssetLibraryReference &library_ref) |
| static std::optional< eFileSelectType > | asset_library_reference_to_fileselect_type (const AssetLibraryReference &library_reference) |
| static std::tuple< AssetList &, is_new_t > | ensure_list_storage (const AssetLibraryReference &library_reference, eFileSelectType filesel_type) |
Can return false to stop iterating.
Definition at line 43 of file ED_asset_list.hh.
| using blender::ed::asset::list::AssetListIterFn = FunctionRef<bool(asset_system::AssetRepresentation &)> |
Definition at line 44 of file ED_asset_list.hh.
A global asset list map, each entry being a list for a specific asset library.
Definition at line 373 of file asset_list.cc.
| using blender::ed::asset::list::is_new_t = bool |
Definition at line 419 of file asset_list.cc.
| asset_system::AssetRepresentation * blender::ed::asset::list::asset_get_by_index | ( | const AssetLibraryReference & | library_reference, |
| int | asset_index ) |
Definition at line 563 of file asset_list.cc.
References FileDirEntry::asset, asset_handle_get_by_index(), and AssetHandle::file_data.
Referenced by asset_view_filter_items().
| AssetHandle blender::ed::asset::list::asset_handle_get_by_index | ( | const AssetLibraryReference * | library_reference, |
| int | asset_index ) |
Definition at line 556 of file asset_list.cc.
References lookup_list().
Referenced by asset_get_by_index(), and asset_view_draw_item().
| ImBuf * blender::ed::asset::list::asset_image_get | ( | const AssetHandle * | asset_handle | ) |
Definition at line 585 of file asset_list.cc.
References AssetHandle::file_data, filelist_file_getimage(), and filelist_geticon_image_ex().
Referenced by asset_view_item_but_drag_set().
| bool blender::ed::asset::list::asset_image_is_loading | ( | const AssetLibraryReference * | library_reference, |
| const AssetHandle * | asset_handle ) |
Definition at line 570 of file asset_list.cc.
References lookup_list().
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile().
|
static |
Definition at line 403 of file asset_list.cc.
References ASSET_LIBRARY_ALL, ASSET_LIBRARY_CUSTOM, ASSET_LIBRARY_ESSENTIALS, ASSET_LIBRARY_LOCAL, FILE_ASSET_LIBRARY, FILE_ASSET_LIBRARY_ALL, FILE_MAIN_ASSET, and AssetLibraryReference::type.
Referenced by storage_fetch().
| void blender::ed::asset::list::asset_preview_ensure_requested | ( | const bContext & | C, |
| const AssetLibraryReference * | library_reference, | ||
| AssetHandle * | asset_handle ) |
Definition at line 577 of file asset_list.cc.
References lookup_list().
Referenced by asset_view_draw_item(), and blender::ed::asset::shelf::AssetViewItem::build_grid_tile().
| void blender::ed::asset::list::asset_reading_region_listen_fn | ( | const wmRegionListenerParams * | params | ) |
Definition at line 434 of file asset_list.cc.
References wmNotifier::category, wmNotifier::data, ED_region_tag_refresh_ui(), ELEM, NC_ASSET, ND_ASSET_LIST_PREVIEW, ND_ASSET_LIST_READING, and params.
Referenced by blender::ed::space_node::add_catalog_assets_menu_type(), blender::ed::space_node::add_root_catalogs_menu_type(), blender::ed::space_node::add_unassigned_assets_menu_type(), blender::ed::asset::shelf::catalog_selector_panel_register(), blender::ed::object::modifier_add_catalog_assets_menu_type(), blender::ed::object::modifier_add_root_catalogs_menu_type(), blender::ed::object::modifier_add_unassigned_assets_menu_type(), blender::ed::geometry::node_group_operator_assets_menu(), blender::ed::geometry::node_group_operator_assets_menu_unassigned(), and blender::ed::asset::shelf::popover_panel_register().
| void blender::ed::asset::list::clear | ( | const AssetLibraryReference * | library_reference, |
| const bContext * | C ) |
Clears this asset library and the "All" asset library for reload in both the static asset list storage, as well as for all open asset browsers. Call this whenever the content of the given asset library changed in a way that a reload is necessary.
Definition at line 486 of file asset_list.cc.
References ASSET_LIBRARY_ALL, FileAssetSelectParams::asset_library_ref, SpaceFile::asset_params, SpaceFile::browse_mode, clear_all_library(), CTX_wm_manager(), ED_fileselect_clear(), FILE_BROWSE_MODE_ASSETS, LISTBASE_FOREACH, lookup_list(), SPACE_FILE, AssetLibraryReference::type, wmWindowManager::windows, and WM_window_get_active_screen().
Referenced by blender::ed::asset::asset_library_refresh_exec(), clear_all_library(), and blender::ed::sculpt_paint::refresh_asset_library().
| void blender::ed::asset::list::clear_all_library | ( | const bContext * | C | ) |
Clears the all asset library for reload in both the static asset list storage, as well as for all open asset browsers. Call this whenever any asset library content changed in a way that a reload is necessary.
Definition at line 517 of file asset_list.cc.
References blender::asset_system::all_library_reference(), and clear().
Referenced by clear(), preferences_asset_library_add_exec(), and preferences_asset_library_remove_exec().
|
static |
Definition at line 420 of file asset_list.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), global_storage(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr().
Referenced by storage_fetch().
|
static |
Wrapper for Construct on First Use idiom, to avoid the Static Initialization Fiasco.
Definition at line 378 of file asset_list.cc.
References global_storage().
Referenced by ensure_list_storage(), global_storage(), lookup_list(), storage_exit(), storage_id_remap(), and storage_tag_main_data_dirty().
| bool blender::ed::asset::list::is_loaded | ( | const AssetLibraryReference * | library_reference | ) |
Definition at line 466 of file asset_list.cc.
References lookup_list().
Referenced by blender::ed::object::all_loading_finished(), blender::ed::space_node::all_loading_finished(), blender::ed::asset::build_filtered_all_catalog_tree(), blender::ed::asset::find_asset_from_weak_ref(), and blender::ed::asset::get_local_asset_from_relative_identifier().
| void blender::ed::asset::list::iterate | ( | const AssetLibraryReference & | library_reference, |
| AssetListHandleIterFn | fn, | ||
| FunctionRef< bool(asset_system::AssetRepresentation &)> | prefilter_fn = nullptr ) |
Definition at line 528 of file asset_list.cc.
References lookup_list().
Referenced by blender::ed::asset::build_filtered_all_catalog_tree(), blender::ed::asset::build_filtered_catalog_tree(), blender::ed::asset::shelf::AssetView::build_items(), blender::ed::asset::find_asset_from_weak_ref(), blender::ed::space_node::gather_search_link_ops_for_all_assets(), blender::ed::asset::get_local_asset_from_relative_identifier(), and populate_asset_collection().
| void blender::ed::asset::list::iterate | ( | const AssetLibraryReference & | library_reference, |
| AssetListIterFn | fn ) |
Definition at line 538 of file asset_list.cc.
References lookup_list().
| asset_system::AssetLibrary * blender::ed::asset::list::library_get_once_available | ( | const AssetLibraryReference & | library_reference | ) |
Get the asset library being read into an asset-list and identified using library_reference.
NC_ASSET | ND_ASSET_LIST_READING notifiers until loading is done, they can be used to continuously call this function to retrieve the asset library once available. Definition at line 546 of file asset_list.cc.
References lookup_list().
Referenced by blender::ed::asset::shelf::build_asset_view(), blender::ed::asset::build_filtered_all_catalog_tree(), blender::ed::asset::shelf::AssetView::build_items(), blender::ed::geometry::catalog_assets_draw(), blender::ed::asset::shelf::catalog_selector_panel_draw(), blender::ed::asset::shelf::catalog_tree_draw(), blender::ed::asset::find_asset_from_weak_ref(), blender::ed::object::ui_template_modifier_asset_menu_items(), and blender::ed::geometry::ui_template_node_operator_asset_menu_items().
| bool blender::ed::asset::list::listen | ( | const wmNotifier * | notifier | ) |
Definition at line 595 of file asset_list.cc.
References blender::ed::asset::list::AssetList::listen().
Referenced by asset_view_listener(), and blender::ed::asset::shelf::region_listen().
|
static |
Definition at line 384 of file asset_list.cc.
References global_storage(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr().
Referenced by asset_handle_get_by_index(), asset_image_is_loading(), asset_preview_ensure_requested(), clear(), is_loaded(), iterate(), iterate(), library_get_once_available(), previews_fetch(), size(), and storage_has_list_for_library().
| void blender::ed::asset::list::previews_fetch | ( | const AssetLibraryReference * | library_reference, |
| const bContext * | C ) |
Definition at line 478 of file asset_list.cc.
References lookup_list().
Referenced by blender::ed::asset::shelf::build_asset_view(), and uiTemplateAssetView().
| int blender::ed::asset::list::size | ( | const AssetLibraryReference * | library_reference | ) |
Definition at line 600 of file asset_list.cc.
References lookup_list().
Referenced by uiTemplateAssetView().
| void blender::ed::asset::list::storage_exit | ( | ) |
Can't wait for static deallocation to run. There's nested data allocated with our guarded allocator, it will complain about unfreed memory on exit.
Definition at line 609 of file asset_list.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear_and_shrink(), and global_storage().
| void blender::ed::asset::list::storage_fetch | ( | const AssetLibraryReference * | library_reference, |
| const bContext * | C ) |
Invoke asset list reading, potentially in a parallel job. Won't wait until the job is done, and may return earlier.
Definition at line 452 of file asset_list.cc.
References asset_library_reference_to_fileselect_type(), and ensure_list_storage().
Referenced by blender::ed::asset::shelf::asset_shelf_header_draw(), blender::ed::asset::shelf::build_asset_view(), blender::ed::asset::build_filtered_all_catalog_tree(), blender::ed::asset::find_asset_from_weak_ref(), blender::ed::space_node::gather_search_link_ops_for_all_assets(), blender::ed::asset::get_local_asset_from_relative_identifier(), and uiTemplateAssetView().
| bool blender::ed::asset::list::storage_has_list_for_library | ( | const AssetLibraryReference * | library_reference | ) |
Definition at line 523 of file asset_list.cc.
References lookup_list().
Referenced by blender::ed::asset::asset_library_refresh_poll().
Remapping of ID pointers within the asset lists. Typically called when an ID is deleted to clear all references to it (id_new is null then).
Definition at line 396 of file asset_list.cc.
References global_storage(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by WM_main_remap_editor_id_reference().
| void blender::ed::asset::list::storage_tag_main_data_dirty | ( | ) |
Tag all asset lists in the storage that show main data as needing an update (re-fetch).
This only tags the data. If the asset list is visible on screen, the space is still responsible for ensuring the necessary redraw. It can use listen() to check if the asset-list needs a redraw for a given notifier.
Definition at line 389 of file asset_list.cc.
References global_storage(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values().
Referenced by asset_view_listener(), blender::ed::asset::clear_id(), and blender::ed::asset::mark_id().