diff options
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 8b66b1fc628..78729fb9261 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -68,6 +68,7 @@ #include "BLO_read_write.h" #include "SEQ_sequencer.h" +#include "SEQ_sound.h" static void sound_free_audio(bSound *sound); @@ -135,13 +136,19 @@ static void sound_foreach_cache(ID *id, static void sound_blend_write(BlendWriter *writer, ID *id, const void *id_address) { bSound *sound = (bSound *)id; - if (sound->id.us > 0 || BLO_write_is_undo(writer)) { + const bool is_undo = BLO_write_is_undo(writer); + if (sound->id.us > 0 || is_undo) { /* 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; + /* Do not store packed files in case this is a library override ID. */ + if (ID_IS_OVERRIDE_LIBRARY(sound) && !is_undo) { + sound->packedfile = NULL; + } + /* write LibData */ BLO_write_id_struct(writer, bSound, id_address, &sound->id); BKE_id_blend_write(writer, &sound->id); @@ -677,7 +684,7 @@ void BKE_sound_update_fps(Main *bmain, Scene *scene) AUD_Sequence_setFPS(scene->sound_scene, FPS); } - BKE_sequencer_refresh_sound_length(bmain, scene); + SEQ_sound_update_length(bmain, scene); } void BKE_sound_update_scene_listener(Scene *scene) @@ -819,7 +826,7 @@ void BKE_sound_update_sequencer(Main *main, bSound *sound) Scene *scene; for (scene = main->scenes.first; scene; scene = scene->id.next) { - BKE_sequencer_update_sound(scene, sound); + SEQ_sound_update(scene, sound); } } |