[Bf-blender-cvs] [103583c] master: Fix T38786: Curve unable to make segment

Campbell Barton noreply at git.blender.org
Mon Feb 24 09:25:42 CET 2014


Commit: 103583c89b5466402409afe6e55cfdc66dc31d3e
Author: Campbell Barton
Date:   Mon Feb 24 19:24:52 2014 +1100
https://developer.blender.org/rB103583c89b5466402409afe6e55cfdc66dc31d3e

Fix T38786: Curve unable to make segment

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

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

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

diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index ad58338..7659372 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -4366,7 +4366,11 @@ static int make_segment_exec(bContext *C, wmOperator *op)
 			ok = 1;
 		}
 	}
-	else if (nu1 && !nu2) {
+	else if ((nu1 && !nu2) || (!nu1 && nu2)) {
+		if (nu2) {
+			SWAP(Nurb *, nu1, nu2);
+		}
+
 		if (!(nu1->flagu & CU_NURB_CYCLIC) && nu1->pntsu > 1) {
 			if (nu1->type == CU_BEZIER && BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt) &&
 			    BEZSELECTED_HIDDENHANDLES(cu, &nu1->bezt[nu1->pntsu - 1]))




More information about the Bf-blender-cvs mailing list