Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-01-28 19:46:11 +0300
committerAntonioya <blendergit@gmail.com>2019-01-28 19:46:11 +0300
commitcad1016c20b529c394af6ac22e88c99dad41c20c (patch)
treeeceda913773e8058b88631e7af02067443d83fa8 /source
parent55e171be3349b22ada9b84d36067d0a6f00db7f7 (diff)
Fix T60944: Add Tablet eraser support to annotations usin pen
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/gpencil/annotate_paint.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index d0c95af5f5c..2ec9b1a29ef 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -1911,6 +1911,11 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event
Scene *scene = CTX_data_scene(C);
tGPsdata *p = NULL;
+ /* support for tablets eraser pen */
+ if (gpencil_is_tablet_eraser_active(event)) {
+ RNA_enum_set(op->ptr, "mode", GP_PAINTMODE_ERASER);
+ }
+
/* if try to do annotations with a gp object selected, first
* unselect the object to avoid conflicts.
* The solution is not perfect but we can keep running the annotations while