[Bf-blender-cvs] [4101d3e4003] master: UI: Changes to Paint Cursors

Harley Acheson noreply at git.blender.org
Tue Oct 1 01:46:29 CEST 2019


Commit: 4101d3e4003a6745fec11cdc86ca0f721bd7cf7e
Author: Harley Acheson
Date:   Mon Sep 30 16:38:40 2019 -0700
Branches: master
https://developer.blender.org/rB4101d3e4003a6745fec11cdc86ca0f721bd7cf7e

UI: Changes to Paint Cursors

Changes to cursors that can be used for painting and sculpting.

Differential Revision: https://developer.blender.org/D5951

Reviewed by Brecht Van Lommel

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

M	release/windows/icons/cursors/crossa.cur
M	release/windows/icons/cursors/crossb.cur
M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/makesrna/intern/rna_wm_api.c
M	source/blender/windowmanager/intern/wm_cursors.c
M	source/blender/windowmanager/wm_cursors.h

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

diff --git a/release/windows/icons/cursors/crossa.cur b/release/windows/icons/cursors/crossa.cur
index f6f11f32b28..7a2bfa7f406 100644
Binary files a/release/windows/icons/cursors/crossa.cur and b/release/windows/icons/cursors/crossa.cur differ
diff --git a/release/windows/icons/cursors/crossb.cur b/release/windows/icons/cursors/crossb.cur
index 39c0b3fba02..78bb1a3574b 100644
Binary files a/release/windows/icons/cursors/crossb.cur and b/release/windows/icons/cursors/crossb.cur differ
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 411710635d6..82975b2b0fb 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1363,7 +1363,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
     }
     /* Use special paint crosshair cursor in all paint modes*/
     wmWindow *win = CTX_wm_window(C);
