10e95bebca77fe72445fa55fc387293f020c0038
Adding "writeback" callbacks to the depsgraph should be temporary, since these callbacks can bind pointers that become invalid. In this case: the evaluated nodes modifier bound by a bake node callback. These callbacks are cleared after being added in the `deg_flush_updates_and_refresh` function, but there are other cases where depsgraph updates are executed which don't support writeback callbacks (`object_force_modifier_update_for_bind` run by the smooth modifier "bind" function). To prevent dangling invalid pointers in outdated callbacks, disallow adding callbacks in any case other than the `deg_flush_updates_and_refresh` function. Since callbacks can be added from any depsgraph update, the safest way to prevent adding them is in the depsgraph itself. If the `use_writeback_callbacks` flag is not set, any callback is simply discarded. Pull Request: https://projects.blender.org/blender/blender/pulls/137083
…
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%
