Blender V5.3
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 "BLI_enum_flags.hh"
12
13#include "DNA_defs.h"
14#include "DNA_listBase.h"
15#include "DNA_uuid_types.h"
16
17#include <memory>
18
19namespace blender {
20
21class StringRef;
22namespace asset_system {
23class AssetLibrary;
24} // namespace asset_system
25
43
56
68
74
80struct AssetTag {
81 struct AssetTag *next = nullptr, *prev = nullptr;
82 char name[/*MAX_NAME*/ 64] = "";
83};
84
95
107
109 struct IDProperty *properties = nullptr;
110
122 char catalog_simple_name[/*MAX_NAME*/ 64] = "";
123
125 char *author = nullptr;
126
128 char *description = nullptr;
129
131 char *copyright = nullptr;
132
134 char *license = nullptr;
135
139 ListBaseT<AssetTag> tags = {nullptr, nullptr};
140 short active_tag = 0;
143 short tot_tags = 0;
144
146
150
151 char _pad[4] = {};
152
153#if defined(__cplusplus) && !defined(DNA_NO_EXTERNAL_CONSTRUCTORS)
154 AssetMetaData() = default;
155 AssetMetaData(const AssetMetaData &other);
159#endif
160};
161
162#
163#
168
186
204 char _pad[6] = {};
205
209 const char *asset_library_identifier = nullptr;
210
211 const char *relative_asset_identifier = nullptr;
212
213#if defined(__cplusplus) && !defined(DNA_NO_EXTERNAL_CONSTRUCTORS)
220
221 friend bool operator==(const AssetWeakReference &a, const AssetWeakReference &b);
222 friend bool operator!=(const AssetWeakReference &a, const AssetWeakReference &b)
223 {
224 return !(a == b);
225 }
226
230 static AssetWeakReference make_reference(const asset_system::AssetLibrary &library,
231 StringRef library_relative_identifier);
232#endif
233};
234
236 struct AssetCatalogPathLink *next = nullptr, *prev = nullptr;
237 char *path = nullptr;
238};
239
240} // namespace blender
These structs are the foundation for all linked lists in the library system.
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
ENUM_OPERATORS(Layer::Flags)
bool operator==(const Error &left, const Error &right)
BMesh Iterators.
@ ASSET_LIBRARY_USE_AUTH_TOKEN
@ ASSET_LIBRARY_PROJECT_DEFINED
@ ASSET_LIBRARY_DISABLED
@ ASSET_LIBRARY_USE_REMOTE_URL
@ ASSET_LIBRARY_RELATIVE_PATH
bool operator!=(const CPPType &a, const CPPType &b)
@ ASSET_LIBRARY_CUSTOM
@ ASSET_LIBRARY_ESSENTIALS
@ ASSET_LIBRARY_ONLINE_ESSENTIALS
@ ASSET_LIBRARY_LOCAL
@ ASSET_IMPORT_APPEND
@ ASSET_IMPORT_APPEND_REUSE
@ ASSETDATA_USE_OWN_IMPORT_METHOD
signed char int8_t
Definition BKE_text.h:76
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
AssetMetaDataFlag flag
struct IDProperty * properties
eAssetImportMethod preferred_import_method
ListBaseT< AssetTag > tags
struct AssetTypeInfo * local_type_info
User defined tag. Currently only used by assets, could be used more often at some point....
struct AssetTag * prev
struct AssetTag * next
eAssetLibraryType asset_library_type
Universally Unique Identifier according to RFC4122.