67 const bool use_old_bmain_data,
71 char mainstr[
sizeof(bmain->
name)];
72 int success = 0, fileflags;
76 fileflags =
G.fileflags;
90 if (!use_old_bmain_data) {
123 static int counter = 0;
129 counter = counter %
U.undosteps;
131 BLI_snprintf(numstr,
sizeof(numstr),
"%d.blend", counter);
void BKE_blendfile_read_setup(struct bContext *C, struct BlendFileData *bfd, const struct BlendFileReadParams *params, struct ReportList *reports)
struct BlendFileData * BKE_blendfile_read_from_memfile(struct Main *bmain, struct MemFile *memfile, const struct BlendFileReadParams *params, struct ReportList *reports)
struct BlendFileData * BKE_blendfile_read(const char *filepath, const struct BlendFileReadParams *params, struct ReportList *reports)
struct Main * CTX_data_main(const bContext *C)
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
external readfile function prototypes.
@ BLO_READ_SKIP_UNDO_OLD_MAIN
void BLO_memfile_clear_future(MemFile *memfile)
void BLO_memfile_free(MemFile *memfile)
external writefile function prototypes.
bool BLO_write_file(struct Main *mainvar, const char *filepath, const int write_flags, const struct BlendFileWriteParams *params, struct ReportList *reports)
bool BLO_write_file_mem(struct Main *mainvar, struct MemFile *compare, struct MemFile *current, int write_flags)
void DEG_on_visible_update(struct Main *bmain, const bool do_time)
Read Guarded memory(de)allocation.
MemFileUndoData * BKE_memfile_undo_encode(Main *bmain, MemFileUndoData *mfu_prev)
void BKE_memfile_undo_free(MemFileUndoData *mfu)
bool BKE_memfile_undo_decode(MemFileUndoData *mfu, const eUndoStepDir undo_direction, const bool use_old_bmain_data, bContext *C)
void * BKE_tempdir_session
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
char is_memfile_undo_written