Files
test/source
Hans Goudey b3ecfcd77d Node Tools: Avoid depsgraph evaluation when possible
Currently for node tools we create and evaluate a temporary depsgraph
with all the selected object data-blocks and all data-blocks referenced
by the node tree.

Needless to say, this can be very slow when those data-blocks contain
arbitrary procedural operations. Re-evaluating all the selected objects
is particularly because it will give a slowdown even in very basic uses
of node tools.

Originally I hoped that geometry nodes could be made to work with
original as well as evaluated data-blocks. But that would require far
too many tricky changes and arguably isn't right design-wise anyway.
Instead of that, this commit makes node tools dependency graph
evaluation more fine-grained in a few ways.

1. Remove the evaluation of selected objects. These are always visible
   in the viewport and part of the active depsgraph anyway. To protect
   against cyclic dependencies, we now compare `orig_id` instead of the
   object pointer itself.
2. Evaluate the node group and its dependencies in a separate depsgraph
   used only when necessary. This allows using the original node tree
   without any copies when it doesn't reference any data-blocks.
3. Evaluate IDs from node group inputs (from the redo panel) in the extra
   depsgraph as well, only when necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/120723
2024-04-24 17:08:25 +02:00
..
2024-04-24 15:59:47 +02:00