|
Blender
V2.93
|
Go to the source code of this file.
Enumerations | |
| enum | eDNA_RenameDir { DNA_RENAME_STATIC_FROM_ALIAS = -1 , DNA_RENAME_ALIAS_FROM_STATIC = 1 } |
Functions | |
| int | DNA_elem_array_size (const char *str) |
| uint | DNA_elem_id_offset_start (const char *elem_full) |
| uint | DNA_elem_id_offset_end (const char *elem_full) |
| uint | DNA_elem_id_strip_copy (char *elem_dst, const char *elem_src) |
| uint | DNA_elem_id_strip (char *elem) |
| bool | DNA_elem_id_match (const char *elem_search, const int elem_search_len, const char *elem_full, uint *r_elem_full_offset) |
| char * | DNA_elem_id_rename (struct MemArena *mem_arena, const char *elem_src, const int elem_src_len, const char *elem_dst, const int elem_dst_len, const char *elem_src_full, const int elem_src_full_len, const uint elem_src_full_offset_len) |
| void | DNA_alias_maps (enum eDNA_RenameDir version_dir, struct GHash **r_struct_map, struct GHash **r_elem_map) |
| const char * | DNA_struct_rename_legacy_hack_alias_from_static (const char *name) |
| const char * | DNA_struct_rename_legacy_hack_static_from_alias (const char *name) |
| enum eDNA_RenameDir |
| Enumerator | |
|---|---|
| DNA_RENAME_STATIC_FROM_ALIAS | |
| DNA_RENAME_ALIAS_FROM_STATIC | |
Definition at line 50 of file dna_utils.h.
| void DNA_alias_maps | ( | enum eDNA_RenameDir | version_dir, |
| struct GHash ** | r_struct_map, | ||
| struct GHash ** | r_elem_map | ||
| ) |
Definition at line 210 of file dna_utils.c.
References ARRAY_SIZE, BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_lookup_default(), BLI_ghash_new_ex(), BLI_ghash_str_new_ex(), data, DNA_RENAME_ALIAS_FROM_STATIC, DNA_RENAME_STATIC_FROM_ALIAS, MEM_mallocN, NULL, strhash_pair_cmp(), and strhash_pair_p().
Referenced by DNA_sdna_alias_data_ensure(), make_structDNA(), and RNA_create().
| int DNA_elem_array_size | ( | const char * | str | ) |
Parses the [n1][n2]... on the end of an array name and returns the number of array elements n1 * n2 ....
Definition at line 46 of file dna_utils.c.
References Freestyle::c, result, and str.
Referenced by calculate_struct_sizes(), init_structDNA(), and rna_find_sdna_member().
| bool DNA_elem_id_match | ( | const char * | elem_search, |
| const int | elem_search_len, | ||
| const char * | elem_full, | ||
| uint * | r_elem_full_offset | ||
| ) |
Check if 'var' matches '*var[3]' for eg, return true if it does, with start/end offsets.
Definition at line 136 of file dna_utils.c.
References BLI_assert, Freestyle::c, DNA_elem_id_offset_start(), and is_identifier().
Referenced by DNA_sdna_patch_struct_member_nr().
| uint DNA_elem_id_offset_end | ( | const char * | elem_full | ) |
Definition at line 100 of file dna_utils.c.
References is_identifier().
Referenced by DNA_elem_id_strip(), and DNA_elem_id_strip_copy().
| uint DNA_elem_id_offset_start | ( | const char * | elem_full | ) |
Definition at line 91 of file dna_utils.c.
References is_identifier().
Referenced by DNA_elem_id_match(), DNA_elem_id_rename(), DNA_elem_id_strip(), DNA_elem_id_strip_copy(), dna_sdna_alias_from_static_elem_full(), and version_elem_static_from_alias().
| char* DNA_elem_id_rename | ( | struct MemArena * | mem_arena, |
| const char * | elem_src, | ||
| const int | elem_src_len, | ||
| const char * | elem_dst, | ||
| const int | elem_dst_len, | ||
| const char * | elem_src_full, | ||
| const int | elem_src_full_len, | ||
| const uint | elem_src_full_offset_len | ||
| ) |
Return a renamed dna name, allocated from mem_arena.
Definition at line 157 of file dna_utils.c.
References BLI_assert, BLI_memarena_alloc(), DNA_elem_id_offset_start(), mem_arena, and UNUSED_VARS_NDEBUG.
Referenced by dna_sdna_alias_from_static_elem_full(), DNA_sdna_patch_struct_member_nr(), and version_elem_static_from_alias().
| uint DNA_elem_id_strip | ( | char * | elem | ) |
Definition at line 122 of file dna_utils.c.
References DNA_elem_id_offset_end(), DNA_elem_id_offset_start(), and elem_offset().
Referenced by make_structDNA().
| uint DNA_elem_id_strip_copy | ( | char * | elem_dst, |
| const char * | elem_src | ||
| ) |
elem_dst must be at least the size of elem_src.
Definition at line 112 of file dna_utils.c.
References DNA_elem_id_offset_end(), and DNA_elem_id_offset_start().
Referenced by calculate_struct_sizes(), dna_sdna_alias_from_static_elem_full(), is_name_legal(), and version_elem_static_from_alias().
| const char* DNA_struct_rename_legacy_hack_alias_from_static | ( | const char * | name | ) |
Definition at line 327 of file dna_utils.c.
References STREQ.
Referenced by DNA_sdna_alias_data_ensure().
| const char* DNA_struct_rename_legacy_hack_static_from_alias | ( | const char * | name | ) |
Only keep this for compatibility: NEVER ADD NEW STRINGS HERE.
The renaming here isn't complete, references to the old struct names are still included in DNA, now fixing these struct names properly breaks forward compatibility. Leave these as-is, but don't add to them! See D4342#98780
Definition at line 311 of file dna_utils.c.
References STREQ.
Referenced by DNA_struct_find_nr_wrapper(), and init_structDNA().