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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-10 14:17:59 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-10 14:17:59 +0400
commitac9ec06ec121589fedbfeaa10137140b45bfd668 (patch)
treeab08f9528136f0b8813593b78621f869d98d655e /source/blender/blenkernel/intern/library.c
parent3c064f4553e4be988fe4fcec450b59b935fa3c80 (diff)
parent63af7068ad17f30a526ccb81fbe74253b064bc89 (diff)
Merged changes in the trunk up to revision 54421.
Conflicts resolved: release/datafiles/startup.blend release/scripts/startup/bl_ui/properties_render.py source/blender/SConscript source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 610237abcdd..b4c1d681ddc 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -319,7 +319,7 @@ int id_copy(ID *id, ID **newid, int test)
if (!test) *newid = (ID *)BKE_texture_copy((Tex *)id);
return 1;
case ID_IM:
- if (!test) *newid = (ID *)BKE_image_copy((Image *)id);
+ if (!test) *newid = (ID *)BKE_image_copy(G.main, (Image *)id);
return 1;
case ID_LT:
if (!test) *newid = (ID *)BKE_lattice_copy((Lattice *)id);
@@ -766,13 +766,13 @@ void BKE_libblock_copy_data(ID *id, const ID *id_from, const short do_action)
}
/* used everywhere in blenkernel */
-void *BKE_libblock_copy(ID *id)
+void *BKE_libblock_copy_ex(Main *bmain, ID *id)
{
ID *idn;
ListBase *lb;
size_t idn_len;
- lb = which_libbase(G.main, GS(id->name));
+ lb = which_libbase(bmain, GS(id->name));
idn = BKE_libblock_alloc(lb, GS(id->name), id->name + 2);
assert(idn != NULL);
@@ -793,6 +793,11 @@ void *BKE_libblock_copy(ID *id)
return idn;
}
+void *BKE_libblock_copy(ID *id)
+{
+ return BKE_libblock_copy_ex(G.main, id);
+}
+
static void BKE_library_free(Library *lib)
{
if (lib->packedfile)