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-08-09 01:12:51 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-08-09 01:12:51 +0400
commite2c24bac6c56df6a54c37233d43f609f86d868d5 (patch)
treed38015c0a40f4352d181e32b023c310b759d2c2d /source/blender/modifiers/intern/MOD_weightvg_util.c
parentce20487fa79bb5b7e112bcdaca5a25ba8fbcfec2 (diff)
vgroup_modifiers: Now clamping output values to [0.0, 1.0] range (and added min/max mapping values for Prowimity modif).
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvg_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 1fe1a96c2e5..43cc3081199 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -192,6 +192,9 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, int num, int *indice
MDeformVert *dv = &dvert[indices ? indices[i] : i];
MDeformWeight *newdw;
+ /* Never allow weights out of [0.0, 1.0] range. */
+ CLAMP(w, 0.0, 1.0);
+
/* Let’s first check to see if this vert is already in the weight group – if so
* let’s update it, or remove it if needed.
*/