Bugfix;
More referenced library issues: if an Object loses the Armature (because for example the linked file removed it) the Object still had the Pose and posemode flag set, crashing Blender.
This commit is contained in:
@@ -307,6 +307,8 @@ void set_scene_bg(Scene *sce)
|
||||
flag= ob->flag & (OB_FROMGROUP);
|
||||
base->flag |= flag;
|
||||
|
||||
/* not too nice... for recovering objects with lost data */
|
||||
if(ob->pose==NULL) base->flag &= ~OB_POSEMODE;
|
||||
ob->flag= base->flag;
|
||||
|
||||
ob->ctime= -1234567.0; /* force ipo to be calculated later */
|
||||
|
||||
@@ -2613,6 +2613,13 @@ static void lib_link_object(FileData *fd, Main *main)
|
||||
warn= 1;
|
||||
if(ob->id.lib) printf("Can't find obdata of %s lib %s\n", ob->id.name+2, ob->id.lib->name);
|
||||
else printf("Object %s lost data. Lib:%x\n", ob->id.name+2, (unsigned int) ob->id.lib);
|
||||
|
||||
if(ob->pose) {
|
||||
free_pose_channels(ob->pose);
|
||||
MEM_freeN(ob->pose);
|
||||
ob->pose= NULL;
|
||||
ob->flag &= ~OB_POSEMODE;
|
||||
}
|
||||
}
|
||||
for(a=0; a<ob->totcol; a++) ob->mat[a]= newlibadr_us(fd, ob->id.lib, ob->mat[a]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user