Blender V5.3
asset_list.cc File Reference
#include <optional>
#include <string>
#include "AS_asset_library.hh"
#include "AS_asset_representation.hh"
#include "BKE_context.hh"
#include "BKE_main.hh"
#include "BKE_preferences.h"
#include "BKE_screen.hh"
#include "BLI_listbase.hh"
#include "BLI_map.hh"
#include "BLI_string.hh"
#include "BLI_utility_mixins.hh"
#include "DNA_asset_types.h"
#include "DNA_space_enums.h"
#include "DNA_space_types.h"
#include "WM_api.hh"
#include "../space_file/file_indexer.hh"
#include "../space_file/filelist.hh"
#include "ED_asset_indexer.hh"
#include "ED_asset_list.hh"
#include "ED_fileselect.hh"
#include "ED_screen.hh"
#include "asset_library_reference.hh"

Go to the source code of this file.

Classes

class  blender::ed::asset::list::FileListWrapper
class  blender::ed::asset::list::AssetList
struct  blender::ed::asset::list::GlobalStorage

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::ed
namespace  blender::ed::asset
namespace  blender::ed::asset::list

Functions

void blender::ed::asset::list::asset_reading_region_listen_fn (const wmRegionListenerParams *params)
C-API
void blender::ed::asset::list::storage_fetch (const AssetLibraryReference *library_reference, const bContext *C)
void blender::ed::asset::list::storage_fetch_blocking (const AssetLibraryReference &library_reference, const bContext &C)
bool blender::ed::asset::list::is_loaded (const AssetLibraryReference *library_reference)
static void blender::ed::asset::list::foreach_visible_asset_browser_showing_library (const AssetLibraryReference &library_reference, const wmWindowManager *wm, const FunctionRef< void(SpaceFile &sfile)> fn)
void blender::ed::asset::list::clear (const AssetLibraryReference *library_reference, const bContext *C)
void blender::ed::asset::list::clear_all_library (const bContext *C)
void blender::ed::asset::list::on_remote_assets_downloaded (wmWindowManager &wm, StringRef library_url, StringRef downloaded_file_abspath)
bool blender::ed::asset::list::has_list_storage_for_library (const AssetLibraryReference *library_reference)
bool blender::ed::asset::list::has_asset_browser_storage_for_library (const AssetLibraryReference *library_reference, const bContext *C)
void blender::ed::asset::list::iterate (const AssetLibraryReference &library_reference, AssetListIterFn fn)
asset_system::AssetLibrary * blender::ed::asset::list::library_get_once_available (const AssetLibraryReference &library_reference)
bool blender::ed::asset::list::listen (const wmNotifier *notifier)
int blender::ed::asset::list::size (const AssetLibraryReference *library_reference)
void blender::ed::asset::list::storage_exit ()

Runtime asset list cache

using blender::ed::asset::list::AssetListMap = Map<AssetLibraryReference, AssetList>
using blender::ed::asset::list::is_new_t = bool
static void blender::ed::asset::list::clear (const AssetLibraryReference *library_reference, wmWindowManager *wm)
static void blender::ed::asset::list::on_save_post (Main *main, PointerRNA **pointers, int num_pointers, void *arg)
static AssetListMap & blender::ed::asset::list::libraries_map ()
static AssetList * blender::ed::asset::list::lookup_list (const AssetLibraryReference &library_ref)
void blender::ed::asset::list::storage_tag_main_data_dirty ()
void blender::ed::asset::list::storage_id_remap (ID *id_old, ID *id_new)
static std::optional< eFileSelectType > blender::ed::asset::list::asset_library_reference_to_fileselect_type (const AssetLibraryReference &library_reference)
static std::tuple< AssetList &, is_new_t > blender::ed::asset::list::ensure_list_storage (const AssetLibraryReference &library_reference, eFileSelectType filesel_type)

Detailed Description

Abstractions to manage runtime asset lists with a global cache for multiple UI elements to access. Internally this uses the #FileList API and structures from filelist.cc. This is just because it contains most necessary logic already and there's not much time for a more long-term solution.

Definition in file asset_list.cc.