Fix #81948: Regression: Sculpt mode Annotation tool cursor conflict

Sculpt brush cursor is still drawn when annotation tool is selected.
Use `SCULPT_poll` function for paint cursor poll function (`pc->poll`).
This new poll function checks whether active tool is brush. In case of
non-brush tools (transform, annotate), poll function will return false
which eventually prevents pc->draw() from drawing the brush cursor.

Fix is similar to !122657

Pull Request: https://projects.blender.org/blender/blender/pulls/122709
This commit is contained in:
Pratik Borhade
2024-06-05 13:46:59 +02:00
committed by Pratik Borhade
parent a6ed013baa
commit 03d3f2fa73

View File

@@ -370,7 +370,7 @@ void ED_object_sculptmode_enter_ex(Main &bmain,
Paint *paint = BKE_paint_get_active_from_paintmode(&scene, PaintMode::Sculpt);
BKE_paint_init(&bmain, &scene, PaintMode::Sculpt, PAINT_CURSOR_SCULPT);
ED_paint_cursor_start(paint, SCULPT_mode_poll_view3d);
ED_paint_cursor_start(paint, SCULPT_poll);
/* Check dynamic-topology flag; re-enter dynamic-topology mode when changing modes,
* As long as no data was added that is not supported. */