From 6c892efdbc4d5882da9a2655b21e4f4c2559106b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 29 Oct 2018 13:01:48 +1100 Subject: Modifier: mask threshold option D3834 by @Allosteric --- source/blender/modifiers/intern/MOD_mask.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_mask.c') diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index 93332fb0455..5246f8cd35a 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -196,7 +196,7 @@ static DerivedMesh *applyModifier( for (j = 0; j < dv->totweight; j++, dw++) { if (dw->def_nr < defbase_tot) { if (bone_select_array[dw->def_nr]) { - if (dw->weight != 0.0f) { + if (dw->weight > mmd->threshold) { found = true; break; } @@ -228,7 +228,7 @@ static DerivedMesh *applyModifier( /* add vertices which exist in vertexgroup into ghash for filtering */ for (i = 0, dv = dvert; i < maxVerts; i++, dv++) { - const bool found = defvert_find_weight(dv, defgrp_index) != 0.0f; + const bool found = defvert_find_weight(dv, defgrp_index) > mmd->threshold; if (found_test != found) { continue; } -- cgit v1.2.3