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-05-19 10:17:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-19 10:17:44 +0400
commit1ce0958369790c743ed5aefabaad93189781f901 (patch)
tree858c770e64d21a835ab6148eb578c2e59549efbe /source/blender/blenloader
parent32793a13959eb28d3508ad3bb2ecc7490cf9dd5d (diff)
fix [#27437] Appending armatures with custom bone shapes brings no custom objects into scene.. impossible to edit
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c25f9d9e044..e5e1fb049b0 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4140,7 +4140,7 @@ static void direct_link_object(FileData *fd, Object *ob)
bActuator *act;
int a;
- /* weak weak... this was only meant as draw flag, now is used in give_base too */
+ /* weak weak... this was only meant as draw flag, now is used in give_base_to_objects too */
ob->flag &= ~OB_FROMGROUP;
/* loading saved files with editmode enabled works, but for undo we like
@@ -12735,12 +12735,22 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, int is
int do_it= 0;
- if(ob->id.us==0)
+ 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)
+ }
+ else if (lib==NULL) { /* appending */
+ if(object_in_any_scene(mainvar, ob)==0) {
+ /* when appending, make sure any indirectly loaded objects
+ * get a base else they cant be accessed at all [#27437] */
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;
+ }
+ }
+
if(do_it) {
base= MEM_callocN( sizeof(Base), "add_ext_base");
BLI_addtail(&(sce->base), base);
@@ -13010,6 +13020,9 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
give_base_to_objects(mainvar, scene, NULL, 0);
}
}
+ else {
+ printf("library_append_end, scene is NULL (objects wont get bases)\n");
+ }
/* has been removed... erm, why? s..ton) */
/* 20040907: looks like they are give base already in append_named_part(); -Nathan L */
/* 20041208: put back. It only linked direct, not indirect objects (ton) */