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