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/gpencil_modifiers/intern/MOD_gpencilsmooth.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
index be9260da225..8487283d848 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
@@ -35,6 +35,8 @@
#include "BKE_deform.h"
#include "BKE_gpencil_geom.h"
#include "BKE_gpencil_modifier.h"
+#include "BKE_lib_query.h"
+#include "BKE_modifier.h"
#include "DEG_depsgraph.h"
@@ -48,7 +50,7 @@ static void initData(GpencilModifierData *md)
gpmd->flag |= GP_SMOOTH_MOD_LOCATION;
gpmd->factor = 0.5f;
gpmd->layername[0] = '\0';
- gpmd->materialname[0] = '\0';
+ gpmd->material = NULL;
gpmd->vgname[0] = '\0';
gpmd->step = 1;
@@ -88,7 +90,7 @@ static void deformStroke(GpencilModifierData *md,
if (!is_stroke_affected_by_modifier(ob,
mmd->layername,
- mmd->materialname,
+ mmd->material,
mmd->pass_index,
mmd->layer_pass,
3,
@@ -167,6 +169,13 @@ static void freeData(GpencilModifierData *md)
}
}
+static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
+{
+ SmoothGpencilModifierData *mmd = (SmoothGpencilModifierData *)md;
+
+ walk(userData, ob, (ID **)&mmd->material, IDWALK_CB_USER);
+}
+
GpencilModifierTypeInfo modifierType_Gpencil_Smooth = {
/* name */ "Smooth",
/* structName */ "SmoothGpencilModifierData",
@@ -187,6 +196,6 @@ GpencilModifierTypeInfo modifierType_Gpencil_Smooth = {
/* updateDepsgraph */ NULL,
/* dependsOnTime */ NULL,
/* foreachObjectLink */ NULL,
- /* foreachIDLink */ NULL,
+ /* foreachIDLink */ foreachIDLink,
/* foreachTexLink */ NULL,
};