b3ecfcd77d6392005b773a5eaad4c0337a1c0e52
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
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
