diff options
author | Matias Mendiola <matias.mendiola@gmail.com> | 2019-08-21 09:30:45 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-08-21 09:41:19 +0300 |
commit | 3d8f1586973b1fbadf3cf45c66873d1a012764ee (patch) | |
tree | e856b4a1708c441878039f385fad982b37b4e8f1 /source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c | |
parent | 8ffbe398341ca81acbb1515864fa55027fa68766 (diff) |
GPencil: add new filter by material to modifiers
This commit adds a new filter by material using the name and not only the index.
Reviewers: antoniov, pepeland
Differential Revision: https://developer.blender.org/D5544
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c index 36a1c3db700..346d1e834a6 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c @@ -52,6 +52,7 @@ static void initData(GpencilModifierData *md) gpmd->pass_index = 0; gpmd->factor = 1.0f; gpmd->layername[0] = '\0'; + gpmd->materialname[0] = '\0'; gpmd->vgname[0] = '\0'; gpmd->flag |= GP_OPACITY_CREATE_COLORS; gpmd->modify_color = GP_MODIFY_COLOR_BOTH; @@ -75,6 +76,7 @@ static void deformStroke(GpencilModifierData *md, if (!is_stroke_affected_by_modifier(ob, mmd->layername, + mmd->materialname, mmd->pass_index, mmd->layer_pass, 1, @@ -82,7 +84,8 @@ static void deformStroke(GpencilModifierData *md, gps, mmd->flag & GP_OPACITY_INVERT_LAYER, mmd->flag & GP_OPACITY_INVERT_PASS, - mmd->flag & GP_OPACITY_INVERT_LAYERPASS)) { + mmd->flag & GP_OPACITY_INVERT_LAYERPASS, + mmd->flag & GP_OPACITY_INVERT_MATERIAL)) { return; } |