118# define MAKE_ID(a, b, c, d) (int(a) << 24 | int(b) << 16 | (c) << 8 | (d))
121# define MAKE_ID(a, b, c, d) (int(d) << 24 | int(c) << 16 | (b) << 8 | (a))
170 return (name[0] ==
'*' || (name[0] ==
'(' && name[1] ==
'*'));
175 const char *cp = sdna->
members[member_index];
192static void printstruct(
SDNA *sdna,
short struct_index)
197 printf(
"struct %s\n", sdna->
types[struct_info->type]);
199 for (
int b = 0;
b < struct_info->members_len;
b++) {
201 printf(
" %s %s\n", sdna->
types[struct_member->type], sdna->names[struct_member->name]);
220 uint *struct_index_last)
225 return *struct_index_last;
232 if (struct_index_p) {
234 *struct_index_last = struct_index;
240 for (
int struct_index = 0; struct_index <
types_num; struct_index++) {
242 if (
STREQ(types[struct_info->type],
str)) {
243 *struct_index_last = struct_index;
254 uint *struct_index_last)
323 int member_index_gravity_fix = -1;
325 int *data = (
int *)sdna->
data;
329 sdna->
types =
nullptr;
340 if (*data !=
MAKE_ID(
'S',
'D',
'N',
'A')) {
341 *r_error_message =
"SDNA error in SDNA file";
349 if (*data ==
MAKE_ID(
'N',
'A',
'M',
'E')) {
353 if (do_endian_swap) {
359 sdna->
members =
static_cast<const char **
>(
363 *r_error_message =
"NAME error in SDNA file";
368 for (
int member_index = 0; member_index < sdna->
members_num; member_index++) {
369 sdna->
members[member_index] = cp;
374 if (*cp ==
'[' &&
STREQ(cp,
"[3]")) {
375 if (member_index &&
STREQ(sdna->
members[member_index - 1],
"Cvi")) {
376 sdna->
members[member_index] =
"gravity[3]";
377 member_index_gravity_fix = member_index;
390 if (*data ==
MAKE_ID(
'T',
'Y',
'P',
'E')) {
394 if (do_endian_swap) {
399 sdna->
types =
static_cast<const char **
>(
403 *r_error_message =
"TYPE error in SDNA file";
408 for (
int type_index = 0; type_index < sdna->
types_num; type_index++) {
422 if (*data ==
MAKE_ID(
'T',
'L',
'E',
'N')) {
427 if (do_endian_swap) {
434 *r_error_message =
"TLEN error in SDNA file";
444 if (*data ==
MAKE_ID(
'S',
'T',
'R',
'C')) {
448 if (do_endian_swap) {
457 *r_error_message =
"STRC error in SDNA file";
462 for (
int struct_index = 0; struct_index < sdna->
structs_num; struct_index++) {
464 sdna->
structs[struct_index] = struct_info;
466 if (do_endian_swap) {
470 for (
short a = 0; a < struct_info->
members_num; a++) {
481 if (member_index_gravity_fix > -1) {
482 for (
int struct_index = 0; struct_index < sdna->
structs_num; struct_index++) {
483 sp = (
short *)sdna->
structs[struct_index];
484 if (
STREQ(sdna->
types[sp[0]],
"ClothSimSettings")) {
516 *r_error_message =
"ListBase struct error! Not found.";
526 *r_error_message =
"ListBase struct error: invalid computed pointer-size.";
533 short *members_array_num =
static_cast<short int *
>(
535 for (
int member_index = 0; member_index < sdna->
members_num; member_index++) {
543 for (
int type_index = 0; type_index < sdna->
types_num; type_index++) {
549 uint dummy_index = 0;
551 sdna,
"mat4x4f", &dummy_index);
552 if (mat4x4f_struct_index > 0) {
554 const int mat4x4f_type_index = struct_info->
type_index;
567 const char **r_error_message)
570 const char *error_message =
nullptr;
574 char *data_copy =
static_cast<char *
>(
MEM_mallocN(data_len,
"sdna_data"));
575 memcpy(data_copy, data, data_len);
576 sdna->
data = data_copy;
579 sdna->
data =
static_cast<const char *
>(
data);
590 if (r_error_message ==
nullptr) {
591 fprintf(stderr,
"Error decoding blend file SDNA: %s\n", error_message);
594 *r_error_message = error_message;
636 const int old_struct_index)
647 if (new_struct_index == -1) {
666 for (
int member_index = 0; member_index < old_struct->
members_num; member_index++) {
672 if (!
STREQ(old_type_name, new_type_name)) {
680 if (!
STREQ(old_member_name, new_member_name)) {
697 if (old_member_struct_index >= 0) {
714 printf(
"error: file without SDNA\n");
722 for (
int old_struct_index = 0; old_struct_index < oldsdna->
structs_num; old_struct_index++) {
754 for (
int a = 0; a < oldsdna->structs_len; a++) {
757 printf(
"changed: %s\n", oldsdna->
types[struct_info->type]);
762 return compare_flags;
780 const char *old_data,
787 double old_value_f = 0.0;
792 for (
int a = 0; a < array_len; a++) {
795 const char value = *old_data;
797 old_value_f =
double(value);
801 const uchar value = *
reinterpret_cast<const uchar *
>(old_data);
803 old_value_f =
double(value);
807 const short value = *
reinterpret_cast<const short *
>(old_data);
809 old_value_f =
double(value);
813 const ushort value = *
reinterpret_cast<const ushort *
>(old_data);
815 old_value_f =
double(value);
819 const int value = *
reinterpret_cast<const int *
>(old_data);
821 old_value_f =
double(value);
825 const float value = *
reinterpret_cast<const float *
>(old_data);
832 const double value = *
reinterpret_cast<const double *
>(old_data);
839 const int64_t value = *
reinterpret_cast<const int64_t *
>(old_data);
841 old_value_f =
double(value);
847 old_value_f =
double(value);
851 const int8_t value = *
reinterpret_cast<const int8_t *
>(old_data);
853 old_value_f =
double(value);
857 BLI_assert_msg(
false,
"Conversion from SDNA_TYPE_RAW_DATA is not supported");
863 *new_data = char(old_value_i);
866 *
reinterpret_cast<uchar *
>(new_data) =
uchar(old_value_i);
869 *
reinterpret_cast<short *
>(new_data) =
short(old_value_i);
872 *
reinterpret_cast<ushort *
>(new_data) =
ushort(old_value_i);
875 *
reinterpret_cast<int *
>(new_data) =
int(old_value_i);
879 old_value_f /= 255.0;
881 *
reinterpret_cast<float *
>(new_data) = old_value_f;
885 old_value_f /= 255.0;
887 *
reinterpret_cast<double *
>(new_data) = old_value_f;
893 *
reinterpret_cast<uint64_t *
>(new_data) = old_value_i;
896 *
reinterpret_cast<int8_t *
>(new_data) =
int8_t(old_value_i);
899 BLI_assert_msg(
false,
"Conversion to SDNA_TYPE_RAW_DATA is not supported");
912 for (
int a = 0; a < array_len; a++) {
913 new_data[a] = old_data[a];
924 for (
int a = 0; a < array_len; a++) {
925 new_data[a] = old_data[a] >> 3;
937 if (name[a] != oname[a]) {
940 if (name[a] ==
'[' || oname[a] ==
'[') {
943 if (name[a] == 0 || oname[a] == 0) {
972 const char *otype = types[member->
type_index];
976 return STREQ(type, otype);
1028 const char *otype = types[member->
type_index];
1031 if (
STREQ(type, otype)) {
1104 return type_size * array_length;
1109 if (struct_index == -1) {
1115 int offset_in_bytes = 0;
1116 for (
int member_index = 0; member_index < struct_info->
members_num; member_index++) {
1119 char *member_data = data + offset_in_bytes;
1123 switch (member_category) {
1128 for (
int a = 0; a < member_array_length; a++) {
1163 if (
sizeof(
void *) < 8) {
1225 const int old_struct_index,
1226 const int new_struct_index,
1227 const char *old_blocks,
1240 const int new_struct_index,
1241 const char *old_block,
1245 const int step_count = reconstruct_info->
step_counts[new_struct_index];
1248 for (
int a = 0; a < step_count; a++) {
1250 switch (step->type) {
1252 memcpy(new_block + step->data.memcpy.new_offset,
1253 old_block + step->data.memcpy.old_offset,
1254 step->data.memcpy.size);
1258 step->data.cast_primitive.new_type,
1259 step->data.cast_primitive.array_len,
1260 old_block + step->data.cast_primitive.old_offset,
1261 new_block + step->data.cast_primitive.new_offset);
1265 (
const uint64_t *)(old_block + step->data.cast_pointer.old_offset),
1266 (
uint32_t *)(new_block + step->data.cast_pointer.new_offset));
1270 (
const uint32_t *)(old_block + step->data.cast_pointer.old_offset),
1271 (
uint64_t *)(new_block + step->data.cast_pointer.new_offset));
1275 step->data.substruct.array_len,
1276 step->data.substruct.old_struct_index,
1277 step->data.substruct.new_struct_index,
1278 old_block + step->data.substruct.old_offset,
1279 new_block + step->data.substruct.new_offset);
1294 const int old_struct_index,
1295 const int new_struct_index,
1296 const char *old_blocks,
1305 for (
int a = 0; a < blocks; a++) {
1306 const char *old_block = old_blocks + a * old_block_size;
1307 char *new_block = new_blocks + a * new_block_size;
1313 int old_struct_index,
1315 const void *old_blocks,
1316 const char *alloc_name)
1325 if (new_struct_index == -1) {
1333 char *new_blocks =
static_cast<char *
>(
1339 static_cast<const char *
>(old_blocks),
1351 for (
int a = 0; a < struct_info->
members_num; a++) {
1365 const SDNA *newsdna,
1366 const char *compare_flags,
1369 const int new_member_offset,
1374 int old_member_offset;
1377 oldsdna, old_struct, new_name, &old_member_offset);
1379 if (old_member ==
nullptr) {
1389 if (new_category != old_category) {
1398 const int shared_array_length = std::min(new_array_length, old_array_length);
1403 switch (new_category) {
1405 if (
STREQ(new_type_name, old_type_name)) {
1409 compare_flags[old_struct_index]);
1417 shared_array_length;
1441 if (
STREQ(new_type_name, old_type_name)) {
1447 shared_array_length;
1493 const SDNA *oldsdna,
1494 const SDNA *newsdna)
1496 switch (step->type) {
1498 printf(
"initialize zero");
1502 printf(
"memcpy, size: %d, old offset: %d, new offset: %d",
1503 step->data.memcpy.size,
1504 step->data.memcpy.old_offset,
1505 step->data.memcpy.new_offset);
1510 "cast element, old type: %d ('%s'), new type: %d ('%s'), old offset: %d, new offset: "
1512 int(step->data.cast_primitive.old_type),
1513 oldsdna->
types[step->data.cast_primitive.old_type],
1514 int(step->data.cast_primitive.new_type),
1515 newsdna->
types[step->data.cast_primitive.new_type],
1516 step->data.cast_primitive.old_offset,
1517 step->data.cast_primitive.new_offset,
1518 step->data.cast_primitive.array_len);
1522 printf(
"pointer to 32, old offset: %d, new offset: %d, length: %d",
1523 step->data.cast_pointer.old_offset,
1524 step->data.cast_pointer.new_offset,
1525 step->data.cast_pointer.array_len);
1529 printf(
"pointer to 64, old offset: %d, new offset: %d, length: %d",
1530 step->data.cast_pointer.old_offset,
1531 step->data.cast_pointer.new_offset,
1532 step->data.cast_pointer.array_len);
1537 "substruct, old offset: %d, new offset: %d, new struct: %d ('%s', size per struct: %d), "
1539 step->data.substruct.old_offset,
1540 step->data.substruct.new_offset,
1541 step->data.substruct.new_struct_index,
1544 step->data.substruct.array_len);
1555 const SDNA *newsdna,
1556 const char *compare_flags,
1563 int new_member_offset = 0;
1564 for (
int new_member_index = 0; new_member_index < new_struct->
members_num; new_member_index++) {
1572 &
steps[new_member_index]);
1582 int new_step_count = 0;
1583 for (
int a = 0; a < old_step_count; a++) {
1585 switch (step->type) {
1590 if (new_step_count > 0) {
1596 step->data.memcpy.old_offset &&
1598 step->data.memcpy.new_offset)
1605 steps[new_step_count] = *step;
1614 steps[new_step_count] = *step;
1619 return new_step_count;
1623 const SDNA *newsdna,
1624 const char *compare_flags)
1628 reconstruct_info->
oldsdna = oldsdna;
1629 reconstruct_info->
newsdna = newsdna;
1631 reconstruct_info->
step_counts =
static_cast<int *
>(
1637 for (
int new_struct_index = 0; new_struct_index < newsdna->
structs_num; new_struct_index++) {
1641 if (old_struct_index < 0) {
1642 reconstruct_info->
steps[new_struct_index] =
nullptr;
1643 reconstruct_info->
step_counts[new_struct_index] = 0;
1648 oldsdna, newsdna, compare_flags, old_struct, new_struct);
1653 reconstruct_info->
steps[new_struct_index] =
steps;
1654 reconstruct_info->
step_counts[new_struct_index] = steps_len;
1658 printf(
"%s: \n", new_struct_name);
1659 for (
int a = 0; a < steps_len; a++) {
1667 return reconstruct_info;
1672 for (
int new_struct_index = 0; new_struct_index < reconstruct_info->
newsdna->
structs_num;
1675 if (reconstruct_info->
steps[new_struct_index] !=
nullptr) {
1686 const char *vartype,
1697 const char *vartype,
1713 const char *vartype,
1718 if (struct_index != -1) {
1731 const char *vartype,
1766 BLI_assert_msg(
false,
"Operations on the size of SDNA_TYPE_RAW_DATA is not supported");
1794#ifdef WITH_DNA_GHASH
1804 const char *old_type_name,
1805 const char *new_type_name)
1808 if (struct_index != -1) {
1816 const int struct_index,
1817 const char *old_member_name,
1818 const char *new_member_name)
1823 const int old_member_name_len = strlen(old_member_name);
1824 const int new_member_name_len = strlen(new_member_name);
1827 for (
int struct_member_index = struct_info->
members_num; struct_member_index > 0;
1828 struct_member_index--)
1833 uint old_member_name_full_offset_start;
1835 old_member_name_len,
1836 old_member_name_full,
1837 &old_member_name_full_offset_start))
1844 old_member_name_len,
1846 new_member_name_len,
1847 old_member_name_full,
1848 strlen(old_member_name_full),
1849 old_member_name_full_offset_start);
1859 const short old_member_index = member_info->
member_index;
1871 const char *type_name,
1872 const char *old_member_name,
1873 const char *new_member_name)
1876 if (struct_index != -1) {
1898 int names_expand_len = 0;
1899 for (
int struct_index = 0; struct_index < sdna->
structs_num; struct_index++) {
1903 const char **names_expand =
static_cast<const char **
>(
1904 MEM_mallocN(
sizeof(*names_expand) * names_expand_len, __func__));
1905 short *names_array_len_expand =
static_cast<short int *
>(
1906 MEM_mallocN(
sizeof(*names_array_len_expand) * names_expand_len, __func__));
1908 int names_expand_index = 0;
1909 for (
int struct_index = 0; struct_index < sdna->
structs_num; struct_index++) {
1916 memcpy(struct_new, struct_old, array_size);
1917 sdna->
structs[struct_index] = struct_new;
1919 for (
int i = 0; i < struct_old->
members_num; i++) {
1924 names_array_len_expand[names_expand_index] =
1929 names_expand_index++;
1942 GHash *elem_map_alias_from_static,
1943 const char *struct_name_static,
1944 const char *elem_static_full)
1946 const int elem_static_full_len = strlen(elem_static_full);
1947 char *elem_static =
static_cast<char *
>(alloca(elem_static_full_len + 1));
1949 const char *str_pair[2] = {struct_name_static, elem_static};
1950 const char *elem_alias =
static_cast<const char *
>(
1959 elem_static_full_len,
1972 const bool use_legacy_hack =
true;
1985 sdna->
alias.
types =
static_cast<const char **
>(
1987 for (
int type_index = 0; type_index < sdna->
types_num; type_index++) {
1988 const char *type_name_static = sdna->
types[type_index];
1990 if (use_legacy_hack) {
2003 for (
int struct_index = 0; struct_index < sdna->
structs_num; struct_index++) {
2005 const char *struct_name_static = sdna->
types[struct_info->
type_index];
2007 if (use_legacy_hack) {
2011 for (
int a = 0; a < struct_info->
members_num; a++) {
2018 if (member_alias_full !=
nullptr) {
2038#ifdef WITH_DNA_GHASH
#define BLI_STATIC_ASSERT(a, msg)
#define BLI_assert_msg(a, msg)
BLI_INLINE void BLI_endian_switch_int32(int *val) ATTR_NONNULL(1)
void BLI_endian_switch_int32_array(int *val, int size) ATTR_NONNULL(1)
void BLI_endian_switch_uint64_array(uint64_t *val, int size) ATTR_NONNULL(1)
void BLI_endian_switch_int64_array(int64_t *val, int size) ATTR_NONNULL(1)
void BLI_endian_switch_int16_array(short *val, int size) ATTR_NONNULL(1)
BLI_INLINE void BLI_endian_switch_int16(short *val) ATTR_NONNULL(1)
void * BLI_ghash_lookup_default(const GHash *gh, const void *key, void *val_default) ATTR_WARN_UNUSED_RESULT
void ** BLI_ghash_lookup_p(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_str_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void * BLI_memarena_alloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2)
void BLI_memarena_free(struct MemArena *ma) ATTR_NONNULL(1)
struct MemArena * BLI_memarena_new(size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(2) ATTR_MALLOC
#define BLI_MEMARENA_STD_BUFSIZE
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
typedef double(DMatrix)[4][4]
blenloader genfile private function prototypes
const unsigned char DNAstr[]
struct SDNA_StructMember SDNA_StructMember
#define SDNA_RAW_DATA_STRUCT_INDEX
Read Guarded memory(de)allocation.
#define MEM_recallocN(vmemh, len)
local_group_size(16, 16) .push_constant(Type b
bool DNA_struct_member_exists_with_alias(const SDNA *sdna, const char *stype, const char *vartype, const char *name)
static bool init_structDNA(SDNA *sdna, bool do_endian_swap, const char **r_error_message)
static void print_reconstruct_step(const ReconstructStep *step, const SDNA *oldsdna, const SDNA *newsdna)
static void reconstruct_struct(const DNA_ReconstructInfo *reconstruct_info, const int new_struct_index, const char *old_block, char *new_block)
static void reconstruct_structs(const DNA_ReconstructInfo *reconstruct_info, const int blocks, const int old_struct_index, const int new_struct_index, const char *old_blocks, char *new_blocks)
int DNA_struct_find_index_without_alias_ex(const SDNA *sdna, const char *str, uint *struct_index_last)
const char * DNA_struct_identifier(SDNA *sdna, const int struct_index)
void DNA_sdna_current_free()
int DNA_struct_find_with_alias(const SDNA *sdna, const char *str)
SDNA * DNA_sdna_from_data(const void *data, const int data_len, bool do_endian_swap, bool data_alloc, const bool do_alias, const char **r_error_message)
DNA_ReconstructInfo * DNA_reconstruct_info_create(const SDNA *oldsdna, const SDNA *newsdna, const char *compare_flags)
@ RECONSTRUCT_STEP_CAST_POINTER_TO_32
@ RECONSTRUCT_STEP_CAST_POINTER_TO_64
@ RECONSTRUCT_STEP_INIT_ZERO
@ RECONSTRUCT_STEP_SUBSTRUCT
@ RECONSTRUCT_STEP_CAST_PRIMITIVE
@ RECONSTRUCT_STEP_MEMCPY
int DNA_elem_type_size(const eSDNA_Type elem_nr)
static bool ispointer(const char *name)
static bool DNA_sdna_patch_struct_member(SDNA *sdna, const int struct_index, const char *old_member_name, const char *new_member_name)
int DNA_struct_member_size(const SDNA *sdna, short type, short member_index)
static bool elem_exists_impl(const char **types, const char **names, const char *type, const char *name, const SDNA_Struct *old)
static bool DNA_sdna_patch_struct(SDNA *sdna, const int struct_index, const char *new_type_name)
static int elem_offset_with_alias(const SDNA *sdna, const char *type, const char *name, const SDNA_Struct *old)
static void cast_primitive_type(const eSDNA_Type old_type, const eSDNA_Type new_type, const int array_len, const char *old_data, char *new_data)
BLI_INLINE const char * pad_up_4(const char *ptr)
bool DNA_struct_exists_without_alias(const SDNA *sdna, const char *stype)
static void init_reconstruct_step_for_member(const SDNA *oldsdna, const SDNA *newsdna, const char *compare_flags, const SDNA_Struct *old_struct, const SDNA_StructMember *new_member, const int new_member_offset, ReconstructStep *r_step)
static void cast_pointer_64_to_32(const int array_len, const uint64_t *old_data, uint32_t *new_data)
void DNA_struct_switch_endian(const SDNA *sdna, int struct_index, char *data)
static void sdna_expand_names(SDNA *sdna)
static int get_member_size_in_bytes(const SDNA *sdna, const SDNA_StructMember *member)
static int dna_struct_find_index_ex_impl(const char **types, const int, SDNA_Struct **const structs, const int structs_num, const char *str, uint *struct_index_last)
int DNA_struct_alignment(const SDNA *sdna, const int struct_index)
const SDNA * DNA_sdna_current_get()
static const char * dna_sdna_alias_from_static_elem_full(SDNA *sdna, GHash *elem_map_alias_from_static, const char *struct_name_static, const char *elem_static_full)
static bool elem_exists_without_alias(const SDNA *sdna, const char *type, const char *name, const SDNA_Struct *old)
#define MAKE_ID(a, b, c, d)
int DNA_struct_size(const SDNA *sdna, int struct_index)
static eStructMemberCategory get_struct_member_category(const SDNA *sdna, const SDNA_StructMember *member)
static bool elem_exists_with_alias(const SDNA *sdna, const char *type, const char *name, const SDNA_Struct *old)
static void set_compare_flags_for_struct(const SDNA *oldsdna, const SDNA *newsdna, char *compare_flags, const int old_struct_index)
void DNA_reconstruct_info_free(DNA_ReconstructInfo *reconstruct_info)
int DNA_struct_member_offset_by_name_with_alias(const SDNA *sdna, const char *stype, const char *vartype, const char *name)
static const SDNA_StructMember * find_member_with_matching_name(const SDNA *sdna, const SDNA_Struct *struct_info, const char *name, int *r_offset)
static ReconstructStep * create_reconstruct_steps_for_struct(const SDNA *oldsdna, const SDNA *newsdna, const char *compare_flags, const SDNA_Struct *old_struct, const SDNA_Struct *new_struct)
const char * DNA_struct_get_compareflags(const SDNA *oldsdna, const SDNA *newsdna)
static int elem_offset_without_alias(const SDNA *sdna, const char *type, const char *name, const SDNA_Struct *old)
void DNA_sdna_alias_data_ensure(SDNA *sdna)
static int elem_offset_impl(const SDNA *sdna, const char **types, const char **names, const char *type, const char *name, const SDNA_Struct *old)
@ STRUCT_MEMBER_CATEGORY_STRUCT
@ STRUCT_MEMBER_CATEGORY_POINTER
@ STRUCT_MEMBER_CATEGORY_PRIMITIVE
static void cast_pointer_32_to_64(const int array_len, const uint32_t *old_data, uint64_t *new_data)
bool DNA_sdna_patch_struct_member_by_name(SDNA *sdna, const char *type_name, const char *old_member_name, const char *new_member_name)
void DNA_sdna_free(SDNA *sdna)
static bool elem_streq(const char *name, const char *oname)
void * DNA_struct_reconstruct(const DNA_ReconstructInfo *reconstruct_info, int old_struct_index, int blocks, const void *old_blocks, const char *alloc_name)
bool DNA_struct_exists_with_alias(const SDNA *sdna, const char *str)
void DNA_sdna_current_init()
void DNA_sdna_alias_data_ensure_structs_map(SDNA *sdna)
int DNA_struct_find_index_with_alias_ex(const SDNA *sdna, const char *str, uint *struct_index_last)
int DNA_struct_member_offset_by_name_without_alias(const SDNA *sdna, const char *stype, const char *vartype, const char *name)
bool DNA_struct_member_exists_without_alias(const SDNA *sdna, const char *stype, const char *vartype, const char *name)
static int compress_reconstruct_steps(ReconstructStep *steps, const int old_step_count)
int DNA_struct_find_index_without_alias(const SDNA *sdna, const char *str)
bool DNA_sdna_patch_struct_by_name(SDNA *sdna, const char *old_type_name, const char *new_type_name)
const char * DNA_struct_rename_legacy_hack_static_from_alias(const char *name)
const char * DNA_struct_rename_legacy_hack_alias_from_static(const char *name)
int DNA_member_array_num(const char *str)
void DNA_alias_maps(enum eDNA_RenameDir version_dir, GHash **r_type_map, GHash **r_member_map)
bool DNA_member_id_match(const char *member_id, const int member_id_len, const char *member_full, uint *r_member_full_offset)
uint DNA_member_id_offset_start(const char *member_full)
uint DNA_member_id_strip_copy(char *member_id_dst, const char *member_full_src)
char * DNA_member_id_rename(MemArena *mem_arena, const char *member_id_src, const int member_id_src_len, const char *member_id_dst, const int member_id_dst_len, const char *member_full_src, const int member_full_src_len, const uint member_full_src_offset_len)
@ DNA_RENAME_ALIAS_FROM_STATIC
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
GHash * type_map_alias_from_static
GHash * member_map_alias_from_static
void *(* MEM_mallocN)(size_t len, const char *str)
void *(* MEM_calloc_arrayN_aligned)(size_t len, size_t size, size_t alignment, const char *str)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void *(* MEM_calloc_arrayN)(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
MatBase< float, 4, 4 > float4x4
_W64 unsigned int uintptr_t
unsigned __int64 uint64_t
const char * compare_flags
struct ReconstructStep::@1320::@1324 substruct
eReconstructStepType type
struct ReconstructStep::@1320::@1321 memcpy
struct ReconstructStep::@1320::@1322 cast_primitive
union ReconstructStep::@1320 data
struct ReconstructStep::@1320::@1323 cast_pointer
SDNA_StructMember members[]
struct GHash * types_to_structs_map
struct MemArena * mem_arena
short * members_array_num