Blender V4.5
blender::nodes::LazyFunctionForReduceForeachGeometryElement Struct Reference

Inherits blender::fn::lazy_function::LazyFunction.

Public Member Functions

 LazyFunctionForReduceForeachGeometryElement (const LazyFunctionForForeachGeometryElementZone &parent, ForeachGeometryElementEvalStorage &eval_storage)
void execute_impl (lf::Params &params, const lf::Context &context) const override
void handle_main_items_and_geometry (lf::Params &params, const lf::Context &context) const
void handle_generation_items (lf::Params &params, const lf::Context &context) const
int handle_invalid_generation_items (lf::Params &params) const
void handle_generation_item_groups (lf::Params &params, const lf::Context &context, int first_valid_item_i) const
void handle_generation_items_group (lf::Params &params, const lf::Context &context, int geometry_item_i, IndexRange generation_items_range) const
bool handle_generation_items_group_lazyness (lf::Params &params, const lf::Context &context, int geometry_item_i, IndexRange generation_items_range) const
Public Member Functions inherited from blender::fn::lazy_function::LazyFunction
virtual ~LazyFunction ()=default
virtual std::string name () const
virtual std::string input_name (int index) const
virtual std::string output_name (int index) const
virtual void * init_storage (LinearAllocator<> &allocator) const
virtual void destruct_storage (void *storage) const
virtual void possible_output_dependencies (int output_index, FunctionRef< void(Span< int >)> fn) const
bool always_used_inputs_available (const Params &params) const
bool allow_missing_requested_inputs () const
Span< Inputinputs () const
Span< Outputoutputs () const
void execute (Params &params, const Context &context) const

Public Attributes

const LazyFunctionForForeachGeometryElementZoneparent_
ForeachGeometryElementEvalStorageeval_storage_

Additional Inherited Members

Protected Attributes inherited from blender::fn::lazy_function::LazyFunction
const char * debug_name_ = "unknown"
Vector< Inputinputs_
Vector< Outputoutputs_
bool allow_missing_requested_inputs_ = false

Detailed Description

A lazy-function that takes the result from all loop body evaluations and reduces them to the final output of the entire zone.

Definition at line 105 of file geometry_nodes_foreach_geometry_element_zone.cc.

Constructor & Destructor Documentation

◆ LazyFunctionForReduceForeachGeometryElement()

Member Function Documentation

◆ execute_impl()

void blender::nodes::LazyFunctionForReduceForeachGeometryElement::execute_impl ( lf::Params & params,
const lf::Context & context ) const
overridevirtual

Needs to be implemented by subclasses. This is separate from execute so that additional debugging logic can be implemented in execute.

Implements blender::fn::lazy_function::LazyFunction.

Definition at line 839 of file geometry_nodes_foreach_geometry_element_zone.cc.

References handle_generation_items(), handle_main_items_and_geometry(), parent_, and bNode::storage.

◆ handle_generation_item_groups()

void blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_item_groups ( lf::Params & params,
const lf::Context & context,
int first_valid_item_i ) const

◆ handle_generation_items()

void blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items ( lf::Params & params,
const lf::Context & context ) const

◆ handle_generation_items_group()

void blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group ( lf::Params & params,
const lf::Context & context,
int geometry_item_i,
IndexRange generation_items_range ) const

Definition at line 996 of file geometry_nodes_foreach_geometry_element_zone.cc.

