diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-07-21 11:55:53 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-07-21 11:55:53 +0400 |
commit | d17ce0f148d5cb5d11cc3b1591b397865f3fb641 (patch) | |
tree | c193f9de664adc2c9b5b661ecab84122596df8e3 /source/blender/blenkernel/intern/sound.c | |
parent | 51bd50f746e56ade6fdfe04882af5f0d4b38367a (diff) |
Merging revision 30567 from my GSoC branch, log: Fix for sound not possible to load when file unsaved.
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index f780e71d5cd..ca39355976b 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -122,10 +122,15 @@ struct bSound* sound_new_file(struct Main *bmain, char* filename) bSound* sound = NULL; char str[FILE_MAX]; + char *path; + int len; strcpy(str, filename); - BLI_path_abs(str, bmain->name); + + path = /*bmain ? bmain->name :*/ G.sce; + + BLI_path_abs(str, path); len = strlen(filename); while(len > 0 && filename[len-1] != '/' && filename[len-1] != '\\') @@ -258,7 +263,7 @@ void sound_load(struct Main *bmain, struct bSound* sound) if(sound->id.lib) path = sound->id.lib->filepath; else - path = bmain ? bmain->name : G.sce; + path = /*bmain ? bmain->name :*/ G.sce; BLI_path_abs(fullpath, path); |