diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 60 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 6 |
2 files changed, 58 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 5ea83f0375f..5c176c4a72b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2152,6 +2152,13 @@ static void lib_link_constraints(FileData *fd, ID *id, ListBase *conlist) data->tar = newlibadr(fd, id->lib, data->tar); } break; + case CONSTRAINT_TYPE_SHRINKWRAP: + { + bShrinkwrapConstraint *data; + data= ((bShrinkwrapConstraint*)con->data); + data->target = newlibadr(fd, id->lib, data->target); + } + break; case CONSTRAINT_TYPE_NULL: break; } @@ -3484,6 +3491,12 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) collmd->mfaces = NULL; } + else if (md->type==eModifierType_Surface) { + SurfaceModifierData *surmd = (SurfaceModifierData*) md; + + surmd->dm = NULL; + surmd->bvhtree = NULL; + } else if (md->type==eModifierType_Hook) { HookModifierData *hmd = (HookModifierData*) md; @@ -3820,7 +3833,9 @@ static void lib_link_scene(FileData *fd, Main *main) srl->mat_override= newlibadr_us(fd, sce->id.lib, srl->mat_override); srl->light_override= newlibadr_us(fd, sce->id.lib, srl->light_override); } - + /*Game Settings: Dome Warp Text*/ + sce->r.dometext= newlibadr_us(fd, sce->id.lib, sce->r.dometext); + sce->id.flag -= LIB_NEEDLINK; } @@ -5702,8 +5717,7 @@ static void do_versions_gpencil_2_50(Main *main, bScreen *screen) /* add regions */ for(sa= screen->areabase.first; sa; sa= sa->next) { - sl= sa->spacedata.first; - for(sl; sl; sl= sl->next) { + for(sl= sa->spacedata.first; sl; sl= sl->next) { if (sl->spacetype==SPACE_VIEW3D) { View3D *v3d= (View3D*) sl; if(v3d->gpd) { @@ -8801,6 +8815,35 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 3)) { + Object *ob; + + /* Adjustments needed after Bullets update */ + for(ob = main->object.first; ob; ob= ob->id.next) { + ob->damping *= 0.635f; + ob->rdamping = 0.1 + (0.59f * ob->rdamping); + } + } + + if (main->versionfile < 248 || (main->versionfile == 248 && main->subversionfile < 4)) { + Scene *sce; + World *wrld; + + /* Dome (Fisheye) default parameters */ + for (sce= main->scene.first; sce; sce= sce->id.next) { + sce->r.domeangle = 180; + sce->r.domemode = 1; + sce->r.domesize = 1.0f; + sce->r.domeres = 4; + sce->r.domeresbuf = 1.0f; + } + /* DBVT culling by default */ + for(wrld=main->world.first; wrld; wrld= wrld->id.next) { + wrld->mode |= WO_DBVT_CULLING; + wrld->occlusionRes = 128; + } + } + if (main->versionfile < 250) { bScreen *screen; Scene *scene; @@ -8921,7 +8964,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */ @@ -9568,6 +9611,12 @@ static void expand_constraints(FileData *fd, Main *mainvar, ListBase *lb) expand_doit(fd, mainvar, data->tar); } break; + case CONSTRAINT_TYPE_SHRINKWRAP: + { + bShrinkwrapConstraint *data = (bShrinkwrapConstraint*)curcon->data; + expand_doit(fd, mainvar, data->target); + } + break; default: break; } @@ -9797,6 +9846,9 @@ static void expand_scene(FileData *fd, Main *mainvar, Scene *sce) expand_doit(fd, mainvar, srl->mat_override); expand_doit(fd, mainvar, srl->light_override); } + + if(sce->r.dometext) + expand_doit(fd, mainvar, sce->r.dometext); } static void expand_camera(FileData *fd, Main *mainvar, Camera *ca) diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index d7d7ad79239..f93ad5eaf2b 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1434,9 +1434,9 @@ static void write_textures(WriteData *wd, ListBase *idbase) if (tex->adt) write_animdata(wd, tex->adt); /* direct data */ - if(tex->plugin) writestruct(wd, DATA, "PluginTex", 1, tex->plugin); + if(tex->type == TEX_PLUGIN && tex->plugin) writestruct(wd, DATA, "PluginTex", 1, tex->plugin); if(tex->coba) writestruct(wd, DATA, "ColorBand", 1, tex->coba); - if(tex->env) writestruct(wd, DATA, "EnvMap", 1, tex->env); + if(tex->type == TEX_ENVMAP && tex->env) writestruct(wd, DATA, "EnvMap", 1, tex->env); /* nodetree is integral part of texture, no libdata */ if(tex->nodetree) { @@ -1832,7 +1832,6 @@ static void write_screens(WriteData *wd, ListBase *scrbase) writestruct(wd, DATA, "SpaceFile", 1, sl); } else if(sl->spacetype==SPACE_SEQ) { - SpaceSeq *sseq= (SpaceSeq *)sl; writestruct(wd, DATA, "SpaceSeq", 1, sl); } else if(sl->spacetype==SPACE_OUTLINER) { @@ -1878,7 +1877,6 @@ static void write_screens(WriteData *wd, ListBase *scrbase) writestruct(wd, DATA, "SpaceTime", 1, sl); } else if(sl->spacetype==SPACE_NODE){ - SpaceNode *snode= (SpaceNode *)sl; writestruct(wd, DATA, "SpaceNode", 1, sl); } sl= sl->next; |