Fix for [#24654] Sound Actuator doesn't find the file when Blender is reopened.

This commit is contained in:
2010-11-13 13:44:45 +00:00
parent c1dec420b0
commit 2fbfd11f8d
4 changed files with 8 additions and 9 deletions

View File

@@ -467,7 +467,7 @@ int unpackVFont(ReportList *reports, VFont *vfont, int how)
return (ret_value);
}
int unpackSound(ReportList *reports, bSound *sound, int how)
int unpackSound(Main *bmain, ReportList *reports, bSound *sound, int how)
{
char localname[FILE_MAXDIR + FILE_MAX], fi[FILE_MAX];
char *newname;
@@ -486,7 +486,7 @@ int unpackSound(ReportList *reports, bSound *sound, int how)
freePackedFile(sound->packedfile);
sound->packedfile = 0;
sound_load(NULL, sound);
sound_load(bmain, sound);
ret_value = RET_OK;
}
@@ -536,6 +536,6 @@ void unpackAll(Main *bmain, ReportList *reports, int how)
for(sound=bmain->sound.first; sound; sound=sound->id.next)
if(sound->packedfile)
unpackSound(reports, sound, how);
unpackSound(bmain, reports, sound, how);
}