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.
This commit is contained in:
parent
ab8e7ffc64
commit
475d7d073a
Notes:
blender-bot
2023-02-14 00:57:33 +01:00
Referenced by issue #74800, Bevel modifier generates vertex group weight > 1.0 once applied (geometry is flagged as invalid inside BKE_mesh_validate)
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue