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_gpencilarray.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
index 0d0ce7476b9..553d9087c3f 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
@@ -315,6 +315,13 @@ static void foreachObjectLink(
walk(userData, ob, &mmd->object, IDWALK_CB_NOP);
}
+static int getDuplicationFactor(GpencilModifierData *md)
+{
+ ArrayGpencilModifierData *mmd = (ArrayGpencilModifierData *)md;
+ int t = mmd->count;
+ CLAMP_MIN(t, 1);
+ return t;
+}
GpencilModifierTypeInfo modifierType_Gpencil_Array = {
/* name */ "Array",
@@ -338,4 +345,5 @@ GpencilModifierTypeInfo modifierType_Gpencil_Array = {
/* foreachObjectLink */ foreachObjectLink,
/* foreachIDLink */ NULL,
/* foreachTexLink */ NULL,
+ /* getDuplicationFactor */ getDuplicationFactor,
};