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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-07-03 16:43:05 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-07-03 17:05:31 +0300
commitc44144835974ad877212973a4ae45c03b7c66f80 (patch)
tree269000fd1ee5f8846e5cb85dd1b6f59517670ff9 /source/blender/blenkernel/intern/customdata.c
parent3d187a2764c11e72293151bfc4a5dc2da1c75ec2 (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/blenkernel/intern/customdata.c')
-rw-r--r--source/blender/blenkernel/intern/customdata.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 76098db5fd1..5bfb14824b4 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -26,6 +26,9 @@
#include "MEM_guardedalloc.h"
+/* Since we have versioning code here (CustomData_verify_versions()). */
+#define DNA_DEPRECATED_ALLOW
+
#include "DNA_customdata_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_ID.h"
@@ -4191,9 +4194,10 @@ bool CustomData_verify_versions(struct CustomData *data, int index)
* Better to be safe here, and fix issue on the fly rather than crash... */
/* 0 structnum is used in writing code to tag layer types that should not be written. */
else if (typeInfo->structnum == 0 &&
- /* XXX Not sure why those two are exception, maybe that should be fixed? */
- !ELEM(layer->type, CD_PAINT_MASK, CD_FACEMAP)) {
+ /* XXX Not sure why those three are exception, maybe that should be fixed? */
+ !ELEM(layer->type, CD_PAINT_MASK, CD_FACEMAP, CD_MTEXPOLY)) {
keeplayer = false;
+ printf("%d\n", layer->type);
CLOG_WARN(&LOG, ".blend file read: removing a data layer that should not have been written");
}
}