diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-03 16:43:05 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-03 17:05:31 +0300 |
commit | c44144835974ad877212973a4ae45c03b7c66f80 (patch) | |
tree | 269000fd1ee5f8846e5cb85dd1b6f59517670ff9 /source/blender/blenloader | |
parent | 3d187a2764c11e72293151bfc4a5dc2da1c75ec2 (diff) |
Fix T66369: Excessive WARN messages in console when opening older files
CDData checking on file load was not taking into account deprecated
CD_MTEXPOLY datatype, which unfortunately shows same weird glitch as
CD_PAINT_MASK and CD_FACEMAP ones...
Note that it was annoying (due to amount of warnings in console), but
totally harmless, since that data type is just deleted anyway.
This commit also generally cleans up the CD_MTEXPOLY deprecation code, we
have a system to handle that, let's use it, instead of defining local
static values to replace it...
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 4b55364f0b1..5d899ef73a6 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1180,12 +1180,11 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* MTexPoly now removed. */ if (DNA_struct_find(fd->filesdna, "MTexPoly")) { - const int cd_mtexpoly = 15; /* CD_MTEXPOLY, deprecated */ 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 (me->mloopuv != NULL) { CustomData_update_typemap(&me->pdata); - CustomData_free_layers(&me->pdata, cd_mtexpoly, me->totpoly); + CustomData_free_layers(&me->pdata, CD_MTEXPOLY, me->totpoly); BKE_mesh_update_customdata_pointers(me, false); } } |