[Bf-blender-cvs] [d6a25d62623] greasepencil-object: Fix error using different eraser modes

Antonio Vazquez noreply at git.blender.org
Sat Mar 3 16:08:15 CET 2018


Commit: d6a25d62623bb149d6072b78dfbc628465eb142d
Author: Antonio Vazquez
Date:   Sat Mar 3 16:08:09 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBd6a25d62623bb149d6072b78dfbc628465eb142d

Fix error using different eraser modes

If the bursh was eraser, the brush was not using the eraser mode.

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

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 285fc657eca..a84953cf6d4 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1456,7 +1456,12 @@ static void gp_init_drawing_brush(ToolSettings *ts, tGPsdata *p)
 
 	/* asign to temp tGPsdata */
 	p->brush = brush;
-	p->eraser = gp_get_default_eraser(ts);
+	if (brush->type != GP_BRUSH_TYPE_ERASE) {
+		p->eraser = gp_get_default_eraser(ts);
+	}
+	else {
+		p->eraser = brush;
+	}
 	/* use radius of eraser */
 	p->radius = (short)p->eraser->thickness;
 }



More information about the Bf-blender-cvs mailing list