Blender Git Commit Log

Git Commits -> Revision eb0d216

Revision eb0d216 by Jacques Lucke (master)
October 18, 2021, 09:46 (GMT)
Geometry Nodes: decouple multi-function lifetimes from modifier

Previously, some multi-functions were allocated in a resource scope.
This was fine as long as the multi-functions were only needed during
the current evaluation of the node tree. However, now cases arise
that require the multi-functions to be alive after the modifier is finished.
For example, we want to evaluate fields created with geometry nodes
outside of geometry nodes.

To make this work, `std::shared_ptr` has to be used in a few more places.
Realistically, this shouldn't have a noticable impact on performance.
If this does become a bottleneck in the future, we can think about ways
to make this work without using `shared_ptr` for multi-functions that
are only used once.

Commit Details:

Full Hash: eb0d216dc1caab515eb7cf1ef6bb1632e5ca8fae
Parent Commit: 746ee29
Lines Changed: +42, -35

6 Modified Paths:

/source/blender/functions/FN_field.hh (+2, -2) (Diff)
/source/blender/functions/intern/field.cc (+1, -1) (Diff)
/source/blender/modifiers/intern/MOD_nodes.cc (+1, -1) (Diff)
/source/blender/modifiers/intern/MOD_nodes_evaluator.cc (+11, -5) (Diff)
/source/blender/nodes/intern/node_multi_function.cc (+4, -5) (Diff)
/source/blender/nodes/NOD_multi_function.hh (+23, -21) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021