Remove MTexPoly layers

This commit is contained in:
Campbell Barton 2017-05-26 20:58:57 +10:00
parent ff29914dcc
commit c6e92b4947
Notes: blender-bot 2023-02-14 10:04:50 +01:00
Referenced by commit 9caf328a7c, Revert "Remove MTexPoly layers"
Referenced by issue #51382, Proposal for removing TexFace in 2.8x
1 changed files with 13 additions and 0 deletions

View File

@ -33,12 +33,14 @@
#include "DNA_gpu_types.h"
#include "DNA_layer_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_genfile.h"
#include "BKE_blender.h"
#include "BKE_collection.h"
#include "BKE_customdata.h"
#include "BKE_idprop.h"
#include "BKE_layer.h"
#include "BKE_main.h"
@ -273,4 +275,15 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
/* MTexPoly now removed. */
if (DNA_struct_find(fd->filesdna, "MTexPoly")) {
const int cd_mtexpoly = 15; /* CD_MTEXPOLY, deprecated */
for (Mesh *me = main->mesh.first; me; me = me->id.next) {
/* If we have UV's, so this file will have MTexPoly layers too! */
if (me->mloopuv != NULL) {
CustomData_free_layers(&me->pdata, cd_mtexpoly, me->totpoly);
}
}
}
}