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_gpencilsubdiv.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
index 38aa4159632..71881de50fc 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
@@ -97,6 +97,14 @@ static void bakeModifier(
}
}
+static int getDuplicationFactor(GpencilModifierData *md)
+{
+ SubdivGpencilModifierData *mmd = (SubdivGpencilModifierData *)md;
+ int t = (mmd->level + 1) * (mmd->level + 1);
+ CLAMP_MIN(t, 2);
+ return t;
+}
+
GpencilModifierTypeInfo modifierType_Gpencil_Subdiv = {
/* name */ "Subdivision",
/* structName */ "SubdivGpencilModifierData",
@@ -119,4 +127,5 @@ GpencilModifierTypeInfo modifierType_Gpencil_Subdiv = {
/* foreachObjectLink */ NULL,
/* foreachIDLink */ NULL,
/* foreachTexLink */ NULL,
+ /* getDuplicationFactor */ getDuplicationFactor,
};