[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36810] trunk/blender/source/blender/ blenloader/intern/readfile.c: fix [#27437] Appending armatures with custom bone shapes brings no custom objects into scene ..
Campbell Barton
ideasman42 at gmail.com
Sat May 21 09:15:37 CEST 2011
Revision: 36810
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36810
Author: campbellbarton
Date: 2011-05-21 07:15:36 +0000 (Sat, 21 May 2011)
Log Message:
-----------
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.
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 2011-05-21 06:48:19 UTC (rev 36809)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2011-05-21 07:15:36 UTC (rev 36810)
@@ -12739,11 +12739,22 @@
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;
+ }
+ }
+ }
if(do_it) {
base= MEM_callocN( sizeof(Base), "add_ext_base");
@@ -13001,14 +13012,12 @@
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 {
More information about the Bf-blender-cvs
mailing list