Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2022-01-12 12:43:42 +0300
committerBastien Montagne <bastien@blender.org>2022-02-08 12:50:39 +0300
commit32278b79a8de225a0edefa3d07693a098611a412 (patch)
tree2e8d0512a301aba00b592ccbcb97e24b709675d7 /source/blender/makesdna
parent0617efd51b0ae3fa387ee0366a453040d899f318 (diff)
LibOverride: Add 'hierarchy root ID' info.
This change will make handling of liboverrides hierarchies (especially resyncing) much easier and efficient. It should also make it more resilient to 'degenerate' cases, and allow proper support of things like parenting an override to another override of the same linked data (e.g. a override character parented to another override of the same character). NOTE: this commit only implements minimal changes to add that data and generate it for existing files on load. Actual refactor of resync code to take advantage of this new info will happen separately.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 4f479abe2b0..cfee35e147a 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -310,6 +310,13 @@ typedef struct IDOverrideLibrary {
/** List of IDOverrideLibraryProperty structs. */
ListBase properties;
+ /** Override hierarchy root ID. Usually the actual root of the hierarchy, but not always
+ * in degenerated cases.
+ *
+ * All liboverrides of a same hierarchy (e.g. a character collection) share the same root.
+ */
+ struct ID *hierarchy_root;
+
/* Read/write data. */
/* Temp ID storing extra override data (used for differential operations only currently).
* Always NULL outside of read/write context. */
@@ -317,8 +324,6 @@ typedef struct IDOverrideLibrary {
IDOverrideLibraryRuntime *runtime;
- void *_pad_0;
-
unsigned int flag;
char _pad_1[4];
} IDOverrideLibrary;