diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-22 22:10:36 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-22 22:10:36 +0300 |
commit | 3a702ec028231e7deb012edac3eee5ed7f2436d4 (patch) | |
tree | 6be0f279d128d5f204ef89b4b8c1b20efdb6d41e /source/blender/blenkernel/intern/blendfile.c | |
parent | 3600e94ebac0d411042c54ed0970099a7a9cb932 (diff) |
Fix (unreported) usercount of linked IDs becoming garbage after undo/redo.
Not re-reading linked data-blocks in undo/redo case also means that we
do not touch to their usercounts. Even worse, lib_link process in
readfile will increase those (for cases where local data uses linked
one).
Whole data management code is now heavily relying on valid consistent
refcount of all IDs, so we cannot allow that anymore.
Simple solution here could have been to then not increase that one for
linked IDs in `newlibadr_us()`, but unfortunately that would not be
totally bullet-proof, as some local users of linked data may be added or
removed by an undo step...
So I cannot think of any other solution than the ugly brute force one,
i.e. going over the whole Main database and recompute linked IDs users
count... Should not be a big issue performance wise though, this is
fairly cheap process.
Diffstat (limited to 'source/blender/blenkernel/intern/blendfile.c')
0 files changed, 0 insertions, 0 deletions