Fix T48186: Grease Pencil Smooth brush doesn't work properly - "erase" the stroke thickness
As soon as you started trying to smooth a stroke, the thickness of the stroke would quickly drop right down to near zero, if "affect pressure" was enabled. This step got accidentally missed when restoring the affect pressure functionality to the stroke smoothing brush code, following cleanups from the stroke quality patch.
This commit is contained in:
parent
9f39619dda
commit
2aafadd4ac
Notes:
blender-bot
2023-02-14 07:58:26 +01:00
Referenced by issue #48186, Grease Pencil Smooth brush don´t work properly, ¨erase¨ the stroke thickness
|
@ -569,6 +569,10 @@ bool gp_smooth_stroke(bGPDstroke *gps, int i, float inf, bool affect_pressure)
|
|||
/* add the point itself */
|
||||
madd_v3_v3fl(sco, &pt->x, average_fac);
|
||||
|
||||
if (affect_pressure) {
|
||||
pressure += pt->pressure * average_fac;
|
||||
}
|
||||
|
||||
/* n-steps before/after current point */
|
||||
// XXX: review how the endpoints are treated by this algorithm
|
||||
// XXX: falloff measures should also introduce some weighting variations, so that further-out points get less weight
|
||||
|
|
Loading…
Reference in New Issue