=== Transform ===

Fixed a bug with PET with connectivity, Mesh Face Select mode and Individual Centers.

Those three together could give negative factors, which is a big no no (this is due to some approximation in the connectivity code). Clamping the factor makes everything fine.

Bug reported by someone on BA
This commit is contained in:
2007-04-14 20:56:24 +00:00
parent 16be2ce5ba
commit c9a54805a5

View File

@@ -830,6 +830,15 @@ void calculatePropRatio(TransInfo *t)
/* Use rdist for falloff calculations, it is the real distance */
td->flag &= ~TD_NOACTION;
dist= (t->propsize-td->rdist)/t->propsize;
/*
* Clamp to positive numbers.
* Certain corner cases with connectivity and individual centers
* can give values of rdist larger than propsize.
*/
if (dist < 0.0f)
dist = 0.0f;
switch(G.scene->prop_mode) {
case PROP_SHARP:
td->factor= dist*dist;