Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image.c
| Show First 20 Lines • Show All 802 Lines • ▼ Show 20 Lines | |||||
| * mode is enabled in the image editor. the paint poll will | * mode is enabled in the image editor. the paint poll will | ||||
| * ensure that the cursor is hidden when not in paint mode */ | * ensure that the cursor is hidden when not in paint mode */ | ||||
| void ED_space_image_paint_update(Main *bmain, wmWindowManager *wm, Scene *scene) | void ED_space_image_paint_update(Main *bmain, wmWindowManager *wm, Scene *scene) | ||||
| { | { | ||||
| ToolSettings *settings = scene->toolsettings; | ToolSettings *settings = scene->toolsettings; | ||||
| ImagePaintSettings *imapaint = &settings->imapaint; | ImagePaintSettings *imapaint = &settings->imapaint; | ||||
| bool enabled = false; | bool enabled = false; | ||||
| for (wmWindow *win = wm->windows.first; win; win = win->next) { | LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { | ||||
| bScreen *screen = WM_window_get_active_screen(win); | bScreen *screen = WM_window_get_active_screen(win); | ||||
| for (ScrArea *area = screen->areabase.first; area; area = area->next) { | LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | ||||
| if (area->spacetype == SPACE_IMAGE) { | if (area->spacetype == SPACE_IMAGE) { | ||||
| if (((SpaceImage *)area->spacedata.first)->mode == SI_MODE_PAINT) { | if (((SpaceImage *)area->spacedata.first)->mode == SI_MODE_PAINT) { | ||||
| enabled = true; | enabled = true; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 531 Lines • Show Last 20 Lines | |||||