[Bf-blender-cvs] [e56f71d03f1] master: Grease Pencil: use standard eraser and paint brush cursors
Harley Acheson
noreply at git.blender.org
Thu Sep 26 14:33:23 CEST 2019
Commit: e56f71d03f1e856b7daec169c12ffc8885f64d43
Author: Harley Acheson
Date: Thu Sep 26 14:31:52 2019 +0200
Branches: master
https://developer.blender.org/rBe56f71d03f1e856b7daec169c12ffc8885f64d43
Grease Pencil: use standard eraser and paint brush cursors
Ref D5197
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
M source/blender/editors/gpencil/annotate_paint.c
M source/blender/makesrna/intern/rna_wm_api.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index a232146c82d..5a48a509f15 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -199,7 +199,7 @@ class _defs_annotate:
idname="builtin.annotate_line",
label="Annotate Line",
icon="ops.gpencil.draw.line",
- cursor='CROSSHAIR',
+ cursor='PAINT_BRUSH',
keymap="Generic Tool: Annotate Line",
draw_settings=draw_settings,
)
@@ -210,7 +210,7 @@ class _defs_annotate:
idname="builtin.annotate_polygon",
label="Annotate Polygon",
icon="ops.gpencil.draw.poly",
- cursor='CROSSHAIR',
+ cursor='PAINT_BRUSH',
keymap="Generic Tool: Annotate Polygon",
draw_settings=draw_settings,
)
@@ -225,7 +225,7 @@ class _defs_annotate:
idname="builtin.annotate_eraser",
label="Annotate Eraser",
icon="ops.gpencil.draw.eraser",
- cursor='CROSSHAIR', # XXX: Always show brush circle when enabled
+ cursor='ERASER',
keymap="Generic Tool: Annotate Eraser",
draw_settings=draw_settings,
)
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index f2d039bb47c..7a10547f35c 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -1560,7 +1560,7 @@ static int gpencil_draw_init(bContext *C, wmOperator *op, const wmEvent *event)
static void gpencil_draw_cursor_set(tGPsdata *p)
{
if (p->paintmode == GP_PAINTMODE_ERASER) {
- WM_cursor_modal_set(p->win, WM_CURSOR_CROSS); /* XXX need a better cursor */
+ WM_cursor_modal_set(p->win, WM_CURSOR_ERASER);
}
else {
WM_cursor_modal_set(p->win, WM_CURSOR_PAINT_BRUSH);
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 1e8b561f396..f0bc031c328 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -54,6 +54,7 @@ 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_ERASER, "ERASER", 0, "Eraser", ""},
{WM_CURSOR_HAND, "HAND", 0, "Hand", ""},
{WM_CURSOR_EW_SCROLL, "SCROLL_X", 0, "Scroll-X", ""},
{WM_CURSOR_NS_SCROLL, "SCROLL_Y", 0, "Scroll-Y", ""},
More information about the Bf-blender-cvs
mailing list