[Bf-blender-cvs] [95b60634c7e] master: GPencil: Enable subdiv for 2-point strokes.
YimingWu
noreply at git.blender.org
Mon Sep 16 10:51:37 CEST 2019
Commit: 95b60634c7e34a7b6994fe73b26fb9e05bda5e2f
Author: YimingWu
Date: Mon Sep 16 16:06:34 2019 +0800
Branches: master
https://developer.blender.org/rB95b60634c7e34a7b6994fe73b26fb9e05bda5e2f
GPencil: Enable subdiv for 2-point strokes.
It makes sense when adding points to a straight line, e.g. for creating thickness variation in later modifiers.
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
===================================================================
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
index 741555722b5..21493ec60c0 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
@@ -65,12 +65,16 @@ static void deformStroke(GpencilModifierData *md,
{
SubdivGpencilModifierData *mmd = (SubdivGpencilModifierData *)md;
+ /* It makes sense when adding points to a straight line */
+ /* e.g. for creating thickness variation in later modifiers. */
+ int minimum_vert = (mmd->flag | GP_SUBDIV_SIMPLE) ? 2 : 3;
+
if (!is_stroke_affected_by_modifier(ob,
mmd->layername,
mmd->materialname,
mmd->pass_index,
mmd->layer_pass,
- 3,
+ minimum_vert,
gpl,
gps,
mmd->flag & GP_SUBDIV_INVERT_LAYER,
More information about the Bf-blender-cvs
mailing list