blob: 43a466d51ad82f921ff4a82a51888c2b989f18f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup edasset
*
* API to abstract away details for temporary loading of an ID from an asset. If the ID is stored
* in the current file (or more precisely, in the #Main given when requesting an ID) no loading is
* performed and the ID is returned. Otherwise it's imported for temporary access using the
* `BLO_library_temp` API.
*/
#pragma once
#include "DNA_ID_enums.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct AssetTempIDConsumer AssetTempIDConsumer;
struct AssetHandle;
struct AssetLibraryReference;
struct Main;
struct ReportList;
struct bContext;
AssetTempIDConsumer *ED_asset_temp_id_consumer_create(const struct AssetHandle *handle);
void ED_asset_temp_id_consumer_free(AssetTempIDConsumer **consumer);
struct ID *ED_asset_temp_id_consumer_ensure_local_id(
AssetTempIDConsumer *consumer,
const struct bContext *C,
const struct AssetLibraryReference *asset_library_ref,
ID_Type id_type,
struct Main *bmain,
struct ReportList *reports);
#ifdef __cplusplus
}
#endif
|