Blender V4.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 "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[64]; /* MAX_NAME */
36
45typedef struct AssetMetaData {
48
51
63 char catalog_simple_name[64]; /* MAX_NAME */
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
126
134typedef struct AssetLibraryReference {
135 short type; /* eAssetLibraryType */
136 char _pad1[2];
144
161typedef struct AssetWeakReference {
162 char _pad[6];
163
164 short asset_library_type; /* #eAssetLibraryType */
168
170
171#ifdef __cplusplus
178
179 friend bool operator==(const AssetWeakReference &a, const AssetWeakReference &b);
180 friend bool operator!=(const AssetWeakReference &a, const AssetWeakReference &b)
181 {
182 return !(a == b);
183 }
184
188 static AssetWeakReference make_reference(const blender::asset_system::AssetLibrary &library,
189 blender::StringRef library_relative_identifier);
190#endif
192
204#
205#
206typedef struct AssetHandle {
207 const struct FileDirEntry *file_data;
209
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)
local_group_size(16, 16) .push_constant(Type b
ccl_device_inline bool operator!=(const float2 a, const float2 b)
const struct FileDirEntry * file_data
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.