From a573d7e8a14ce5e49b8c05ff762a00e181e905aa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 Jun 2020 09:54:07 +1000 Subject: Cleanup: rename Library.filepath to filepath_abs Make it clear that this is the absolute path, allow the 'name' to be renamed to 'filepath'. Rename is safe since this is only for run-time. --- source/blender/blenkernel/intern/library.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel/intern/library.c') diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 64ffea22363..f9432eaab3f 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -85,19 +85,19 @@ void BKE_library_filepath_set(Main *bmain, Library *lib, const char *filepath) BLI_strncpy(lib->name, filepath, sizeof(lib->name)); } - BLI_strncpy(lib->filepath, filepath, sizeof(lib->filepath)); + BLI_strncpy(lib->filepath_abs, filepath, sizeof(lib->filepath_abs)); - /* not essential but set filepath is an absolute copy of value which - * is more useful if its kept in sync */ - if (BLI_path_is_rel(lib->filepath)) { + /* Not essential but set `filepath_abs` is an absolute copy of value which + * is more useful if its kept in sync. */ + if (BLI_path_is_rel(lib->filepath_abs)) { /* note that the file may be unsaved, in this case, setting the - * filepath on an indirectly linked path is not allowed from the + * `filepath_abs` on an indirectly linked path is not allowed from the * outliner, and its not really supported but allow from here for now * since making local could cause this to be directly linked - campbell */ /* Never make paths relative to parent lib - reading code (blenloader) always set *all* * lib->name 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, basepath); + BLI_path_abs(lib->filepath_abs, basepath); } } -- cgit v1.2.3