diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-23 16:47:47 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-23 16:47:47 +0300 |
commit | c9975d19b5fa0811ce27fe1804192ee229c6dbad (patch) | |
tree | cc55aee9fe0023c5c3af57ce86682b8b330d9730 /source/blender/makesdna | |
parent | c8b24af1b2504ca674728b503294d19451eb7408 (diff) | |
parent | 8d35dceb14612322a0b70b36b94a2b63893a72af (diff) |
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/intern/dna_utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/dna_utils.c b/source/blender/makesdna/intern/dna_utils.c index 6708365a4c8..97f4785374a 100644 --- a/source/blender/makesdna/intern/dna_utils.c +++ b/source/blender/makesdna/intern/dna_utils.c @@ -232,6 +232,21 @@ void DNA_alias_maps(enum eDNA_RenameDir version_dir, GHash **r_struct_map, GHash for (int i = 0; i < ARRAY_SIZE(data); i++) { BLI_ghash_insert(struct_map, (void *)data[i][elem_key], (void *)data[i][elem_val]); } + + if (version_dir == DNA_RENAME_STATIC_FROM_ALIAS) { + const char *renames[][2] = { + {"int8_t", "char"}, /* Note that a char is always unsigned in Blender. */ + {"uint8_t", "uchar"}, + {"int16_t", "short"}, + {"uint16_t", "ushort"}, + {"int32_t", "int"}, + {"uint32_t", "int"}, + }; + for (int i = 0; i < ARRAY_SIZE(renames); i++) { + BLI_ghash_insert(struct_map, (void *)renames[i][0], (void *)renames[i][1]); + } + } + *r_struct_map = struct_map; /* We know the direction of this, for local use. */ |