Blender V4.5
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
122
123#
124#
129
133
141typedef struct AssetLibraryReference {
142 short type; /* eAssetLibraryType */
143 char _pad1[2];
151
168typedef struct AssetWeakReference {
169 char _pad[6];
170
171 short asset_library_type; /* #eAssetLibraryType */
175
177
178#ifdef __cplusplus
185
186 friend bool operator==(const AssetWeakReference &a, const AssetWeakReference &b);
187 friend bool operator!=(const AssetWeakReference &a, const AssetWeakReference &b)
188 {
189 return !(a == b);
190 }
191
195 static AssetWeakReference make_reference(const blender::asset_system::AssetLibrary &library,
196 blender::StringRef library_relative_identifier);
197#endif
199
211#
212#
213typedef struct AssetHandle {
214 const struct FileDirEntry *file_data;
216
eAssetImportMethod
@ 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)
bool operator!=(const SpreadsheetInstanceID &a, const SpreadsheetInstanceID &b)
const struct FileDirEntry * file_data
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.