Tweaked library link/append rules for groups a bit further;
- append group: appends group + puts objects in scene - link group: only links group, doesn't put objects in scene - append particle system with group: appends group + objects in scene - link particle system with group: only links group
This commit is contained in:
parent
43c95ee9f2
commit
1c89675a3a
@ -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) */
|
||||
|
Loading…
Reference in New Issue
Block a user