Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-05-26 13:58:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-05-26 14:04:34 +0300
commitc6e92b4947945e3c1238d936f7954a5b4688c195 (patch)
treedbcc28562d3a68f69566a4d7cd83f166a0da1bce /source/blender
parentff29914dcc92ac2391608ffaff43326f7ce08106 (diff)
Remove MTexPoly layers
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index ea7a6316466..808984c88a0 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -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);
+ }
+ }
+ }
}