diff options
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_interpolate.c | 14 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 18 |
3 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index f9284d71db3..5eb3321b414 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -1042,7 +1042,7 @@ static void gpsculpt_brush_header_set(bContext *C, tGP_BrushEditData *gso) " | Shift-Wheel Up/Down for Strength"), (brush_name) ? brush_name : "<?>"); - ED_area_headerprint(CTX_wm_area(C), str); + ED_workspace_status_text(C, str); } /* ************************************************ */ @@ -1176,7 +1176,7 @@ static void gpsculpt_brush_exit(bContext *C, wmOperator *op) } /* disable cursor and headerprints */ - ED_area_headerprint(CTX_wm_area(C), NULL); + ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); gpencil_toggle_brush_cursor(C, false); diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index ff3f5b20858..d7e4be676e5 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -352,7 +352,7 @@ static void gpencil_mouse_update_shift(tGPDinterpolate *tgpi, wmOperator *op, co } /* Helper: Draw status message while the user is running the operator */ -static void gpencil_interpolate_status_indicators(tGPDinterpolate *p) +static void gpencil_interpolate_status_indicators(bContext *C, tGPDinterpolate *p) { Scene *scene = p->scene; char status_str[UI_MAX_DRAW_STR]; @@ -370,14 +370,14 @@ static void gpencil_interpolate_status_indicators(tGPDinterpolate *p) BLI_snprintf(status_str, sizeof(status_str), "%s: %d %%", msg_str, (int)((p->init_factor + p->shift) * 100.0f)); } - ED_area_headerprint(p->sa, status_str); + ED_workspace_status_text(C, status_str); } /* Update screen and stroke */ static void gpencil_interpolate_update(bContext *C, wmOperator *op, tGPDinterpolate *tgpi) { /* update shift indicator in header */ - gpencil_interpolate_status_indicators(tgpi); + gpencil_interpolate_status_indicators(C, tgpi); /* apply... */ tgpi->shift = RNA_float_get(op->ptr, "shift"); /* update points position */ @@ -403,7 +403,7 @@ static void gpencil_interpolate_exit(bContext *C, wmOperator *op) } /* clear status message area */ - ED_area_headerprint(tgpi->sa, NULL); + ED_workspace_status_text(C, NULL); /* finally, free memory used by temp data */ for (tgpil = tgpi->ilayers.first; tgpil; tgpil = tgpil->next) { @@ -526,7 +526,7 @@ static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent WM_cursor_modal_set(win, BC_EW_SCROLLCURSOR); /* update shift indicator in header */ - gpencil_interpolate_status_indicators(tgpi); + gpencil_interpolate_status_indicators(C, tgpi); WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL); /* add a modal handler for this operator */ @@ -550,7 +550,7 @@ static int gpencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent case RETKEY: { /* return to normal cursor and header status */ - ED_area_headerprint(tgpi->sa, NULL); + ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); /* insert keyframes as required... */ @@ -585,7 +585,7 @@ static int gpencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent case RIGHTMOUSE: { /* return to normal cursor and header status */ - ED_area_headerprint(tgpi->sa, NULL); + ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); /* clean up temp data */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index c8f1901d075..800c899f9c2 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2025,38 +2025,38 @@ static void gpencil_draw_cursor_set(tGPsdata *p) } /* update UI indicators of status, including cursor and header prints */ -static void gpencil_draw_status_indicators(tGPsdata *p) +static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p) { /* header prints */ switch (p->status) { case GP_STATUS_PAINTING: /* only print this for paint-sessions, otherwise it gets annoying */ if (GPENCIL_SKETCH_SESSIONS_ON(p->scene)) - ED_area_headerprint(p->sa, IFACE_("Grease Pencil: Drawing/erasing stroke... Release to end stroke")); + ED_workspace_status_text(C, IFACE_("Grease Pencil: Drawing/erasing stroke... Release to end stroke")); break; case GP_STATUS_IDLING: /* print status info */ switch (p->paintmode) { case GP_PAINTMODE_ERASER: - ED_area_headerprint(p->sa, IFACE_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | " + ED_workspace_status_text(C, IFACE_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | " "ESC/Enter to end (or click outside this area)")); break; case GP_PAINTMODE_DRAW_STRAIGHT: - ED_area_headerprint(p->sa, IFACE_("Grease Pencil Line Session: Hold and drag LMB to draw | " + ED_workspace_status_text(C, IFACE_("Grease Pencil Line Session: Hold and drag LMB to draw | " "ESC/Enter to end (or click outside this area)")); break; case GP_PAINTMODE_DRAW: - ED_area_headerprint(p->sa, IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw | " + ED_workspace_status_text(C, IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw | " "E/ESC/Enter to end (or click outside this area)")); break; case GP_PAINTMODE_DRAW_POLY: - ED_area_headerprint(p->sa, IFACE_("Grease Pencil Poly Session: LMB click to place next stroke vertex | " + ED_workspace_status_text(C, IFACE_("Grease Pencil Poly Session: LMB click to place next stroke vertex | " "ESC/Enter to end (or click outside this area)")); break; default: /* unhandled future cases */ - ED_area_headerprint(p->sa, IFACE_("Grease Pencil Session: ESC/Enter to end (or click outside this area)")); + ED_workspace_status_text(C, IFACE_("Grease Pencil Session: ESC/Enter to end (or click outside this area)")); break; } break; @@ -2064,7 +2064,7 @@ static void gpencil_draw_status_indicators(tGPsdata *p) case GP_STATUS_ERROR: case GP_STATUS_DONE: /* clear status string */ - ED_area_headerprint(p->sa, NULL); + ED_workspace_status_text(C, NULL); break; } } @@ -2744,7 +2744,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) estate = OPERATOR_CANCELLED; else { /* update status indicators - cursor, header, etc. */ - gpencil_draw_status_indicators(p); + gpencil_draw_status_indicators(C, p); gpencil_draw_cursor_set(p); /* cursor may have changed outside our control - T44084 */ } |