diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2016-01-21 23:03:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-24 08:25:53 +0300 |
commit | b147ecb991e04a5b37bae96166c8f9eb554030cc (patch) | |
tree | cc2dca5e74318a9ee6aae7824965e14cc4dd870b /source | |
parent | 2ca34e419e9ed82f2065433d41b7544f17b18ce2 (diff) |
Fix Smooth Weight expand logic
Since weight_other is equal to weight_accum_prev[i_other], the original
lines actually are no-op. The visible effect is that when smoothing just
two vertices with weights 1 and 0, the expand value has no effect until
it reaches exactly 1. This change makes it gradual.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index c0b0303404e..265ef222d56 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1828,13 +1828,13 @@ static void vgroup_smooth_subset( float tot_factor = 1.0f; \ if (expand_sign == 1) { /* expand */ \ if (weight_other < weight_accum_prev[i]) { \ - weight_other = (weight_accum_prev[i_other] * iexpand) + (weight_other * expand); \ + weight_other = (weight_accum_prev[i] * expand) + (weight_other * iexpand); \ tot_factor = iexpand; \ } \ } \ else if (expand_sign == -1) { /* contract */ \ if (weight_other > weight_accum_prev[i]) { \ - weight_other = (weight_accum_prev[i_other] * iexpand) + (weight_other * expand); \ + weight_other = (weight_accum_prev[i] * expand) + (weight_other * iexpand); \ tot_factor = iexpand; \ } \ } \ |