[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55503] trunk/blender/source/blender/ blenloader/intern/readfile.c: Bug fix #34726

Ton Roosendaal ton at blender.org
Fri Mar 22 12:14:05 CET 2013


Revision: 55503
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55503
Author:   ton
Date:     2013-03-22 11:14:04 +0000 (Fri, 22 Mar 2013)
Log Message:
-----------
Bug fix #34726

Appending a group (which adds all object members to scene), didn't follow the
setting "In active layer".

One note: only the scene layers are copied over, not local view3d layers.

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	2013-03-22 10:34:52 UTC (rev 55502)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2013-03-22 11:14:04 UTC (rev 55503)
@@ -10291,7 +10291,7 @@
 	return 0;
 }
 
-static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const short idcode, const short is_link)
+static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const short idcode, const short is_link, const short active_lay)
 {
 	Object *ob;
 	Base *base;
@@ -10335,6 +10335,9 @@
 				if (do_it) {
 					base = MEM_callocN(sizeof(Base), "add_ext_base");
 					BLI_addtail(&sce->base, base);
+					
+					if (active_lay) ob->lay = sce->lay;
+					
 					base->lay = ob->lay;
 					base->object = ob;
 					base->flag = ob->flag;
@@ -10593,7 +10596,7 @@
 				/* don't instance anything when linking in scenes, assume the scene its self instances the data */
 			}
 			else {
-				give_base_to_objects(mainvar, scene, curlib, idcode, is_link);
+				give_base_to_objects(mainvar, scene, curlib, idcode, is_link, flag & FILE_ACTIVELAY);
 				
 				if (flag & FILE_GROUP_INSTANCE) {
 					give_base_to_groups(mainvar, scene);




More information about the Bf-blender-cvs mailing list