Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-05-13 20:39:47 +0300
committerBastien Montagne <bastien@blender.org>2020-05-13 20:39:47 +0300
commite4890fa564f2b798d48274b34a563e23f6f32bf5 (patch)
tree31c655c97801e726a61ee917724eec78669abed3 /source/blender/blenkernel/intern/lightprobe.c
parentc0e1bd815bd26d666da9f9b12646cde50a2f98c8 (diff)
Refactor: Move lightprobe foreach_id to new IDTypeInfo structure.
Diffstat (limited to 'source/blender/blenkernel/intern/lightprobe.c')
-rw-r--r--source/blender/blenkernel/intern/lightprobe.c10
1 files changed, 10 insertions, 0 deletions
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)