From a443287908248d0b83f490f0993d857fb1d73fec Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 28 Aug 2020 13:05:48 +0200 Subject: 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 --- source/blender/blenkernel/intern/material.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/blenkernel/intern/material.c') diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 0520ba3faae..d521d6c8a99 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -175,6 +175,12 @@ IDTypeInfo IDType_ID_MA = { .free_data = material_free_data, .make_local = NULL, .foreach_id = material_foreach_id, + .foreach_cache = NULL, + + .blend_write = NULL, + .blend_read_data = NULL, + .blend_read_lib = NULL, + .blend_read_expand = NULL, }; void BKE_gpencil_material_attr_init(Material *ma) -- cgit v1.2.3