Blender  V2.93
pipeline_all_objects.cc
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2020 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #include "pipeline_all_objects.h"
21 
24 #include "intern/depsgraph.h"
25 
26 #include "DNA_layer_types.h"
27 
28 namespace blender::deg {
29 
30 namespace {
31 
32 class AllObjectsNodeBuilder : public DepsgraphNodeBuilder {
33  public:
34  AllObjectsNodeBuilder(Main *bmain, Depsgraph *graph, DepsgraphBuilderCache *cache)
35  : DepsgraphNodeBuilder(bmain, graph, cache)
36  {
37  }
38 
39  bool need_pull_base_into_graph(Base * /*base*/) override
40  {
41  return true;
42  }
43 };
44 
45 class AllObjectsRelationBuilder : public DepsgraphRelationBuilder {
46  public:
47  AllObjectsRelationBuilder(Main *bmain, Depsgraph *graph, DepsgraphBuilderCache *cache)
48  : DepsgraphRelationBuilder(bmain, graph, cache)
49  {
50  }
51 
52  bool need_pull_base_into_graph(Base * /*base*/) override
53  {
54  return true;
55  }
56 };
57 
58 } // namespace
59 
62 {
63 }
64 
65 unique_ptr<DepsgraphNodeBuilder> AllObjectsBuilderPipeline::construct_node_builder()
66 {
67  return std::make_unique<AllObjectsNodeBuilder>(bmain_, deg_graph_, &builder_cache_);
68 }
69 
70 unique_ptr<DepsgraphRelationBuilder> AllObjectsBuilderPipeline::construct_relation_builder()
71 {
72  return std::make_unique<AllObjectsRelationBuilder>(bmain_, deg_graph_, &builder_cache_);
73 }
74 
75 } // namespace blender::deg
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
virtual unique_ptr< DepsgraphNodeBuilder > construct_node_builder() override
virtual unique_ptr< DepsgraphRelationBuilder > construct_relation_builder() override
Depsgraph * graph
Definition: BKE_main.h:116