Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-06-08 22:37:29 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-06-08 22:37:29 +0300
commit371fc68678d51576809e4a2e4e70906ef32be69e (patch)
tree56ebed6b3a696dc79bf23fae39e81ceb90b3909f /source/blender/editors/space_image
parent285a68b7bbf2fa40e41d507991467387f5dd5264 (diff)
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
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/space_image.c3
1 files changed, 3 insertions, 0 deletions
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(&params->scene->toolsettings->imapaint.paint,
+ ED_image_tools_paint_poll);
+
if (wmn->subtype == NS_EDITMODE_MESH) {
ED_area_tag_refresh(area);
}