diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-04 13:17:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-04 13:24:57 +0300 |
commit | 78017916f7c7a8ec8907c9b993214ff8ec3c3557 (patch) | |
tree | f8becbdad75303714dfae3c3fa1c2205cbd27fb6 /source/blender/editors/sculpt_paint/paint_cursor.c | |
parent | 465a9f65de769d76cc950b674683a0903e36f31a (diff) |
Fix error removing the image paint cursor
Mix up with imapaint.paintcursor & imapaint.paint.paint_cursor
Remove imapaint.paintcursor since it wasn't used.
Also rename paint_cursor_start_explicit() to paint_cursor_start(),
removing the existing paint_cursor_start() since it took the paint
struct from the context, a value that's known by all callers.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index e31efe5abd7..4222a466a7b 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -1674,10 +1674,8 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) /* Public API */ -void paint_cursor_start(bContext *C, bool (*poll)(bContext *C)) +void paint_cursor_start(Paint *p, bool (*poll)(bContext *C)) { - Paint *p = BKE_paint_get_active_from_context(C); - if (p && !p->paint_cursor) { p->paint_cursor = WM_paint_cursor_activate( SPACE_TYPE_ANY, RGN_TYPE_ANY, poll, paint_draw_cursor, NULL); @@ -1686,11 +1684,3 @@ void paint_cursor_start(bContext *C, bool (*poll)(bContext *C)) /* Invalidate the paint cursors. */ BKE_paint_invalidate_overlay_all(); } - -void paint_cursor_start_explicit(Paint *p, bool (*poll)(bContext *C)) -{ - if (p && !p->paint_cursor) { - p->paint_cursor = WM_paint_cursor_activate( - SPACE_TYPE_ANY, RGN_TYPE_ANY, poll, paint_draw_cursor, NULL); - } -} |