[Bf-blender-cvs] [254748c3e7c] master: Writefile: Cleanup Lattice runtime data.

Bastien Montagne noreply at git.blender.org
Wed Apr 1 14:27:36 CEST 2020


Commit: 254748c3e7c7068a6fed97f42c7012c7c2594c3e
Author: Bastien Montagne
Date:   Wed Apr 1 11:28:41 2020 +0200
Branches: master
https://developer.blender.org/rB254748c3e7c7068a6fed97f42c7012c7c2594c3e

Writefile: Cleanup Lattice 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 c92a64288d9..78e36a49c11 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2280,6 +2280,10 @@ static void write_mesh(WriteData *wd, Mesh *mesh, const void *id_address)
 static void write_lattice(WriteData *wd, Lattice *lt, const void *id_address)
 {
   if (lt->id.us > 0 || wd->use_memfile) {
+    /* Clean up, important in undo case to reduce false detection of changed datablocks. */
+    lt->editlatt = NULL;
+    lt->batch_cache = NULL;
+
     /* write LibData */
     writestruct_at_address(wd, ID_LT, Lattice, 1, id_address, lt);
     write_iddata(wd, &lt->id);



More information about the Bf-blender-cvs mailing list