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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-08 16:29:58 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-18 18:10:22 +0300
commit8fe556a337792b7d3bba6e2c3a03820d65d8a2b9 (patch)
tree004a8c1ece6fa1cdb4fe07328634a5f07f297f5f /source/blender/depsgraph/intern/depsgraph.cc
parenta41fe949d8c346b246bdd1bff4ae50aee19ca859 (diff)
Depsgraph: Introduce flat list of ID nodes
The idea is to allow iterating over ID nodes in exact order of their construction, and in order which will not change dependent on memory pointers or anything.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 30ab21b1d8c..2ab6320f14f 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -282,6 +282,7 @@ IDDepsNode *Depsgraph::add_id_node(ID *id, const char *name)
id->tag |= LIB_TAG_DOIT;
/* register */
BLI_ghash_insert(id_hash, id, id_node);
+ id_nodes.push_back(id_node);
}
return id_node;
}
@@ -289,6 +290,7 @@ IDDepsNode *Depsgraph::add_id_node(ID *id, const char *name)
void Depsgraph::clear_id_nodes()
{
BLI_ghash_clear(id_hash, NULL, id_node_deleter);
+ id_nodes.clear();
}
/* Add new relationship between two nodes. */
@@ -410,7 +412,6 @@ void Depsgraph::add_entry_tag(OperationDepsNode *node)
void Depsgraph::clear_all_nodes()
{
clear_id_nodes();
- BLI_ghash_clear(id_hash, NULL, NULL);
if (time_source != NULL) {
OBJECT_GUARDED_DELETE(time_source, TimeSourceDepsNode);
time_source = NULL;