diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-27 09:02:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-27 09:05:57 +0300 |
commit | 34c97a1b003143bb79e8b08dec339b9ad13a17f6 (patch) | |
tree | e2fa91198e41e883ef1993ad4fbb985b492969df /source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c | |
parent | 21c75bc7c560b65c1ed6fe2a7ba05d3fb59dadc6 (diff) |
Cleanup: rename 'vindex' to 'def_nr'
Name hinted 'vertex index', where it's the index of the vertex group.
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c index be361498578..d2e74a1de66 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c @@ -110,8 +110,7 @@ static void deformStroke( #endif int sc_frame = 0; int sc_diff = 0; - int vindex = defgroup_name_index(ob, mmd->vgname); - float weight = 1.0f; + const int def_nr = defgroup_name_index(ob, mmd->vgname); /* Random generator, only init once. */ if (mmd->rng == NULL) { @@ -154,8 +153,8 @@ static void deformStroke( } /* verify vertex group */ - weight = get_modifier_point_weight(dvert, (int)((mmd->flag & GP_NOISE_INVERT_VGROUP) != 0), vindex); - if (weight < 0) { + const float weight = get_modifier_point_weight(dvert, (mmd->flag & GP_NOISE_INVERT_VGROUP) != 0, def_nr); + if (weight < 0.0f) { continue; } |