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/sculpt_paint/curves_sculpt_ops.cc
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/sculpt_paint/curves_sculpt_ops.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index dc3dacf9c81..f5f7726a7f8 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -17,6 +17,7 @@
#include "WM_api.h"
#include "WM_toolsystem.h"
+#include "ED_image.h"
#include "ED_curves_sculpt.h"
#include "ED_object.h"
#include "ED_screen.h"
@@ -271,7 +272,7 @@ static void curves_sculptmode_enter(bContext *C)
ob->mode = OB_MODE_SCULPT_CURVES;
- paint_cursor_start(&curves_sculpt->paint, CURVES_SCULPT_mode_poll_view3d);
+ ED_paint_cursor_start(&curves_sculpt->paint, CURVES_SCULPT_mode_poll_view3d);
/* Update for mode change. */
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);