int BKE_read_file_from_memory(bContext *C, const void *filebuf, int filelength, ReportList *reports, int update_defaults) { BlendFileData *bfd; bfd = BLO_read_from_memory(filebuf, filelength, reports); if (bfd) { if (update_defaults) BLO_update_defaults_startup_blend(bfd->main); setup_app_data(C, bfd, "<memory2>"); } else BKE_reports_prepend(reports, "Loading failed: "); return (bfd ? 1 : 0); }
bool BKE_blendfile_read_from_memory( bContext *C, const void *filebuf, int filelength, ReportList *reports, int skip_flags, bool update_defaults) { BlendFileData *bfd; bfd = BLO_read_from_memory(filebuf, filelength, reports, skip_flags); if (bfd) { if (update_defaults) BLO_update_defaults_startup_blend(bfd->main); setup_app_data(C, bfd, "<memory2>", reports); } else { BKE_reports_prepend(reports, "Loading failed: "); } return (bfd != NULL); }