From 02b2fc5ec8029994efcd5c04e261db64464f5b08 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 30 Oct 2004 12:06:22 +0000 Subject: [PATCH] Added warning in makesdna to check for total struct sizes. Found error in wipe struct, which was even constructed terrible weird :) --- source/blender/makesdna/DNA_sequence_types.h | 5 +---- source/blender/makesdna/intern/makesdna.c | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 9c88c04caa7..3e79a688522 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -141,10 +141,7 @@ typedef struct Editing { /* ************* Effect Variable Structs ********* */ typedef struct WipeVars { float edgeWidth,angle; - short forward,spad1,spad2,spad3; - int ipad1; - float fpad1,fpad2; - short wipetype; + short forward, wipetype; } WipeVars; typedef struct GlowVars { diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index fab4f72a1ad..213ad3f9213 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -747,6 +747,12 @@ int calculate_structlens(void) dna_error = 1; } } + + if(len % 4) { + printf("Sizeerror in struct: %s\n", types[structtype]); + dna_error = 1; + } + } } }