diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-28 13:06:00 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-28 14:04:28 +0300 |
commit | 89e0d9848a0660c81e57f1e5e9778a2b920bd54a (patch) | |
tree | 9c72026a731d04c3663683e52f06f943e78a1a32 /source/blender/editors/armature | |
parent | af9fcb6a333b575e7f1c2ab1e3d8fbcf1a69b7e1 (diff) |
UI: keep some operator text in headers.
Key shortcuts and explanation about how to use the tool should go to the
status bar, but other info can in the header so it's near where the user
is working. This distinction has not been made yet for all operators.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/pose_lib.c | 19 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_slide.c | 12 |
2 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index b5ae950a28a..46663d7a771 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -1115,10 +1115,8 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) /* do header print - if interactively previewing */ if (pld->state == PL_PREVIEW_RUNNING) { if (pld->flag & PL_PREVIEW_SHOWORIGINAL) { - BLI_strncpy(pld->headerstr, - IFACE_("PoseLib Previewing Pose: [Showing Original Pose] | Use Tab to start previewing poses again"), - sizeof(pld->headerstr)); - ED_workspace_status_text(C, pld->headerstr); + ED_area_status_text(pld->sa, IFACE_("PoseLib Previewing Pose: [Showing Original Pose]")); + ED_workspace_status_text(C, IFACE_("Use Tab to start previewing poses again")); } else if (pld->searchstr[0]) { char tempstr[65]; @@ -1142,17 +1140,17 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) BLI_snprintf(pld->headerstr, sizeof(pld->headerstr), IFACE_("PoseLib Previewing Pose: Filter - [%s] | " - "Current Pose - \"%s\" | " - "Use ScrollWheel or PageUp/Down to change"), + "Current Pose - \"%s\""), tempstr, markern); - ED_workspace_status_text(C, pld->headerstr); + ED_area_status_text(pld->sa, pld->headerstr); + ED_workspace_status_text(C, IFACE_("Use ScrollWheel or PageUp/Down to change pose")); } else { BLI_snprintf(pld->headerstr, sizeof(pld->headerstr), - IFACE_("PoseLib Previewing Pose: \"%s\" | " - "Use ScrollWheel or PageUp/Down to change"), + IFACE_("PoseLib Previewing Pose: \"%s\""), pld->marker->name); - ED_workspace_status_text(C, pld->headerstr); + ED_area_status_text(pld->sa, pld->headerstr); + ED_workspace_status_text(C, NULL); } } @@ -1602,6 +1600,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_status_text(pld->sa, NULL); ED_workspace_status_text(C, NULL); /* this signal does one recalc on pose, then unlocks, so ESC or edit will work */ diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index 4f2e2397ef4..0a07af4ab43 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(bContext *C, tPoseSlideOp *pso) +static void pose_slide_draw_status(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(bContext *C, tPoseSlideOp *pso) BLI_snprintf(status_str, sizeof(status_str), "%s: %d %% | %s", mode_str, (int)(pso->percentage * 100.0f), limits_str); } - ED_workspace_status_text(C, status_str); + ED_area_status_text(pso->sa, 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(C, pso); + pose_slide_draw_status(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_workspace_status_text(C, NULL); + ED_area_status_text(pso->sa, 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_workspace_status_text(C, NULL); + ED_area_status_text(pso->sa, 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(C, pso); + pose_slide_draw_status(pso); /* reset transforms (to avoid accumulation errors) */ pose_slide_reset(pso); |