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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-28 08:44:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-28 08:44:59 +0400
commit4b635d16316d12dd4c57e1dcf99092551e6bbe35 (patch)
tree6ea23bd0fe40254564bad60d6113e4362c4f7dd1 /source/blender/python
parent3ad7445e28eaf36bf7a7907072205a757cc284d7 (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')
-rw-r--r--source/blender/python/intern/bpy_library.c5
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!");
}
}