21class DepsgraphFromCollectionIDsFilter {
23 DepsgraphFromCollectionIDsFilter(
const Set<ID *> &ids) :
ids_(ids) {}
27 return ids_.contains(
id);
34class DepsgraphFromCollectionIDsNodeBuilder :
public DepsgraphNodeBuilder {
36 DepsgraphFromCollectionIDsNodeBuilder(
Main *bmain,
38 DepsgraphBuilderCache *cache,
40 : DepsgraphNodeBuilder(bmain, graph, cache),
filter_(ids)
44 bool need_pull_base_into_graph(
const Base *base)
override
56class DepsgraphFromCollectionIDsRelationBuilder :
public DepsgraphRelationBuilder {
58 DepsgraphFromCollectionIDsRelationBuilder(
Main *bmain,
60 DepsgraphBuilderCache *cache,
62 : DepsgraphRelationBuilder(bmain, graph, cache),
filter_(ids)
66 bool need_pull_base_into_graph(
const Base *base)
override
75 DepsgraphFromCollectionIDsFilter
filter_;
87 for (; base; base = base->
next) {
88 if (base->
flag & base_flag) {
96 return std::make_unique<DepsgraphFromCollectionIDsNodeBuilder>(
102 return std::make_unique<DepsgraphFromCollectionIDsRelationBuilder>(
109 for (
ID *
id : ids_) {
117 for (
ID *
id : ids_) {
Base * BKE_collection_or_layer_objects(const Scene *scene, ViewLayer *view_layer, Collection *collection)
DepsgraphBuilderCache builder_cache_
virtual bool need_pull_base_into_graph(const Base *base)
virtual void build_id(ID *id, bool force_be_visible=false)
virtual void build_view_layer(Scene *scene, ViewLayer *view_layer, eDepsNode_LinkedState_Type linked_state)
virtual void build_view_layer(Scene *scene, ViewLayer *view_layer, eDepsNode_LinkedState_Type linked_state)
virtual void build_id(ID *id)
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)
DepsgraphFromCollectionIDsFilter filter_