Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_paint.c
| Context not available. | |||||
| WM_cursor_modal_restore(CTX_wm_window(C)); | WM_cursor_modal_restore(CTX_wm_window(C)); | ||||
| } | } | ||||
| else { | 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 */ | /* drawing batch cache is dirty now */ | ||||
| bGPdata *gpd = CTX_data_gpencil_data(C); | bGPdata *gpd = CTX_data_gpencil_data(C); | ||||
| Context not available. | |||||
| gpencil_undo_finish(); | gpencil_undo_finish(); | ||||
| /* cleanup */ | /* cleanup */ | ||||
| WM_cursor_modal_set(p->win, CURSOR_STD); | |||||
| gp_paint_cleanup(p); | gp_paint_cleanup(p); | ||||
| gp_session_cleanup(p); | gp_session_cleanup(p); | ||||
| ED_gpencil_toggle_brush_cursor(C, true, NULL); | ED_gpencil_toggle_brush_cursor(C, true, NULL); | ||||
| Context not available. | |||||
| /* ensure that the correct cursor icon is set */ | /* ensure that the correct cursor icon is set */ | ||||
| static void gpencil_draw_cursor_set(tGPsdata *p) | 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; | Brush *brush = p->brush; | ||||
| if ((p->paintmode == GP_PAINTMODE_ERASER) || (brush->gpencil_tool == GPAINT_TOOL_ERASE)) { | 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 */ | WM_cursor_modal_set(p->win, BC_CROSSCURSOR); /* XXX need a better cursor */ | ||||
| Context not available. | |||||
| else { | else { | ||||
| WM_cursor_modal_set(p->win, CURSOR_NONE); | WM_cursor_modal_set(p->win, CURSOR_NONE); | ||||
| } | } | ||||
| #endif | |||||
| } | } | ||||
| /* update UI indicators of status, including cursor and header prints */ | /* update UI indicators of status, including cursor and header prints */ | ||||
| Context not available. | |||||