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>2021-07-28 13:24:07 +0300
committerBastien Montagne <bastien@blender.org>2021-07-28 13:33:16 +0300
commit544ddcdaac20bab7707a49edbd31b8ae38446603 (patch)
treeb7e62ada006392f0507be854e9946266bfcaad73 /source/blender/blenkernel/intern/layer.c
parent91dd1a1ba398e81d5a9737969f5e8f64bba8eff5 (diff)
Fix (studio-reported) liboverride resync crash after recent changes.
Recent own rBabf3ce811f6e prevented any LayerCollection update during the whole liboverride resync process, for both performances and feature reasons. However that means that the various runtime caches like the Base GHash are not cleared anymore during ID remapping process, so we need to call `BKE_main_collection_sync_remap` instead of `BKE_main_collection_sync` when we finally are ready for this update. Reported by @eyecandy (Andy Goralczyk) from Blender studio, thanks!
Diffstat (limited to 'source/blender/blenkernel/intern/layer.c')
-rw-r--r--source/blender/blenkernel/intern/layer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 61b031396dd..23ea306c1a8 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -748,6 +748,11 @@ int BKE_layer_collection_findindex(ViewLayer *view_layer, const LayerCollection
*
* WARNING: This is not threadsafe at all, only use from main thread.
*
+ * NOTE: It is probably needed to use #BKE_main_collection_sync_remap instead
+ * of just #BKE_main_collection_sync after disabling LayerCollection resync,
+ * unless it is absolutely certain that no ID remapping (or any other process
+ * that may invalidate the caches) will happen while it is disabled.
+ *
* NOTE: This is a quick and safe band-aid around the long-known issue
* regarding this resync process.
* Proper fix would be to make resync itself lazy, i.e. only happen