[Bf-blender-cvs] [b75f1410dbb] undo-experiments: undo experiments: actually write at leat one memchunck per ID.

Bastien Montagne noreply at git.blender.org
Fri Nov 15 12:08:55 CET 2019


Commit: b75f1410dbb34f1f63696d6a520d56e4a25c5e7a
Author: Bastien Montagne
Date:   Fri Nov 15 09:56:14 2019 +0100
Branches: undo-experiments
https://developer.blender.org/rBb75f1410dbb34f1f63696d6a520d56e4a25c5e7a

undo experiments: actually write at leat one memchunck per ID.

Checked that before, but missed the fact that the flush was done after a
whole ID type process in the main saving loop, now we actually do it
after every ID when using mem undo file saving.

Besides fixing the stupid issue with lots of unchanged IDs being
detected as changed when reading back the undo step, this should also
help reduce undo memory usage in some cases (although I could not detect
that with some quick test...).

===================================================================

M	source/blender/blenloader/intern/writefile.c

===================================================================

diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index a5a1056c1a2..30dca1770a7 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3935,6 +3935,10 @@ static bool write_file_handle(Main *mainvar,
         if (do_override) {
           BKE_override_library_operations_store_end(override_storage, id);
         }
+
+        if (wd->use_memfile) {
+          mywrite_flush(wd);
+        }
       }
 
       mywrite_flush(wd);



More information about the Bf-blender-cvs mailing list