From 252f7c9af845c22b5f0a39aa3e14e8823dd7ebd2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 9 Jun 2011 04:28:53 +0000 Subject: [PATCH] fix [#27616] Appending an object from a file brings all existing group links to scene When appending from a blend file which had an object already linked, _but_ was not in any scenes. - the linked object would be instanced. --- source/blender/blenloader/intern/readfile.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 49579432de2..1dc02c4b866 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -12742,8 +12742,14 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const /* when appending, make sure any indirectly loaded objects * get a base else they cant be accessed at all [#27437] */ if(ob->id.us==1 && is_link==FALSE && ob->id.lib==lib) { - if(object_in_any_scene(mainvar, ob)==0) { - do_it= 1; + + /* we may be appending from a scene where we already + * have a linked object which is not in any scene [#27616] */ + if((ob->id.flag & LIB_PRE_EXISTING)==0) { + + if(object_in_any_scene(mainvar, ob)==0) { + do_it= 1; + } } } }