Blender Git Commits
Page: 12 / 13
Revision bb08351 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 8, 2020, 10:05 (GMT) |
Merge branch 'undo-experiments' into undo-experiments-idnames |
Revision 23d5ca8 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 8, 2020, 10:03 (GMT) |
undoexp: Fix crash on NULL depsgraph in storage/restoring code. There are some cases where a depsgraph has 'no time' to be built (like multi-steps undo's). Plus I guess in multi-viewlayers/scenes cases... |
Revision 2737bcd by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 7, 2020, 14:30 (GMT) |
Change message in case of pointer collision to always print. It is very difficult to test that code, as pointer collisions are expected to be rather rare... So for now systematically print when we detect one, could be at least a useful hint in bug report. And some more comments. |
Revision 7a893ff by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 6, 2020, 14:49 (GMT) |
Merge branch 'undo-experiments' into undo-experiments-idnames |
Revision 618c36b by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 6, 2020, 14:49 (GMT) |
Merge branch 'master' into undo-experiments |
Revision cc7f831 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 6, 2020, 09:38 (GMT) |
undoexp: much better handling of idname-based re-using old IDs. This commit adds obvious usage of a proper mapping to find local IDs in old Main based on their names. It also adds handling of potential pointer collisions between old Main realm and read .blend memfile realm. That last part is theoritical currently though, testing it actually works won't be easy (pointer collisions will happen, but they are not very likely to happen...). We are still missing some way to prevent all that new code to be ran over an undo step that contains ID renaming (ID creation/deletion should be safe, but idname-based search cannot work whith renaming). |
Revision ff8bd65 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 5, 2020, 17:27 (GMT) |
Merge branch 'undo-experiments' into undo-experiments-idnames |
Revision 9737ab7 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 5, 2020, 17:27 (GMT) |
Merge branch 'master' into undo-experiments |
Revision 176a3ad by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 2, 2020, 19:50 (GMT) |
undoexp: Initial, *VERY* basic code using ID names. This comes from the fact that we are now handling IDs from potentially many different 'memory realms' (at the very least, two of them, those read from memfile [new IDs], and those from previous Main [old IDs]). The main consequence is that using pointers (aka memory addresses) as 'uids' is not working anymore: we'd need to keep some sort of 'history' of all pointers a given data-block has had to get it working, and that would likely lead to 'pointer collisions' [1] at some point or another. So instead we need to use the only kind of uid we have for datablocks: their names. That patch is very basic, but it is enough to check undo/redo on basic object and pose-bone-of-rigged-mesh dummies, not get it crashing, and demonstrate huges speed-up in some artificial 'worst test case' scenario. There are still several things to do from there: * IDname handling: * Obviously, use a ghash instead of dummy linear list search! Most likely use BKE_library_idmap code to generate it. * Check and handle pointers collisions. [1] * Testing, testing and moar testing! These changes are highly dangerous and can destroy a blend file completely, so we'll need to be 100% sure they are working perfectly before puting them in master! [1] Pointer collision: the issue here is with 'old' memory addresses stored/used as uid in .blend file. When one read a .blend file as a whole this is not an issue, since all old data-blocks where in a single 'memory realm' (the old Main valid at time of file writing), and all new data-blocks are also in a single realm (the newly read file). Since we only remap each pointer once, this is fine. But when we start mixing those 'memory realms' by re-using IDs from old Main in this undo project, we can end up with the same 'uuid' old pointer value having to be remapped to two different new addresses. |
Revision ec71992 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 2, 2020, 16:03 (GMT) |
undoexp: fix crashes with even trivial relationships (like parent ones). Even if we re-used an old ID, it may have some pointers to other IDs remapped to newly read data, e.g. the `parent` of an object... So CoW/evaluated data in re-used despgraph needs to be flushed in those cases. |
Revision 0c76664 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 2, 2020, 16:00 (GMT) |
undoexp: Add new 'UNDO_OLD_ID_REUSED' ID tag. We need to be able to distinguish between reused IDs and newly read ones, and 'NEW' tag is not enough here, as it gets cleared in read code. This will be used in next commit to inform depsgraph that some re-used old IDs need at least a COW refresh, as they are using ID pointers to newly read data. |
Revision fdafa4f by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 2, 2020, 09:48 (GMT) |
Undoexp: do not tag re-used IDs with LIB_TAG_NEW. |
Revision c765025 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) January 2, 2020, 09:45 (GMT) |
Merge branch 'master' into undo-experiments |
Revision ae9d276 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) December 30, 2019, 16:58 (GMT) |
undoexp: do not clear icon_id of re-used IDs. Those icon_id's remain valid, and allocated in the preview system, clearing them here will lead to asserts... |
Revision 1ea1c12 by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) December 30, 2019, 14:30 (GMT) |
Merge branch 'master' into undo-experiments |
Revision 74b241b by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) December 23, 2019, 16:38 (GMT) |
Merge branch 'master' into undo-experiments |
Revision 0425faa by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) December 10, 2019, 10:58 (GMT) |
Fix stupid misplacement of depsgraphs extraction/restoration. |
Revision b417e2d by Bastien Montagne (undo-experiments-swap-reread-datablocks, uuid-undo-experiments-swap-reread-datablocks) December 10, 2019, 10:31 (GMT) |
Merge branch 'undo-experiments' into undo-experiments-swap-reread-datablocks |
Revision cbb9a5a by Bastien Montagne (undo-experiments, undo-experiments-idnames, undo-experiments-remap-history, undo-experiments-swap-reread-datablocks, uuid-undo-experiments, uuid-undo-experiments-swap-reread-datablocks) December 10, 2019, 10:14 (GMT) |
Merge branch 'master' into undo-experiments |
Revision 93b33b6 by Bastien Montagne (undo-experiments-swap-reread-datablocks, uuid-undo-experiments-swap-reread-datablocks) November 29, 2019, 15:58 (GMT) |
Undo: initial attempt to use ID swap to address pointers remapping issue. Not really working right now... |