[Bf-blender-cvs] [d06671b3d9a] master: GPencil: Don't hide Cursor while drawing

Antonioya noreply at git.blender.org
Thu Jun 27 23:19:12 CEST 2019


Commit: d06671b3d9a1469dd03fc68c4506f957e758d18d
Author: Antonioya
Date:   Thu Jun 27 23:19:05 2019 +0200
Branches: master
https://developer.blender.org/rBd06671b3d9a1469dd03fc68c4506f957e758d18d

GPencil: Don't hide Cursor while drawing

This is a partial solution for T62446 while we prepare a way to hide the cursor all the time.

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

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 46a016b8c78..03b4dd444d7 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2393,10 +2393,10 @@ 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);
-      }
+      ///* 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);
@@ -2410,7 +2410,7 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op)
     gpencil_undo_finish();
 
     /* cleanup */
-    WM_cursor_modal_set(p->win, CURSOR_STD);
+    // WM_cursor_modal_set(p->win, CURSOR_STD);
 
     gp_paint_cleanup(p);
     gp_session_cleanup(p);
@@ -2479,6 +2479,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 */
@@ -2486,6 +2489,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 */



More information about the Bf-blender-cvs mailing list