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:
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r--source/blender/blenkernel/intern/mask.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index 6c835dc5fb2..49c909850de 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -45,6 +45,7 @@
#include "BKE_image.h"
#include "BKE_lib_id.h"
+#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_mask.h"
#include "BKE_movieclip.h"
@@ -79,6 +80,20 @@ static void mask_free_data(ID *id)
BKE_mask_layer_free_list(&mask->masklayers);
}
+static void mask_foreach_id(ID *id, LibraryForeachIDData *data)
+{
+ Mask *mask = (Mask *)id;
+
+ LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
+ LISTBASE_FOREACH (MaskSpline *, mask_spline, &mask_layer->splines) {
+ for (int i = 0; i < mask_spline->tot_point; i++) {
+ MaskSplinePoint *point = &mask_spline->points[i];
+ BKE_LIB_FOREACHID_PROCESS_ID(data, point->parent.id, IDWALK_CB_USER);
+ }
+ }
+ }
+}
+
IDTypeInfo IDType_ID_MSK = {
.id_code = ID_MSK,
.id_filter = FILTER_ID_MSK,
@@ -93,6 +108,7 @@ IDTypeInfo IDType_ID_MSK = {
.copy_data = mask_copy_data,
.free_data = mask_free_data,
.make_local = NULL,
+ .foreach_id = mask_foreach_id,
};
static struct {