Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_250.c
| Show First 20 Lines • Show All 793 Lines • ▼ Show 20 Lines | for (ob = bmain->objects.first; ob; ob = ob->id.next) { | ||||
| // for (pid = pidlist.first; pid; pid = pid->next) { | // for (pid = pidlist.first; pid; pid = pid->next) { | ||||
| // if (BLI_listbase_is_empty(pid->ptcaches)) | // if (BLI_listbase_is_empty(pid->ptcaches)) | ||||
| // pid->ptcaches->first = pid->ptcaches->last = pid->cache; | // pid->ptcaches->first = pid->ptcaches->last = pid->cache; | ||||
| //} | //} | ||||
| // BLI_freelistN(&pidlist); | // BLI_freelistN(&pidlist); | ||||
| if (ob->type == OB_MESH) { | |||||
| Mesh *me = blo_do_versions_newlibadr(fd, lib, ob->data); | |||||
| void *olddata = ob->data; | |||||
| ob->data = me; | |||||
| /* XXX - library meshes crash on loading most yoFrankie levels, | |||||
| * the multires pointer gets invalid - Campbell */ | |||||
| if (me && me->id.lib == NULL && me->mr && me->mr->level_count > 1) { | |||||
| multires_load_old(ob, me); | |||||
| } | |||||
| ob->data = olddata; | |||||
| } | |||||
| if (ob->totcol && ob->matbits == NULL) { | if (ob->totcol && ob->matbits == NULL) { | ||||
| int a; | int a; | ||||
| ob->matbits = MEM_calloc_arrayN(ob->totcol, sizeof(char), "ob->matbits"); | ob->matbits = MEM_calloc_arrayN(ob->totcol, sizeof(char), "ob->matbits"); | ||||
| for (a = 0; a < ob->totcol; a++) { | for (a = 0; a < ob->totcol; a++) { | ||||
| ob->matbits[a] = (ob->colbits & (1 << a)) != 0; | ob->matbits[a] = (ob->colbits & (1 << a)) != 0; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 323 Lines • ▼ Show 20 Lines | if (!MAIN_VERSION_ATLEAST(bmain, 250, 9)) { | ||||
| for (sce = bmain->scenes.first; sce; sce = sce->id.next) { | for (sce = bmain->scenes.first; sce; sce = sce->id.next) { | ||||
| if (!sce->toolsettings->particle.selectmode) { | if (!sce->toolsettings->particle.selectmode) { | ||||
| sce->toolsettings->particle.selectmode = SCE_SELECT_PATH; | sce->toolsettings->particle.selectmode = SCE_SELECT_PATH; | ||||
| } | } | ||||
| } | } | ||||
| if (bmain->versionfile == 250 && bmain->subversionfile > 1) { | if (bmain->versionfile == 250 && bmain->subversionfile > 1) { | ||||
| for (me = bmain->meshes.first; me; me = me->id.next) { | for (me = bmain->meshes.first; me; me = me->id.next) { | ||||
| multires_load_old_250(me); | CustomData_free_layer_active(&me->fdata, CD_MDISPS, me->totface); | ||||
| } | } | ||||
| for (ob = bmain->objects.first; ob; ob = ob->id.next) { | for (ob = bmain->objects.first; ob; ob = ob->id.next) { | ||||
| MultiresModifierData *mmd = (MultiresModifierData *)BKE_modifiers_findby_type( | MultiresModifierData *mmd = (MultiresModifierData *)BKE_modifiers_findby_type( | ||||
| ob, eModifierType_Multires); | ob, eModifierType_Multires); | ||||
| if (mmd) { | if (mmd) { | ||||
| mmd->totlvl--; | mmd->totlvl--; | ||||
| ▲ Show 20 Lines • Show All 1,222 Lines • Show Last 20 Lines | |||||