[Bf-blender-cvs] [e24553ca0f0] master: Writefile: Cleanup Soung runtime data.

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


Commit: e24553ca0f0d20a0eb738a39e55318756154a603
Author: Bastien Montagne
Date:   Wed Apr 1 11:43:03 2020 +0200
Branches: master
https://developer.blender.org/rBe24553ca0f0d20a0eb738a39e55318756154a603

Writefile: Cleanup Soung 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 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);



More information about the Bf-blender-cvs mailing list