References blender::bke::AttributeAccessor::adapt_domain(), blender::bke::AttributeFilter::allow_skip(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::GeometryComponent::attributes_for_write(), blender::nodes::ForeachElementComponent::body_nodes_range, BUFFER_FOR_CPP_TYPE_VALUE, CD_PROP_STRING, blender::nodes::ForeachGeometryElementEvalStorage::components, blender::bke::AttributeAccessor::contains(), blender::GMutableSpan::data(), blender::bke::AttributeIter::data_type, blender::CPPType::destruct(), blender::bke::GAttributeReader::domain, blender::nodes::ForeachElementComponentID::domain, NodeForeachGeometryElementGenerationItem::domain, eval_storage_, blender::fn::lazy_function::Params::extract_input(), blender::nodes::ForeachElementComponent::field_evaluator, blender::CPPType::fill_assign_n(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::GeometrySet::get_component_for_write(), blender::nodes::get_foreach_attribute_propagation_target_domain(), blender::fn::lazy_function::Params::get_input(), blender::GVArrayCommon::get_to_uninitialized(), blender::nodes::GField::GField(), handle_generation_items_group_lazyness(), blender::bke::GeometrySet::has(), blender::bke::hash_to_anonymous_attribute_name(), i, blender::nodes::ForeachElementComponent::id, bNode::identifier, NodeForeachGeometryElementGenerationItem::identifier, blender::IndexRange::index_range(), blender::nodes::ForeachElementComponent::input_attributes(), blender::bke::AttributeAccessor::is_builtin(), NodeForeachGeometryElementMainItems::items_num, blender::geometry::join_geometries(), blender::bke::GeometrySet::keep_only(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::nodes::ForeachGeometryElementEvalStorage::lf_body_nodes, blender::bke::AttributeAccessor::lookup(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::nodes::ForeachGeometryElementEvalStorage::main_geometry, NodeGeometryForeachGeometryElementOutput::main_items, blender::nodes::make_anonymous_attribute_socket_inspection_string(), mask(), blender::bke::AttributeIter::name, blender::fn::lazy_function::LazyFunction::name(), parent_, blender::fn::lazy_function::Params::set_output(), blender::GMutableSpan::size(), blender::IndexRange::size(), NodeForeachGeometryElementGenerationItem::socket_type, blender::bke::socket_type_to_geo_nodes_base_cpp_type(), blender::bke::GSpanAttributeWriter::span, bNode::storage, blender::bke::try_capture_field_on_geometry(), and blender::GVArrayCommon::type().

Referenced by handle_generation_item_groups().

◆ handle_generation_items_group_lazyness()

◆ handle_invalid_generation_items()

◆ handle_main_items_and_geometry()

void blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_main_items_and_geometry ( lf::Params & params,
const lf::Context & context ) const

Definition at line 852 of file geometry_nodes_foreach_geometry_element_zone.cc.

References blender::nodes::ForeachElementComponent::attributes_for_write(), blender::nodes::ForeachGeometryElementEvalStorage::components, blender::CPPType::copy_construct(), blender::bke::cpp_type_to_custom_data_type(), blender::GMutableSpan::data(), blender::nodes::ForeachElementComponentID::domain, blender::bke::AttributeAccessor::domain_size(), eval_storage_, blender::nodes::ForeachElementComponent::field_evaluator, blender::bke::GSpanAttributeWriter::finish(), blender::fn::lazy_function::Params::get_input(), blender::bke::SocketValueVariant::get_single_ptr_raw(), blender::nodes::GField::GField(), blender::bke::hash_to_anonymous_attribute_name(), i, blender::nodes::ForeachElementComponent::id, bNode::identifier, NodeForeachGeometryElementMainItem::identifier, blender::IndexRange::IndexRange(), NodeForeachGeometryElementMainItems::items_num, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::nodes::ForeachGeometryElementEvalStorage::main_geometry, NodeGeometryForeachGeometryElementOutput::main_items, blender::nodes::make_anonymous_attribute_socket_inspection_string(), mask(), blender::fn::lazy_function::Params::output_was_set(), parent_, blender::fn::lazy_function::Params::set_output(), NodeForeachGeometryElementMainItem::socket_type, blender::bke::socket_type_to_geo_nodes_base_cpp_type(), blender::bke::GSpanAttributeWriter::span, bNode::storage, and blender::CPPType::value_initialize_indices().

Referenced by execute_impl().

Member Data Documentation

◆ eval_storage_

◆ parent_


The documentation for this struct was generated from the following file: