From 481cdb08ed6f33a09d0e6843d1024db93c301178 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 5 Jun 2018 15:10:33 +0200 Subject: Cleanup: use new accessors to blendfile path (Main.name). --- source/blender/blenkernel/intern/sound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/sound.c') diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 45d1f969d64..7ad8f03dfee 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -79,7 +79,7 @@ bSound *BKE_sound_new_file(struct Main *bmain, const char *filepath) BLI_strncpy(str, filepath, sizeof(str)); - path = /*bmain ? bmain->name :*/ G.main->name; + path = BKE_main_blendfile_path(bmain); BLI_path_abs(str, path); @@ -98,7 +98,7 @@ bSound *BKE_sound_new_file_exists_ex(struct Main *bmain, const char *filepath, b char str[FILE_MAX], strtest[FILE_MAX]; BLI_strncpy(str, filepath, sizeof(str)); - BLI_path_abs(str, bmain->name); + BLI_path_abs(str, BKE_main_blendfile_path(bmain)); /* first search an identical filepath */ for (sound = bmain->sound.first; sound; sound = sound->id.next) { -- cgit v1.2.3