Blender V4.5
DNA_ID.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9
10#pragma once
11
12#include "DNA_ID_enums.h"
13#include "DNA_defs.h"
14#include "DNA_listBase.h"
15
16#include "BLI_assert.h"
18
20#ifdef __cplusplus
21# include <type_traits>
22
23namespace blender::bke {
25}
26namespace blender::bke::library {
27struct LibraryRuntime;
28}
31#else
34#endif
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40struct FileData;
41struct GHash;
42struct ID;
43struct ID_Readfile_Data;
44struct Library;
45struct PackedFile;
46struct UniqueName_Map;
47struct Depsgraph;
48
57
58/* DNA version of #EnumPropertyItem. */
60 /* Unique identifier, used for string lookup. */
62 /* UI name of the item. */
63 char *name;
64 /* Optional description. */
66 /* Unique integer value, should never change. */
67 int value;
68 /* Optional icon. */
69 int icon;
71
72/* IDP_UI_DATA_TYPE_INT */
88
90typedef struct IDPropertyUIDataBool {
92 int8_t *default_array; /* Only for array properties. */
94 char _pad[3];
95
98
100typedef struct IDPropertyUIDataFloat {
102 double *default_array; /* Only for array properties. */
104 char _pad[4];
105
106 float step;
108
109 double min;
110 double max;
111 double soft_min;
112 double soft_max;
115
121
135
142
143typedef struct IDProperty {
146 char type;
153 short flag;
154 char name[/*MAX_IDPROP_NAME*/ 64];
155
156 char _pad0[4];
157
160
165 int len;
172
175
176#define MAX_IDPROP_NAME 64
177#define DEFAULT_ALLOC_FOR_NULL_STRINGS 64
178
179/* add any future new id property types here. */
180
181/* Static ID override structs. */
182
185
186 /* Type of override. */
188 short flag;
189
191 short tag;
192 char _pad0[2];
193
194 /* Sub-item references, if needed (for arrays or collections only).
195 * We need both reference and local values to allow e.g. insertion into RNA collections
196 * (constraints, modifiers...).
197 * In RNA collection case, if names are defined, they are used in priority.
198 * Names are pointers (instead of char[64]) to save some space, NULL or empty string when unset.
199 * Indices are -1 when unset.
200 *
201 * NOTE: For insertion operations in RNA collections, reference may not actually exist in the
202 * linked reference data. It is used to identify the anchor of the insertion operation (i.e. the
203 * item after or before which the new local item should be inserted), in the local override. */
214
215/* IDOverrideLibraryPropertyOperation->operation. */
216enum {
217 /* Basic operations. */
218 LIBOVERRIDE_OP_NOOP = 0, /* Special value, forbids any overriding. */
219
220 LIBOVERRIDE_OP_REPLACE = 1, /* Fully replace local value by reference one. */
221
222 /* Numeric-only operations. */
223 LIBOVERRIDE_OP_ADD = 101, /* Add local value to reference one. */
224 /* Subtract local value from reference one (needed due to unsigned values etc.). */
226 /* Multiply reference value by local one (more useful than diff for scales and the like). */
228
229 /* Collection-only operations. */
230 LIBOVERRIDE_OP_INSERT_AFTER = 201, /* Insert after given reference's subitem. */
231 LIBOVERRIDE_OP_INSERT_BEFORE = 202, /* Insert before given reference's subitem. */
232 /* We can add more if needed (move, delete, ...). */
233};
234
235/* IDOverrideLibraryPropertyOperation->flag. */
236enum {
241
253};
254
280
281/* IDOverrideLibraryProperty->tag and IDOverrideLibraryPropertyOperation->tag. */
282enum {
285
288};
289
290#
291#
296
297/* IDOverrideLibraryRuntime->tag. */
298enum {
301
307
319};
320
321/* Main container for all overriding data info of a data-block. */
341
342/* IDOverrideLibrary->flag */
343enum {
354};
355
356/* watch it: Strip has identical beginning. */
361
362/* 2 characters for ID code and 64 for actual name */
363#define MAX_ID_NAME 66
364
366enum {
371};
372
387
403
404typedef struct ID {
405 /* There's a nasty circular dependency here.... 'void *' to the rescue! I
406 * really wonder why this is needed. */
407 void *next, *prev;
408 struct ID *newid;
409
410 struct Library *lib;
411
414
415 char name[/*MAX_ID_NAME*/ 66];
420 short flag;
424 int tag;
425 int us;
427 unsigned int recalc;
439
444 unsigned int session_uid;
445
447
455
456 void *_pad1;
457
460
466 struct ID *orig_id;
467
484
492
495
499typedef struct Library {
500#ifdef __cplusplus
502 static constexpr ID_Type id_type = ID_LI;
503#endif
504
507 char filepath[/*FILE_MAX*/ 1024];
508
510
518
529typedef struct LibraryWeakReference {
531 char library_filepath[/*FILE_MAX*/ 1024];
532
534 char library_id_name[/*MAX_ID_NAME*/ 66];
535
536 char _pad[2];
538
539/* PreviewImage.flag */
541 PRV_CHANGED = (1 << 0),
543 PRV_USER_EDITED = (1 << 1),
544 /* Rendering was invoked. Cleared on file read. */
545 PRV_RENDERING = (1 << 2),
546};
547
548/* PreviewImage.tag */
549enum {
556};
557
562typedef struct PreviewImage {
564 /* All values of 2 are really NUM_ICON_SIZES */
565 unsigned int w[2];
566 unsigned int h[2];
567 short flag[2];
569 unsigned int *rect[2];
570
573
578#define ID_FAKE_USERS(id) ((((const ID *)id)->flag & ID_FLAG_FAKEUSER) ? 1 : 0)
585#define ID_EXTRA_USERS(id) (((const ID *)id)->tag & ID_TAG_EXTRAUSER ? 1 : 0)
594#define ID_EXTRA_REAL_USERS(id) (((const ID *)id)->tag & ID_TAG_EXTRAUSER_SET ? 1 : 0)
599#define ID_REAL_USERS(id) (((const ID *)id)->us - ID_FAKE_USERS(id))
604#define ID_REFCOUNTING_USERS(id) (ID_REAL_USERS(id) - ID_EXTRA_REAL_USERS(id))
605
606#define ID_CHECK_UNDO(id) (!ELEM(GS((id)->name), ID_SCR, ID_WM, ID_WS, ID_BR))
607
608#define ID_BLEND_PATH(_bmain, _id) \
609 ((_id)->lib ? (_id)->lib->runtime->filepath_abs : BKE_main_blendfile_path((_bmain)))
610#define ID_BLEND_PATH_FROM_GLOBAL(_id) \
611 ((_id)->lib ? (_id)->lib->runtime->filepath_abs : BKE_main_blendfile_path_from_global())
612
613#define ID_MISSING(_id) ((((const ID *)(_id))->tag & ID_TAG_MISSING) != 0)
614
615#define ID_IS_LINKED(_id) (((const ID *)(_id))->lib != NULL)
616
617#define ID_TYPE_SUPPORTS_ASSET_EDITABLE(id_type) \
618 ELEM(id_type, ID_BR, ID_TE, ID_NT, ID_IM, ID_PC, ID_MA)
619
620#define ID_IS_EDITABLE(_id) \
621 ((((const ID *)(_id))->lib == NULL) || \
622 ((((const ID *)(_id))->lib->runtime->tag & LIBRARY_ASSET_EDITABLE) && \
623 ID_TYPE_SUPPORTS_ASSET_EDITABLE(GS((((const ID *)(_id))->name)))))
624
625/* Note that these are fairly high-level checks, should be used at user interaction level, not in
626 * BKE_library_override typically (especially due to the check on ID_TAG_EXTERN). */
627#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(_id) \
628 (ID_IS_LINKED(_id) && !ID_MISSING(_id) && \
629 (BKE_idtype_get_info_from_id((const ID *)(_id))->flags & IDTYPE_FLAGS_NO_LIBLINKING) == 0 && \
630 !ELEM(GS(((ID *)(_id))->name), ID_SCE))
631#define ID_IS_OVERRIDABLE_LIBRARY(_id) \
632 (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & ID_TAG_EXTERN) != 0)
633
634/* NOTE: The three checks below do not take into account whether given ID is linked or not (when
635 * chaining overrides over several libraries). User must ensure the ID is not linked itself
636 * currently. */
637/* TODO: add `_EDITABLE` versions of those macros (that would check if ID is linked or not)? */
638#define ID_IS_OVERRIDE_LIBRARY_REAL(_id) \
639 (((const ID *)(_id))->override_library != NULL && \
640 ((const ID *)(_id))->override_library->reference != NULL)
641
642#define ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id) \
643 ((((const ID *)(_id))->flag & ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE) != 0)
644
645#define ID_IS_OVERRIDE_LIBRARY(_id) \
646 (ID_IS_OVERRIDE_LIBRARY_REAL(_id) || ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id))
647
648#define ID_IS_OVERRIDE_LIBRARY_HIERARCHY_ROOT(_id) \
649 (!ID_IS_OVERRIDE_LIBRARY_REAL(_id) || \
650 ((ID *)(_id))->override_library->hierarchy_root == ((ID *)(_id)))
651
652#define ID_IS_ASSET(_id) (((const ID *)(_id))->asset_data != NULL)
653
654/* Check whether datablock type is covered by copy-on-evaluation. */
655#define ID_TYPE_USE_COPY_ON_EVAL(_id_type) \
656 (!ELEM(_id_type, ID_LI, ID_IP, ID_SCR, ID_VF, ID_BR, ID_WM, ID_PAL, ID_PC, ID_WS, ID_IM))
657
658/* Check whether data-block type requires copy-on-evaluation from #ID_RECALC_PARAMETERS.
659 * Keep in sync with #BKE_id_eval_properties_copy. */
660#define ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW(id_type) ELEM(id_type, ID_ME)
661
662#define ID_TYPE_IS_DEPRECATED(id_type) ELEM(id_type, ID_IP)
663
664#ifdef GS
665# undef GS
666#endif
667#define GS(a) (CHECK_TYPE_ANY(a, char *, const char *), (ID_Type)(*((const short *)(a))))
668
669#define ID_NEW_SET(_id, _idn) \
670 (((ID *)(_id))->newid = (ID *)(_idn), \
671 ((ID *)(_id))->newid->tag |= ID_TAG_NEW, \
672 (void *)((ID *)(_id))->newid)
673#define ID_NEW_REMAP(a) \
674 if ((a) && (a)->id.newid) { \
675 *(void **)&(a) = (a)->id.newid; \
676 } \
677 ((void)0)
678
680enum {
713};
714
732enum {
738
757
768
776
793
815
819
827 ID_TAG_NEW = 1 << 12,
835
863
864 /* ------------------------------------------------------------------------------------------- */
870
886 ID_TAG_NO_MAIN = 1 << 21,
916
920
934
935 /* ------------------------------------------------------------------------------------------- */
936
944 ID_TAG_DOIT = 1u << 31,
945};
946
954#define ID_TAG_KEEP_ON_UNDO (ID_TAG_EXTRAUSER | ID_TAG_MISSING | ID_TAG_RUNTIME)
955
956/* Tag given ID for an update in all the dependency graphs. */
957typedef enum IDRecalcFlag {
958 /***************************************************************************
959 * Individual update tags, this is what ID gets tagged for update with. */
960
961 /* ** Object transformation changed. ** */
963
964 /* ** Geometry changed. **
965 *
966 * When object of armature type gets tagged with this flag, its pose is
967 * re-evaluated.
968 *
969 * When object of other type is tagged with this flag it makes the modifier
970 * stack to be re-evaluated.
971 *
972 * When object data type (mesh, curve, ...) gets tagged with this flag it
973 * makes all objects which shares this data-block to be updated.
974 *
975 * Note that the evaluation depends on the object-mode.
976 * So edit-mesh data for example only reevaluate with the updated edit-mesh.
977 * When geometry in the original ID has been modified #ID_RECALC_GEOMETRY_ALL_MODES
978 * must be used instead.
979 *
980 * When a collection gets tagged with this flag, all objects depending on the geometry and
981 * transforms on any of the objects in the collection are updated. */
983
984 /* ** Animation or time changed and animation is to be re-evaluated. ** */
986
987 /* ** Particle system changed. ** */
988 /* Only do path-cache etc. */
990 /* Reset everything including point-cache. */
992 /* Only child settings changed. */
994 /* Physics type changed. */
996
997 /* ** Material and shading ** */
998
999 /* For materials and node trees this means that topology of the shader tree
1000 * changed, and the shader is to be recompiled.
1001 * For objects it means that the draw batch cache is to be redone. */
1003 /* TODO(sergey): Consider adding an explicit ID_RECALC_SHADING_PARAMETERS
1004 * which can be used for cases when only socket value changed, to speed up
1005 * redraw update in that case. */
1006
1007 /* Selection of the ID itself or its components (for example, vertices) did
1008 * change, and all the drawing data is to be updated. */
1010 /* Flags on the base did change, and is to be copied onto all the copies of
1011 * corresponding objects. */
1014 /* Only inform editors about the change. Is used to force update of editors
1015 * when data-block which is not a part of dependency graph did change.
1016 *
1017 * For example, brush texture did change and the preview is to be
1018 * re-rendered. */
1020
1021 /* ** Update evaluated copy component. **
1022 *
1023 * This is most generic tag which should only be used when nothing else matches.
1024 * It is not to explicitly mixed in with other recalculation flags.
1025 */
1027
1028 /* Sequences in the sequencer did change.
1029 * Use this tag with a scene ID which owns the sequences. */
1031
1032 /* Runs on frame-change (used for seeking audio too). */
1034
1039
1040 ID_RECALC_AUDIO = (1 << 20),
1041
1042 /* NOTE: This triggers copy-on-eval for types that require it.
1043 * Exceptions to this can be added using #ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW,
1044 * this has the advantage that large arrays stored in the idea data don't
1045 * have to be copied on every update. */
1047
1048 /* Input has changed and data-block is to be reload from disk.
1049 * Applies to movie clips to inform that copy-on-written version is to be refreshed for the new
1050 * input file or for color space changes. */
1051 ID_RECALC_SOURCE = (1 << 23),
1052
1053 /* Virtual recalc tag/marker required for undo in some cases, where actual data does not change
1054 * and hence do not require an update, but conceptually we are dealing with something new.
1055 *
1056 * Current known case: linked IDs made local without requiring any copy. While their users do not
1057 * require any update, they have actually been 'virtually' remapped from the linked ID to the
1058 * local one.
1059 */
1061
1062 /* The node tree has changed in a way that affects its output nodes. */
1064
1065 /* Hierarchy of collection and object within collection changed. */
1067
1068 /* Provisioned flags.
1069 *
1070 * Not for actual use. The idea of them is to have all bits of the `IDRecalcFlag` defined to a
1071 * known value, silencing sanitizer warnings when checking bits of the ID_RECALC_ALL. */
1077
1078 /***************************************************************************
1079 * Pseudonyms, to have more semantic meaning in the actual code without
1080 * using too much low-level and implementation specific tags. */
1081
1082 /* Update animation data-block itself, without doing full re-evaluation of
1083 * all dependent objects. */
1085
1086 /* Ensure geometry of object and edit modes are both up-to-date in the evaluated data-block.
1087 * Example usage is when mesh validation modifies the non-edit-mode data,
1088 * which we want to be copied over to the evaluated data-block. */
1090
1091 /***************************************************************************
1092 * Aggregate flags, use only for checks on runtime.
1093 * Do NOT use those for tagging. */
1094
1095 /* Identifies that SOMETHING has been changed in this ID. */
1096 ID_RECALC_ALL = (0xffffffff),
1097
1098 /* Identifies that something in particle system did change. */
1101
1103
1104/* To filter ID types (filter_id). 64 bit to fit all types. */
1105#define FILTER_ID_AC (1ULL << 0)
1106#define FILTER_ID_AR (1ULL << 1)
1107#define FILTER_ID_BR (1ULL << 2)
1108#define FILTER_ID_CA (1ULL << 3)
1109#define FILTER_ID_CU_LEGACY (1ULL << 4)
1110#define FILTER_ID_GD_LEGACY (1ULL << 5)
1111#define FILTER_ID_GR (1ULL << 6)
1112#define FILTER_ID_IM (1ULL << 7)
1113#define FILTER_ID_LA (1ULL << 8)
1114#define FILTER_ID_LS (1ULL << 9)
1115#define FILTER_ID_LT (1ULL << 10)
1116#define FILTER_ID_MA (1ULL << 11)
1117#define FILTER_ID_MB (1ULL << 12)
1118#define FILTER_ID_MC (1ULL << 13)
1119#define FILTER_ID_ME (1ULL << 14)
1120#define FILTER_ID_MSK (1ULL << 15)
1121#define FILTER_ID_NT (1ULL << 16)
1122#define FILTER_ID_OB (1ULL << 17)
1123#define FILTER_ID_PAL (1ULL << 18)
1124#define FILTER_ID_PC (1ULL << 19)
1125#define FILTER_ID_SCE (1ULL << 20)
1126#define FILTER_ID_SPK (1ULL << 21)
1127#define FILTER_ID_SO (1ULL << 22)
1128#define FILTER_ID_TE (1ULL << 23)
1129#define FILTER_ID_TXT (1ULL << 24)
1130#define FILTER_ID_VF (1ULL << 25)
1131#define FILTER_ID_WO (1ULL << 26)
1132#define FILTER_ID_PA (1ULL << 27)
1133#define FILTER_ID_CF (1ULL << 28)
1134#define FILTER_ID_WS (1ULL << 29)
1135#define FILTER_ID_LP (1ULL << 31)
1136#define FILTER_ID_CV (1ULL << 32)
1137#define FILTER_ID_PT (1ULL << 33)
1138#define FILTER_ID_VO (1ULL << 34)
1139#define FILTER_ID_SIM (1ULL << 35)
1140#define FILTER_ID_KE (1ULL << 36)
1141#define FILTER_ID_SCR (1ULL << 37)
1142#define FILTER_ID_WM (1ULL << 38)
1143#define FILTER_ID_LI (1ULL << 39)
1144#define FILTER_ID_GP (1ULL << 40)
1145#define FILTER_ID_IP (1ULL << 41)
1146
1147#define FILTER_ID_ALL \
1148 (FILTER_ID_AC | FILTER_ID_AR | FILTER_ID_BR | FILTER_ID_CA | FILTER_ID_CU_LEGACY | \
1149 FILTER_ID_GD_LEGACY | FILTER_ID_GR | FILTER_ID_IM | FILTER_ID_LA | FILTER_ID_LS | \
1150 FILTER_ID_LT | FILTER_ID_MA | FILTER_ID_MB | FILTER_ID_MC | FILTER_ID_ME | FILTER_ID_MSK | \
1151 FILTER_ID_NT | FILTER_ID_OB | FILTER_ID_PA | FILTER_ID_PAL | FILTER_ID_PC | FILTER_ID_SCE | \
1152 FILTER_ID_SPK | FILTER_ID_SO | FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_WO | \
1153 FILTER_ID_CF | FILTER_ID_WS | FILTER_ID_LP | FILTER_ID_CV | FILTER_ID_PT | FILTER_ID_VO | \
1154 FILTER_ID_SIM | FILTER_ID_KE | FILTER_ID_SCR | FILTER_ID_WM | FILTER_ID_LI | FILTER_ID_GP | \
1155 FILTER_ID_IP)
1156
1187typedef enum eID_Index {
1188 /* Special case: Library, should never ever depend on any other type. */
1190
1191 /* Animation types, might be used by almost all other types. */
1192 INDEX_ID_IP, /* Deprecated. */
1194
1195 /* Grease Pencil, special case, should be with the other obdata, but it can also be used by many
1196 * other ID types, including node trees e.g.
1197 * So there is no proper place for those, for now keep close to the lower end of the processing
1198 * hierarchy, but we may want to re-evaluate that at some point. */
1200
1201 /* Node trees, abstraction for procedural data, potentially used by many other ID types.
1202 *
1203 * NOTE: While node trees can also use many other ID types, they should not /own/ any of those,
1204 * while they are being owned by many other ID types. This is why they are placed here. */
1206
1207 /* File-wrapper types, those usually 'embed' external files in Blender, with no dependencies to
1208 * other ID types. */
1212
1213 /* Image/movie types, can be used by shading ID types, but also directly by Objects, Scenes, etc.
1214 */
1218
1219 /* Shading types. */
1224
1225 /* Simulation-related types. */
1228
1229 /* Shape Keys snow-flake, can be used by several obdata types. */
1231
1232 /* Object data types. */
1246
1247 /* Collection and object types. */
1250
1251 /* Preset-like, not-really-data types, can use many other ID types but should never be used by
1252 * any actual data type (besides Scene, due to tool settings). */
1256
1257 /* Scene, after preset-like ID types because of tool settings. */
1259
1260 /* UI-related types, should never be used by any other data type. */
1264
1265 /* Special values, keep last. */
1268
1269#define INDEX_ID_MAX (INDEX_ID_NULL + 1)
1270
1271#ifdef __cplusplus
1272}
1273#endif
1274
1275#ifdef __cplusplus
1276namespace blender::dna {
1277namespace detail {
1278template<typename, typename = void> struct has_ID_member : std::false_type {};
1279template<typename T> struct has_ID_member<T, std::void_t<decltype(&T::id)>> : std::true_type {};
1280template<typename T> constexpr bool has_ID_as_first_member()
1281{
1282 if constexpr (std::is_standard_layout_v<T> && has_ID_member<T>::value) {
1283 return offsetof(T, id) == 0 && std::is_same_v<decltype(T::id), ID>;
1284 }
1285 else {
1286 return false;
1287 }
1288}
1289} // namespace detail
1290
1295template<typename T>
1296constexpr bool is_ID_v = detail::has_ID_as_first_member<T>() || std::is_same_v<T, ID>;
1297
1298} // namespace blender::dna
1299
1300namespace blender {
1301
1302namespace dna::detail {
1303template<typename Dst, typename Src, typename SrcRuntime>
1304constexpr void id_cast_assert([[maybe_unused]] SrcRuntime *src)
1305{
1306 static_assert(blender::dna::is_ID_v<Src>);
1307 static_assert(blender::dna::is_ID_v<Dst>);
1308 if constexpr (std::is_same_v<Src, ID> && !std::is_same_v<Dst, ID>) {
1309 /* Runtime check for when converting from #ID to subtype like #Object. */
1310 BLI_assert(src == nullptr || GS(src->name) == Dst::id_type);
1311 }
1312 else if constexpr (!std::is_same_v<Src, ID> && std::is_same_v<Dst, ID>) {
1313 /* Converting from subtype like #Object to #ID is always allowed. */
1314 }
1315 else {
1316 /* Converting between the same types is always allowed. */
1317 static_assert(std::is_same_v<Src, Dst>);
1318 }
1319}
1320} // namespace dna::detail
1321
1330template<typename Dst, typename Src> inline Dst id_cast(Src &&id)
1331{
1332 using DstDecay = std::decay_t<Dst>;
1333 using SrcDecay = std::decay_t<Src>;
1334 static_assert(std::is_pointer_v<SrcDecay> == std::is_pointer_v<DstDecay>);
1335 if constexpr (std::is_pointer_v<SrcDecay>) {
1336 dna::detail::id_cast_assert<std::decay_t<std::remove_pointer_t<DstDecay>>,
1337 std::decay_t<std::remove_pointer_t<SrcDecay>>>(id);
1338 }
1339 else {
1340 static_assert(std::is_lvalue_reference_v<Src> && std::is_lvalue_reference_v<Dst>);
1341 dna::detail::id_cast_assert<DstDecay, SrcDecay>(&id);
1342 }
1343 /* This also makes sure that we don't cast away constness. */
1344 return reinterpret_cast<Dst>(id);
1345}
1346
1347} // namespace blender
1348#endif
#define BLI_assert(a)
Definition BLI_assert.h:46
unsigned int uint
struct LibraryRuntimeHandle LibraryRuntimeHandle
Definition DNA_ID.h:33
@ LIBOVERRIDE_PROP_TAG_NEEDS_RETORE
Definition DNA_ID.h:287
@ LIBOVERRIDE_PROP_OP_TAG_UNUSED
Definition DNA_ID.h:284
@ PRV_TAG_DEFFERED_DELETE
Definition DNA_ID.h:553
@ PRV_TAG_DEFFERED_RENDERING
Definition DNA_ID.h:551
@ PRV_TAG_DEFFERED_INVALID
Definition DNA_ID.h:555
IDRecalcFlag
Definition DNA_ID.h:957
@ ID_RECALC_PARAMETERS
Definition DNA_ID.h:1046
@ ID_RECALC_AUDIO_FPS
Definition DNA_ID.h:1035
@ ID_RECALC_PSYS_PHYS
Definition DNA_ID.h:995
@ ID_RECALC_AUDIO_LISTENER
Definition DNA_ID.h:1038
@ ID_RECALC_TRANSFORM
Definition DNA_ID.h:962
@ ID_RECALC_PROVISION_29
Definition DNA_ID.h:1074
@ ID_RECALC_SHADING
Definition DNA_ID.h:1002
@ ID_RECALC_PROVISION_30
Definition DNA_ID.h:1075
@ ID_RECALC_FRAME_CHANGE
Definition DNA_ID.h:1033
@ ID_RECALC_AUDIO
Definition DNA_ID.h:1040
@ ID_RECALC_POINT_CACHE
Definition DNA_ID.h:1013
@ ID_RECALC_SELECT
Definition DNA_ID.h:1009
@ ID_RECALC_PSYS_REDO
Definition DNA_ID.h:989
@ ID_RECALC_PROVISION_31
Definition DNA_ID.h:1076
@ ID_RECALC_PSYS_CHILD
Definition DNA_ID.h:993
@ ID_RECALC_HIERARCHY
Definition DNA_ID.h:1066
@ ID_RECALC_PROVISION_27
Definition DNA_ID.h:1072
@ ID_RECALC_SOURCE
Definition DNA_ID.h:1051
@ ID_RECALC_SYNC_TO_EVAL
Definition DNA_ID.h:1026
@ ID_RECALC_EDITORS
Definition DNA_ID.h:1019
@ ID_RECALC_GEOMETRY_ALL_MODES
Definition DNA_ID.h:1089
@ ID_RECALC_PSYS_ALL
Definition DNA_ID.h:1099
@ ID_RECALC_AUDIO_MUTE
Definition DNA_ID.h:1037
@ ID_RECALC_SEQUENCER_STRIPS
Definition DNA_ID.h:1030
@ ID_RECALC_TAG_FOR_UNDO
Definition DNA_ID.h:1060
@ ID_RECALC_NTREE_OUTPUT
Definition DNA_ID.h:1063
@ ID_RECALC_PSYS_RESET
Definition DNA_ID.h:991
@ ID_RECALC_ANIMATION
Definition DNA_ID.h:985
@ ID_RECALC_PROVISION_28
Definition DNA_ID.h:1073
@ ID_RECALC_GEOMETRY
Definition DNA_ID.h:982
@ ID_RECALC_ALL
Definition DNA_ID.h:1096
@ ID_RECALC_AUDIO_VOLUME
Definition DNA_ID.h:1036
@ ID_RECALC_ANIMATION_NO_FLUSH
Definition DNA_ID.h:1084
@ ID_RECALC_BASE_FLAGS
Definition DNA_ID.h:1012
@ LIBOVERRIDE_OP_FLAG_MANDATORY
Definition DNA_ID.h:238
@ LIBOVERRIDE_OP_FLAG_LOCKED
Definition DNA_ID.h:240
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_ITEM_USE_ID
Definition DNA_ID.h:252
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE
Definition DNA_ID.h:246
struct ID ID
@ ID_REMAP_IS_LINKED_DIRECT
Definition DNA_ID.h:368
@ ID_REMAP_IS_USER_ONE_SKIPPED
Definition DNA_ID.h:370
@ ID_TAG_UNDO_OLD_ID_REUSED_UNCHANGED
Definition DNA_ID.h:844
@ ID_TAG_NEW
Definition DNA_ID.h:827
@ ID_TAG_UNDO_OLD_ID_REUSED_NOUNDO
Definition DNA_ID.h:855
@ ID_TAG_COPIED_ON_EVAL
Definition DNA_ID.h:905
@ ID_TAG_EXTRAUSER
Definition DNA_ID.h:786
@ ID_TAG_NO_USER_REFCOUNT
Definition DNA_ID.h:926
@ ID_TAG_TEMP_MAIN
Definition DNA_ID.h:879
@ ID_TAG_LIBOVERRIDE_AUTOREFRESH
Definition DNA_ID.h:805
@ ID_TAG_INDIRECT
Definition DNA_ID.h:756
@ ID_TAG_RUNTIME
Definition DNA_ID.h:767
@ ID_TAG_PRE_EXISTING
Definition DNA_ID.h:834
@ ID_TAG_EXTERN
Definition DNA_ID.h:750
@ ID_TAG_LOCALIZED
Definition DNA_ID.h:895
@ ID_TAG_MISSING
Definition DNA_ID.h:775
@ ID_TAG_LOCAL
Definition DNA_ID.h:744
@ ID_TAG_UNDO_OLD_ID_REREAD_IN_PLACE
Definition DNA_ID.h:862
@ ID_TAG_COPIED_ON_EVAL_FINAL_RESULT
Definition DNA_ID.h:915
@ ID_TAG_DOIT
Definition DNA_ID.h:944
@ ID_TAG_NOT_ALLOCATED
Definition DNA_ID.h:933
@ ID_TAG_LIBOVERRIDE_NEED_RESYNC
Definition DNA_ID.h:814
@ ID_TAG_EXTRAUSER_SET
Definition DNA_ID.h:792
@ ID_TAG_LIBOVERRIDE_REFOK
Definition DNA_ID.h:799
@ ID_TAG_NO_MAIN
Definition DNA_ID.h:886
eID_Index
Definition DNA_ID.h:1187
@ INDEX_ID_TXT
Definition DNA_ID.h:1210
@ INDEX_ID_WM
Definition DNA_ID.h:1263
@ INDEX_ID_VO
Definition DNA_ID.h:1239
@ INDEX_ID_NULL
Definition DNA_ID.h:1266
@ INDEX_ID_CF
Definition DNA_ID.h:1226
@ INDEX_ID_CV
Definition DNA_ID.h:1237
@ INDEX_ID_PT
Definition DNA_ID.h:1238
@ INDEX_ID_GR
Definition DNA_ID.h:1249
@ INDEX_ID_LA
Definition DNA_ID.h:1241
@ INDEX_ID_LT
Definition DNA_ID.h:1240
@ INDEX_ID_PC
Definition DNA_ID.h:1254
@ INDEX_ID_MA
Definition DNA_ID.h:1221
@ INDEX_ID_IM
Definition DNA_ID.h:1216
@ INDEX_ID_OB
Definition DNA_ID.h:1248
@ INDEX_ID_ME
Definition DNA_ID.h:1234
@ INDEX_ID_SO
Definition DNA_ID.h:1211
@ INDEX_ID_VF
Definition DNA_ID.h:1209
@ INDEX_ID_MC
Definition DNA_ID.h:1217
@ INDEX_ID_MSK
Definition DNA_ID.h:1215
@ INDEX_ID_BR
Definition DNA_ID.h:1255
@ INDEX_ID_WS
Definition DNA_ID.h:1262
@ INDEX_ID_SCR
Definition DNA_ID.h:1261
@ INDEX_ID_SPK
Definition DNA_ID.h:1243
@ INDEX_ID_MB
Definition DNA_ID.h:1236
@ INDEX_ID_CU_LEGACY
Definition DNA_ID.h:1235
@ INDEX_ID_LI
Definition DNA_ID.h:1189
@ INDEX_ID_IP
Definition DNA_ID.h:1192
@ INDEX_ID_NT
Definition DNA_ID.h:1205
@ INDEX_ID_WO
Definition DNA_ID.h:1223
@ INDEX_ID_TE
Definition DNA_ID.h:1220
@ INDEX_ID_PAL
Definition DNA_ID.h:1253
@ INDEX_ID_GP
Definition DNA_ID.h:1245
@ INDEX_ID_LS
Definition DNA_ID.h:1222
@ INDEX_ID_SCE
Definition DNA_ID.h:1258
@ INDEX_ID_GD_LEGACY
Definition DNA_ID.h:1199
@ INDEX_ID_LP
Definition DNA_ID.h:1244
@ INDEX_ID_AC
Definition DNA_ID.h:1193
@ INDEX_ID_CA
Definition DNA_ID.h:1242
@ INDEX_ID_AR
Definition DNA_ID.h:1233
@ INDEX_ID_PA
Definition DNA_ID.h:1227
@ INDEX_ID_KE
Definition DNA_ID.h:1230
@ ID_FLAG_INDIRECT_WEAK_LINK
Definition DNA_ID.h:693
@ ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE
Definition DNA_ID.h:698
@ ID_FLAG_CLIPBOARD_MARK
Definition DNA_ID.h:712
@ ID_FLAG_LIB_OVERRIDE_RESYNC_LEFTOVER
Definition DNA_ID.h:703
@ ID_FLAG_FAKEUSER
Definition DNA_ID.h:682
@ ID_FLAG_EMBEDDED_DATA
Definition DNA_ID.h:687
@ LIBOVERRIDE_OP_NOOP
Definition DNA_ID.h:218
@ LIBOVERRIDE_OP_ADD
Definition DNA_ID.h:223
@ LIBOVERRIDE_OP_SUBTRACT
Definition DNA_ID.h:225
@ LIBOVERRIDE_OP_REPLACE
Definition DNA_ID.h:220
@ LIBOVERRIDE_OP_MULTIPLY
Definition DNA_ID.h:227
@ LIBOVERRIDE_OP_INSERT_BEFORE
Definition DNA_ID.h:231
@ LIBOVERRIDE_OP_INSERT_AFTER
Definition DNA_ID.h:230
@ LIBOVERRIDE_FLAG_NO_HIERARCHY
Definition DNA_ID.h:348
@ LIBOVERRIDE_FLAG_SYSTEM_DEFINED
Definition DNA_ID.h:353
struct PreviewImageRuntimeHandle PreviewImageRuntimeHandle
Definition DNA_ID.h:32
@ LIBOVERRIDE_TAG_NEEDS_RESTORE
Definition DNA_ID.h:306
@ LIBOVERRIDE_TAG_RESYNC_ISOLATED_FROM_ROOT
Definition DNA_ID.h:312
@ LIBOVERRIDE_TAG_NEEDS_RELOAD
Definition DNA_ID.h:300
@ LIBOVERRIDE_TAG_NEED_RESYNC_ORIGINAL
Definition DNA_ID.h:318
ePreviewImage_Flag
Definition DNA_ID.h:540
@ PRV_RENDERING
Definition DNA_ID.h:545
@ PRV_CHANGED
Definition DNA_ID.h:541
@ PRV_USER_EDITED
Definition DNA_ID.h:543
Enumerations for DNA_ID.h.
ID_Type
@ ID_LI
These structs are the foundation for all linked lists in the library system.
#define offsetof(t, d)
#define unsigned
#define DNA_DEFINE_CXX_METHODS(class_name)
#define GS(a)
#define T
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
struct IDOverrideLibraryPropertyOperation * next
Definition DNA_ID.h:184
struct IDOverrideLibraryPropertyOperation * prev
Definition DNA_ID.h:184
struct IDOverrideLibraryProperty * prev
Definition DNA_ID.h:257
unsigned int rna_prop_type
Definition DNA_ID.h:278
struct IDOverrideLibraryProperty * next
Definition DNA_ID.h:257
struct GHash * rna_path_to_override_properties
Definition DNA_ID.h:293
char _pad_1[4]
Definition DNA_ID.h:339
ListBase properties
Definition DNA_ID.h:326
unsigned int flag
Definition DNA_ID.h:338
struct ID * hierarchy_root
Definition DNA_ID.h:334
struct ID * reference
Definition DNA_ID.h:324
IDOverrideLibraryRuntime * runtime
Definition DNA_ID.h:336
ListBase group
Definition DNA_ID.h:138
void * pointer
Definition DNA_ID.h:137
int8_t default_value
Definition DNA_ID.h:96
int8_t * default_array
Definition DNA_ID.h:92
IDPropertyUIData base
Definition DNA_ID.h:91
double * default_array
Definition DNA_ID.h:102
IDPropertyUIData base
Definition DNA_ID.h:101
IDPropertyUIData base
Definition DNA_ID.h:124
IDPropertyUIData base
Definition DNA_ID.h:74
IDPropertyUIDataEnumItem * enum_items
Definition DNA_ID.h:86
int * default_array
Definition DNA_ID.h:75
IDPropertyUIData base
Definition DNA_ID.h:118
char _pad[4]
Definition DNA_ID.h:55
char * description
Definition DNA_ID.h:51
short flag
Definition DNA_ID.h:153
int len
Definition DNA_ID.h:165
struct IDProperty * next
Definition DNA_ID.h:144
IDPropertyUIData * ui_data
Definition DNA_ID.h:173
char name[64]
Definition DNA_ID.h:154
IDPropertyData data
Definition DNA_ID.h:159
struct IDProperty * prev
Definition DNA_ID.h:144
char _pad0[4]
Definition DNA_ID.h:156
char subtype
Definition DNA_ID.h:151
int totallen
Definition DNA_ID.h:171
char type
Definition DNA_ID.h:146
int skipped_refcounted
Definition DNA_ID.h:378
int skipped_indirect
Definition DNA_ID.h:385
struct ID_Readfile_Data * readfile_data
Definition DNA_ID.h:401
struct Depsgraph * depsgraph
Definition DNA_ID.h:395
ID_Runtime_Remap remap
Definition DNA_ID.h:389
Definition DNA_ID.h:404
unsigned int recalc_after_undo_push
Definition DNA_ID.h:438
unsigned int recalc
Definition DNA_ID.h:427
void * py_instance
Definition DNA_ID.h:483
int tag
Definition DNA_ID.h:424
struct AssetMetaData * asset_data
Definition DNA_ID.h:413
struct Library * lib
Definition DNA_ID.h:410
IDProperty * system_properties
Definition DNA_ID.h:454
int us
Definition DNA_ID.h:425
int icon_id
Definition DNA_ID.h:426
struct ID * newid
Definition DNA_ID.h:408
void * prev
Definition DNA_ID.h:407
IDProperty * properties
Definition DNA_ID.h:446
IDOverrideLibrary * override_library
Definition DNA_ID.h:459
struct ID * orig_id
Definition DNA_ID.h:466
short flag
Definition DNA_ID.h:420
void * next
Definition DNA_ID.h:407
void * _pad1
Definition DNA_ID.h:456
char name[66]
Definition DNA_ID.h:415
unsigned int recalc_up_to_undo_push
Definition DNA_ID.h:437
unsigned int session_uid
Definition DNA_ID.h:444
struct LibraryWeakReference * library_weak_reference
Definition DNA_ID.h:491
struct ID_Runtime runtime
Definition DNA_ID.h:493
char library_filepath[1024]
Definition DNA_ID.h:531
char library_id_name[66]
Definition DNA_ID.h:534
struct PackedFile * packedfile
Definition DNA_ID.h:509
char filepath[1024]
Definition DNA_ID.h:507
ID id
Definition DNA_ID.h:505
LibraryRuntimeHandle * runtime
Definition DNA_ID.h:516
PreviewImageRuntimeHandle * runtime
Definition DNA_ID.h:571
unsigned int h[2]
Definition DNA_ID.h:566
short changed_timestamp[2]
Definition DNA_ID.h:568
short flag[2]
Definition DNA_ID.h:567
unsigned int * rect[2]
Definition DNA_ID.h:569
unsigned int w[2]
Definition DNA_ID.h:565