diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 2e6a5821d78..c4d4349cdf2 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -131,7 +131,6 @@ DepsgraphNodeBuilder::DepsgraphNodeBuilder(Main *bmain, scene_(nullptr), view_layer_(nullptr), view_layer_index_(-1), - collection_(nullptr), is_parent_collection_visible_(true) { } @@ -711,10 +710,8 @@ void DepsgraphNodeBuilder::build_collection(LayerCollection *from_layer_collecti return; } /* Backup state. */ - Collection *current_state_collection = collection_; const bool is_current_parent_collection_visible = is_parent_collection_visible_; /* Modify state as we've entered new collection/ */ - collection_ = collection; is_parent_collection_visible_ = is_collection_visible; /* Build collection objects. */ LISTBASE_FOREACH (CollectionObject *, cob, &collection->gobject) { @@ -725,7 +722,6 @@ void DepsgraphNodeBuilder::build_collection(LayerCollection *from_layer_collecti build_collection(nullptr, child->collection); } /* Restore state. */ - collection_ = current_state_collection; is_parent_collection_visible_ = is_current_parent_collection_visible; id_node->is_collection_fully_expanded = true; } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h index 11eadd74065..68ae1484a16 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h @@ -307,7 +307,6 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder { int view_layer_index_; /* NOTE: Collection are possibly built recursively, so be careful when * setting the current state. */ - Collection *collection_; /* Accumulated flag over the hierarchy of currently building collections. * Denotes whether all the hierarchy from parent of `collection_` to the * very root is visible (aka not restricted.). */