From 5610ccdc080497042a24592432ade575e2fab489 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 3 Nov 2020 11:39:36 +0100 Subject: Add a callback to `IDTypeInfo` to allow preservation of some data accross memfile undos This is essentially adding that new callback, and using it only for already existing Scene's 3DCursor. Note that the place where this is called has been moved again, after all have been lib-linked, such that those callbacks may also work on ID pointers. Maniphest Tasks: T71759 Differential Revision: https://developer.blender.org/D9237 --- source/blender/blenkernel/intern/light.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/intern/light.c') diff --git a/source/blender/blenkernel/intern/light.c b/source/blender/blenkernel/intern/light.c index 4780f0cf208..a47a0c043ff 100644 --- a/source/blender/blenkernel/intern/light.c +++ b/source/blender/blenkernel/intern/light.c @@ -207,6 +207,8 @@ IDTypeInfo IDType_ID_LA = { .blend_read_data = light_blend_read_data, .blend_read_lib = light_blend_read_lib, .blend_read_expand = light_blend_read_expand, + + .blend_read_undo_preserve = NULL, }; Light *BKE_light_add(Main *bmain, const char *name) -- cgit v1.2.3