[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36809] trunk/blender/source/blender/ blenloader/intern/readfile.c: no functional changes, make give_base_to_objects() arguments less confusing.
Campbell Barton
ideasman42 at gmail.com
Sat May 21 08:48:19 CEST 2011
Revision: 36809
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36809
Author: campbellbarton
Date: 2011-05-21 06:48:19 +0000 (Sat, 21 May 2011)
Log Message:
-----------
no functional changes, make give_base_to_objects() arguments less confusing.
Modified Paths:
--------------
trunk/blender/source/blender/blenloader/intern/readfile.c
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2011-05-21 06:04:44 UTC (rev 36808)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2011-05-21 06:48:19 UTC (rev 36809)
@@ -12716,10 +12716,11 @@
}
/* 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 @@
/* 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 {
More information about the Bf-blender-cvs
mailing list