Fix T60944: Add Tablet eraser support to annotations usin pen
This commit is contained in:
parent
55e171be33
commit
cad1016c20
Notes:
blender-bot
2023-02-14 03:56:12 +01:00
Referenced by issue #60995, Tool Bar Icons non-rendering Referenced by issue #60944, Annotate tool doesn't switch to eraser mode when using tablet stylus eraser
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue