Blender V4.3
blender::nodes::LazyFunctionForForeachGeometryElementZone Class Reference

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

Public Member Functions

 LazyFunctionForForeachGeometryElementZone (const bNodeTree &btree, const 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 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

Definition at line 2300 of file geometry_nodes_lazy_function.cc.

Constructor & Destructor Documentation

◆ LazyFunctionForForeachGeometryElementZone()

blender::nodes::LazyFunctionForForeachGeometryElementZone::LazyFunctionForForeachGeometryElementZone ( const bNodeTree & btree,
const bNodeTreeZone & zone,
ZoneBuildInfo & zone_info,
const ZoneBodyFunction & body_fn )
inline

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 2705 of file geometry_nodes_lazy_function.cc.

References blender::fn::lazy_function::Graph::add_function(), blender::fn::lazy_function::Graph::add_link(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::nodes::ZoneFunctionIndices::attributes_by_caller_propagation_index, blender::nodes::ZoneFunctionIndices::attributes_by_field_source_index, BLI_assert, blender::nodes::ZoneFunctionIndices::border_link_usages, blender::bke::bNodeTreeZone::border_links, blender::nodes::ZoneFunctionIndices::border_links, blender::nodes::ForeachGeometryElementEvalStorage::components, blender::nodes::ZoneBodyFunction::function, NodeGeometryForeachGeometryElementOutput::generation_items, blender::nodes::ForeachGeometryElementEvalStorage::graph, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range(), blender::nodes::ZoneBodyFunction::indices, blender::nodes::ZoneBuildInfo::indices, blender::fn::lazy_function::Node::input(), NodeGeometryForeachGeometryElementOutput::input_items, blender::bke::bNodeTreeZone::input_node, blender::nodes::ZoneFunctionIndices::input_usages, blender::nodes::ZoneFunctionIndices::inputs, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), NodeForeachGeometryElementGenerationItems::items_num, NodeForeachGeometryElementInputItems::items_num, NodeForeachGeometryElementMainItems::items_num, blender::nodes::ForeachGeometryElementEvalStorage::lf_body_nodes, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::nodes::ZoneFunctionIndices::main, NodeGeometryForeachGeometryElementOutput::main_items, blender::nodes::ForeachGeometryElementEvalStorage::or_function, blender::fn::lazy_function::Node::output(), blender::nodes::ZoneFunctionIndices::output_usages, blender::nodes::ZoneFunctionIndices::outputs, blender::nodes::ForeachGeometryElementEvalStorage::reduce_function, blender::fn::lazy_function::InputSocket::set_default_value(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::nodes::ForeachGeometryElementEvalStorage::total_iterations_num.

◆ destruct_storage()

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

◆ 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 2391 of file geometry_nodes_lazy_function.cc.

References blender::nodes::geo_eval_log::GeoTreeLogger::allocator, blender::nodes::geo_eval_log::GeoTreeLogger::node_warnings, params, and bNode::storage.

◆ 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 2377 of file geometry_nodes_lazy_function.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 2483 of file geometry_nodes_lazy_function.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::bke::GeometrySet::get_components(), blender::bke::GeometrySet::get_grease_pencil(), blender::nodes::ForeachElementComponent::id, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::nodes::ForeachElementComponent::index_values, blender::nodes::ZoneBuildInfo::indices, blender::nodes::ForeachElementComponent::input_attributes(), NodeGeometryForeachGeometryElementOutput::input_items, blender::bke::bNodeTreeZone::input_node, blender::nodes::ZoneFunctionIndices::inputs, blender::nodes::ForeachElementComponent::item_input_values, NodeForeachGeometryElementInputItems::items, NodeForeachGeometryElementInputItems::items_num, blender::nodes::ZoneFunctionIndices::main, blender::nodes::ForeachGeometryElementEvalStorage::main_geometry, params, pos, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), NodeForeachGeometryElementInputItem::socket_type, blender::bke::greasepencil::Drawing::strokes(), and blender::nodes::ForeachGeometryElementEvalStorage::total_iterations_num.

◆ try_extract_element_geometries()

Member Data Documentation

◆ generation

◆ inputs

ItemIndices blender::nodes::LazyFunctionForForeachGeometryElementZone::inputs

Definition at line 2320 of file geometry_nodes_lazy_function.cc.

◆ main


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