[Bf-blender-cvs] [c4e2d23702d] soc-2020-outliner: Outliner: Activate collections with selection
Nathan Craddock
noreply at git.blender.org
Thu Jul 9 05:31:02 CEST 2020
Commit: c4e2d23702de160f886105835abfccac9457b4d3
Author: Nathan Craddock
Date: Wed Jul 8 21:09:11 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rBc4e2d23702de160f886105835abfccac9457b4d3
Outliner: Activate collections with selection
Restore original behavior.
===================================================================
M source/blender/editors/space_outliner/outliner_select.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index a6bdf3ac487..26688faf80d 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1007,6 +1007,12 @@ static eOLDrawState tree_element_active_master_collection(bContext *C,
return OL_DRAWSEL_NORMAL;
}
}
+ else {
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ LayerCollection *layer_collection = view_layer->layer_collections.first;
+ BKE_layer_collection_activate(view_layer, layer_collection);
+ WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL);
+ }
return OL_DRAWSEL_NONE;
}
@@ -1022,6 +1028,13 @@ static eOLDrawState tree_element_active_layer_collection(bContext *C,
return OL_DRAWSEL_NORMAL;
}
}
+ else {
+ Scene *scene = CTX_data_scene(C);
+ LayerCollection *layer_collection = te->directdata;
+ ViewLayer *view_layer = BKE_view_layer_find_from_collection(scene, layer_collection);
+ BKE_layer_collection_activate(view_layer, layer_collection);
+ WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL);
+ }
return OL_DRAWSEL_NONE;
}
More information about the Bf-blender-cvs
mailing list