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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-09 08:28:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-09 08:28:53 +0400
commit252f7c9af845c22b5f0a39aa3e14e8823dd7ebd2 (patch)
tree760be18d451a08e452acf31f398b385add1ae888 /source/blender/blenloader
parent912db4cdb571d6421cb8c018a0db4fa93984549c (diff)
fix [#27616] Appending an object from a file brings all existing group links to scene
When appending from a blend file which had an object already linked, _but_ was not in any scenes. - the linked object would be instanced.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 49579432de2..1dc02c4b866 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -12742,8 +12742,14 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const
/* when appending, make sure any indirectly loaded objects
* get a base else they cant be accessed at all [#27437] */
if(ob->id.us==1 && is_link==FALSE && ob->id.lib==lib) {
- if(object_in_any_scene(mainvar, ob)==0) {
- do_it= 1;
+
+ /* we may be appending from a scene where we already
+ * have a linked object which is not in any scene [#27616] */
+ if((ob->id.flag & LIB_PRE_EXISTING)==0) {
+
+ if(object_in_any_scene(mainvar, ob)==0) {
+ do_it= 1;
+ }
}
}
}