Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-09 16:46:22 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-09 16:52:29 +0300
commit0385b33f0b3e389ea2a82c4b6bb181c684f0511a (patch)
tree554f34dda10b0b249e31eea2ee95a1b9b7f72f2d /source/blender/blenkernel/intern
parent69f2305415a224c277fe4fa9c81f846ba60cbb17 (diff)
Fix broken 'check/validate libs' code with indirect libs.
Readcode always set relative paths of indirectly linked libs relative to *current* .blend file, not to the library using it. But BKE_library_filepath_set was then setting them relative to their parent library, breaking checking code (and saved files even :((( ).
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/library.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 292f37b5ce9..ff4780f0605 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -2384,7 +2384,9 @@ void BKE_library_filepath_set(Library *lib, const char *filepath)
* outliner, and its not really supported but allow from here for now
* since making local could cause this to be directly linked - campbell
*/
- const char *basepath = lib->parent ? lib->parent->filepath : G.main->name;
+ /* Never make paths relative to parent lib - reading code (blenloader) always set *all* lib->name relative to
+ * current G.main, not to their parent for indirectly linked ones. */
+ const char *basepath = G.main->name;
BLI_path_abs(lib->filepath, basepath);
}
}