[Bf-blender-cvs] [c1a6248] temp-curve-draw: Support cancelling a stroke

Campbell Barton noreply at git.blender.org
Fri Apr 15 01:44:25 CEST 2016


Commit: c1a62480428e1afa2e0c076947cd70c7f7355ff7
Author: Campbell Barton
Date:   Fri Apr 15 09:27:48 2016 +1000
Branches: temp-curve-draw
https://developer.blender.org/rBc1a62480428e1afa2e0c076947cd70c7f7355ff7

Support cancelling a stroke

===================================================================

M	source/blender/editors/curve/editcurve_paint.c

===================================================================

diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 66f308b..fcb3d12 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -981,6 +981,11 @@ static int curve_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
 			return OPERATOR_FINISHED;
 		}
 	}
+	else if (ELEM(event->type, ESCKEY, RIGHTMOUSE)) {
+		ED_region_tag_redraw(cdd->vc.ar);
+		curve_draw_cancel(C, op);
+		return OPERATOR_CANCELLED;
+	}
 	else if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) {
 		const float mval_fl[2] = {UNPACK2(event->mval)};
 		if (len_squared_v2v2(mval_fl, cdd->prev.location_world) > SQUARE(STROKE_SAMPLE_DIST_MIN_PX)) {




More information about the Bf-blender-cvs mailing list