Blender Git Commit Log

Git Commits -> Revision 8f5ad8d

February 20, 2020, 12:00 (GMT)
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

Commit Details:

Full Hash: 8f5ad8df7e83edefd6e461d0d7df01e3c49e45e4
Parent Commit: f7ef613
Committed By: Julian Eisel
Lines Changed: +119, -129

3 Modified Paths:

/source/blender/blenkernel/intern/blendfile.c (+1, -1) (Diff)
/source/blender/blenloader/intern/readfile.c (+117, -126) (Diff)
/source/blender/blenloader/intern/versioning_legacy.c (+1, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021