pub fn use_dna(
    print_dna: bool,
    path: &PathBuf,
    dna_types_hm: &HashMap<String, u16>,
    dna_structs_hm: &HashMap<String, DnaStrC>,
    names: &Vec<String>,
    dna_2_type_id: &Vec<u16>,
    types: &Vec<String>,
    bytes_read: &mut Vec<u8>,
    structs_read: &mut Vec<String>,
    data_read: &mut Vec<u32>,
    pointers_read: &mut Vec<(usize, u32)>
) -> Result<()>
Expand description

Use the DNA types and structs returned by read_dna().

Read the .blend file (again), but limit the returned data by filtering out information provided as input by the names vector of strings.

Verbosity flags:

  • print_dna

Input

  • path - a path to a folder/filename.blend
  • names - filter out by list of interesting things

Input returned by previous read_dna(…) call

  • dna_types_hm - A HashMap with a type name (e.g. “float”) and it’s byte size as u16
  • dna_structs_hm - A HashMap with a struct name (e.g. “Camera”) and it’s members (DnaStrC)
  • dna_2_type_id - Use sdna_nr to find type_id
  • types - Vec of type names (e.g. “char”, “short”, “double”)

Return values (&mut):

  • bytes_read - All bytes read which relate to input names
  • structs_read - All struct names read as a list in order of bytes read
  • data_read - List of chunk sizes (same length as structs_read)
  • pointers_read - List of tuples (pointer as usize and SDNAnr)