-    WM_cursor_set(win, WM_CURSOR_CROSSA);
+    WM_cursor_set(win, WM_CURSOR_PAINT);
 
     if ((mode == PAINT_MODE_SCULPT) && ss && !is_multires &&
         !(brush->falloff_shape & BRUSH_AIRBRUSH)) {
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 1457f0e45e7..886258ee45f 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -41,7 +41,7 @@
 
 #include "rna_internal.h" /* own include */
 
-/* confusingm 2 enums mixed up here */
+/* confusing 2 enums mixed up here */
 const EnumPropertyItem rna_enum_window_cursor_items[] = {
     {WM_CURSOR_DEFAULT, "DEFAULT", 0, "Default", ""},
     {WM_CURSOR_NONE, "NONE", 0, "None", ""},
@@ -54,7 +54,8 @@ const EnumPropertyItem rna_enum_window_cursor_items[] = {
     {WM_CURSOR_KNIFE, "KNIFE", 0, "Knife", ""},
     {WM_CURSOR_TEXT_EDIT, "TEXT", 0, "Text", ""},
     {WM_CURSOR_PAINT_BRUSH, "PAINT_BRUSH", 0, "Paint Brush", ""},
-    {WM_CURSOR_CROSSA, "PAINT_CROSS", 0, "Paint Cross", ""},
+    {WM_CURSOR_PAINT, "PAINT_CROSS", 0, "Paint Cross", ""},
+    {WM_CURSOR_DOT, "DOT", 0, "Dot Cursor", ""},
     {WM_CURSOR_ERASER, "ERASER", 0, "Eraser", ""},
     {WM_CURSOR_HAND, "HAND", 0, "Hand", ""},
     {WM_CURSOR_EW_SCROLL, "SCROLL_X", 0, "Scroll-X", ""},
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index 96353fc472a..4b1abeceebb 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -107,9 +107,9 @@ static GHOST_TStandardCursor convert_to_ghost_standard_cursor(WMCursorType curs)
       return GHOST_kStandardCursorUpArrow;
     case WM_CURSOR_S_ARROW:
       return GHOST_kStandardCursorDownArrow;
-    case WM_CURSOR_CROSSA:
+    case WM_CURSOR_PAINT:
       return GHOST_kStandardCursorCrosshairA;
-    case WM_CURSOR_CROSSB:
+    case WM_CURSOR_DOT:
       return GHOST_kStandardCursorCrosshairB;
     case WM_CURSOR_CROSSC:
       return GHOST_kStandardCursorCrosshairC;
@@ -752,54 +752,54 @@ void wm_init_cursor_data(void)
   BlenderCursor[WM_CURSOR_CROSS] = &CrossCursor;
   END_CURSOR_BLOCK;
 
-  /****************** Crosshair Cursor A ************************/
+  /****************** Painting Cursor ************************/
   BEGIN_CURSOR_BLOCK;
-  static char crossa_sbm[] = {
-      0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00,
-      0x00, 0x00, 0x00, 0x1e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
-      0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+  static char paint_sbm[] = {
+      0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x8f, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
   };
 
-  static char crossa_smsk[] = {
-      0x80, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x80,
-      0x00, 0x1e, 0x3c, 0x3f, 0x7e, 0x1e, 0x3c, 0x80, 0x00, 0xc0, 0x01,
-      0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00,
+  static char paint_smsk[] = {
+      0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00, 0x00,
+      0x00, 0x8f, 0x78, 0xcf, 0x79, 0x8f, 0x78, 0x00, 0x00, 0x00, 0x00,
+      0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00,
   };
-  static char crossa_lbm[] = {
+  static char paint_lbm[] = {
       0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,
       0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
-      0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
-      0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-      0xfe, 0x0f, 0xf0, 0x7f, 0xfe, 0x0f, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,
-      0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
+      0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0xfe, 0x80, 0x01, 0x7f, 0xfe, 0x80, 0x01, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,
       0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00,
       0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
   };
 
-  static char crossa_lmsk[] = {
+  static char paint_lmsk[] = {
       0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03,
       0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0,
-      0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
-      0xc0, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0xf0, 0x7f,
-      0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xfe, 0x0f, 0xf0, 0x7f, 0x00, 0x00, 0x00,
-      0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0,
-      0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
+      0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x80, 0x01, 0x7f,
+      0xff, 0xc1, 0x83, 0xff, 0xff, 0xc1, 0x83, 0xff, 0xfe, 0x80, 0x01, 0x7f, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
       0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00,
       0x00, 0xc0, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00,
   };
 
-  static BCursor CrossCursorA = {
+  static BCursor PaintCursor = {
       /* small */
-      crossa_sbm,
-      crossa_smsk,
+      paint_sbm,
+      paint_smsk,
       16,
       16,
       7,
       7,
       /* big */
-      crossa_lbm,
-      crossa_lmsk,
+      paint_lbm,
+      paint_lmsk,
       32,
       32,
       15,
@@ -808,69 +808,69 @@ void wm_init_cursor_data(void)
       false,
   };
 
-  BlenderCursor[WM_CURSOR_CROSSA] = &CrossCursorA;
+  BlenderCursor[WM_CURSOR_PAINT] = &PaintCursor;
   END_CURSOR_BLOCK;
 
-  /********************** Diagonal Cross Cursor B ***********************/
+  /********************** Dot Cursor ***********************/
   BEGIN_CURSOR_BLOCK;
-  static char crossb_sbm[] = {
-      0x00, 0x00, 0x02, 0x40, 0x04, 0x20, 0x08, 0x10, 0x10, 0x08, 0x20,
-      0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04,
-      0x10, 0x08, 0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x00, 0x00,
-  };
-
-  static char crossb_smsk[] = {
-      0x03, 0xc0, 0x07, 0xe0, 0x0e, 0x70, 0x1c, 0x38, 0x38, 0x1c, 0x70,
-      0x0e, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x70, 0x0e,
-      0x38, 0x1c, 0x1c, 0x38, 0x0e, 0x70, 0x07, 0xe0, 0x03, 0xc0,
-  };
-  static char crossb_lbm[] = {
-      0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00,
-      0x10, 0x10, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x02, 0x80, 0x00,
-      0x00, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00,
-      0x08, 0x10, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  static char dot_sbm[] = {
+      0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x8f, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
+  };
+
+  static char dot_smsk[] = {
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x80, 0x00, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  };
+  static char dot_lbm[] = {
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-      0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x02,
-      0x40, 0x00, 0x00, 0x01, 0x80, 0x00, 0x80, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x20,
-      0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x20,
-      0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
+      0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list