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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-26 18:19:25 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-26 20:45:55 +0300
commitdf02675e21736bd79acb0e34bb410efe748a86bc (patch)
tree876e21c395f20fe945bae6a3bfd031a386f2620a /source/blender/editors/sculpt_paint
parentc817a89e73891307c2a04e75d0968d49be0e6c29 (diff)
UI: move modal operator text from headers to status bar.
Python API is context.workspace.status_text_set()
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c6
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c9
2 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 3c097095ddc..c3a0ca4299f 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -886,7 +886,7 @@ static void sample_color_update_header(SampleColorData *data, bContext *C)
!data->sample_palette ?
IFACE_("Brush. Use Left Click to sample for palette instead") :
IFACE_("Palette. Use Left Click to sample more colors"));
- ED_area_headerprint(sa, msg);
+ ED_workspace_status_text(C, msg);
}
}
@@ -965,8 +965,6 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
Brush *brush = BKE_paint_brush(paint);
if ((event->type == data->event_type) && (event->val == KM_RELEASE)) {
- ScrArea *sa = CTX_wm_area(C);
-
if (data->show_cursor) {
paint->flags |= PAINT_SHOW_BRUSH;
}
@@ -977,7 +975,7 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
WM_cursor_modal_restore(CTX_wm_window(C));
MEM_freeN(data);
- ED_area_headerprint(sa, NULL);
+ ED_workspace_status_text(C, NULL);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 414b9f2062f..88cb6f548e8 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5970,8 +5970,7 @@ static int sculpt_sample_detail_size_exec(bContext *C, wmOperator *op)
static int sculpt_sample_detail_size_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e))
{
- ScrArea *sa = CTX_wm_area(C);
- ED_area_headerprint(sa, "Click on the mesh to set the detail");
+ ED_workspace_status_text(C, "Click on the mesh to set the detail");
WM_cursor_modal_set(CTX_wm_window(C), BC_EYEDROPPER_CURSOR);
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -5982,14 +5981,13 @@ static int sculpt_sample_detail_size_modal(bContext *C, wmOperator *op, const wm
switch (e->type) {
case LEFTMOUSE:
if (e->val == KM_PRESS) {
- ScrArea *sa = CTX_wm_area(C);
int ss_co[2] = {e->mval[0], e->mval[1]};
sample_detail(C, ss_co);
RNA_int_set_array(op->ptr, "location", ss_co);
WM_cursor_modal_restore(CTX_wm_window(C));
- ED_area_headerprint(sa, NULL);
+ ED_workspace_status_text(C, NULL);
WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL);
return OPERATOR_FINISHED;
@@ -5998,9 +5996,8 @@ static int sculpt_sample_detail_size_modal(bContext *C, wmOperator *op, const wm
case RIGHTMOUSE:
{
- ScrArea *sa = CTX_wm_area(C);
WM_cursor_modal_restore(CTX_wm_window(C));
- ED_area_headerprint(sa, NULL);
+ ED_workspace_status_text(C, NULL);
return OPERATOR_CANCELLED;
}