fn build_glb_for_export()

in native/src/work_asset/export.rs [162:176]


    fn build_glb_for_export(&self, export_parse: Root, export_blob: &[u8]) -> Result<Vec<u8>> {
        let json = export_parse.to_string_pretty();
        let json = json
            .map(|s| s.into_bytes())
            .map_err(|e| format!("JSON deserialisation error: {}", e))?;

        let json_chunk = GlbChunk::JSON(&json);
        let bin_chunk = if !export_blob.is_empty() {
            Some(GlbChunk::BIN(export_blob))
        } else {
            None
        };

        Ok(GlbChunk::to_bytes(json_chunk, bin_chunk)?)
    }