diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-04-01 12:43:03 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-04-01 13:39:06 +0300 |
commit | e24553ca0f0d20a0eb738a39e55318756154a603 (patch) | |
tree | 5b6eedd7860699763cbce5b9d222bed24a45b254 | |
parent | 8d63135da313b09562bb0cd4b0dd079b0ebabc64 (diff) |
Writefile: Cleanup Soung runtime data.
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 7567a76f565..e5209281d2b 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -3225,6 +3225,12 @@ static void write_speaker(WriteData *wd, Speaker *spk, const void *id_address) static void write_sound(WriteData *wd, bSound *sound, const void *id_address) { if (sound->id.us > 0 || wd->use_memfile) { + /* Clean up, important in undo case to reduce false detection of changed datablocks. */ + sound->tags = 0; + sound->handle = NULL; + sound->playback_handle = NULL; + sound->spinlock = NULL; + /* write LibData */ writestruct_at_address(wd, ID_SO, bSound, 1, id_address, sound); write_iddata(wd, &sound->id); |