[Bf-blender-cvs] [6dcf8ba] master: Knife: fix recent drag option /w loop close

Campbell Barton noreply at git.blender.org
Sun Nov 16 14:57:34 CET 2014


Commit: 6dcf8ba1894af3b24a8b40887867b0ffe6408401
Author: Campbell Barton
Date:   Sun Nov 16 14:56:44 2014 +0100
Branches: master
https://developer.blender.org/rB6dcf8ba1894af3b24a8b40887867b0ffe6408401

Knife: fix recent drag option /w loop close

It would miss adding an edge when closing the loop.

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

M	source/blender/editors/mesh/editmesh_knife.c

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

diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 6246abd..b08f7ef 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -3012,12 +3012,22 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event)
 				}
 				else {
 					kcd->is_drag_hold = false;
+
+					/* needed because the last face 'hit' is ignored when dragging */
+					knifetool_update_mval(kcd, kcd->curr.mval);
 				}
 
 				ED_region_tag_redraw(kcd->ar);
 				break;
 			case KNF_MODAL_ADD_CUT_CLOSED:
 				if (kcd->mode == MODE_DRAGGING) {
+
+					/* shouldn't be possible with default key-layout, just incase... */
+					if (kcd->is_drag_hold) {
+						kcd->is_drag_hold = false;
+						knifetool_update_mval(kcd, kcd->curr.mval);
+					}
+
 					kcd->prev = kcd->curr;
 					kcd->curr = kcd->init;




More information about the Bf-blender-cvs mailing list