diff options
author | Joseph Eagar <joeedh@gmail.com> | 2011-05-10 00:43:05 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2011-05-10 00:43:05 +0400 |
commit | 6acd2f1138bb0fb3eceb99d1be9f733e56f2c983 (patch) | |
tree | 9bc906b7f87eb4f64d0b2df2fd822ad05946d435 /source | |
parent | 5ba0c2c04906dd45db42380fa56c0044222194ae (diff) |
=bmesh= undo loopcut commit, for some reason the recent merge didn't catch it
Diffstat (limited to 'source')
-rwxr-xr-x | source/blender/editors/mesh/knifetool.c | 8 | ||||
-rw-r--r-- | source/blender/editors/mesh/loopcut.c | 27 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 6 |
6 files changed, 12 insertions, 34 deletions
diff --git a/source/blender/editors/mesh/knifetool.c b/source/blender/editors/mesh/knifetool.c index 9d907a82482..0315fa80506 100755 --- a/source/blender/editors/mesh/knifetool.c +++ b/source/blender/editors/mesh/knifetool.c @@ -1707,6 +1707,8 @@ static int knifetool_init (bContext *C, wmOperator *op, int UNUSED(do_cut)) kcd->vthresh = KMAXDIST-1; kcd->ethresh = KMAXDIST; + kcd->extend = 1; + knife_recalc_projmat(kcd); ED_region_tag_redraw(kcd->ar); @@ -1825,7 +1827,11 @@ static int knifetool_modal (bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; case EKEY: - kcd->extend = event->val!=KM_RELEASE; + kcd->extend = event->val==KM_RELEASE; + if (event->val == KM_RELEASE) { + knife_finish_cut(kcd); + kcd->mode = MODE_IDLE; + } return OPERATOR_RUNNING_MODAL; case LEFTCTRLKEY: case RIGHTCTRLKEY: diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index 6c6d4e3bd4a..58d3ce71ad8 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -104,9 +104,6 @@ typedef struct tringselOpData { int extend; int do_cut; - - double leftmouse_time; - wmTimer *timer; } tringselOpData; /* modal loop selection drawing callback */ @@ -346,9 +343,6 @@ static void ringsel_exit(bContext *C, wmOperator *op) { tringselOpData *lcd= op->customdata; - if (lcd->timer) - WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), lcd->timer); - /* deactivate the extra drawing stuff in 3D-View */ ED_region_draw_cb_exit(lcd->ar->type, lcd->draw_handle); @@ -431,10 +425,6 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt) BMEdge *edge; int dist = 75; - /*if we're in the cut-n-slide macro, set release_confirm based on user pref*/ - if (op->opm) - RNA_boolean_set(op->next->ptr, "release_confirm", U.loopcut_finish_on_release); - if(modifiers_isDeformedByLattice(obedit) || modifiers_isDeformedByArmature(obedit)) BKE_report(op->reports, RPT_WARNING, "Loop cut doesn't work well on deformed edit mesh display"); @@ -470,7 +460,7 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event) switch (event->type) { case RETKEY: case LEFTMOUSE: /* confirm */ // XXX hardcoded - if (event->val == KM_RELEASE) { + if (event->val == KM_PRESS) { /* finish */ ED_region_tag_redraw(lcd->ar); @@ -479,24 +469,11 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event) ED_area_headerprint(CTX_wm_area(C), NULL); - return OPERATOR_FINISHED|OPERATOR_ABORT_MACRO; - } else { - lcd->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER2, 0.12); + return OPERATOR_FINISHED; } ED_region_tag_redraw(lcd->ar); break; - case TIMER2: - /* finish */ - ED_region_tag_redraw(lcd->ar); - - ringsel_finish(C, op); - ringsel_exit(C, op); - - ED_area_headerprint(CTX_wm_area(C), NULL); - - return OPERATOR_FINISHED; - case RIGHTMOUSE: /* abort */ // XXX hardcoded ED_region_tag_redraw(lcd->ar); ringsel_exit(C, op); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index fd2bb59294b..a9792ebaca3 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1525,8 +1525,6 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int t->mode = mode; t->launch_event = event ? event->type : -1; - if (RNA_property_is_set(op->ptr, "launch_event")) - t->launch_event = RNA_int_get(op->ptr, "launch_event"); if (t->launch_event == EVT_TWEAK_R) { diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 0cb81a3d4cc..4edaabb9508 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -499,8 +499,6 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) // Add confirm method all the time. At the end because it's not really that important and should be hidden only in log, not in keymap edit /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button"); //RNA_def_property_flag(prop, PROP_HIDDEN); - - RNA_def_int(ot->srna, "launch_event", -1, 0, INT_MAX, "", "", -1, INT_MAX); } void TRANSFORM_OT_translate(struct wmOperatorType *ot) diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 6c3e52004c0..769f0ad17db 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -313,7 +313,6 @@ typedef struct wmOperator { #define OPERATOR_PASS_THROUGH 8 /* in case operator got executed outside WM code... like via fileselect */ #define OPERATOR_HANDLED 16 -#define OPERATOR_ABORT_MACRO 32 /* wmOperator flag */ #define OP_GRAB_POINTER 1 diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index b2f3eb52ecd..dc1ef324d61 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -208,7 +208,7 @@ static int wm_macro_exec(bContext *C, wmOperator *op) if(opm->type->exec) { retval= opm->type->exec(C, opm); - if ((retval & OPERATOR_FINISHED) && !(retval & OPERATOR_ABORT_MACRO)) { + if (retval & OPERATOR_FINISHED) { MacroData *md = op->customdata; md->retval = OPERATOR_FINISHED; /* keep in mind that at least one operator finished */ } else { @@ -233,7 +233,7 @@ static int wm_macro_invoke_internal(bContext *C, wmOperator *op, wmEvent *event, BLI_movelisttolist(&op->reports->list, &opm->reports->list); - if ((retval & OPERATOR_FINISHED) && !(retval & OPERATOR_ABORT_MACRO)) { + if (retval & OPERATOR_FINISHED) { MacroData *md = op->customdata; md->retval = OPERATOR_FINISHED; /* keep in mind that at least one operator finished */ } else { @@ -261,7 +261,7 @@ static int wm_macro_modal(bContext *C, wmOperator *op, wmEvent *event) retval = opm->type->modal(C, opm, event); /* if this one is done but it's not the last operator in the macro */ - if (opm->next && (retval & OPERATOR_FINISHED) && !(retval & OPERATOR_ABORT_MACRO)) { + if (opm->next && (retval & OPERATOR_FINISHED)) { MacroData *md = op->customdata; md->retval = OPERATOR_FINISHED; /* keep in mind that at least one operator finished */ |