Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_genfile.h
| Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
| * \param data: Struct data that is to be converted | * \param data: Struct data that is to be converted | ||||
| */ | */ | ||||
| void DNA_struct_switch_endian(const struct SDNA *sdna, int struct_nr, char *data); | void DNA_struct_switch_endian(const struct SDNA *sdna, int struct_nr, char *data); | ||||
| /** | /** | ||||
| * Constructs and returns an array of byte flags with one element for each struct in oldsdna, | * Constructs and returns an array of byte flags with one element for each struct in oldsdna, | ||||
| * indicating how it compares to newsdna. | * indicating how it compares to newsdna. | ||||
| */ | */ | ||||
| const char *DNA_struct_get_compareflags(const struct SDNA *sdna, const struct SDNA *newsdna); | const char *DNA_struct_get_compareflags(const struct SDNA *sdna, const struct SDNA *newsdna); | ||||
| typedef struct DNA_ReconstructParams { | |||||
| void *userdata; | |||||
| void (*add_data)(void *userdata, const void *old_address, void *new_address); | |||||
| } DNA_ReconstructParams; | |||||
| /** | /** | ||||
| * \param reconstruct_info: Information preprocessed by #DNA_reconstruct_info_create. | * \param reconstruct_info: Information preprocessed by #DNA_reconstruct_info_create. | ||||
| * \param old_struct_nr: Index of struct info within oldsdna. | * \param old_struct_nr: Index of struct info within oldsdna. | ||||
| * \param blocks: The number of array elements. | * \param blocks: The number of array elements. | ||||
| * \param old_blocks: Array of struct data. | * \param old_blocks: Array of struct data. | ||||
| * \return An allocated reconstructed struct. | * \return An allocated reconstructed struct. | ||||
| */ | */ | ||||
| void *DNA_struct_reconstruct(const struct DNA_ReconstructInfo *reconstruct_info, | void *DNA_struct_reconstruct(const struct DNA_ReconstructInfo *reconstruct_info, | ||||
| int old_struct_nr, | int old_struct_nr, | ||||
| int blocks, | int blocks, | ||||
| const void *old_blocks); | const void *old_blocks, | ||||
| const DNA_ReconstructParams *params); | |||||
| /** | /** | ||||
| * Returns the offset of the field with the specified name and type within the specified | * Returns the offset of the field with the specified name and type within the specified | ||||
| * struct type in #SDNA, -1 on failure. | * struct type in #SDNA, -1 on failure. | ||||
| */ | */ | ||||
| int DNA_elem_offset(struct SDNA *sdna, const char *stype, const char *vartype, const char *name); | int DNA_elem_offset(struct SDNA *sdna, const char *stype, const char *vartype, const char *name); | ||||
| /** | /** | ||||
| ▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines | |||||