diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_layer.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_layer.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c index 46a32256114..b99457056fe 100644 --- a/source/blender/makesrna/intern/rna_layer.c +++ b/source/blender/makesrna/intern/rna_layer.c @@ -299,19 +299,6 @@ static void rna_LayerCollection_hide_viewport_set(PointerRNA *ptr, bool value) rna_LayerCollection_flag_set(ptr, value, LAYER_COLLECTION_HIDE); } -static void rna_LayerCollection_exclude_update_recursive(ListBase *lb, const bool exclude) -{ - LISTBASE_FOREACH (LayerCollection *, lc, lb) { - if (exclude) { - lc->flag |= LAYER_COLLECTION_EXCLUDE; - } - else { - lc->flag &= ~LAYER_COLLECTION_EXCLUDE; - } - rna_LayerCollection_exclude_update_recursive(&lc->layer_collections, exclude); - } -} - static void rna_LayerCollection_exclude_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->owner_id; @@ -320,7 +307,7 @@ static void rna_LayerCollection_exclude_update(Main *bmain, Scene *UNUSED(scene) /* Set/Unset it recursively to match the behavior of excluding via the menu or shortcuts. */ const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0; - rna_LayerCollection_exclude_update_recursive(&lc->layer_collections, exclude); + BKE_layer_collection_set_flag(lc, LAYER_COLLECTION_EXCLUDE, exclude); BKE_layer_collection_sync(scene, view_layer); |