Instead of the monolothic `depsgraph_type.hh` header that includes most types used in the despgraph, just add includes where they are actually necessary. Also remove the `using` keywords for `std` types. The lack of specificity isn't considered good practice nowadays. Removing unnecessary transitive includes can help improve compile times because the time spent parsing headers decreases. Using the "include what you use" pattern makes futher improvements much easier too, since it the path to further reduce transitive includes becomes much clearer. Pull Request: https://projects.blender.org/blender/blender/pulls/133749
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
/* SPDX-FileCopyrightText: 2020 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup depsgraph
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "pipeline.h"
|
|
|
|
namespace blender::deg {
|
|
|
|
/* Optimized builders for dependency graph built from a given set of IDs.
|
|
*
|
|
* General notes:
|
|
*
|
|
* - We pull in all bases if their objects are in the set of IDs. This allows to have proper
|
|
* visibility and other flags assigned to the objects.
|
|
* All other bases (the ones which points to object which is outside of the set of IDs) are
|
|
* completely ignored.
|
|
*/
|
|
|
|
class FromIDsBuilderPipeline : public AbstractBuilderPipeline {
|
|
Span<ID *> ids_;
|
|
|
|
public:
|
|
FromIDsBuilderPipeline(::Depsgraph *graph, Span<ID *> ids);
|
|
|
|
protected:
|
|
std::unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
|
std::unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
|
|
|
void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
|
void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
|
};
|
|
|
|
} // namespace blender::deg
|