Blender  V3.3
source/blender/depsgraph/intern/builder/pipeline.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "deg_builder_cache.h"
11 
12 #include "intern/depsgraph_type.h"
13 
14 struct Depsgraph;
15 struct Main;
16 struct Scene;
17 struct ViewLayer;
18 
19 namespace blender::deg {
20 
21 struct Depsgraph;
22 class DepsgraphNodeBuilder;
23 class DepsgraphRelationBuilder;
24 
25 /* Base class for Depsgraph Builder pipelines.
26  *
27  * Basically it runs through the following steps:
28  * - sanity check
29  * - build nodes
30  * - build relations
31  * - finalize
32  */
34  public:
36  virtual ~AbstractBuilderPipeline() = default;
37 
38  void build();
39 
40  protected:
46 
47  virtual unique_ptr<DepsgraphNodeBuilder> construct_node_builder();
48  virtual unique_ptr<DepsgraphRelationBuilder> construct_relation_builder();
49 
50  virtual void build_step_sanity_check();
51  void build_step_nodes();
52  void build_step_relations();
53  void build_step_finalize();
54 
55  virtual void build_nodes(DepsgraphNodeBuilder &node_builder) = 0;
56  virtual void build_relations(DepsgraphRelationBuilder &relation_builder) = 0;
57 };
58 
59 } // namespace blender::deg
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
virtual unique_ptr< DepsgraphRelationBuilder > construct_relation_builder()
virtual unique_ptr< DepsgraphNodeBuilder > construct_node_builder()
virtual void build_nodes(DepsgraphNodeBuilder &node_builder)=0
virtual ~AbstractBuilderPipeline()=default
virtual void build_relations(DepsgraphRelationBuilder &relation_builder)=0
Depsgraph * graph
Definition: BKE_main.h:121