Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-03-22 15:14:04 +0400
committerTon Roosendaal <ton@blender.org>2013-03-22 15:14:04 +0400
commit5fb95d5567863dac395e346595a53b61dfb17746 (patch)
treeeac768fe52753fa225c5005fb5b4cec2effd2cbb /source
parent70319509ba7bb8878114ee3047f1a92def7967d4 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 177ed972e95..989b00313bf 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10291,7 +10291,7 @@ static int object_in_any_scene(Main *mainvar, Object *ob)
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 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const
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 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
/* 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);