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-28 12:22:25 +0300
committerBastien Montagne <bastien@blender.org>2022-01-28 12:24:07 +0300
commit78647fbcc01cc53a8aa2e812cb6599b2bb1039de (patch)
tree83d7be8a03396e206150843f617c44c10c77d0ed /source/blender/makesdna
parente1be275878b949b4e09ef6f3a1f44379a4359a5c (diff)
Fix T95060: Outliner: Broken 'make override hierarchy' in indirect linked casae.
In Outliner, 'Make Override Hierarchy' on an indirectly linked data would fail in case some items higher up in the hierarchy also needed to be overridden was also indirectly linked.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 060b55ffe5c..fad24f4326c 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -534,12 +534,14 @@ typedef struct PreviewImage {
#define ID_IS_LINKED(_id) (((const ID *)(_id))->lib != NULL)
-/* Note that this is a fairly high-level check, should be used at user interaction level, not in
+/* Note that these are fairly high-level checks, should be used at user interaction level, not in
* BKE_library_override typically (especially due to the check on LIB_TAG_EXTERN). */
-#define ID_IS_OVERRIDABLE_LIBRARY(_id) \
- (ID_IS_LINKED(_id) && !ID_MISSING(_id) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0 && \
+#define ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(_id) \
+ (ID_IS_LINKED(_id) && !ID_MISSING(_id) && \
(BKE_idtype_get_info_from_id((const ID *)(_id))->flags & IDTYPE_FLAGS_NO_LIBLINKING) == 0 && \
!ELEM(GS(((ID *)(_id))->name), ID_SCE))
+#define ID_IS_OVERRIDABLE_LIBRARY(_id) \
+ (ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY((_id)) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0)
/* NOTE: The three checks below do not take into account whether given ID is linked or not (when
* chaining overrides over several libraries). User must ensure the ID is not linked itself