diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-04-01 11:15:13 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-04-01 13:39:06 +0300 |
commit | e790aa1f19ebed6d8135d8cc71003f490cbc219e (patch) | |
tree | f314acd36837bec337c55f72ef4caca8a01ffff3 /source/blender/blenloader | |
parent | 27b9f1f626294173269af85ef0d928d059179598 (diff) |
Writefile: Cleanup material runtime data.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index a8f219ccf84..4307d3c076f 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2361,6 +2361,10 @@ static void write_texture(WriteData *wd, Tex *tex, const void *id_address) static void write_material(WriteData *wd, Material *ma, const void *id_address) { if (ma->id.us > 0 || wd->use_memfile) { + /* Clean up, important in undo case to reduce false detection of changed datablocks. */ + ma->texpaintslot = NULL; + BLI_listbase_clear(&ma->gpumaterial); + /* write LibData */ writestruct_at_address(wd, ID_MA, Material, 1, id_address, ma); write_iddata(wd, &ma->id); |