21class DepsgraphFromCollectionIDsFilter {
23 DepsgraphFromCollectionIDsFilter(
const Set<ID *> &ids) : ids_(ids) {}
27 return ids_.contains(
id);
31 const Set<ID *> &ids_;
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
46 if (!filter_.contains(&base->
object->
id)) {
53 DepsgraphFromCollectionIDsFilter filter_;
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
68 if (!filter_.contains(&base->
object->
id)) {
75 DepsgraphFromCollectionIDsFilter filter_;
87 for (; base; base = base->
next) {
88 if (!
deg_graph_->use_visibility_optimization || (base->
flag & base_flag)) {
96 return std::make_unique<DepsgraphFromCollectionIDsNodeBuilder>(
103 return std::make_unique<DepsgraphFromCollectionIDsRelationBuilder>(
110 for (
ID *
id : ids_) {
118 for (
ID *
id : ids_) {
Base * BKE_collection_or_layer_objects(const Scene *scene, ViewLayer *view_layer, Collection *collection)
DepsgraphBuilderCache builder_cache_
AbstractBuilderPipeline(::Depsgraph *graph)
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)
void build_nodes(DepsgraphNodeBuilder &node_builder) override
void build_relations(DepsgraphRelationBuilder &relation_builder) override
std::unique_ptr< DepsgraphRelationBuilder > construct_relation_builder() override
FromCollectionBuilderPipeline(::Depsgraph *graph, Collection *collection)
std::unique_ptr< DepsgraphNodeBuilder > construct_node_builder() override
bool contains(const VArray< bool > &varray, const IndexMask &indices_to_check, bool value)