Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 05ea60b50df..868dafdb98a 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2137,45 +2137,21 @@ static void write_texts(WriteData *wd, ListBase *idbase)
static void write_sounds(WriteData *wd, ListBase *idbase)
{
bSound *sound;
- bSample *sample;
PackedFile * pf;
- // set all samples to unsaved status
-
- sample = samples->first; // samples is a global defined in sound.c
- while (sample) {
- sample->flags |= SAMPLE_NEEDS_SAVE;
- sample = sample->id.next;
- }
-
sound= idbase->first;
while(sound) {
if(sound->id.us>0 || wd->current) {
- // do we need to save the packedfile as well ?
- sample = sound->sample;
- if (sample) {
- if (sample->flags & SAMPLE_NEEDS_SAVE) {
- sound->newpackedfile = sample->packedfile;
- sample->flags &= ~SAMPLE_NEEDS_SAVE;
- } else {
- sound->newpackedfile = NULL;
- }
- }
-
/* write LibData */
writestruct(wd, ID_SO, "bSound", 1, sound);
if (sound->id.properties) IDP_WriteProperty(sound->id.properties, wd);
- if (sound->newpackedfile) {
- pf = sound->newpackedfile;
+ if (sound->packedfile) {
+ pf = sound->packedfile;
writestruct(wd, DATA, "PackedFile", 1, pf);
writedata(wd, DATA, pf->size, pf->data);
}
-
- if (sample) {
- sound->newpackedfile = sample->packedfile;
- }
}
sound= sound->id.next;
}