diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-28 08:44:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-28 08:44:59 +0400 |
commit | 4b635d16316d12dd4c57e1dcf99092551e6bbe35 (patch) | |
tree | 6ea23bd0fe40254564bad60d6113e4362c4f7dd1 /source/blender/python/intern/bpy_library.c | |
parent | 3ad7445e28eaf36bf7a7907072205a757cc284d7 (diff) |
use generic path remapping when making all library data local, previously only image paths were getting corrected, now all paths will (scene image seq strips, pointcache etc)
Diffstat (limited to 'source/blender/python/intern/bpy_library.c')
-rw-r--r-- | source/blender/python/intern/bpy_library.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c index 651a626244f..382a513f40a 100644 --- a/source/blender/python/intern/bpy_library.c +++ b/source/blender/python/intern/bpy_library.c @@ -310,13 +310,14 @@ static void bpy_lib_exit_warn_type(BPy_Library *self, PyObject *item) static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) { + Main *bmain= CTX_data_main(BPy_GetContext()); Main *mainl= NULL; int err= 0; flag_all_listbases_ids(LIB_PRE_EXISTING, 1); /* here appending/linking starts */ - mainl= BLO_library_append_begin(CTX_data_main(BPy_GetContext()), &(self->blo_handle), self->relpath); + mainl= BLO_library_append_begin(bmain, &(self->blo_handle), self->relpath); { int i= 0, code; @@ -399,7 +400,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) /* append, rather than linking */ if ((self->flag & FILE_LINK)==0) { Library *lib= BLI_findstring(&G.main->library, self->abspath, offsetof(Library, name)); - if (lib) all_local(lib, 1); + if (lib) BKE_library_make_local(bmain, lib, 1); else BLI_assert(!"cant find name of just added library!"); } } |