Blender V4.3
pipeline_from_collection.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "pipeline.h"
12
13struct Collection;
14
15namespace blender::deg {
16
17/* Optimized builders for dependency graph built from a given Collection.
18 *
19 * General notes:
20 *
21 * - We pull in all bases if their objects are in the set of IDs. This allows to have proper
22 * visibility and other flags assigned to the objects.
23 * All other bases (the ones which points to object which is outside of the set of IDs) are
24 * completely ignored.
25 */
26
28 public:
29 FromCollectionBuilderPipeline(::Depsgraph *graph, Collection *collection);
30
31 protected:
32 virtual unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
33 virtual unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
34
35 virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
36 virtual void build_relations(DepsgraphRelationBuilder &relation_builder) override;
37
38 private:
39 Set<ID *> ids_;
40};
41
42} // namespace blender::deg
virtual unique_ptr< DepsgraphNodeBuilder > construct_node_builder() override
virtual unique_ptr< DepsgraphRelationBuilder > construct_relation_builder() override
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override
virtual void build_relations(DepsgraphRelationBuilder &relation_builder) override
FromCollectionBuilderPipeline(::Depsgraph *graph, Collection *collection)