diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-21 11:15:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-21 11:15:36 +0400 |
commit | b1025f2a3068ab31662d2da584c5dc7c26fe9b37 (patch) | |
tree | c4091cd748f814d32c6e9fc50bc31843b7afe960 | |
parent | 6c4cd8d9f313da2af5424a3cc405dfafb8b64f4a (diff) |
fix [#27437] Appending armatures with custom bone shapes brings no custom objects into scene.. impossible to edit
previous fix unintentionally made linking groups also add objects to the scene,
tested this more throughly, its ensured only to run on append and not to conflict with group linking/appending.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4f77f08bce1..a82f20e214b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -12739,9 +12739,20 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const if(ob->id.us==0) { do_it= 1; } - else if(ob->id.us==1 && lib) { - if(ob->id.lib==lib && (ob->flag & OB_FROMGROUP) && object_in_any_scene(mainvar, ob)==0) { - do_it= 1; + else if(idcode==ID_GR) { + if(ob->id.us==1 && is_link==FALSE && ob->id.lib==lib) { + if((ob->flag & OB_FROMGROUP) && object_in_any_scene(mainvar, ob)==0) { + do_it= 1; + } + } + } + else { + /* 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; + } } } @@ -13001,14 +13012,12 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in if(idcode==ID_SCE) { /* dont instance anything when linking in scenes, assume the scene its self instances the data */ } - else if(idcode==ID_GR) { - give_base_to_objects(mainvar, scene, is_link ? NULL : curlib, idcode, is_link); + else { + give_base_to_objects(mainvar, scene, curlib, idcode, is_link); if (flag & FILE_GROUP_INSTANCE) { give_base_to_groups(mainvar, scene); } - } else { - give_base_to_objects(mainvar, scene, NULL, idcode, is_link); } } else { |