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_gpencilhook.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_gpencilhook.c')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c index 46d452545e2..1ba2a08acdb 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c @@ -203,8 +203,7 @@ static void deformStroke( return; } - int vindex = defgroup_name_index(ob, mmd->vgname); - float weight = 1.0f; + const int def_nr = defgroup_name_index(ob, mmd->vgname); bPoseChannel *pchan = BKE_pose_channel_find_name(mmd->object->pose, mmd->subtarget); float dmat[4][4]; @@ -253,8 +252,8 @@ static void deformStroke( MDeformVert *dvert = &gps->dvert[i]; /* verify vertex group */ - weight = get_modifier_point_weight(dvert, (int)((mmd->flag & GP_HOOK_INVERT_VGROUP) != 0), vindex); - if (weight < 0) { + const float weight = get_modifier_point_weight(dvert, (mmd->flag & GP_HOOK_INVERT_VGROUP) != 0, def_nr); + if (weight < 0.0f) { continue; } gp_hook_co_apply(&tData, weight, pt); |