Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <b.mont29@gmail.com>2020-04-01 12:28:41 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-04-01 13:39:06 +0300
commit254748c3e7c7068a6fed97f42c7012c7c2594c3e (patch)
tree1c3d0f4d0a9121a4e11da5066a66854d799303c4
parent4f509db181f6a73383180f0fa19239b8deb46d9c (diff)
Writefile: Cleanup Lattice runtime data.
-rw-r--r--source/blender/blenloader/intern/writefile.c4
1 files changed, 4 insertions, 0 deletions
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);