Page MenuHome

Fix Image Editor Cursor Disappearing (T90120)
ClosedPublic

Authored by Joseph Eagar (joeedh) on May 15 2022, 8:30 AM.

Details

Summary

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.

Diff Detail

Repository
rB Blender

Event Timeline

Joseph Eagar (joeedh) requested review of this revision.May 15 2022, 8:30 AM
Joseph Eagar (joeedh) created this revision.
Joseph Eagar (joeedh) edited the summary of this revision. (Show Details)May 15 2022, 8:39 AM

Accepting, although it if possible it would be good to avoid starting the paint cursor on any mode change.

source/blender/editors/space_image/space_image.c
318–319

Since this should only run when painting is enabled, could this be narrowed down to when the paint mode is enabled?

This revision is now accepted and ready to land.May 16 2022, 4:30 AM