diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 7ac778630ac..e6b0c2fbd1b 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -137,13 +137,11 @@ static float view_angle_limits_apply_falloff(const struct NormalAnglePrecalc *a, /* outsize the normal limit */ return false; } - else if (angle_cos < a->angle_inner__cos) { + if (angle_cos < a->angle_inner__cos) { *mask_p *= (a->angle - acosf(angle_cos)) / a->angle_range; return true; } - else { - return true; - } + return true; } static bool vwpaint_use_normal(const VPaint *vp) @@ -405,12 +403,10 @@ static float wpaint_clamp_monotonic(float oldval, float curval, float newval) if (newval < oldval) { return MIN2(newval, curval); } - else if (newval > oldval) { + if (newval > oldval) { return MAX2(newval, curval); } - else { - return newval; - } + return newval; } static float wpaint_undo_lock_relative( @@ -535,7 +531,7 @@ static bool do_weight_paint_normalize_all_locked(MDeformVert *dvert, return (lock_weight == 1.0f); } - else if (sum_unlock != 0.0f) { + if (sum_unlock != 0.0f) { fac = (1.0f - lock_weight) / sum_unlock; for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) { |