31 if (filter->id_types && (filter->id_types & asset_id_filter) == 0) {
40 if (matched_tag ==
nullptr) {
58 if (!is_asset_visible_fn(asset)) {
69 if (catalog ==
nullptr) {
72 known_paths.
add(catalog->path.str());
86 if (catalog ==
nullptr) {
89 filtered_tree.insert_item(*catalog);
112 const bool dirty = !loading_finished;
119 if (meta_data_filter && !meta_data_filter(meta_data)) {
124 unassigned_assets.append(&asset);
130 if (catalog ==
nullptr) {
133 unassigned_assets.
append(&asset);
136 assets_per_path.
add(catalog->path, &asset);
148 if (catalog ==
nullptr) {
151 catalogs_with_node_assets.insert_item(*catalog);
154 return {std::move(catalogs_with_node_assets),
155 std::move(assets_per_path),
156 std::move(unassigned_assets),
Main runtime representation of an asset.
uint64_t BKE_idtype_idcode_to_idfilter(short idcode)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
bool BLI_uuid_is_nil(bUUID uuid)
Span< Value > lookup(const Key &key) const
void add(const Key &key, const Value &value)
bool contains(const Key &key) const
void append(const T &value)
const std::string & str() const
AssetCatalog * find_catalog(CatalogID catalog_id) const
const AssetCatalogTree & catalog_tree()
AssetCatalogPath catalog_path() const
CatalogID get_catalog_id() const
void foreach_item(ItemIterFn callback) const
AssetCatalogService & catalog_service() const
AssetMetaData & get_metadata() const
ID_Type get_id_type() const
void storage_fetch(const AssetLibraryReference *library_reference, const bContext *C)
asset_system::AssetLibrary * library_get_once_available(const AssetLibraryReference &library_reference)
void iterate(const AssetLibraryReference &library_reference, AssetListHandleIterFn fn, FunctionRef< bool(asset_system::AssetRepresentation &)> prefilter_fn=nullptr)
bool is_loaded(const AssetLibraryReference *library_reference)
AssetItemTree build_filtered_all_catalog_tree(const AssetLibraryReference &library_ref, const bContext &C, const AssetFilterSettings &filter_settings, FunctionRef< bool(const AssetMetaData &)> meta_data_filter={})
asset_system::AssetCatalogTree build_filtered_catalog_tree(const asset_system::AssetLibrary &library, const AssetLibraryReference &library_ref, blender::FunctionRef< bool(const asset_system::AssetRepresentation &)> is_asset_visible_fn)
bool filter_matches_asset(const AssetFilterSettings *filter, const blender::asset_system::AssetRepresentation &asset)
unsigned __int64 uint64_t
User defined tag. Currently only used by assets, could be used more often at some point....