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>2020-12-24 20:11:46 +0300
committerBastien Montagne <bastien@blender.org>2021-01-25 16:48:51 +0300
commit2a81d948ad00c5099ecdbdf2505c8732c99a1fba (patch)
treeeb48ff9dc8f1b0d8ef44f06d18d962af417762f1 /source/blender/makesdna/DNA_ID.h
parent5c490bcbc82b43487f2e08978b69f1900e8bfce5 (diff)
LibOverride: refactor of relationships handling in library overrides.
First step towards a better handling of relationships between IDs in override context, especially when a resync is needed. First, introduce a new flag to override operations, `IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE`, for ID pointers. It keeps track of whether an RNA ID pointer has been kept to its 'natural overriden ID' (in override hierarchy context), or has actually been re-assigned to some other data-block. Second, refactor how we deal with relationships between IDs in override hierarchy code, especially in resync case. This will fixe several cases listed in T83811, especially the case where an ID pointer to an existing override needs to be updated to a new one due to a matching change in linked data.
Diffstat (limited to 'source/blender/makesdna/DNA_ID.h')
-rw-r--r--source/blender/makesdna/DNA_ID.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 89c7ba0cca7..2c7e82e6587 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -193,6 +193,10 @@ enum {
IDOVERRIDE_LIBRARY_FLAG_MANDATORY = 1 << 0,
/** User cannot change that override operation. */
IDOVERRIDE_LIBRARY_FLAG_LOCKED = 1 << 1,
+
+ /** For overrides of ID pointers: this override still matches (follows) the hierarchy of the
+ * reference linked data. */
+ IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE = 1 << 8,
};
/** A single overridden property, contain all operations on this one. */