Cleanup: Remove unused collection pointer from depsgraph builder

Pull Request: https://projects.blender.org/blender/blender/pulls/108177
This commit is contained in:
Sergey Sharybin
2023-05-23 12:35:23 +02:00
committed by Sergey Sharybin
parent a9beb62449
commit e54a20b2a2
2 changed files with 0 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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.). */