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

#include <NOD_geometry_nodes_closure.hh>

Inherits blender::ImplicitSharingMixin.

Public Member Functions

 Closure (std::shared_ptr< ClosureSignature > signature, std::unique_ptr< ResourceScope > scope, const fn::lazy_function::LazyFunction &function, ClosureFunctionIndices indices, Vector< bke::SocketValueVariant > default_input_values, std::optional< ClosureSourceLocation > source_location, std::shared_ptr< ClosureEvalLog > eval_log)
const ClosureSignaturesignature () const
const ClosureFunctionIndicesindices () const
const fn::lazy_function::LazyFunctionfunction () const
const std::optional< ClosureSourceLocation > & source_location () const
const std::shared_ptr< ClosureEvalLog > & eval_log_ptr () const
const bke::SocketValueVariantdefault_input_value (const int index) const
void delete_self () override
void log_evaluation (const ClosureEvalLocation &location) const
Public Member Functions inherited from blender::ImplicitSharingInfo
virtual ~ImplicitSharingInfo ()
bool is_mutable () const
bool is_expired () const
void add_user () const
void add_weak_user () const
void tag_ensured_mutable () const
int64_t version () const
int strong_users () const
void remove_user_and_delete_if_last () const
void remove_weak_user_and_delete_if_last () const

Detailed Description

A closure is like a node group that is passed around as a value. It's typically evaluated using the Evaluate Closure node.

Internally, a closure is a lazy-function. So the inputs that are passed to the closure are requested lazily. It's not yet supported to request the potentially captured values from the Closure Zone lazily.

Definition at line 51 of file NOD_geometry_nodes_closure.hh.

Constructor & Destructor Documentation

◆ Closure()

blender::nodes::Closure::Closure ( std::shared_ptr< ClosureSignature > signature,
std::unique_ptr< ResourceScope > scope,
const fn::lazy_function::LazyFunction & function,
ClosureFunctionIndices indices,
Vector< bke::SocketValueVariant > default_input_values,
std::optional< ClosureSourceLocation > source_location,
std::shared_ptr< ClosureEvalLog > eval_log )
inline

Definition at line 68 of file NOD_geometry_nodes_closure.hh.

References function(), indices(), signature(), and source_location().

Member Function Documentation

◆ default_input_value()

const bke::SocketValueVariant & blender::nodes::Closure::default_input_value ( const int index) const
inline

◆ delete_self()

void blender::nodes::Closure::delete_self ( )
inlineoverridevirtual

Implements blender::ImplicitSharingMixin.

Definition at line 115 of file NOD_geometry_nodes_closure.hh.

◆ eval_log_ptr()

const std::shared_ptr< ClosureEvalLog > & blender::nodes::Closure::eval_log_ptr ( ) const
inline

Definition at line 105 of file NOD_geometry_nodes_closure.hh.

◆ function()

◆ indices()

◆ log_evaluation()

void blender::nodes::Closure::log_evaluation ( const ClosureEvalLocation & location) const
inline

Definition at line 120 of file NOD_geometry_nodes_closure.hh.

References lock.

◆ signature()

◆ source_location()

const std::optional< ClosureSourceLocation > & blender::nodes::Closure::source_location ( ) const
inline

Definition at line 100 of file NOD_geometry_nodes_closure.hh.

Referenced by Closure().


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