Blender Git Loki
Git Commits -> Revision 2a061a5
Revision 2a061a5 by Bastien Montagne (undo-experiments-swap-reread-datablocks, uuid-undo-experiments-swap-reread-datablocks) January 28, 2020, 20:22 (GMT) |
undoexp: initial implementation of ID swapping. Goal is to reuse same address also for changed IDs during an undo step. This will allow for a given ID to almost always keep its same address along a whole editing session, reducing a lot useless updates required by current memfile undo. Note that this commit has a lot of things to be investigated & fixed still, at the very least: * Refcounting is not really taken care of yet. This is fine for now since we remap everything still, but at some point plan is to not remap (liblink) reused unchanged IDs at all... * We keep the double libmap for now, getting rid of it requires further investigations (especially in some corner cases). * 'UI' IDs (WM, screen and WS) are likely troublemakers given their current weird specific handling. This might actually be seriously simplified with this new approach? * Since even changed IDs keep the same address, we are going to have to improve a lot the `id->recalc` handling - unless we accept a brute-force complete depsgraph update of the changed IDs. Last point is especially interesting, as with current code, updates do happen as expected most of the time (proper updates are missing sometimes). This means that even undo moving of a very highly modifier-subdivided object can be done "instantaneously" as that object updates does not requires a geometry update. Handling it properly will likely require to store the 'future' update flag (as we do currently with the future unchanged status). Not sure we'll catch all cases though, if that goes too far we may just force full update as a first step. :/ |
Commit Details:
Full Hash: 2a061a5610d45a93f31bfde41bc0fe8cb7c11680
Parent Commit: 06c2bb9
Lines Changed: +45, -10
1 Modified Path:
/source/blender/blenloader/intern/readfile.c (+45, -10) (Diff)