Fix T96238: shrinking to zero doesn't actually scales the radius to zero
Probably to prevent the radius of a point from being stuck at zero, the `Shrink/Fatten` curve operator sets a minimum value of `0.001` for all points being transformed. This is an inconvenience as these points may have been purposely set to zero on the panel. And it also doesn't follow the convention seen in other operators (which keep the value zero). So remove this limitation.
This commit is contained in:
@@ -65,9 +65,7 @@ static void applyCurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
||||
*td->val = td->ival * ratio;
|
||||
/* apply PET */
|
||||
*td->val = (*td->val * td->factor) + ((1.0f - td->factor) * td->ival);
|
||||
if (*td->val <= 0.0f) {
|
||||
*td->val = 0.001f;
|
||||
}
|
||||
CLAMP_MIN(*td->val, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,10 +91,6 @@ void initCurveShrinkFatten(TransInfo *t)
|
||||
t->num.unit_sys = t->scene->unit.system;
|
||||
t->num.unit_type[0] = B_UNIT_NONE;
|
||||
|
||||
#ifdef USE_NUM_NO_ZERO
|
||||
t->num.val_flag[0] |= NUM_NO_ZERO;
|
||||
#endif
|
||||
|
||||
t->flag |= T_NO_CONSTRAINT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user