Blender V5.0
DNA_asset_types.h
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 "DNA_defs.h"
12#include "DNA_listBase.h"
13#include "DNA_uuid_types.h"
14
15#ifdef __cplusplus
16# include <memory>
17
18namespace blender {
19class StringRef;
20}
21namespace blender::asset_system {
22class AssetLibrary;
23} // namespace blender::asset_system
24
25#endif
26
32typedef struct AssetTag {
33 struct AssetTag *next, *prev;
34 char name[/*MAX_NAME*/ 64];
36
45typedef struct AssetMetaData {
48
51
63 char catalog_simple_name[/*MAX_NAME*/ 64];
64
66 char *author;
67
70
72 char *copyright;
73
75 char *license;
76
80 ListBase tags; /* AssetTag */
84 short tot_tags;
85
86 char _pad[4];
87
88#ifdef __cplusplus
89 AssetMetaData() = default;
90 AssetMetaData(const AssetMetaData &other);
94#endif
96
111
124
125#
126#
131
135
143typedef struct AssetLibraryReference {
144 short type; /* eAssetLibraryType */
145 char _pad1[2];
153
170typedef struct AssetWeakReference {
171 char _pad[6];
172
173 short asset_library_type; /* #eAssetLibraryType */
177
179
180#ifdef __cplusplus
187
188 friend bool operator==(const AssetWeakReference &a, const AssetWeakReference &b);
189 friend bool operator!=(const AssetWeakReference &a, const AssetWeakReference &b)
190 {
191 return !(a == b);
192 }
193
197 static AssetWeakReference make_reference(const blender::asset_system::AssetLibrary &library,
198 blender::StringRef library_relative_identifier);
199#endif
201
BLI_INLINE bool operator!=(const ListBase &a, const ListBase &b)
eAssetImportMethod
@ ASSET_IMPORT_PACK
@ ASSET_IMPORT_LINK
@ ASSET_IMPORT_APPEND_REUSE
@ ASSET_IMPORT_APPEND
eAssetLibrary_Flag
@ ASSET_LIBRARY_RELATIVE_PATH
struct AssetWeakReference AssetWeakReference
struct AssetMetaData AssetMetaData
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
Definition asset.cc:49
eAssetLibraryType
@ ASSET_LIBRARY_CUSTOM
@ ASSET_LIBRARY_ESSENTIALS
@ ASSET_LIBRARY_LOCAL
@ ASSET_LIBRARY_ALL
These structs are the foundation for all linked lists in the library system.
bool operator==(const AssetWeakReference &a, const AssetWeakReference &b)
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
eAssetImportMethod method
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
char catalog_simple_name[64]
struct IDProperty * properties
struct AssetTypeInfo * local_type_info
struct bUUID catalog_id
User defined tag. Currently only used by assets, could be used more often at some point....
char name[64]
struct AssetTag * prev
struct AssetTag * next
const char * relative_asset_identifier
const char * asset_library_identifier
Universally Unique Identifier according to RFC4122.