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/blenkernel/intern/layer.c')
-rw-r--r--source/blender/blenkernel/intern/layer.c42
1 files changed, 17 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 0eaf7cf2f41..f03bf60817f 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -694,14 +694,14 @@ int BKE_layer_collection_findindex(ViewLayer *view_layer, const LayerCollection
* in at least one layer collection. That list is also synchronized here, and
* stores state like selection. */
-static short layer_collection_sync(ViewLayer *view_layer,
- const ListBase *lb_scene,
- ListBase *lb_layer,
- ListBase *new_object_bases,
- short parent_exclude,
- short parent_restrict,
- short parent_layer_restrict,
- unsigned short parent_local_collections_bits)
+static void layer_collection_sync(ViewLayer *view_layer,
+ const ListBase *lb_scene,
+ ListBase *lb_layer,
+ ListBase *new_object_bases,
+ short parent_exclude,
+ short parent_restrict,
+ short parent_layer_restrict,
+ unsigned short parent_local_collections_bits)
{
/* TODO: support recovery after removal of intermediate collections, reordering, ..
* For local edits we can make editing operating do the appropriate thing, but for
@@ -732,7 +732,6 @@ static short layer_collection_sync(ViewLayer *view_layer,
/* Add layer collections for any new scene collections, and ensure order is the same. */
ListBase new_lb_layer = {NULL, NULL};
- short runtime_flag = 0;
LISTBASE_FOREACH (const CollectionChild *, child, lb_scene) {
Collection *collection = child->collection;
@@ -763,23 +762,20 @@ static short layer_collection_sync(ViewLayer *view_layer,
}
/* Sync child collections. */
- short child_runtime_flag = layer_collection_sync(view_layer,
- &collection->children,
- &lc->layer_collections,
- new_object_bases,
- lc->flag,
- child_restrict,
- child_layer_restrict,
- local_collections_bits);
+ layer_collection_sync(view_layer,
+ &collection->children,
+ &lc->layer_collections,
+ new_object_bases,
+ lc->flag,
+ child_restrict,
+ child_layer_restrict,
+ local_collections_bits);
/* Layer collection exclude is not inherited. */
+ lc->runtime_flag = 0;
if (lc->flag & LAYER_COLLECTION_EXCLUDE) {
- lc->runtime_flag = 0;
continue;
}
- else {
- lc->runtime_flag = child_runtime_flag;
- }
/* We separate restrict viewport and visible view layer because a layer collection can be
* hidden in the view layer yet (locally) visible in a viewport (if it is not restricted).*/
@@ -846,15 +842,11 @@ static short layer_collection_sync(ViewLayer *view_layer,
lc->runtime_flag |= LAYER_COLLECTION_HAS_OBJECTS;
}
-
- runtime_flag |= lc->runtime_flag;
}
/* Replace layer collection list with new one. */
*lb_layer = new_lb_layer;
BLI_assert(BLI_listbase_count(lb_scene) == BLI_listbase_count(lb_layer));
-
- return runtime_flag;
}
/**