diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-06-07 13:59:47 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-06-07 13:59:47 +0300 |
commit | a412f49e7580a96ff3088dd2f763efe3a814c131 (patch) | |
tree | 4c4077c7e3fcab2cdc2e736a59d5c4d8f4ae8a5f /source/blender/editors/gpencil | |
parent | 1f93f9e9820890a9389b603df8e3c4623a6f73a5 (diff) |
GPencil: Create new CURSOR for paint modes
This new cursor is used instead of the ARROW because it was too disruptive while you are drawing.
The change affects all paint modes that are used Brushes.
See D5036 for details.
Reviewers: @brecht @billreynish @mendio
Cursor designed by: @billreynish
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index cd1ebc91fbb..fc888ba95f4 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2392,10 +2392,6 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op) WM_cursor_modal_restore(CTX_wm_window(C)); } else { - /* or restore paint if 3D view */ - if ((p) && (p->paintmode == GP_PAINTMODE_ERASER)) { - WM_cursor_modal_set(p->win, CURSOR_STD); - } /* drawing batch cache is dirty now */ bGPdata *gpd = CTX_data_gpencil_data(C); @@ -2409,8 +2405,6 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op) gpencil_undo_finish(); /* cleanup */ - WM_cursor_modal_set(p->win, CURSOR_STD); - gp_paint_cleanup(p); gp_session_cleanup(p); ED_gpencil_toggle_brush_cursor(C, true, NULL); @@ -2478,6 +2472,9 @@ static int gpencil_draw_init(bContext *C, wmOperator *op, const wmEvent *event) /* ensure that the correct cursor icon is set */ static void gpencil_draw_cursor_set(tGPsdata *p) { + return; + /* Disable while we get a better cursor handling for direct input devices (Cintiq/Ipad)*/ +#if 0 Brush *brush = p->brush; if ((p->paintmode == GP_PAINTMODE_ERASER) || (brush->gpencil_tool == GPAINT_TOOL_ERASE)) { WM_cursor_modal_set(p->win, BC_CROSSCURSOR); /* XXX need a better cursor */ @@ -2485,6 +2482,7 @@ static void gpencil_draw_cursor_set(tGPsdata *p) else { WM_cursor_modal_set(p->win, CURSOR_NONE); } +#endif } /* update UI indicators of status, including cursor and header prints */ |