Geometry Nodes: use lazy evaluation in repeat zone #112421

Merged
Jacques Lucke merged 26 commits from JacquesLucke/blender:lazy-repeat-zone into main 2023-09-22 08:58:26 +02:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit c67c4b87ae - Show all commits

View File

@ -1753,7 +1753,7 @@ class LazyFunctionForRepeatZone : public LazyFunction {
}
/**
* Generate a lazy-function graph that contains contains the loop body (`body_fn_`) as many times
* Generate a lazy-function graph that contains the loop body (`body_fn_`) as many times
JacquesLucke marked this conversation as resolved Outdated

Typo: contains contains

Typo: `contains contains`
* 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
@ -1791,7 +1791,7 @@ class LazyFunctionForRepeatZone : public LazyFunction {
VectorSet<lf::FunctionNode *> &lf_body_nodes = eval_storage.lf_body_nodes;
for ([[maybe_unused]] const int i : IndexRange(iterations)) {
lf::FunctionNode &lf_node = lf_graph.add_function(body_fn_);
eval_storage.lf_body_nodes.add_new(&lf_node);
lf_body_nodes.add_new(&lf_node);
JacquesLucke marked this conversation as resolved Outdated

Shorter alias: lf_body_nodes.add_new(&lf_node);;

Shorter alias: `lf_body_nodes.add_new(&lf_node);`;
}
/* Create nodes for combining border link usages. A border link is used when any of the loop