diff options
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c index e0484e19959..5c177077a98 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c @@ -75,7 +75,7 @@ static void deformStroke( Object *ob, bGPDlayer *gpl, bGPDstroke *gps) { OpacityGpencilModifierData *mmd = (OpacityGpencilModifierData *)md; - int vindex = defgroup_name_index(ob, mmd->vgname); + const int def_nr = defgroup_name_index(ob, mmd->vgname); if (!is_stroke_affected_by_modifier( ob, @@ -110,8 +110,8 @@ static void deformStroke( MDeformVert *dvert = &gps->dvert[i]; /* verify vertex group */ - float weight = get_modifier_point_weight(dvert, ((mmd->flag & GP_OPACITY_INVERT_VGROUP) != 0), vindex); - if (weight < 0) { + const float weight = get_modifier_point_weight(dvert, (mmd->flag & GP_OPACITY_INVERT_VGROUP) != 0, def_nr); + if (weight < 0.0f) { pt->strength += mmd->factor - 1.0f; } else { |