diff options
author | Bastien Montagne <bastien@blender.org> | 2021-02-10 19:10:24 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-02-10 19:10:43 +0300 |
commit | f269fbd64a5a0cb7cab894284b37334888e72aaf (patch) | |
tree | d4cc9cf14ebe515d2216e71a1775e38cf0523f1c /source/blender/makesdna/DNA_ID.h | |
parent | b5536c97b756224324995fc2a766a38d53a31d11 (diff) |
LibOverride: Refactor: Switch more code to using Main.relations.
This potentially could fix some missed cases in dependency tagging (when
dealing with overrides hierarchies), since relying on tag in ID itself
is not a good idea to check whether an ID has been propcessed or not
(exterior code may have forced that tag on some IDs e.g., which would
prevent them from ever being processed properly).
Diffstat (limited to 'source/blender/makesdna/DNA_ID.h')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index d9c821d3ba7..00d0d4e3626 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -427,6 +427,10 @@ typedef struct PreviewImage { (ID_IS_LINKED(_id) && !ID_MISSING(_id) && (((const ID *)(_id))->tag & LIB_TAG_EXTERN) != 0 && \ (BKE_idtype_get_info_from_id((const ID *)(_id))->flags & IDTYPE_FLAGS_NO_LIBLINKING) == 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 + * currently. */ +/* TODO: add `_EDITABLE` versions of those macros (that would check if ID is linked or not)? */ #define ID_IS_OVERRIDE_LIBRARY_REAL(_id) \ (((const ID *)(_id))->override_library != NULL && \ ((const ID *)(_id))->override_library->reference != NULL) |