diff options
author | YimingWu <xp8110@outlook.com> | 2019-09-15 16:58:14 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2019-09-15 16:58:14 +0300 |
commit | ec009507a419fbfe7d1e90408e78865170865663 (patch) | |
tree | 5beb2d0a965d5c55d7e1910a507e9929032fe657 /source/blender/gpencil_modifiers/intern | |
parent | 2632502876574cec06f57d389a65d9c72441c8a4 (diff) |
Gpencil: layer/material influence for lenght modifier.
Diffstat (limited to 'source/blender/gpencil_modifiers/intern')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencillength.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c index c019245a3da..3bf7383000b 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c @@ -108,7 +108,20 @@ static void bakeModifier(Main *UNUSED(bmain), LengthGpencilModifierData *lmd = (LengthGpencilModifierData *)md; bGPDstroke *gps; for (gps = gpf->strokes.first; gps; gps = gps->next) { - applyLength(gps, lmd->length, lmd->percentage); + if (is_stroke_affected_by_modifier(ob, + lmd->layername, + lmd->materialname, + lmd->pass_index, + lmd->layer_pass, + 1, + gpl, + gps, + lmd->flag & GP_MIRROR_INVERT_LAYER, + lmd->flag & GP_MIRROR_INVERT_PASS, + lmd->flag & GP_MIRROR_INVERT_LAYERPASS, + lmd->flag & GP_MIRROR_INVERT_MATERIAL)){ + applyLength(gps, lmd->length, lmd->percentage); + } } return; } @@ -126,7 +139,20 @@ static void deformStroke(GpencilModifierData *md, bGPDstroke *gps) { LengthGpencilModifierData *lmd = (LengthGpencilModifierData *)md; - applyLength(gps, lmd->length, lmd->percentage); + if (is_stroke_affected_by_modifier(ob, + lmd->layername, + lmd->materialname, + lmd->pass_index, + lmd->layer_pass, + 1, + gpl, + gps, + lmd->flag & GP_MIRROR_INVERT_LAYER, + lmd->flag & GP_MIRROR_INVERT_PASS, + lmd->flag & GP_MIRROR_INVERT_LAYERPASS, + lmd->flag & GP_MIRROR_INVERT_MATERIAL)){ + applyLength(gps, lmd->length, lmd->percentage); + } } GpencilModifierTypeInfo modifierType_Gpencil_Length = { |