diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2020-04-10 17:59:27 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2020-04-10 18:03:27 +0300 |
commit | 475d7d073add3d1f49867d1ab5c0a1b4857adab8 (patch) | |
tree | a0b53adf60d407a5b24ef21bf57da9f8a2f70fef | |
parent | ab8e7ffc6411da2bbd9cfb574b8dfcb86390c5ea (diff) |
Fix T74800 Bevel modifier generates vertex group weight > 1.0.
Due to floating point approximations, the weights for interpolating
the mdeformvert layer could add up to a tiny bit more than 1.0.
This was not a problem in practice, but the mesh validation routine
used in regression tests was testing for this and therefore failing.
Just changed interpolation of mdeformverts to clamp max to 1.0f.
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 754c2ce097f..eb5a90a7c4a 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -315,6 +315,9 @@ static void layerInterp_mdeformvert(const void **sources, if (totweight) { dvert->totweight = totweight; for (i = 0, node = dest_dwlink; node; node = node->next, i++) { + if (node->dw.weight > 1.0f) { + node->dw.weight = 1.0f; + } dvert->dw[i] = node->dw; } } |