9b8001f370936fd02baad8ac1a6b6f79fb7c74f0
This commit allows re-entrant calls to `BKE_layer_collection_resync_forbid` and `BKE_layer_collection_resync_allow`, such that higher-level code can block layer collections updates while calling lower-level code that does the same thing. E.g. `BKE_id_delete` blocks and then re-allows such updates. However, such code can also be called from other pieces of code that also need to prevent these updates in their own, broader scope. In addition, realized that this call had concurrency issues since BKE code using it is called from non-main thread too (e.g. from depsgraph evaluation). So made the counter atomic to ensure all calls to `BKE_layer_collection_resync_forbid` is matched by a call to `BKE_layer_collection_resync_allow`. Also added a cap to max amount of 're-entrant' calls (has to be quite high, due to potential concurrent calls too). This is required to fix #124777.
…
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%
