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:
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.
*/