Blender V4.5
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
8
9#pragma once
10
11#include "BLI_function_ref.hh"
12
13struct AssetHandle;
15struct bContext;
16struct ID;
17struct ImBuf;
18struct wmNotifier;
20namespace blender::asset_system {
21class AssetLibrary;
23} // namespace blender::asset_system
24
26
28
38 const AssetLibraryReference &library_reference);
39
43 FunctionRef<bool(asset_system::AssetRepresentation &, int asset_index)>;
44
52void iterate(const AssetLibraryReference &library_reference, AssetListIndexIterFn fn);
58void iterate(const AssetLibraryReference &library_reference, AssetListIterFn fn);
59
68void storage_fetch(const AssetLibraryReference *library_reference, const bContext *C);
74void storage_fetch_blocking(const AssetLibraryReference &library_reference, const bContext &C);
75bool is_loaded(const AssetLibraryReference *library_reference);
81void clear(const AssetLibraryReference *library_reference, const bContext *C);
87void clear_all_library(const bContext *C);
91bool has_list_storage_for_library(const AssetLibraryReference *library_reference);
98 const bContext *C);
111void storage_id_remap(ID *id_old, ID *id_new);
116void storage_exit();
117
119 int asset_index);
121 const AssetLibraryReference &library_reference, int asset_index);
122
126bool listen(const wmNotifier *notifier);
131int size(const AssetLibraryReference *library_reference);
132
133} // namespace blender::ed::asset::list
#define C
Definition RandGen.cpp:29
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void storage_fetch(const AssetLibraryReference *library_reference, const bContext *C)
FunctionRef< bool(asset_system::AssetRepresentation &, int asset_index)> AssetListIndexIterFn
int size(const AssetLibraryReference *library_reference)
void storage_id_remap(ID *id_old, ID *id_new)
bool has_asset_browser_storage_for_library(const AssetLibraryReference *library_reference, const bContext *C)
asset_system::AssetLibrary * library_get_once_available(const AssetLibraryReference &library_reference)
void storage_fetch_blocking(const AssetLibraryReference &library_reference, const bContext &C)
void clear(const AssetLibraryReference *library_reference, const bContext *C)
bool listen(const wmNotifier *notifier)
void clear_all_library(const bContext *C)
bool has_list_storage_for_library(const AssetLibraryReference *library_reference)
bool is_loaded(const AssetLibraryReference *library_reference)
asset_system::AssetRepresentation * asset_get_by_index(const AssetLibraryReference &library_reference, int asset_index)
FunctionRef< bool(asset_system::AssetRepresentation &)> AssetListIterFn
AssetHandle asset_handle_get_by_index(const AssetLibraryReference *library_reference, int asset_index)
void iterate(const AssetLibraryReference &library_reference, AssetListIndexIterFn fn)
void asset_reading_region_listen_fn(const wmRegionListenerParams *params)
Definition DNA_ID.h:404