diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-06-13 15:12:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-06-13 15:13:55 +0300 |
commit | 90bc882068465865883da55e5c82fa99e0f8d66b (patch) | |
tree | 8b7fbd09ef482b663562ed7dfc50911b3701eb78 /source/blender/depsgraph/intern/builder | |
parent | 6cfa3ecd4d9848f27a0b1fe121e3ca2c29042e32 (diff) |
Depsgraph: Remove root node concept
Was rather weird and only used for time source. It is simpler to make depsgraph
to keep track of time source directly.
No need to introduce extra entitites without actual need.
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
5 files changed, 2 insertions, 33 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 99d8834da1b..ff5cba89741 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -160,11 +160,6 @@ DepsgraphNodeBuilder::~DepsgraphNodeBuilder() { } -RootDepsNode *DepsgraphNodeBuilder::add_root_node() -{ - return m_graph->add_root_node(); -} - IDDepsNode *DepsgraphNodeBuilder::add_id_node(ID *id) { return m_graph->add_id_node(id, id->name); @@ -172,12 +167,7 @@ IDDepsNode *DepsgraphNodeBuilder::add_id_node(ID *id) TimeSourceDepsNode *DepsgraphNodeBuilder::add_time_source() { - /* root-node */ - RootDepsNode *root_node = m_graph->root_node; - if (root_node != NULL) { - return root_node->add_time_source("Time Source"); - } - return NULL; + return m_graph->add_time_source(); } ComponentDepsNode *DepsgraphNodeBuilder::add_component_node( diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h index ba8a5d01cb0..6bc1c1dead4 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h @@ -61,7 +61,6 @@ namespace DEG { struct Depsgraph; struct DepsNode; -struct RootDepsNode; struct IDDepsNode; struct TimeSourceDepsNode; struct ComponentDepsNode; @@ -73,7 +72,6 @@ struct DepsgraphNodeBuilder { void begin_build(Main *bmain); - RootDepsNode *add_root_node(); IDDepsNode *add_id_node(ID *id); TimeSourceDepsNode *add_time_source(); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 348501b107b..dbe8a5f1984 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -198,13 +198,6 @@ DepsgraphRelationBuilder::DepsgraphRelationBuilder(Depsgraph *graph) : { } -RootDepsNode *DepsgraphRelationBuilder::find_node(const RootKey &key) const -{ - (void)key; - BLI_assert(!"Doesn't seem to be correct"); - return m_graph->root_node; -} - TimeSourceDepsNode *DepsgraphRelationBuilder::find_node( const TimeSourceKey &key) const { @@ -213,7 +206,7 @@ TimeSourceDepsNode *DepsgraphRelationBuilder::find_node( return NULL; } else { - return m_graph->root_node->time_source; + return m_graph->time_source; } } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index c5a73ba2d98..02f8fc69070 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -84,10 +84,6 @@ struct ComponentDepsNode; struct OperationDepsNode; struct RootPChanMap; -struct RootKey { - RootKey(); -}; - struct TimeSourceKey { TimeSourceKey(); @@ -236,7 +232,6 @@ struct DepsgraphRelationBuilder Depsgraph *getGraph(); protected: - RootDepsNode *find_node(const RootKey &key) const; TimeSourceDepsNode *find_node(const TimeSourceKey &key) const; ComponentDepsNode *find_node(const ComponentKey &key) const; OperationDepsNode *find_node(const OperationKey &key) const; diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc index 478756e0cff..9d6ab3358a7 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc @@ -35,13 +35,6 @@ namespace DEG { ///////////////////////////////////////// -// Root. - -RootKey::RootKey() -{ -} - -///////////////////////////////////////// // Time source. TimeSourceKey::TimeSourceKey() |