diff options
-rw-r--r-- | source/blender/blenkernel/intern/lib_query.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/lightprobe.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c index df4f4009aeb..71bf065d855 100644 --- a/source/blender/blenkernel/intern/lib_query.c +++ b/source/blender/blenkernel/intern/lib_query.c @@ -948,9 +948,7 @@ static void library_foreach_ID_link(Main *bmain, } case ID_LP: { - LightProbe *probe = (LightProbe *)id; - CALLBACK_INVOKE(probe->image, IDWALK_CB_USER); - CALLBACK_INVOKE(probe->visibility_grp, IDWALK_CB_NOP); + BLI_assert(0); break; } diff --git a/source/blender/blenkernel/intern/lightprobe.c b/source/blender/blenkernel/intern/lightprobe.c index 2f24960b5a1..f73df66b43d 100644 --- a/source/blender/blenkernel/intern/lightprobe.c +++ b/source/blender/blenkernel/intern/lightprobe.c @@ -23,6 +23,7 @@ #include <string.h> +#include "DNA_collection_types.h" #include "DNA_defaults.h" #include "DNA_lightprobe_types.h" #include "DNA_object_types.h" @@ -45,6 +46,14 @@ static void lightprobe_init_data(ID *id) MEMCPY_STRUCT_AFTER(probe, DNA_struct_default_get(LightProbe), id); } +static void lightprobe_foreach_id(ID *id, LibraryForeachIDData *data) +{ + LightProbe *probe = (LightProbe *)id; + + BKE_LIB_FOREACHID_PROCESS(data, probe->image, IDWALK_CB_USER); + BKE_LIB_FOREACHID_PROCESS(data, probe->visibility_grp, IDWALK_CB_NOP); +} + IDTypeInfo IDType_ID_LP = { .id_code = ID_LP, .id_filter = FILTER_ID_LP, @@ -59,6 +68,7 @@ IDTypeInfo IDType_ID_LP = { .copy_data = NULL, .free_data = NULL, .make_local = NULL, + .foreach_id = lightprobe_foreach_id, }; void BKE_lightprobe_type_set(LightProbe *probe, const short lightprobe_type) |