diff options
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 117 |
1 files changed, 1 insertions, 116 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4ec4f43fb1e..82994eb0bc4 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3614,14 +3614,6 @@ static void lib_link_lamp(FileData *fd, Main *main) IDP_LibLinkProperty(la->id.properties, fd); lib_link_animdata(fd, &la->id, la->adt); - for (int a = 0; a < MAX_MTEX; a++) { - MTex *mtex = la->mtex[a]; - if (mtex) { - mtex->tex = newlibadr_us(fd, la->id.lib, mtex->tex); - mtex->object = newlibadr(fd, la->id.lib, mtex->object); - } - } - la->ipo = newlibadr_us(fd, la->id.lib, la->ipo); // XXX deprecated - old animation system if (la->nodetree) { @@ -3636,15 +3628,9 @@ static void lib_link_lamp(FileData *fd, Main *main) static void direct_link_lamp(FileData *fd, Lamp *la) { - int a; - la->adt = newdataadr(fd, la->adt); direct_link_animdata(fd, la->adt); - for (a=0; a<MAX_MTEX; a++) { - la->mtex[a] = newdataadr(fd, la->mtex[a]); - } - la->curfalloff = newdataadr(fd, la->curfalloff); if (la->curfalloff) direct_link_curvemapping(fd, la->curfalloff); @@ -3783,14 +3769,6 @@ static void lib_link_world(FileData *fd, Main *main) wrld->ipo = newlibadr_us(fd, wrld->id.lib, wrld->ipo); // XXX deprecated - old animation system - for (int a = 0; a < MAX_MTEX; a++) { - MTex *mtex = wrld->mtex[a]; - if (mtex) { - mtex->tex = newlibadr_us(fd, wrld->id.lib, mtex->tex); - mtex->object = newlibadr(fd, wrld->id.lib, mtex->object); - } - } - if (wrld->nodetree) { lib_link_ntree(fd, &wrld->id, wrld->nodetree); wrld->nodetree->id.lib = wrld->id.lib; @@ -3803,15 +3781,9 @@ static void lib_link_world(FileData *fd, Main *main) static void direct_link_world(FileData *fd, World *wrld) { - int a; - wrld->adt = newdataadr(fd, wrld->adt); direct_link_animdata(fd, wrld->adt); - for (a = 0; a < MAX_MTEX; a++) { - wrld->mtex[a] = newdataadr(fd, wrld->mtex[a]); - } - wrld->nodetree = newdataadr(fd, wrld->nodetree); if (wrld->nodetree) { direct_link_id(fd, &wrld->nodetree->id); @@ -4063,14 +4035,6 @@ static void lib_link_texture(FileData *fd, Main *main) tex->ima = newlibadr_us(fd, tex->id.lib, tex->ima); tex->ipo = newlibadr_us(fd, tex->id.lib, tex->ipo); // XXX deprecated - old animation system - if (tex->env) - tex->env->object = newlibadr(fd, tex->id.lib, tex->env->object); - if (tex->pd) - tex->pd->object = newlibadr(fd, tex->id.lib, tex->pd->object); - if (tex->vd) - tex->vd->object = newlibadr(fd, tex->id.lib, tex->vd->object); - if (tex->ot) - tex->ot->object = newlibadr(fd, tex->id.lib, tex->ot->object); if (tex->nodetree) { lib_link_ntree(fd, &tex->id, tex->nodetree); @@ -4088,35 +4052,7 @@ static void direct_link_texture(FileData *fd, Tex *tex) direct_link_animdata(fd, tex->adt); tex->coba = newdataadr(fd, tex->coba); - tex->env = newdataadr(fd, tex->env); - if (tex->env) { - tex->env->ima = NULL; - memset(tex->env->cube, 0, 6 * sizeof(void *)); - tex->env->ok= 0; - } - tex->pd = newdataadr(fd, tex->pd); - if (tex->pd) { - tex->pd->point_tree = NULL; - tex->pd->coba = newdataadr(fd, tex->pd->coba); - tex->pd->falloff_curve = newdataadr(fd, tex->pd->falloff_curve); - if (tex->pd->falloff_curve) { - direct_link_curvemapping(fd, tex->pd->falloff_curve); - } - tex->pd->point_data = NULL; /* runtime data */ - } - - tex->vd = newdataadr(fd, tex->vd); - if (tex->vd) { - tex->vd->dataset = NULL; - tex->vd->ok = 0; - } - else { - if (tex->type == TEX_VOXELDATA) - tex->vd = MEM_callocN(sizeof(VoxelData), "direct_link_texture VoxelData"); - } - - tex->ot = newdataadr(fd, tex->ot); - + tex->nodetree = newdataadr(fd, tex->nodetree); if (tex->nodetree) { direct_link_id(fd, &tex->nodetree->id); @@ -4140,15 +4076,6 @@ static void lib_link_material(FileData *fd, Main *main) lib_link_animdata(fd, &ma->id, ma->adt); ma->ipo = newlibadr_us(fd, ma->id.lib, ma->ipo); // XXX deprecated - old animation system - ma->group = newlibadr_us(fd, ma->id.lib, ma->group); - - for (int a = 0; a < MAX_MTEX; a++) { - MTex *mtex = ma->mtex[a]; - if (mtex) { - mtex->tex = newlibadr_us(fd, ma->id.lib, mtex->tex); - mtex->object = newlibadr(fd, ma->id.lib, mtex->object); - } - } if (ma->nodetree) { lib_link_ntree(fd, &ma->id, ma->nodetree); @@ -4162,18 +4089,10 @@ static void lib_link_material(FileData *fd, Main *main) static void direct_link_material(FileData *fd, Material *ma) { - int a; - ma->adt = newdataadr(fd, ma->adt); direct_link_animdata(fd, ma->adt); - for (a = 0; a < MAX_MTEX; a++) { - ma->mtex[a] = newdataadr(fd, ma->mtex[a]); - } ma->texpaintslot = NULL; - - ma->ramp_col = newdataadr(fd, ma->ramp_col); - ma->ramp_spec = newdataadr(fd, ma->ramp_spec); ma->nodetree = newdataadr(fd, ma->nodetree); if (ma->nodetree) { @@ -9383,15 +9302,6 @@ static void expand_brush(FileData *fd, Main *mainvar, Brush *brush) static void expand_material(FileData *fd, Main *mainvar, Material *ma) { - int a; - - for (a = 0; a < MAX_MTEX; a++) { - if (ma->mtex[a]) { - expand_doit(fd, mainvar, ma->mtex[a]->tex); - expand_doit(fd, mainvar, ma->mtex[a]->object); - } - } - expand_doit(fd, mainvar, ma->ipo); // XXX deprecated - old animation system if (ma->adt) @@ -9399,26 +9309,10 @@ static void expand_material(FileData *fd, Main *mainvar, Material *ma) if (ma->nodetree) expand_nodetree(fd, mainvar, ma->nodetree); - - if (ma->group) - expand_doit(fd, mainvar, ma->group); - - if (ma->edit_image) { - expand_doit(fd, mainvar, ma->edit_image); - } } static void expand_lamp(FileData *fd, Main *mainvar, Lamp *la) { - int a; - - for (a = 0; a < MAX_MTEX; a++) { - if (la->mtex[a]) { - expand_doit(fd, mainvar, la->mtex[a]->tex); - expand_doit(fd, mainvar, la->mtex[a]->object); - } - } - expand_doit(fd, mainvar, la->ipo); // XXX deprecated - old animation system if (la->adt) @@ -9440,15 +9334,6 @@ static void expand_lattice(FileData *fd, Main *mainvar, Lattice *lt) static void expand_world(FileData *fd, Main *mainvar, World *wrld) { - int a; - - for (a = 0; a < MAX_MTEX; a++) { - if (wrld->mtex[a]) { - expand_doit(fd, mainvar, wrld->mtex[a]->tex); - expand_doit(fd, mainvar, wrld->mtex[a]->object); - } - } - expand_doit(fd, mainvar, wrld->ipo); // XXX deprecated - old animation system if (wrld->adt) |