Blender V5.0
blender::nodes::LazyFunctionForForeachGeometryElementZone Class Reference

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

Public Member Functions

 LazyFunctionForForeachGeometryElementZone (const bNodeTree &btree, const bke::bNodeTreeZone &zone, ZoneBuildInfo &zone_info, const ZoneBodyFunction &body_fn)
void * init_storage (LinearAllocator<> &allocator) const override
void destruct_storage (void *storage) const override
void execute_impl (lf::Params &params, const lf::Context &context) const override
void initialize_execution_graph (lf::Params &params, ForeachGeometryElementEvalStorage &eval_storage, const NodeGeometryForeachGeometryElementOutput &node_storage) const
void prepare_components (lf::Params &params, ForeachGeometryElementEvalStorage &eval_storage, const NodeGeometryForeachGeometryElementOutput &node_storage) const
std::optional< Array< GeometrySet > > try_extract_element_geometries (const GeometrySet &main_geometry, const ForeachElementComponentID &id, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) const
void build_graph_contents (ForeachGeometryElementEvalStorage &eval_storage, const NodeGeometryForeachGeometryElementOutput &node_storage, Span< lf::GraphInputSocket * > graph_inputs, Span< lf::GraphOutputSocket * > graph_outputs) const
std::string input_name (const int i) const override
std::string output_name (const int i) const override
Public Member Functions inherited from blender::fn::lazy_function::LazyFunction
virtual ~LazyFunction ()=default
virtual std::string name () 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

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

Constructor & Destructor Documentation

◆ LazyFunctionForForeachGeometryElementZone()

Member Function Documentation

◆ build_graph_contents()

void blender::nodes::LazyFunctionForForeachGeometryElementZone::build_graph_contents ( ForeachGeometryElementEvalStorage & eval_storage,
const NodeGeometryForeachGeometryElementOutput & node_storage,
Span< lf::GraphInputSocket * > graph_inputs,
Span< lf::GraphOutputSocket * > graph_outputs ) const
inline

Definition at line 650 of file geometry_nodes_foreach_geometry_element_zone.cc.

References blender::fn::lazy_function::Graph::add_function(), blender::fn::lazy_function::Graph::add_link(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), BLI_assert, blender::nodes::ForeachElementComponent::body_nodes_range, blender::nodes::ForeachGeometryElementEvalStorage::components, blender::nodes::ForeachElementComponent::element_geometries, SocketValueVariant::From(), NodeGeometryForeachGeometryElementOutput::generation_items, blender::nodes::ForeachGeometryElementEvalStorage::graph, i, blender::IndexRange::index_range(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range(), blender::nodes::ForeachElementComponent::index_values, blender::fn::lazy_function::Node::input(), NodeGeometryForeachGeometryElementOutput::input_items, blender::nodes::ForeachElementComponent::item_input_values, NodeForeachGeometryElementGenerationItems::items_num, NodeForeachGeometryElementInputItems::items_num, NodeForeachGeometryElementMainItems::items_num, blender::nodes::ForeachGeometryElementEvalStorage::lf_body_nodes, NodeGeometryForeachGeometryElementOutput::main_items, blender::nodes::ForeachGeometryElementEvalStorage::or_function, blender::fn::lazy_function::Node::output(), blender::nodes::ForeachGeometryElementEvalStorage::reduce_function, blender::fn::lazy_function::InputSocket::set_default_value(), and blender::nodes::ForeachGeometryElementEvalStorage::total_iterations_num.

Referenced by initialize_execution_graph().

◆ destruct_storage()

void blender::nodes::LazyFunctionForForeachGeometryElementZone::destruct_storage ( void * storage) const
inlineoverridevirtual

Destruct the storage created in init_storage.

Reimplemented from blender::fn::lazy_function::LazyFunction.

Definition at line 315 of file geometry_nodes_foreach_geometry_element_zone.cc.

◆ execute_impl()

void blender::nodes::LazyFunctionForForeachGeometryElementZone::execute_impl ( lf::Params & params,
const lf::Context & context ) const
inlineoverridevirtual

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 324 of file geometry_nodes_foreach_geometry_element_zone.cc.

References blender::nodes::geo_eval_log::GeoTreeLogger::allocator, initialize_execution_graph(), blender::nodes::geo_eval_log::GeoTreeLogger::node_warnings, and params.

◆ init_storage()

void * blender::nodes::LazyFunctionForForeachGeometryElementZone::init_storage ( LinearAllocator<> & allocator) const
inlineoverridevirtual

Allocates storage for this function. The storage will be passed to every call to execute. If the function does not keep track of any state, this does not have to be implemented.

Reimplemented from blender::fn::lazy_function::LazyFunction.

Definition at line 310 of file geometry_nodes_foreach_geometry_element_zone.cc.

References blender::LinearAllocator< Allocator >::construct().

◆ initialize_execution_graph()

◆ input_name()

std::string blender::nodes::LazyFunctionForForeachGeometryElementZone::input_name ( const int i) const
inlineoverridevirtual

◆ output_name()

std::string blender::nodes::LazyFunctionForForeachGeometryElementZone::output_name ( const int i) const
inlineoverridevirtual

◆ prepare_components()

void blender::nodes::LazyFunctionForForeachGeometryElementZone::prepare_components ( lf::Params & params,
ForeachGeometryElementEvalStorage & eval_storage,
const NodeGeometryForeachGeometryElementOutput & node_storage ) const
inline

Definition at line 417 of file geometry_nodes_foreach_geometry_element_zone.cc.

References blender::bke::SocketValueVariant::allocate_single(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, blender::nodes::ForeachElementComponent::body_nodes_range, blender::nodes::ForeachGeometryElementEvalStorage::components, NodeGeometryForeachGeometryElementOutput::domain, blender::bke::AttributeAccessor::domain_size(), ELEM, blender::nodes::ForeachElementComponent::element_geometries, blender::nodes::ForeachElementComponent::emplace_field_context(), extract(), blender::nodes::ForeachElementComponent::field_context, blender::nodes::ForeachElementComponent::field_evaluator, blender::IndexRange::from_begin_size(), blender::bke::GeometrySet::get_components(), blender::bke::GeometrySet::get_grease_pencil(), blender::GVArrayCommon::get_to_uninitialized(), i, blender::nodes::ForeachElementComponent::id, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::nodes::ForeachElementComponent::index_values, blender::nodes::ForeachElementComponent::input_attributes(), NodeGeometryForeachGeometryElementOutput::input_items, blender::bke::CurvesGeometry::is_empty(), NodeForeachGeometryElementInputItems::items, NodeForeachGeometryElementInputItems::items_num, blender::nodes::ForeachGeometryElementEvalStorage::main_geometry, mask(), blender::threading::parallel_for(), params, pos, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), NodeForeachGeometryElementInputItem::socket_type, blender::bke::greasepencil::Drawing::strokes(), and try_extract_element_geometries().

Referenced by initialize_execution_graph().

◆ try_extract_element_geometries()

Member Data Documentation

◆ generation

ItemIndices blender::nodes::LazyFunctionForForeachGeometryElementZone::generation

◆ inputs

ItemIndices blender::nodes::LazyFunctionForForeachGeometryElementZone::inputs

◆ main

ItemIndices blender::nodes::LazyFunctionForForeachGeometryElementZone::main

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