From 8d63135da313b09562bb0cd4b0dd079b0ebabc64 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 1 Apr 2020 11:30:30 +0200 Subject: Writefile: Cleanup World runtime data. --- source/blender/blenloader/intern/writefile.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 78e36a49c11..7567a76f565 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2399,6 +2399,9 @@ static void write_material(WriteData *wd, Material *ma, const void *id_address) static void write_world(WriteData *wd, World *wrld, const void *id_address) { if (wrld->id.us > 0 || wd->use_memfile) { + /* Clean up, important in undo case to reduce false detection of changed datablocks. */ + BLI_listbase_clear(&wrld->gpumaterial); + /* write LibData */ writestruct_at_address(wd, ID_WO, World, 1, id_address, wrld); write_iddata(wd, &wrld->id); -- cgit v1.2.3