Blender V4.3
asset_list.cc File Reference
#include <optional>
#include <string>
#include "AS_asset_library.hh"
#include "BKE_context.hh"
#include "BKE_screen.hh"
#include "BLI_map.hh"
#include "BLI_string.h"
#include "BLI_utility_mixins.hh"
#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::PreviewTimer
class  blender::ed::asset::list::AssetList

Namespaces

namespace  blender
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)
bool blender::ed::asset::list::is_loaded (const AssetLibraryReference *library_reference)
void blender::ed::asset::list::previews_fetch (const AssetLibraryReference *library_reference, const bContext *C)
void blender::ed::asset::list::clear (const AssetLibraryReference *library_reference, const bContext *C)
void blender::ed::asset::list::clear_all_library (const bContext *C)
bool blender::ed::asset::list::storage_has_list_for_library (const AssetLibraryReference *library_reference)
void blender::ed::asset::list::iterate (const AssetLibraryReference &library_reference, AssetListHandleIterFn fn, FunctionRef< bool(asset_system::AssetRepresentation &)> prefilter_fn=nullptr)
void blender::ed::asset::list::iterate (const AssetLibraryReference &library_reference, AssetListIterFn fn)
asset_system::AssetLibraryblender::ed::asset::list::library_get_once_available (const AssetLibraryReference &library_reference)
AssetHandle blender::ed::asset::list::asset_handle_get_by_index (const AssetLibraryReference *library_reference, int asset_index)
asset_system::AssetRepresentationblender::ed::asset::list::asset_get_by_index (const AssetLibraryReference &library_reference, int asset_index)
bool blender::ed::asset::list::asset_image_is_loading (const AssetLibraryReference *library_reference, const AssetHandle *asset_handle)
void blender::ed::asset::list::asset_preview_ensure_requested (const bContext &C, const AssetLibraryReference *library_reference, AssetHandle *asset_handle)
ImBufblender::ed::asset::list::asset_image_get (const AssetHandle *asset_handle)
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 AssetListMapblender::ed::asset::list::global_storage ()
static AssetListblender::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< eFileSelectTypeblender::ed::asset::list::asset_library_reference_to_fileselect_type (const AssetLibraryReference &library_reference)
static std::tuple< AssetList &, is_new_tblender::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.