From a0867f05a48e2017a3b634cda5471c015af5bf35 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 5 Feb 2021 16:24:29 +0100 Subject: DNA: support structs with a size of 1 or 2 bytes. Before the smallest possible dna struct size was 4 bytes. Differential Revision: https://developer.blender.org/D10287 --- source/blender/makesdna/intern/makesdna.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 843e6935416..7624649bf78 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -1074,7 +1074,7 @@ static int calculate_struct_sizes(int firststruct, FILE *file_verify, const char } } - if (size_native % 4) { + if (size_native % 4 && !ELEM(size_native, 1, 2)) { fprintf(stderr, "Sizeerror 4 in struct: %s (add %d bytes)\n", types[structtype], -- cgit v1.2.3