IDTypeInfo: add .blend file io callbacks

This is part of T76372.
It adds the `blend_write`, `blend_read_data`, `blend_read_lib`
and `blend_read_expand` which correspond to the various
steps when reading and writing .blend files.
Having these callbacks allows us to decentralize the blenloader
code a lot more. This has the affect that code related to any
specific ID type is less scattered.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D8670
This commit is contained in:
2020-08-28 13:05:48 +02:00
parent 346023b457
commit a443287908
42 changed files with 283 additions and 0 deletions

View File

@@ -75,6 +75,12 @@ IDTypeInfo IDType_ID_LI = {
.free_data = library_free_data,
.make_local = NULL,
.foreach_id = library_foreach_id,
.foreach_cache = NULL,
.blend_write = NULL,
.blend_read_data = NULL,
.blend_read_lib = NULL,
.blend_read_expand = NULL,
};
void BKE_library_filepath_set(Main *bmain, Library *lib, const char *filepath)