Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_legacy.c
| Show First 20 Lines • Show All 1,953 Lines • ▼ Show 20 Lines | |||||
| if (bmain->versionfile <= 245) { | if (bmain->versionfile <= 245) { | ||||
| Scene *sce; | Scene *sce; | ||||
| Object *ob; | Object *ob; | ||||
| Image *ima; | Image *ima; | ||||
| Light *la; | Light *la; | ||||
| Material *ma; | Material *ma; | ||||
| ParticleSettings *part; | ParticleSettings *part; | ||||
| Mesh *me; | |||||
| bNodeTree *ntree; | bNodeTree *ntree; | ||||
| Tex *tex; | Tex *tex; | ||||
| ModifierData *md; | ModifierData *md; | ||||
| ParticleSystem *psys; | ParticleSystem *psys; | ||||
| /* unless the file was created 2.44.3 but not 2.45, update the constraints */ | /* unless the file was created 2.44.3 but not 2.45, update the constraints */ | ||||
| if (!(bmain->versionfile == 244 && bmain->subversionfile == 3) && | if (!(bmain->versionfile == 244 && bmain->subversionfile == 3) && | ||||
| ((bmain->versionfile < 245) || | ((bmain->versionfile < 245) || | ||||
| ▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | for (ob = bmain->objects.first; ob; ob = ob->id.next) { | ||||
| if (!clmd->point_cache) { | if (!clmd->point_cache) { | ||||
| clmd->point_cache = BKE_ptcache_add(&clmd->ptcaches); | clmd->point_cache = BKE_ptcache_add(&clmd->ptcaches); | ||||
| clmd->point_cache->step = 1; | clmd->point_cache->step = 1; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Copy over old per-level multires vertex data | |||||
| * into a single vertex array in struct Multires */ | |||||
| for (me = bmain->meshes.first; me; me = me->id.next) { | |||||
| if (me->mr && !me->mr->verts) { | |||||
| MultiresLevel *lvl = me->mr->levels.last; | |||||
| if (lvl) { | |||||
| me->mr->verts = lvl->verts; | |||||
| lvl->verts = NULL; | |||||
| /* Don't need the other vert arrays */ | |||||
| for (lvl = lvl->prev; lvl; lvl = lvl->prev) { | |||||
| MEM_freeN(lvl->verts); | |||||
| lvl->verts = NULL; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| if (bmain->versionfile != 245 || bmain->subversionfile < 1) { | if (bmain->versionfile != 245 || bmain->subversionfile < 1) { | ||||
| for (la = bmain->lights.first; la; la = la->id.next) { | for (la = bmain->lights.first; la; la = la->id.next) { | ||||
| la->falloff_type = LA_FALLOFF_INVLINEAR; | la->falloff_type = LA_FALLOFF_INVLINEAR; | ||||
| if (la->curfalloff == NULL) { | if (la->curfalloff == NULL) { | ||||
| la->curfalloff = BKE_curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f); | la->curfalloff = BKE_curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f); | ||||
| BKE_curvemapping_init(la->curfalloff); | BKE_curvemapping_init(la->curfalloff); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 508 Lines • Show Last 20 Lines | |||||