[Bf-blender-cvs] [fcffbe1d1b3] master: Fix T62320: Outliner collection disable not propagating to other view layers

Dalai Felinto noreply at git.blender.org
Fri Mar 15 19:36:52 CET 2019


Commit: fcffbe1d1b31ed518b7a710c09d5fda389d8182e
Author: Dalai Felinto
Date:   Fri Mar 15 15:35:17 2019 -0300
Branches: master
https://developer.blender.org/rBfcffbe1d1b31ed518b7a710c09d5fda389d8182e

Fix T62320: Outliner collection disable not propagating to other view layers

The moment you switched to another view layer the visibility was still
outdated.

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

M	source/blender/editors/space_outliner/outliner_draw.c

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

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);
 }



More information about the Bf-blender-cvs mailing list