[Bf-blender-cvs] [ee0d91df5dd] master: Writefile: Cleanup Scene runtime data.
Bastien Montagne
noreply at git.blender.org
Wed Apr 1 14:27:36 CEST 2020
Commit: ee0d91df5dd75029de6886db13e45af3d4c7ef7c
Author: Bastien Montagne
Date: Wed Apr 1 10:04:08 2020 +0200
Branches: master
https://developer.blender.org/rBee0d91df5dd75029de6886db13e45af3d4c7ef7c
Writefile: Cleanup Scene runtime data.
===================================================================
M source/blender/blenloader/intern/writefile.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list