|
Blender V5.0
|
Inherits blender::fn::lazy_function::LazyFunction.
Public Member Functions | |
| LazyFunctionForRepeatZone (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 ¶ms, const lf::Context &context) const override |
| void | initialize_execution_graph (lf::Params ¶ms, RepeatEvalStorage &eval_storage, const NodeGeometryRepeatOutput &node_storage, GeoNodesUserData &user_data, GeoNodesLocalUserData &local_user_data) 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 ¶ms) const |
| bool | allow_missing_requested_inputs () const |
| Span< Input > | inputs () const |
| Span< Output > | outputs () const |
| void | execute (Params ¶ms, const Context &context) const |
Additional Inherited Members | |
| Protected Attributes inherited from blender::fn::lazy_function::LazyFunction | |
| const char * | debug_name_ = "unknown" |
| Vector< Input > | inputs_ |
| Vector< Output > | outputs_ |
| bool | allow_missing_requested_inputs_ = false |
Definition at line 109 of file geometry_nodes_repeat_zone.cc.
|
inline |
Definition at line 118 of file geometry_nodes_repeat_zone.cc.
References blender::fn::lazy_function::LazyFunction::debug_name_, blender::nodes::ZoneBuildInfo::indices, blender::nodes::initialize_zone_wrapper(), blender::nodes::ZoneFunctionIndices::inputs, blender::fn::lazy_function::LazyFunction::inputs_, blender::nodes::ZoneFunctionIndices::main, blender::fn::lazy_function::LazyFunction::outputs_, and blender::fn::lazy_function::Used.
|
inlineoverridevirtual |
Destruct the storage created in init_storage.
Reimplemented from blender::fn::lazy_function::LazyFunction.
Definition at line 140 of file geometry_nodes_repeat_zone.cc.
References blender::nodes::RepeatEvalStorage::graph_executor, and blender::nodes::RepeatEvalStorage::graph_executor_storage.
|
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 149 of file geometry_nodes_repeat_zone.cc.
References blender::nodes::RepeatEvalStorage::graph_executor, blender::nodes::RepeatEvalStorage::graph_executor_storage, initialize_execution_graph(), blender::nodes::RepeatEvalStorage::input_index_map, blender::nodes::RepeatEvalStorage::multi_threading_enabled, blender::nodes::RepeatEvalStorage::output_index_map, and params.
|
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 135 of file geometry_nodes_repeat_zone.cc.
References blender::LinearAllocator< Allocator >::construct().
|
inline |
Generate a lazy-function graph that contains the loop body (body_fn_) as many times as there are iterations. Since this graph depends on the number of iterations, it can't be reused in general. We could consider caching a version of this graph per number of iterations, but right now that doesn't seem worth it. In practice, it takes much less time to create the graph than to execute it (for intended use cases of this generic implementation, more special case repeat loop evaluations could be implemented separately).
Definition at line 191 of file geometry_nodes_repeat_zone.cc.
References blender::bke::SocketValueVariant::get(), NodeGeometryRepeatOutput::inspection_index, NodeGeometryRepeatOutput::items_num, params, blender::lazy_threading::send_hint(), and blender::nodes::GeoNodesLocalUserData::try_get_tree_logger().
Referenced by execute_impl().
|
inlineoverridevirtual |
Reimplemented from blender::fn::lazy_function::LazyFunction.
Definition at line 407 of file geometry_nodes_repeat_zone.cc.
References i, blender::fn::lazy_function::LazyFunction::inputs_, and blender::nodes::zone_wrapper_input_name().
|
inlineoverridevirtual |
Reimplemented from blender::fn::lazy_function::LazyFunction.
Definition at line 412 of file geometry_nodes_repeat_zone.cc.
References i, blender::fn::lazy_function::LazyFunction::outputs_, and blender::nodes::zone_wrapper_output_name().