diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-14 13:32:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-14 13:32:14 +0300 |
commit | 5cce6894d2a7704dcd445d471764af4c6baa65aa (patch) | |
tree | 574f26527aedcf19aecb8372c7f87c728f9d2d83 /source/blender/blenkernel | |
parent | 381cef17738989ec846e667a39fc042bcd0261cf (diff) |
Cleanup: consistent naming for the blender file name
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index d7282b14734..c97b003d241 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -127,7 +127,7 @@ void BKE_library_filepath_set(Main *bmain, Library *lib, const char *filepath) */ /* Never make paths relative to parent lib - reading code (blenloader) always set *all* * `lib->filepath` relative to current main, not to their parent for indirectly linked ones. */ - const char *basepath = BKE_main_blendfile_path(bmain); - BLI_path_abs(lib->filepath_abs, basepath); + const char *blendfile_path = BKE_main_blendfile_path(bmain); + BLI_path_abs(lib->filepath_abs, blendfile_path); } } diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 3e99896054a..b27231e6a17 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -271,14 +271,11 @@ BLI_INLINE void sound_verify_evaluated_id(const ID *id) bSound *BKE_sound_new_file(Main *bmain, const char *filepath) { bSound *sound; - const char *path; + const char *blendfile_path = BKE_main_blendfile_path(bmain); char str[FILE_MAX]; BLI_strncpy(str, filepath, sizeof(str)); - - path = BKE_main_blendfile_path(bmain); - - BLI_path_abs(str, path); + BLI_path_abs(str, blendfile_path); sound = BKE_libblock_alloc(bmain, ID_SO, BLI_path_basename(filepath), 0); BLI_strncpy(sound->filepath, filepath, FILE_MAX); @@ -1249,15 +1246,14 @@ bool BKE_sound_stream_info_get(struct Main *main, int stream, SoundStreamInfo *sound_info) { - const char *path; + const char *blendfile_path = BKE_main_blendfile_path(main); char str[FILE_MAX]; AUD_Sound *sound; AUD_StreamInfo *stream_infos; int stream_count; BLI_strncpy(str, filepath, sizeof(str)); - path = BKE_main_blendfile_path(main); - BLI_path_abs(str, path); + BLI_path_abs(str, blendfile_path); sound = AUD_Sound_file(str); if (!sound) { |