From fcffbe1d1b31ed518b7a710c09d5fda389d8182e Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 15 Mar 2019 15:35:17 -0300 Subject: Fix T62320: Outliner collection disable not propagating to other view layers The moment you switched to another view layer the visibility was still outdated. --- source/blender/editors/space_outliner/outliner_draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 044ab8f1b7b..929c179a62f 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -355,6 +355,7 @@ static int layer_collection_pushed_state_cb(bContext *UNUSED(C), void *poin) static void hidebutton_layer_collection_flag_cb(bContext *C, void *poin, void *poin2) { + Main *bmain = CTX_data_main(C); wmWindow *win = CTX_wm_window(C); Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = poin; @@ -384,7 +385,8 @@ static void hidebutton_layer_collection_flag_cb(bContext *C, void *poin, void *p DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS); if (depsgraph_changed) { - DEG_relations_tag_update(CTX_data_main(C)); + BKE_main_collection_sync_remap(bmain); + DEG_relations_tag_update(bmain); } WM_main_add_notifier(NC_SCENE | ND_LAYER_CONTENT, NULL); } -- cgit v1.2.3