GPencil: Improve soft eraser for low pressure strokes

For very thin strokes with low pressure, the low limit value was too high.
This commit is contained in:
Antonioya
2019-03-30 10:43:52 +01:00
parent de0dab66ff
commit 127ad4fa4a

View File

@@ -1494,19 +1494,15 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
}
}
else {
/* Pressure threshold at which stroke should be culled: Calculated as pressure value
* below which we would have invisible strokes
*/
const float cull_thresh = (gps->thickness) ? 1.0f / ((float)gps->thickness) : 1.0f;
/* Pressure threshold at which stroke should be culled */
const float cull_thresh = 0.005f;
/* Amount to decrease the pressure of each point with each stroke */
// TODO: Fetch from toolsettings, or compute based on thickness instead?
const float strength = 0.1f;
/* Perform culling? */
bool do_cull = false;
/* Clear Tags
*
* Note: It's better this way, as we are sure that