diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-06-08 22:37:29 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-06-08 22:37:29 +0300 |
commit | 371fc68678d51576809e4a2e4e70906ef32be69e (patch) | |
tree | 56ebed6b3a696dc79bf23fae39e81ceb90b3909f /source/blender/editors/include/ED_image.h | |
parent | 285a68b7bbf2fa40e41d507991467387f5dd5264 (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/include/ED_image.h')
-rw-r--r-- | source/blender/editors/include/ED_image.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 774115fa188..89e396c8035 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -24,6 +24,7 @@ struct Scene; struct SpaceImage; struct View2D; struct bContext; +struct Paint; struct wmOperator; struct wmWindowManager; @@ -187,6 +188,9 @@ ListBase ED_image_filesel_detect_sequences(struct Main *bmain, struct wmOperator *op, bool detect_udim); +bool ED_image_tools_paint_poll(struct bContext *C); +void ED_paint_cursor_start(struct Paint *p, bool (*poll)(struct bContext *C)); + #ifdef __cplusplus } #endif |