diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index bac79cf4d01..5600b87d835 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6024,7 +6024,7 @@ static void expand_main(FileData *fd, Main *mainvar) } -static void give_base_to_objects(Scene *sce, ListBase *lb) +static void give_base_to_objects(Scene *sce, ListBase *lb, int is_linked) { Object *ob; Base *base; @@ -6035,7 +6035,7 @@ static void give_base_to_objects(Scene *sce, ListBase *lb) if( ob->id.flag & LIB_INDIRECT ) { /* hrmf... groups give user counter, so we check in that case entire scene */ - if(ob->id.us==0 || ((ob->flag & OB_FROMGROUP) && object_in_scene(ob, sce)==0) ) { + if(ob->id.us==0 || (is_linked==0 && (ob->flag & OB_FROMGROUP) && object_in_scene(ob, sce)==0) ) { base= MEM_callocN( sizeof(Base), "add_ext_base"); BLI_addtail(&(sce->base), base); @@ -6252,7 +6252,7 @@ void BLO_library_append(SpaceFile *sfile, char *dir, int idcode) lib_link_all(fd, G.main); /* give a base to loose objects */ - give_base_to_objects(G.scene, &(G.main->object)); + give_base_to_objects(G.scene, &(G.main->object), sfile->flag & FILE_LINK); /* has been removed... erm, why? (ton) */ /* 20040907: looks like they are give base already in append_named_part(); -Nathan L */ /* 20041208: put back. It only linked direct, not indirect objects (ton) */