From e92a7800b57620df0a5d7619aead572667f27994 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 8 Apr 2021 11:27:05 +0200 Subject: LibOverride: Fix several issues with resync code. This commit essentially touches to post-processing of collections and objects after resync itself has been done, to ensure their proper instantiation in the scene: - Remove a lot of the process in resync case (resynced data are assumed to be already instantiated in the scene, unlike override creation case). - For auto-resync, only do post-processing once after all overrides have been resynced (doing it after each individual resynced was causing a lot of instantiation glitches, with a lot of unwanted extra objects and collections being added to the master collection). It also deals in a much more reliable way with detection of objects missing from the scene, by using the new `BKE_scene_objects_as_gset` utils. As a bonus this makes auto-resync process slightly faster (only by a few percents, but that's always good to get). --- source/blender/editors/space_outliner/outliner_tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_outliner') diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 66eb6ab15dc..4159074df9c 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -925,7 +925,7 @@ static void id_override_library_resync_fn(bContext *C, } BKE_lib_override_library_resync( - bmain, scene, CTX_data_view_layer(C), id_root, NULL, do_hierarchy_enforce); + bmain, scene, CTX_data_view_layer(C), id_root, NULL, do_hierarchy_enforce, true); WM_event_add_notifier(C, NC_WINDOW, NULL); } -- cgit v1.2.3