Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_280.c
| Show First 20 Lines • Show All 1,786 Lines • ▼ Show 20 Lines | if (!DNA_struct_elem_find(fd->filesdna, "GPUDOFSettings", "float", "ratio")) { | ||||
| ca->gpu_dof.ratio = 1.0f; | ca->gpu_dof.ratio = 1.0f; | ||||
| } | } | ||||
| } | } | ||||
| /* MTexPoly now removed. */ | /* MTexPoly now removed. */ | ||||
| if (DNA_struct_find(fd->filesdna, "MTexPoly")) { | if (DNA_struct_find(fd->filesdna, "MTexPoly")) { | ||||
| for (Mesh *me = bmain->meshes.first; me; me = me->id.next) { | for (Mesh *me = bmain->meshes.first; me; me = me->id.next) { | ||||
| /* If we have UV's, so this file will have MTexPoly layers too! */ | /* If we have UV's, so this file will have MTexPoly layers too! */ | ||||
| if (CustomData_has_layer(&me->ldata, CD_MLOOPUV)) { | if (CustomData_has_layer(&me->ldata, CD_MLOOPUV) || | ||||
Baardaap: I removed this because update_customdata_pointers() , which gets called during loading… | |||||
| CustomData_has_layer(&me->ldata, CD_PROP_FLOAT2)) { | |||||
| CustomData_update_typemap(&me->pdata); | CustomData_update_typemap(&me->pdata); | ||||
| CustomData_free_layers(&me->pdata, CD_MTEXPOLY, me->totpoly); | CustomData_free_layers(&me->pdata, CD_MTEXPOLY, me->totpoly); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 280, 2)) { | if (!MAIN_VERSION_ATLEAST(bmain, 280, 2)) { | ||||
| ▲ Show 20 Lines • Show All 3,276 Lines • Show Last 20 Lines | |||||
I removed this because update_customdata_pointers() , which gets called during loading, actually sets this to NULL when loading an old mesh with CD_MLOOPUV layers instead of CD_PROP_FLOAT2 layers. Thus causing this test to fail while it shouldn't. I hope the overhead of just unconditionally wiping those layers is not tooo much...