Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_layer.c
| Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | |||||
| # include "RNA_access.h" | # include "RNA_access.h" | ||||
| # include "BKE_idprop.h" | # include "BKE_idprop.h" | ||||
| # include "BKE_layer.h" | # include "BKE_layer.h" | ||||
| # include "BKE_mesh.h" | # include "BKE_mesh.h" | ||||
| # include "BKE_node.h" | # include "BKE_node.h" | ||||
| # include "BKE_scene.h" | # include "BKE_scene.h" | ||||
| # include "BLI_listbase.h" | |||||
| # include "DEG_depsgraph_build.h" | # include "DEG_depsgraph_build.h" | ||||
| # include "DEG_depsgraph_query.h" | # include "DEG_depsgraph_query.h" | ||||
| /***********************************/ | /***********************************/ | ||||
| static PointerRNA rna_ViewLayer_active_layer_collection_get(PointerRNA *ptr) | static PointerRNA rna_ViewLayer_active_layer_collection_get(PointerRNA *ptr) | ||||
| { | { | ||||
| ViewLayer *view_layer = (ViewLayer *)ptr->data; | ViewLayer *view_layer = (ViewLayer *)ptr->data; | ||||
| ▲ Show 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | |||||
| static void rna_LayerCollection_hide_viewport_set(PointerRNA *ptr, bool value) | static void rna_LayerCollection_hide_viewport_set(PointerRNA *ptr, bool value) | ||||
| { | { | ||||
| rna_LayerCollection_flag_set(ptr, value, LAYER_COLLECTION_HIDE); | rna_LayerCollection_flag_set(ptr, value, LAYER_COLLECTION_HIDE); | ||||
| } | } | ||||
| static void rna_LayerCollection_exclude_update_recursive(ListBase *lb, const bool exclude) | static void rna_LayerCollection_exclude_update_recursive(ListBase *lb, const bool exclude) | ||||
| { | { | ||||
| for (LayerCollection *lc = lb->first; lc; lc = lc->next) { | LISTBASE_FOREACH (LayerCollection *, lc, lb) { | ||||
| if (exclude) { | if (exclude) { | ||||
| lc->flag |= LAYER_COLLECTION_EXCLUDE; | lc->flag |= LAYER_COLLECTION_EXCLUDE; | ||||
| } | } | ||||
| else { | else { | ||||
| lc->flag &= ~LAYER_COLLECTION_EXCLUDE; | lc->flag &= ~LAYER_COLLECTION_EXCLUDE; | ||||
| } | } | ||||
| rna_LayerCollection_exclude_update_recursive(&lc->layer_collections, exclude); | rna_LayerCollection_exclude_update_recursive(&lc->layer_collections, exclude); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 301 Lines • Show Last 20 Lines | |||||