Blender V5.0
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 273 of file geometry_nodes_closure_zone.cc.

Constructor & Destructor Documentation

◆ LazyFunctionForEvaluateClosureNode()

blender::nodes::LazyFunctionForEvaluateClosureNode::LazyFunctionForEvaluateClosureNode ( const bNode & bnode)
inline

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 321 of file geometry_nodes_closure_zone.cc.

◆ 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 330 of file geometry_nodes_closure_zone.cc.

References DEG_get_original(), extract(), generate_closure_compatibility_warnings(), bNodeTree::id, initialize_execution_graph(), initialize_pass_through_graph(), is_recursive_call(), params, ID::session_uid, and set_default_outputs().

◆ generate_closure_compatibility_warnings()

◆ indices()

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

Definition at line 311 of file geometry_nodes_closure_zone.cc.

◆ 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 316 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 515 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::allocator(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::nodes::build_implicit_conversion_lazy_function(), blender::nodes::EvaluateClosureEvalStorage::closure, 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::bke::bNodeSocketType::geometry_nodes_default_value, 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(), i, 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::ClosureFunctionIndices::inputs, blender::nodes::ClosureSignature::inputs, blender::fn::lazy_function::LazyFunction::inputs_, lock, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_try(), blender::nodes::ClosureFunctionIndices::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::ClosureFunctionIndices::outputs, blender::nodes::ClosureSignature::outputs, blender::fn::lazy_function::LazyFunction::outputs_, bNodeTree::runtime, blender::nodes::EvaluateClosureEvalStorage::scope, blender::fn::lazy_function::InputSocket::set_default_value(), blender::nodes::EvaluateClosureEvalStorage::side_effect_provider, blender::nodes::Closure::signature(), blender::fn::lazy_function::OutputSocket::targets(), blender::gpu::shader::to_type(), and blender::fn::lazy_function::Graph::update_node_indices().

Referenced by execute_impl().

◆ initialize_pass_through_graph()

◆ is_recursive_call()

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

◆ set_default_outputs()

void blender::nodes::LazyFunctionForEvaluateClosureNode::set_default_outputs ( lf::Params & params) const
inline

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