From 371fc68678d51576809e4a2e4e70906ef32be69e Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Wed, 8 Jun 2022 12:37:29 -0700 Subject: Paint: Fix Image Editor Cursor Disappearing (T90120) This patch fixes T90120. The fundamental problem is that 2d and the old 3d paint modes share a single Paint struct, ToolSettings->imapaint. This patch is a temporary fix until the new 3d paint mode (which has its own Paint struct) is released. The patch works by listening for `NC_SCENE|ND_MODE` inside `image_listener` in `space_image.c`. It does not use `ED_space_image_paint_update` since that requires a `bMain.` Instead it calls `paint_cursor_start` (which is promoted to `ED_paint_cursor_start`). `image_paint_poll` is also promoted to an `ED_` function. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D14946 Ref D14946 --- source/blender/editors/space_image/space_image.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 9832fcfdb70..fa0b7d75a30 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -316,6 +316,9 @@ static void image_listener(const wmSpaceTypeListenerParams *params) ED_area_tag_redraw(area); break; case ND_MODE: + ED_paint_cursor_start(¶ms->scene->toolsettings->imapaint.paint, + ED_image_tools_paint_poll); + if (wmn->subtype == NS_EDITMODE_MESH) { ED_area_tag_refresh(area); } -- cgit v1.2.3