From 2fcb9ef919b93626182c1d711bab7316140215a5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 6 Jul 2016 23:27:22 +1000 Subject: writefile: add flushes Flush on grease pencil and data with image preview or packed data. --- source/blender/blenloader/intern/writefile.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source') diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 77df7ae0431..217162a67dc 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1922,6 +1922,9 @@ static void write_vfonts(WriteData *wd, ListBase *idbase) vf = vf->id.next; } + + /* flush helps the compression for undo-save */ + mywrite(wd, MYWRITE_FLUSH, 0); } @@ -2358,6 +2361,9 @@ static void write_lattices(WriteData *wd, ListBase *idbase) } lt = lt->id.next; } + + /* flush helps the compression for undo-save */ + mywrite(wd, MYWRITE_FLUSH, 0); } static void write_images(WriteData *wd, ListBase *idbase) @@ -2571,6 +2577,9 @@ static void write_lamps(WriteData *wd, ListBase *idbase) } la = la->id.next; } + + /* flush helps the compression for undo-save */ + mywrite(wd, MYWRITE_FLUSH, 0); } static void write_sequence_modifiers(WriteData *wd, ListBase *modbase) @@ -2856,6 +2865,9 @@ static void write_gpencils(WriteData *wd, ListBase *lb) } } } + + /* flush helps the compression for undo-save */ + mywrite(wd, MYWRITE_FLUSH, 0); } static void write_windowmanagers(WriteData *wd, ListBase *lb) @@ -3291,6 +3303,9 @@ static void write_groups(WriteData *wd, ListBase *idbase) } } } + + /* flush helps the compression for undo-save */ + mywrite(wd, MYWRITE_FLUSH, 0); } static void write_nodetrees(WriteData *wd, ListBase *idbase) @@ -3914,6 +3929,9 @@ static void write_libraries(WriteData *wd, Main *main) } } } + + /* flush helps the compression for undo-save */ + mywrite(wd, MYWRITE_FLUSH, 0); } /* context is usually defined by WM, two cases where no WM is available: -- cgit v1.2.3