Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2011-07-29 17:25:58 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-07-29 17:25:58 +0400
commita22f75606e2c179460bfa36a9a4afd4b9548d5f5 (patch)
treea87052f971d60e917f13323eb7fe3ac56eca1131 /source/blender/modifiers/intern/MOD_weightvg_util.c
parentfb99e23205aa1eb7b3f47b8f43e8b812f598a574 (diff)
vgroup_modifiers: Fixed last problems with WP mode, plus a small fix in weightvg_util.c.
It seems WeightVG modifiers can’t enable the eModifierTypeFlag_SupportsMapping flag...
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvg_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index c18fceb1e3f..1fe1a96c2e5 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -187,6 +187,7 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indice
for (i = 0; i < num; i++) {
int j;
+ char add2vg = do_add;
float w = weights[i];
MDeformVert *dv = &dvert[indices ? indices[i] : i];
MDeformWeight *newdw;
@@ -221,16 +222,17 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indice
}
}
/* Else, just set the new computed weight. */
- else
+ else {
dv->dw[j].weight = w;
+ }
+ add2vg = 0;
break;
}
- continue;
}
/* If the vert wasn’t in the deform group, add it if needed!
*/
- if (do_add && w > add_thresh) {
+ if (add2vg && w > add_thresh) {
newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "WeightVGEdit Modifier, deformWeight");
if(dv->dw) {
memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight);