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>2021-05-05 13:31:38 +0300
committerBastien Montagne <bastien@blender.org>2021-05-05 13:51:59 +0300
commitb616c522d9b395d3b14059c276e4b4ab4cb82c63 (patch)
treed445622caa98dd7bfbf8d8a07fcbfb031760f054 /source/blender/blenkernel/BKE_lib_query.h
parentf7a14b2ac065aa7633e58a0593ddaaf791742cc1 (diff)
LibOverride/LibQuery: Refactor 'non-overridable' status management.
Move the detection/decision of whether an ID pointer should be taken into account in library override hierarchy processing to the LibQuery area of code, by introducing a new callback flag. This allows to factorize the test logic, be explicit in liboverride code about ID relationships that can be ignored when exploring the override hierarchy, and adds the possibility to do more checks about pointers to be tagged as non-overridable in the future. Note that all but the 'special' ID pointers (loop-back, embedded, etc.) should be overridable. If some is not, relevant IDType 'foreach_id' callback code is reponsible to tag it properly. Python-defined IDProperties however are not systematicaly overridable (yet), so this should allow us to detect that case and act accordingly in an incomming commit. No behavioral change expected in this commit.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_query.h')
-rw-r--r--source/blender/blenkernel/BKE_lib_query.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_lib_query.h b/source/blender/blenkernel/BKE_lib_query.h
index 4e781aea9d3..9c49514e7b8 100644
--- a/source/blender/blenkernel/BKE_lib_query.h
+++ b/source/blender/blenkernel/BKE_lib_query.h
@@ -70,12 +70,15 @@ enum {
/** That ID is used as library override's reference by its owner. */
IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE = (1 << 5),
+ /** That ID pointer is not overridable. */
+ IDWALK_CB_OVERRIDE_LIBRARY_NOT_OVERRIDABLE = (1 << 6),
+
/**
* Indicates that this is an internal runtime ID pointer, like e.g. `ID.newid` or `ID.original`.
* \note Those should be ignored in most cases, and won't be processed/generated anyway unless
* `IDWALK_DO_INTERNAL_RUNTIME_POINTERS` option is enabled.
*/
- IDWALK_CB_INTERNAL = (1 << 6),
+ IDWALK_CB_INTERNAL = (1 << 7),
/**
* This ID usage is fully refcounted.