diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-16 03:59:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-16 03:59:02 +0400 |
commit | 862dc635ed98c6d1ffc7c755058c682021da4c6b (patch) | |
tree | 11de5533aaae2da3eab2ab63c5d5977aea73dbc4 /source/blender/modifiers/intern/MOD_cast.c | |
parent | d0b70cffaf99321c57045d8dc8ec197b1542395c (diff) | |
parent | 0dbd9ea73f7f86e02d9aae6c65c3ce5e3c4ecd4b (diff) |
svn merge ^/trunk/blender -r42617:42655
Diffstat (limited to 'source/blender/modifiers/intern/MOD_cast.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_cast.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index 10b0aebbe39..f41dd1b8669 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -200,11 +200,11 @@ static void sphere_do( * with or w/o a vgroup. With lots of if's in the code below, * further optimizations are possible, if needed */ if (dvert) { /* with a vgroup */ + MDeformVert *dv= dvert; float fac_orig = fac; - for (i = 0; i < numVerts; i++) { - MDeformWeight *dw = NULL; - int j; + for (i = 0; i < numVerts; i++, dv++) { float tmp_co[3]; + float weight; copy_v3_v3(tmp_co, vertexCos[i]); if(ctrl_ob) { @@ -224,15 +224,10 @@ static void sphere_do( if (len_v3(vec) > cmd->radius) continue; } - for (j = 0; j < dvert[i].totweight; ++j) { - if(dvert[i].dw[j].def_nr == defgrp_index) { - dw = &dvert[i].dw[j]; - break; - } - } - if (!dw) continue; + weight= defvert_find_weight(dv, defgrp_index); + if (weight <= 0.0f) continue; - fac = fac_orig * dw->weight; + fac = fac_orig * weight; facm = 1.0f - fac; normalize_v3(vec); |