From 78017916f7c7a8ec8907c9b993214ff8ec3c3557 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Jun 2020 20:17:05 +1000 Subject: 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. --- source/blender/editors/sculpt_paint/paint_cursor.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c') 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); - } -} -- cgit v1.2.3