diff options
author | Bastien Montagne <bastien@blender.org> | 2021-05-21 11:14:58 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-05-21 13:43:32 +0300 |
commit | cf42586737554a5902796324a3b8c2f38c9a29f5 (patch) | |
tree | 946decf7bac8eda54eadf74e60e6a1b3cb5bd1d3 /source/blender/blenlib/intern/math_geom.c | |
parent | ff51c2e89a0951d043a843435b4c25ba7a15e8e2 (diff) |
Fix T85752: Collection Instance Crash when instancing collections with disabled subcollections
Root of the issue was actually hidden deep in depsgraph itself: it would
not properly update all of its COW IDs using a datablock when depsgraph
decides to evaluate or un-evaluate it.
This would lead to evaluated IDs pointing to either:
- orig IDs when there was an evaluated version of those (annoying bug,
but not a crashing one).
- old address of previously evaluated IDs that no longer exists in the
depsgraph (causing the crash from the report e.g.).
This commit adds an extra step at the end of nodes building, that goes
over all of already existing IDs in the depsgraph to check whether they
do one of the two things above, and tag them for COW update if so.
NOTE: This only affects depsgraph (re-)building, not its evaluation.
This remains consistent with the fact that operations that may change
the depsgraph content (like Collection exclusion etc.) need to trigger a
rebuild.
NOTE: Performances: Worst case scenarii, like (un-)excluding a whole
character collection in a production file, lead to 5% to 10% extra
processing time in depsgraph building. Most of it comming from extra COW
processing (in depsgraph's update in `build_step_finalize`), the detection
loop itself only accounts for 1% to 2% of the whole building time.
Maniphest Tasks: T85752
Differential Revision: https://developer.blender.org/D10907
Diffstat (limited to 'source/blender/blenlib/intern/math_geom.c')
0 files changed, 0 insertions, 0 deletions