diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-04-01 11:04:08 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-04-01 13:39:06 +0300 |
commit | ee0d91df5dd75029de6886db13e45af3d4c7ef7c (patch) | |
tree | 53badea6958e51a8395f719e2b03ae8737c690c5 /source/blender | |
parent | 9532ce4605a45999fdf4841f716a94383e25bbab (diff) |
Writefile: Cleanup Scene runtime data.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index a9bcf2c13d6..f28063bc691 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1904,7 +1904,7 @@ static void write_shaderfxs(WriteData *wd, ListBase *fxbase) static void write_object(WriteData *wd, Object *ob, const void *id_address) { if (ob->id.us > 0 || wd->use_memfile) { - /* Clean up, important in udo case to reduce false detection of changed datablocks. */ + /* Clean up, important in undo case to reduce false detection of changed datablocks. */ BKE_object_runtime_reset(ob); /* write LibData */ @@ -2045,7 +2045,7 @@ static void write_mball(WriteData *wd, MetaBall *mb, const void *id_address) static void write_curve(WriteData *wd, Curve *cu, const void *id_address) { if (cu->id.us > 0 || wd->use_memfile) { - /* Clean up, important in udo case to reduce false detection of changed datablocks. */ + /* Clean up, important in undo case to reduce false detection of changed datablocks. */ cu->editnurb = NULL; cu->editfont = NULL; cu->batch_cache = NULL; @@ -2562,6 +2562,12 @@ static void write_lightcache(WriteData *wd, LightCache *cache) static void write_scene(WriteData *wd, Scene *sce, const void *id_address) { + /* Clean up, important in undo case to reduce false detection of changed datablocks. */ + if (sce->ed) { + sce->ed->cache = NULL; + sce->ed->prefetch_job = NULL; + } + /* write LibData */ writestruct_at_address(wd, ID_SCE, Scene, 1, id_address, sce); write_iddata(wd, &sce->id); |