diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-04 08:41:58 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-04 08:41:58 +0400 |
commit | 091740f858c1b6d3016e38fc3186cce737d9ff2c (patch) | |
tree | 385a776ba0d2f0ad1df78bc200f216111a77c42b | |
parent | e505203e8de655a7763f67f37f2766c30f0a70f0 (diff) |
Mesh Bisect: add header info message for modal operation
Fixes T37700
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D166
-rw-r--r-- | source/blender/editors/mesh/editmesh_bisect.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index c3c4bda4178..4b521516992 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -32,6 +32,9 @@ #include "DNA_object_types.h" #include "BLI_math.h" +#include "BLI_string.h" + +#include "BLF_translation.h" #include "BKE_global.h" #include "BKE_context.h" @@ -147,6 +150,9 @@ static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event) G.moving = G_TRANSFORM_EDIT; opdata->twtype = v3d->twtype; v3d->twtype = 0; + + /* initialize modal callout */ + ED_area_headerprint(CTX_wm_area(C), IFACE_("LMB: Click and drag to draw cut line")); } return ret; } @@ -168,6 +174,16 @@ static int mesh_bisect_modal(bContext *C, wmOperator *op, const wmEvent *event) ret = WM_gesture_straightline_modal(C, op, event); + /* update or clear modal callout */ + if (event->type == EVT_MODAL_MAP) { + if(event->val == GESTURE_MODAL_BEGIN) { + ED_area_headerprint(CTX_wm_area(C), IFACE_("LMB: Release to confirm cut line")); + } + else { + ED_area_headerprint(CTX_wm_area(C), NULL); + } + } + if (ret & (OPERATOR_FINISHED | OPERATOR_CANCELLED)) { edbm_bisect_exit(C, &opdata_back); } |