Commit: 77291e0305abd3e570d4a1a68803fd6cc63b5e5e
Author: Antonio Vazquez
Date:   Wed Aug 9 16:52:51 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB77291e0305abd3e570d4a1a68803fd6cc63b5e5e

Fix error with tablet eraser pen

Detect if the eraser pen is enabled without pressing any key.

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

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 8be169e05b2..45d5707f127 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2295,7 +2295,12 @@ static int gpencil_draw_invoke(bContext *C, wmOperator 
*op, const wmEvent *event
        
        if (G.debug & G_DEBUG)
                printf("GPencil - Starting Drawing\n");
-       
+
+       /* support for tablets eraser pen */
+       if (gpencil_is_tablet_eraser_active(event)) {
+               RNA_enum_set(op->ptr, "mode", GP_PAINTMODE_ERASER);
+       }
+
        /* try to initialize context data needed while drawing */
        if (!gpencil_draw_init(C, op, event)) {
                if (op->customdata)

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

Reply via email to