[Bf-blender-cvs] [8d35dceb146] blender-v2.90-release: DNA: support fixed size integers
Jacques Lucke
noreply at git.blender.org
Thu Jul 23 15:47:05 CEST 2020
Commit: 8d35dceb14612322a0b70b36b94a2b63893a72af
Author: Jacques Lucke
Date: Thu Jul 23 15:42:45 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rB8d35dceb14612322a0b70b36b94a2b63893a72af
DNA: support fixed size integers
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D8373
===================================================================
M source/blender/makesdna/intern/dna_utils.c
===================================================================
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. */
More information about the Bf-blender-cvs
mailing list