diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-21 10:48:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-21 10:48:19 +0400 |
commit | 6c4cd8d9f313da2af5424a3cc405dfafb8b64f4a (patch) | |
tree | 642d8807c78610d515f2d2cd73ee2b25b7eb59b4 | |
parent | 1890b7f431a37c864617b9600ea60cb73c1ede12 (diff) |
no functional changes, make give_base_to_objects() arguments less confusing.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index f04e4d2d2a0..4f77f08bce1 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -12716,10 +12716,11 @@ static int object_in_any_scene(Main *mainvar, Object *ob) } /* when *lib set, it also does objects that were in the appended group */ -static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, int is_group_append) +static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const short idcode, const short is_link) { Object *ob; Base *base; + const short is_group_append= (is_link==FALSE && idcode==ID_GR); /* give all objects which are LIB_INDIRECT a base, or for a group when *lib has been set */ for(ob= mainvar->object.first; ob; ob= ob->id.next) { @@ -12996,21 +12997,18 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in /* give a base to loose objects. If group append, do it for objects too */ if(scene) { + const short is_link= (flag & FILE_LINK) != 0; if(idcode==ID_SCE) { /* dont instance anything when linking in scenes, assume the scene its self instances the data */ } else if(idcode==ID_GR) { - if (flag & FILE_LINK) { - give_base_to_objects(mainvar, scene, NULL, 0); - } else { - give_base_to_objects(mainvar, scene, curlib, 1); - } + give_base_to_objects(mainvar, scene, is_link ? NULL : curlib, idcode, is_link); if (flag & FILE_GROUP_INSTANCE) { give_base_to_groups(mainvar, scene); } } else { - give_base_to_objects(mainvar, scene, NULL, 0); + give_base_to_objects(mainvar, scene, NULL, idcode, is_link); } } else { |