Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_collections.c
| Show First 20 Lines • Show All 906 Lines • ▼ Show 20 Lines | static int collection_view_layer_exec(bContext *C, wmOperator *op) | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| ViewLayer *view_layer = CTX_data_view_layer(C); | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); | SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); | ||||
| struct CollectionEditData data = { | struct CollectionEditData data = { | ||||
| .scene = scene, | .scene = scene, | ||||
| .space_outliner = space_outliner, | .space_outliner = space_outliner, | ||||
| }; | }; | ||||
| bool clear = strstr(op->idname, "clear") != NULL; | bool clear = strstr(op->idname, "clear") != NULL; | ||||
| int flag = strstr(op->idname, "holdout") ? | int flag = strstr(op->idname, "holdout") ? LAYER_COLLECTION_HOLDOUT : | ||||
| LAYER_COLLECTION_HOLDOUT : | |||||
| strstr(op->idname, "indirect_only") ? LAYER_COLLECTION_INDIRECT_ONLY : | strstr(op->idname, "indirect_only") ? LAYER_COLLECTION_INDIRECT_ONLY : | ||||
| LAYER_COLLECTION_EXCLUDE; | LAYER_COLLECTION_EXCLUDE; | ||||
| data.collections_to_edit = BLI_gset_ptr_new(__func__); | data.collections_to_edit = BLI_gset_ptr_new(__func__); | ||||
| outliner_tree_traverse(space_outliner, | outliner_tree_traverse(space_outliner, | ||||
| &space_outliner->tree, | &space_outliner->tree, | ||||
| 0, | 0, | ||||
| TSE_SELECTED, | TSE_SELECTED, | ||||
| layer_collection_find_data_to_edit, | layer_collection_find_data_to_edit, | ||||
| ▲ Show 20 Lines • Show All 699 Lines • Show Last 20 Lines | |||||