|
Blender V5.0
|
Namespaces | |
| namespace | array |
| namespace | pointers |
Functions | |
| void | print_structs_at_address (const SDNA &sdna, int struct_id, const void *data, const void *address, int64_t element_num, std::ostream &stream) |
| void | print_struct_by_id (int struct_id, const void *data) |
| template<typename T> | |
| int | sdna_struct_id_get () |
| int | sdna_struct_id_get_max () |
| static void | print_struct_array_recursive (const SDNA &sdna, const SDNA_Struct &sdna_struct, const void *initial_data, const int64_t element_num, const int indent, fmt::appender &dst) |
| static void | print_single_struct_recursive (const SDNA &sdna, const SDNA_Struct &sdna_struct, const void *initial_data, const int indent, fmt::appender &dst) |
| static bool | char_array_startswith_simple_name (const char *data, const int array_len) |
|
static |
Uses a heuristic to detect if a char array should be printed as string.
Definition at line 2042 of file dna_genfile.cc.
Referenced by print_single_struct_recursive().
|
static |
Definition at line 2081 of file dna_genfile.cc.
References BLI_assert_unreachable, char_array_startswith_simple_name(), data, DNA_struct_find_index_without_alias(), get_member_size_in_bytes(), get_struct_member_category(), i, SDNA_StructMember::member_index, SDNA::members, SDNA_Struct::members, SDNA::members_array_num, SDNA_Struct::members_num, POINTER_OFFSET, SDNA::pointer_size, print_struct_array_recursive(), SDNA_TYPE_CHAR, SDNA_TYPE_DOUBLE, SDNA_TYPE_FLOAT, SDNA_TYPE_INT, SDNA_TYPE_INT64, SDNA_TYPE_INT8, SDNA_TYPE_RAW_DATA, SDNA_TYPE_SHORT, SDNA_TYPE_UCHAR, SDNA_TYPE_UINT64, SDNA_TYPE_USHORT, STRUCT_MEMBER_CATEGORY_POINTER, STRUCT_MEMBER_CATEGORY_PRIMITIVE, STRUCT_MEMBER_CATEGORY_STRUCT, SDNA::structs, SDNA_StructMember::type_index, SDNA::types, and SDNA::types_size.
Referenced by print_struct_array_recursive().
|
static |
Definition at line 2060 of file dna_genfile.cc.
References data, i, POINTER_OFFSET, print_single_struct_recursive(), SDNA_Struct::type_index, SDNA::types, and SDNA::types_size.
Referenced by print_single_struct_recursive(), and print_structs_at_address().
| void blender::dna::print_struct_by_id | ( | int | struct_id, |
| const void * | data ) |
Prints all members of the struct to stdout.
Definition at line 2217 of file dna_genfile.cc.
References data, DNA_sdna_current_get(), and print_structs_at_address().
| void blender::dna::print_structs_at_address | ( | const SDNA & | sdna, |
| int | struct_id, | ||
| const void * | data, | ||
| const void * | address, | ||
| int64_t | element_num, | ||
| std::ostream & | stream ) |
Print all members of the struct assuming that the data has the given address. This is mainly useful for observing what data is written to a .blend file.
| sdna | Contains reflection information about DNA structs. |
| struct_id | The type the data points to. Used to index into sdna.structs. |
| data | Where the data is stored. |
| address | The address that should be printed. Often it's the same as data. |
| element_num | The number of elements in the array, or 1 if there is only one struct. |
| stream | Where to print the output. |
Definition at line 2198 of file dna_genfile.cc.
References print_struct_array_recursive(), SDNA::structs, SDNA_Struct::type_index, and SDNA::types.
Referenced by print_struct_by_id(), and writestruct_at_address_nr().
| int blender::dna::sdna_struct_id_get | ( | ) |
Each DNA struct has an integer identifier which is unique within a specific Blender build, but not necessarily across different builds. The identifier can be used to index into SDNA.structs.
Referenced by blender::eevee::LightModule::begin_sync(), and blender::nodes::socket_items::blend_write().
| int blender::dna::sdna_struct_id_get_max | ( | ) |
The maximum identifier that will be returned by sdna_struct_id_get in this Blender build.
Referenced by writestruct_at_address_nr().