diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-02-19 14:50:04 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-02-19 14:56:02 +0300 |
commit | 367ecff15d74ed99a305cbfcd46599e59a75db02 (patch) | |
tree | 934a582bc6adff2bf4843c3ad6487cf320ebe925 /intern/mantaflow | |
parent | bde215a60c16ce77a60ecb38eaf7802965d73c7f (diff) |
readfile: Move ID refcounting to libquery.
Having that extra ID users handling at readfile level, besides generic
one ensured by libquery, has been something bothering me for a long time
(had to fix my share of bugs due to mismatches between those two areas).
Further more, work on undo speedup will require even more complex ID
refcount management if we want to keep it in readfile.c area.
So idea is instead to generalize what we did for linked data already
when undoing: recompute properly usercount numbers after liblink step,
for all IDs.
Note that extra time required here is neglectable in a whole .blend file
reading (few extra milliseconds when loading a full production scene
e.g.).
Notes:
* Some deprecated data (IPOs) are not refcounted at all anymore, this
should not be an issue in pratice since the are supposed to get deleted
after doversion anyway.
* Refcounting happens after `do_versions_after_linking`, i.e those
functions won't get valid ID usercounts currently. Again, this is not a
problem in current code, if needed we could recompute refcount before,
and then ensure `do_versions_after_linoiing()` actually handles properly
usercount, which it does not currently.
Differential Revision: https://developer.blender.org/D6881
Diffstat (limited to 'intern/mantaflow')
0 files changed, 0 insertions, 0 deletions