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:
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_collections.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index b00f33ae37d..0a51b1a0d69 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -489,13 +489,12 @@ static int collection_toggle_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- ViewLayer *view_layer = CTX_data_view_layer(C);
int action = RNA_enum_get(op->ptr, "action");
LayerCollection *layer_collection = CTX_data_layer_collection(C);
if (layer_collection->flag & COLLECTION_DISABLED) {
if (ELEM(action, ACTION_TOGGLE, ACTION_ENABLE)) {
- BKE_collection_enable(view_layer, layer_collection);
+ layer_collection->flag &= ~COLLECTION_DISABLED;
}
else { /* ACTION_DISABLE */
BKE_reportf(op->reports, RPT_ERROR, "Layer collection %s already disabled",
@@ -505,7 +504,7 @@ static int collection_toggle_exec(bContext *C, wmOperator *op)
}
else {
if (ELEM(action, ACTION_TOGGLE, ACTION_DISABLE)) {
- BKE_collection_disable(view_layer, layer_collection);
+ layer_collection->flag |= COLLECTION_DISABLED;
}
else { /* ACTION_ENABLE */
BKE_reportf(op->reports, RPT_ERROR, "Layer collection %s already enabled",