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-12 17:03:46 +0300
committerBastien Montagne <bastien@blender.org>2021-07-26 18:36:46 +0300
commitabf3ce811f6e33213a51941b477668750d45c5b4 (patch)
treefb7d706710472120312d5d4e2e5cf6062f588541 /source/blender/blenkernel/BKE_layer.h
parentcee67f3be2b3af987a34bb48f909ffad51c4eb0f (diff)
LayerCollections: Add a way to prevent their resync with Collection hierarchy.
This is an easy & safe, yet not-so-nice way to address the LayerCollections vs. Collections hierarchy resync problem. Currently this resync is enforced everytime something changes in the Collections hierarchy, which is extremely inneficient, and can even produce 'loss' of LayerCollection data during complex Collection processes. Current example is during Library Overrides resync process. New code: * Makes resync significantly faster (between 10 and 15%). * Fixes 'disappearing' layer collections settings on sub-collections' layers. NOTE: This is not a proper fix for the underlying issue. However, implementing and testing the 'lazy update' solution as proposed by {T73411} requires a significant amount of time (especially in testing and tracking all places where code would need to ensure LayerCollections are up-to-date), which is not possible currently. Differential Revision: https://developer.blender.org/D11889
Diffstat (limited to 'source/blender/blenkernel/BKE_layer.h')
-rw-r--r--source/blender/blenkernel/BKE_layer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h
index 404f344919c..c8af1a91725 100644
--- a/source/blender/blenkernel/BKE_layer.h
+++ b/source/blender/blenkernel/BKE_layer.h
@@ -98,6 +98,9 @@ struct LayerCollection *BKE_layer_collection_from_index(struct ViewLayer *view_l
const int index);
int BKE_layer_collection_findindex(struct ViewLayer *view_layer, const struct LayerCollection *lc);
+void BKE_layer_collection_resync_forbid(void);
+void BKE_layer_collection_resync_allow(void);
+
void BKE_main_collection_sync(const struct Main *bmain);
void BKE_scene_collection_sync(const struct Scene *scene);
void BKE_layer_collection_sync(const struct Scene *scene, struct ViewLayer *view_layer);