Commit: 127ad4fa4a3f7f1037c654288acbe32d4267fe9a
Author: Antonioya
Date:   Sat Mar 30 10:43:52 2019 +0100
Branches: master
https://developer.blender.org/rB127ad4fa4a3f7f1037c654288acbe32d4267fe9a

GPencil: Improve soft eraser for low pressure strokes

For very thin strokes with low pressure, the low limit value was too high.

===================================================================

M       source/blender/editors/gpencil/gpencil_paint.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_paint.c 
b/source/blender/editors/gpencil/gpencil_paint.c
index d9a58ddc5a6..4250b95de6d 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -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

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to