[Bf-blender-cvs] [a8e7c8d59b3] blender-v2.93-release: LibOverride: Fix infinite resync loop in some invalid file cases.

Bastien Montagne noreply at git.blender.org
Fri Apr 30 18:49:14 CEST 2021


Commit: a8e7c8d59b32f0e3792ad48dda8193ad7c0ca30c
Author: Bastien Montagne
Date:   Fri Apr 30 16:49:59 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rBa8e7c8d59b32f0e3792ad48dda8193ad7c0ca30c

LibOverride: Fix infinite resync loop in some invalid file cases.

Multi-overrides of a same linked ID in a same override hierarchy are
currently not supported and can cause all kind of issues.

In some cases they could lead to infinite loop trying to resync the same
ID over and over, this is now prevented.

Found in some Blender studio production files.

===================================================================

M	source/blender/blenkernel/intern/lib_override.c

===================================================================

diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c
index 40b7681614d..45ba2526da2 100644
--- a/source/blender/blenkernel/intern/lib_override.c
+++ b/source/blender/blenkernel/intern/lib_override.c
@@ -1224,6 +1224,13 @@ void BKE_lib_override_library_main_resync(Main *bmain, Scene *scene, ViewLayer *
         }
         do_continue = true;
 
+        /* In complex non-supported cases, with several different override hierarchies sharing
+         * relations between each-other, we may end up not actually updating/replacing the given
+         * root id (see e.g. pro/shots/110_rextoria/110_0150_A/110_0150_A.anim.blend of sprites
+         * project repository, r2687).
+         * This can lead to infinite loop here, at least avoid this. */
+        id->tag &= ~LIB_TAG_LIB_OVERRIDE_NEED_RESYNC;
+
         CLOG_INFO(&LOG, 2, "Resyncing %s...", id->name);
         const bool success = BKE_lib_override_library_resync(
             bmain, scene, view_layer, id, override_resync_residual_storage, false, false);



More information about the Bf-blender-cvs mailing list