Function blend_info::read_dna
source · [−]pub fn read_dna(
print_dna: bool,
print_pointers: bool,
path: &PathBuf,
dna_types_hm: &mut HashMap<String, u16>,
dna_structs_hm: &mut HashMap<String, DnaStrC>,
dna_pointers_hm: &mut HashMap<usize, usize>,
dna_2_type_id: &mut Vec<u16>,
types: &mut Vec<String>,
bytes_read: &mut usize
) -> Result<()>
Expand description
Read a .blend
file to extract DNA information first.
Verbosity flags:
print_dna
print_pointers
Input
path
- a path to a folder/filename.blend
Return values (&mut
):
dna_types_hm
- A HashMap with a type name (e.g. “float”) and it’s byte size as u16dna_structs_hm
- A HashMap with a struct name (e.g. “Camera”) and it’s members (DnaStrC)dna_pointers_hm
- A HashMap with 2 usize values (real memory address stored in file, and byte position within .blend file)dna_2_type_id
- Usesdna_nr
to findtype_id
types
- Vec of type names (e.g. “char”, “short”, “double”)bytes_read
- Should match the file size on disk