[Bf-blender-cvs] [8dcddbcc077] master: Fix T91711: Blender 3.0 - The Rain demo scene breaks (Proxy to Override auto conversion).

Bastien Montagne noreply at git.blender.org
Mon Sep 27 11:11:49 CEST 2021


Commit: 8dcddbcc0778b6ac737e63ba7751a4441876e03c
Author: Bastien Montagne
Date:   Mon Sep 27 11:09:48 2021 +0200
Branches: master
https://developer.blender.org/rB8dcddbcc0778b6ac737e63ba7751a4441876e03c

Fix T91711: Blender 3.0 - The Rain demo scene breaks (Proxy to Override auto conversion).

Proxy conversion is a fairly particular case of liboverride creation, in
which remapping all local usages of linked data probably makes more
sense, rather than only doing so whitin the overridden 'group' of IDs.

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

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 f382fc0614b..e6ce6734e64 100644
--- a/source/blender/blenkernel/intern/lib_override.c
+++ b/source/blender/blenkernel/intern/lib_override.c
@@ -1000,6 +1000,18 @@ bool BKE_lib_override_library_proxy_convert(Main *bmain,
 
   DEG_id_tag_update(&ob_proxy->id, ID_RECALC_COPY_ON_WRITE);
 
+  /* In case of proxy conversion, remap all local ID usages to linked IDs to their newly created
+   * overrides.
+   * While this might not be 100% the desired behavior, it is likely to be the case most of the
+   * time. Ref: T91711. */
+  ID *id_iter;
+  FOREACH_MAIN_ID_BEGIN (bmain, id_iter) {
+    if (!ID_IS_LINKED(id_iter)) {
+      id_iter->tag |= LIB_TAG_DOIT;
+    }
+  }
+  FOREACH_MAIN_ID_END;
+
   return BKE_lib_override_library_create(bmain, scene, view_layer, id_root, id_reference, NULL);
 }



More information about the Bf-blender-cvs mailing list