diff options
author | Bastien Montagne <bastien@blender.org> | 2022-01-07 14:07:37 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-01-07 14:09:50 +0300 |
commit | ed52de948ccddf297e010dbf79dfadfcd164dae9 (patch) | |
tree | de4bf8c704dc42f5a25e801516dec7dc2020bfe7 /source/blender/blenkernel/intern | |
parent | 2cc6b249c382981cee15d69db8440e2ba3dd6453 (diff) |
LibOverride: Add tag to libraries that had to be recursively resynced.
Request from studio, to help identify quickly libs that need update.
NOTE: Currently only outputing INFO log in console, display of this info
in the outliner will come in a separate commit.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/lib_override.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 011b7a4924d..6fe57a0257c 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -1733,6 +1733,10 @@ static void lib_override_library_main_resync_on_library_indirect_level( continue; } + if (ID_IS_LINKED(id)) { + id->lib->tag |= LIBRARY_TAG_RESYNC_REQUIRED; + } + /* We cannot resync a scene that is currently active. */ if (id == &scene->id) { id->tag &= ~LIB_TAG_LIB_OVERRIDE_NEED_RESYNC; @@ -1889,6 +1893,16 @@ void BKE_lib_override_library_main_resync(Main *bmain, if (BKE_collection_is_empty(override_resync_residual_storage)) { BKE_collection_delete(bmain, override_resync_residual_storage, true); } + + LISTBASE_FOREACH (Library *, library, &bmain->libraries) { + if (library->tag & LIBRARY_TAG_RESYNC_REQUIRED) { + CLOG_INFO(&LOG, + 2, + "library '%s' contains some linked overrides that required recursive resync, " + "consider updating it", + library->filepath); + } + } } void BKE_lib_override_library_delete(Main *bmain, ID *id_root) |