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:
Diffstat (limited to 'source/blender/python/intern/bpy_library.c')
-rw-r--r--source/blender/python/intern/bpy_library.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c
index 3b0c6a9ff25..382a513f40a 100644
--- a/source/blender/python/intern/bpy_library.c
+++ b/source/blender/python/intern/bpy_library.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -312,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;
@@ -401,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!");
}
}