diff options
author | Julian Eisel <julian@blender.org> | 2020-08-07 14:04:31 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-08-07 14:04:31 +0300 |
commit | 0d2d4a6d4a75ac38c41f872c88255eab70e88ab7 (patch) | |
tree | b7a7518af86dddba48e05a98b3c2be55e8804721 /source/blender/makesdna/intern/dna_utils.c | |
parent | 9b416c66fb714bdfd15a481489dbf650d0f389ea (diff) | |
parent | cfc6f9eb18e701f5be601b95c45004e8cf7fbc81 (diff) |
Merge branch 'master' into temp-ui-button-type-refactortemp-ui-button-type-refactor
Diffstat (limited to 'source/blender/makesdna/intern/dna_utils.c')
-rw-r--r-- | source/blender/makesdna/intern/dna_utils.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/dna_utils.c b/source/blender/makesdna/intern/dna_utils.c index 6708365a4c8..3cf5c52a4c6 100644 --- a/source/blender/makesdna/intern/dna_utils.c +++ b/source/blender/makesdna/intern/dna_utils.c @@ -232,6 +232,23 @@ 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] = { + /* Disable 'int8_t' until we support 'signed char', since changing negative + * values to a different type isn't supported and will change the value. */ + /* {"int8_t", "char"}, */ + {"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. */ |