Blender V4.3
ED_asset_list.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include <string>
12
13#include "BLI_function_ref.hh"
14
15struct AssetHandle;
17struct bContext;
18struct ID;
19struct ImBuf;
20struct wmNotifier;
22namespace blender::asset_system {
23class AssetLibrary;
24class AssetRepresentation;
25} // namespace blender::asset_system
26
28
30
40 const AssetLibraryReference &library_reference);
41
45
53void iterate(const AssetLibraryReference &library_reference,
55 FunctionRef<bool(asset_system::AssetRepresentation &)> prefilter_fn = nullptr);
61void iterate(const AssetLibraryReference &library_reference, AssetListIterFn fn);
62
70void storage_fetch(const AssetLibraryReference *library_reference, const bContext *C);
71bool is_loaded(const AssetLibraryReference *library_reference);
72void previews_fetch(const AssetLibraryReference *library_reference, const bContext *C);
78void clear(const AssetLibraryReference *library_reference, const bContext *C);
84void clear_all_library(const bContext *C);
85bool storage_has_list_for_library(const AssetLibraryReference *library_reference);
98void storage_id_remap(ID *id_old, ID *id_new);
103void storage_exit();
104
106 int asset_index);
108 const AssetLibraryReference &library_reference, int asset_index);
109
110bool asset_image_is_loading(const AssetLibraryReference *library_reference,
111 const AssetHandle *asset_handle);
113 const AssetLibraryReference *library_reference,
114 AssetHandle *asset_handle);
115ImBuf *asset_image_get(const AssetHandle *asset_handle);
116
120bool listen(const wmNotifier *notifier);
125int size(const AssetLibraryReference *library_reference);
126
127} // namespace blender::ed::asset::list
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void storage_fetch(const AssetLibraryReference *library_reference, const bContext *C)
void asset_preview_ensure_requested(const bContext &C, const AssetLibraryReference *library_reference, AssetHandle *asset_handle)
int size(const AssetLibraryReference *library_reference)
void storage_id_remap(ID *id_old, ID *id_new)
bool asset_image_is_loading(const AssetLibraryReference *library_reference, const AssetHandle *asset_handle)
asset_system::AssetLibrary * library_get_once_available(const AssetLibraryReference &library_reference)
void clear(const AssetLibraryReference *library_reference, const bContext *C)
bool listen(const wmNotifier *notifier)
bool storage_has_list_for_library(const AssetLibraryReference *library_reference)
void clear_all_library(const bContext *C)
void iterate(const AssetLibraryReference &library_reference, AssetListHandleIterFn fn, FunctionRef< bool(asset_system::AssetRepresentation &)> prefilter_fn=nullptr)
bool is_loaded(const AssetLibraryReference *library_reference)
asset_system::AssetRepresentation * asset_get_by_index(const AssetLibraryReference &library_reference, int asset_index)
AssetHandle asset_handle_get_by_index(const AssetLibraryReference *library_reference, int asset_index)
ImBuf * asset_image_get(const AssetHandle *asset_handle)
void asset_reading_region_listen_fn(const wmRegionListenerParams *params)
void previews_fetch(const AssetLibraryReference *library_reference, const bContext *C)
Definition DNA_ID.h:413