diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-23 02:54:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-23 04:22:30 +0300 |
commit | a573d7e8a14ce5e49b8c05ff762a00e181e905aa (patch) | |
tree | 3edceaa599e3c9755e0512c6e343f9e3a4c4139b /source/blender/blenkernel/intern/library.c | |
parent | 58f3fabb97f9bb84e7b324dabd0ec4abc03f5cfe (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 12 |
1 files changed, 6 insertions, 6 deletions
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); } } |