Cleanup: Remove unused collection pointer from depsgraph builder #108177

Merged
Sergey Sharybin merged 1 commits from Sergey/blender:cleanup-depsgraph into main 2023-05-23 12:35:29 +02:00
2 changed files with 0 additions and 5 deletions
Showing only changes of commit d62e1b9eff - Show all commits

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