diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-26 18:19:25 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-26 20:45:55 +0300 |
commit | df02675e21736bd79acb0e34bb410efe748a86bc (patch) | |
tree | 876e21c395f20fe945bae6a3bfd031a386f2620a /source/blender/editors/armature | |
parent | c817a89e73891307c2a04e75d0968d49be0e6c29 (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/armature')
-rw-r--r-- | source/blender/editors/armature/pose_lib.c | 8 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_slide.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index b9c4584ff15..b5ae950a28a 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -1118,7 +1118,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) BLI_strncpy(pld->headerstr, IFACE_("PoseLib Previewing Pose: [Showing Original Pose] | Use Tab to start previewing poses again"), sizeof(pld->headerstr)); - ED_area_headerprint(pld->sa, pld->headerstr); + ED_workspace_status_text(C, pld->headerstr); } else if (pld->searchstr[0]) { char tempstr[65]; @@ -1145,14 +1145,14 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) "Current Pose - \"%s\" | " "Use ScrollWheel or PageUp/Down to change"), tempstr, markern); - ED_area_headerprint(pld->sa, pld->headerstr); + ED_workspace_status_text(C, pld->headerstr); } else { BLI_snprintf(pld->headerstr, sizeof(pld->headerstr), IFACE_("PoseLib Previewing Pose: \"%s\" | " "Use ScrollWheel or PageUp/Down to change"), pld->marker->name); - ED_area_headerprint(pld->sa, pld->headerstr); + ED_workspace_status_text(C, pld->headerstr); } } @@ -1602,7 +1602,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) TimeMarker *marker = pld->marker; /* redraw the header so that it doesn't show any of our stuff anymore */ - ED_area_headerprint(pld->sa, NULL); + ED_workspace_status_text(C, NULL); /* this signal does one recalc on pose, then unlocks, so ESC or edit will work */ pose->flag |= POSE_DO_UNLOCK; diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index b82535f013b..4f2e2397ef4 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -627,7 +627,7 @@ static void pose_slide_reset(tPoseSlideOp *pso) /* draw percentage indicator in header */ // TODO: Include hints about locks here... -static void pose_slide_draw_status(tPoseSlideOp *pso) +static void pose_slide_draw_status(bContext *C, tPoseSlideOp *pso) { char status_str[UI_MAX_DRAW_STR]; char limits_str[UI_MAX_DRAW_STR]; @@ -705,7 +705,7 @@ static void pose_slide_draw_status(tPoseSlideOp *pso) BLI_snprintf(status_str, sizeof(status_str), "%s: %d %% | %s", mode_str, (int)(pso->percentage * 100.0f), limits_str); } - ED_area_headerprint(pso->sa, status_str); + ED_workspace_status_text(C, status_str); } /* common code for invoke() methods */ @@ -781,7 +781,7 @@ static int pose_slide_invoke_common(bContext *C, wmOperator *op, tPoseSlideOp *p WM_cursor_modal_set(win, BC_EW_SCROLLCURSOR); /* header print */ - pose_slide_draw_status(pso); + pose_slide_draw_status(C, pso); /* add a modal handler for this operator */ WM_event_add_modal_handler(C, op); @@ -857,7 +857,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) case PADENTER: { /* return to normal cursor and header status */ - ED_area_headerprint(pso->sa, NULL); + ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); /* insert keyframes as required... */ @@ -872,7 +872,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) case RIGHTMOUSE: { /* return to normal cursor and header status */ - ED_area_headerprint(pso->sa, NULL); + ED_workspace_status_text(C, NULL); WM_cursor_modal_restore(win); /* reset transforms back to original state */ @@ -997,7 +997,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) /* perform pose updates - in response to some user action (e.g. pressing a key or moving the mouse) */ if (do_pose_update) { /* update percentage indicator in header */ - pose_slide_draw_status(pso); + pose_slide_draw_status(C, pso); /* reset transforms (to avoid accumulation errors) */ pose_slide_reset(pso); |