Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/BLO_undofile.h
| Show All 25 Lines | |||||
| struct Scene; | struct Scene; | ||||
| struct GHash; | struct GHash; | ||||
| typedef struct { | typedef struct { | ||||
| void *next, *prev; | void *next, *prev; | ||||
| const char *buf; | const char *buf; | ||||
| /** Size in bytes. */ | /** Size in bytes. */ | ||||
| unsigned int size; | size_t size; | ||||
| /** When true, this chunk doesn't own the memory, it's shared with a previous #MemFileChunk */ | /** When true, this chunk doesn't own the memory, it's shared with a previous #MemFileChunk */ | ||||
| bool is_identical; | bool is_identical; | ||||
| /** When true, this chunk is also identical to the one in the next step (used by undo code to | /** When true, this chunk is also identical to the one in the next step (used by undo code to | ||||
| * detect unchanged IDs). | * detect unchanged IDs). | ||||
| * Defined when writing the next step (i.e. last undo step has those always false). */ | * Defined when writing the next step (i.e. last undo step has those always false). */ | ||||
| bool is_identical_future; | bool is_identical_future; | ||||
| /** Session UUID of the ID being currently written (MAIN_ID_SESSION_UUID_UNSET when not writing | /** Session UUID of the ID being currently written (MAIN_ID_SESSION_UUID_UNSET when not writing | ||||
| * ID-related data). Used to find matching chunks in previous memundo step. */ | * ID-related data). Used to find matching chunks in previous memundo step. */ | ||||
| Show All 24 Lines | |||||
| /* actually only used writefile.c */ | /* actually only used writefile.c */ | ||||
| void BLO_memfile_write_init(MemFileWriteData *mem_data, | void BLO_memfile_write_init(MemFileWriteData *mem_data, | ||||
| MemFile *written_memfile, | MemFile *written_memfile, | ||||
| MemFile *reference_memfile); | MemFile *reference_memfile); | ||||
| void BLO_memfile_write_finalize(MemFileWriteData *mem_data); | void BLO_memfile_write_finalize(MemFileWriteData *mem_data); | ||||
| void BLO_memfile_chunk_add(MemFileWriteData *mem_data, const char *buf, unsigned int size); | void BLO_memfile_chunk_add(MemFileWriteData *mem_data, const char *buf, size_t size); | ||||
| /* exports */ | /* exports */ | ||||
| extern void BLO_memfile_free(MemFile *memfile); | extern void BLO_memfile_free(MemFile *memfile); | ||||
| extern void BLO_memfile_merge(MemFile *first, MemFile *second); | extern void BLO_memfile_merge(MemFile *first, MemFile *second); | ||||
| extern void BLO_memfile_clear_future(MemFile *memfile); | extern void BLO_memfile_clear_future(MemFile *memfile); | ||||
| /* utilities */ | /* utilities */ | ||||
| extern struct Main *BLO_memfile_main_get(struct MemFile *memfile, | extern struct Main *BLO_memfile_main_get(struct MemFile *memfile, | ||||
| struct Main *bmain, | struct Main *bmain, | ||||
| struct Scene **r_scene); | struct Scene **r_scene); | ||||
| extern bool BLO_memfile_write_file(struct MemFile *memfile, const char *filename); | extern bool BLO_memfile_write_file(struct MemFile *memfile, const char *filename); | ||||