Blender V4.5
blender::nodes::LazyFunctionForEvaluateClosureNode Class Reference

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

Public Member Functions

 LazyFunctionForEvaluateClosureNode (const bNode &bnode)
 
EvaluateClosureFunctionIndices indices () const
 
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
 
bool is_recursive_call (const GeoNodesUserData &user_data) const
 
void set_default_outputs (lf::Params &params) const
 
void generate_closure_compatibility_warnings (const Closure &closure, const lf::Context &context) const
 
void initialize_execution_graph (EvaluateClosureEvalStorage &eval_storage) const
 
void initialize_pass_through_graph (EvaluateClosureEvalStorage &eval_storage) 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 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

A lazy function that is used to evaluate a passed in closure. Internally that has to build another lazy-function graph, which "fixes" different orderings of inputs/outputs, handles missing sockets and type conversions.

Definition at line 277 of file geometry_nodes_closure_zone.cc.

Constructor & Destructor Documentation

◆ LazyFunctionForEvaluateClosureNode()

Member Function Documentation

◆ destruct_storage()

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

Destruct the storage created in init_storage.

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

Definition at line 325 of file geometry_nodes_closure_zone.cc.

References blender::nodes::EvaluateClosureEvalStorage::graph_executor.

◆ execute_impl()

void blender::nodes::LazyFunctionForEvaluateClosureNode::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 334 of file geometry_nodes_closure_zone.cc.

References blender::nodes::Error, bNode::identifier, is_recursive_call(), set_default_outputs(), and TIP_.

◆ generate_closure_compatibility_warnings()

◆ indices()

EvaluateClosureFunctionIndices blender::nodes::LazyFunctionForEvaluateClosureNode::indices ( ) const
inline

◆ init_storage()

void * blender::nodes::LazyFunctionForEvaluateClosureNode::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 320 of file geometry_nodes_closure_zone.cc.

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

◆ initialize_execution_graph()

void blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_execution_graph ( EvaluateClosureEvalStorage & eval_storage) const
inline

Definition at line 482 of file geometry_nodes_closure_zone.cc.

References blender::fn::lazy_function::Graph::add_function(), blender::fn::lazy_function::Graph::add_input(), blender::fn::lazy_function::Graph::add_link(), blender::fn::lazy_function::Graph::add_output(), blender::ResourceScope::allocate_owned(), blender::ResourceScope::allocator(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), BLI_assert, blender::nodes::build_implicit_conversion_lazy_function(), blender::nodes::EvaluateClosureEvalStorage::closure, blender::nodes::construct_socket_default_value(), blender::nodes::Closure::default_input_value(), DEG_get_original(), blender::nodes::ClosureSignature::find_input_index(), blender::nodes::ClosureSignature::find_output_index(), blender::nodes::Closure::function(), blender::nodes::EvaluateClosureEvalStorage::graph, blender::nodes::EvaluateClosureEvalStorage::graph_executor, blender::nodes::EvaluateClosureEvalStorage::graph_executor_storage, blender::fn::lazy_function::Graph::graph_inputs(), blender::fn::lazy_function::Graph::graph_outputs(), bNode::identifier, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexRange::index_range(), blender::nodes::Closure::indices(), blender::fn::lazy_function::Node::input(), input, blender::nodes::ClosureFunctionIndices::input_usages, blender::nodes::EvaluateClosureFunctionIndices::input_usages, blender::nodes::ClosureFunctionIndices::inputs, blender::nodes::ClosureSignature::inputs, blender::nodes::EvaluateClosureFunctionIndices::inputs, lock, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_try(), blender::nodes::ClosureFunctionIndices::main, blender::nodes::EvaluateClosureFunctionIndices::main, blender::fn::lazy_function::InputSocket::origin(), blender::fn::lazy_function::Node::output(), output, blender::nodes::ClosureFunctionIndices::output_data_reference_sets, blender::nodes::ClosureFunctionIndices::output_usages, blender::nodes::EvaluateClosureFunctionIndices::output_usages, blender::nodes::ClosureFunctionIndices::outputs, blender::nodes::ClosureSignature::outputs, blender::nodes::EvaluateClosureFunctionIndices::outputs, blender::nodes::EvaluateClosureFunctionIndices::reference_set_by_output, bNodeTree::runtime, blender::nodes::EvaluateClosureEvalStorage::scope, blender::fn::lazy_function::InputSocket::set_default_value(), blender::nodes::EvaluateClosureEvalStorage::side_effect_provider, blender::nodes::Closure::signature(), bNode::storage, blender::fn::lazy_function::OutputSocket::targets(), bNode::typeinfo, and blender::fn::lazy_function::Graph::update_node_indices().

◆ initialize_pass_through_graph()

void blender::nodes::LazyFunctionForEvaluateClosureNode::initialize_pass_through_graph ( EvaluateClosureEvalStorage & eval_storage) const
inline

Definition at line 657 of file geometry_nodes_closure_zone.cc.

References blender::fn::lazy_function::Graph::add_function(), blender::fn::lazy_function::Graph::add_input(), blender::fn::lazy_function::Graph::add_link(), blender::fn::lazy_function::Graph::add_output(), blender::ResourceScope::allocate_owned(), blender::ResourceScope::allocator(), blender::nodes::build_implicit_conversion_lazy_function(), blender::nodes::construct_socket_default_value(), blender::nodes::evaluate_closure_node_internally_linked_input(), blender::bke::bNodeSocketType::geometry_nodes_cpp_type, blender::nodes::EvaluateClosureEvalStorage::graph, blender::nodes::EvaluateClosureEvalStorage::graph_executor, blender::nodes::EvaluateClosureEvalStorage::graph_executor_storage, blender::fn::lazy_function::Graph::graph_inputs(), blender::fn::lazy_function::Graph::graph_outputs(), blender::fn::lazy_function::Node::input(), input, blender::nodes::EvaluateClosureFunctionIndices::input_usages, blender::nodes::EvaluateClosureFunctionIndices::inputs, blender::nodes::EvaluateClosureFunctionIndices::main, blender::fn::lazy_function::InputSocket::origin(), blender::fn::lazy_function::Node::output(), output, blender::nodes::EvaluateClosureFunctionIndices::output_usages, blender::nodes::EvaluateClosureFunctionIndices::outputs, blender::nodes::EvaluateClosureEvalStorage::scope, blender::fn::lazy_function::InputSocket::set_default_value(), bNode::storage, bNodeSocket::typeinfo, and blender::fn::lazy_function::Graph::update_node_indices().

◆ is_recursive_call()

bool blender::nodes::LazyFunctionForEvaluateClosureNode::is_recursive_call ( const GeoNodesUserData & user_data) const
inline

◆ set_default_outputs()


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