[Bf-blender-cvs] [e96e67a] gsoc2016-improved_extrusion: Curves: Some tweaks to the work that was concluded during GSoC 2016

João Araújo noreply at git.blender.org
Wed Dec 14 22:50:39 CET 2016


Commit: e96e67ad772b80f04c780f097b3d49a154ae4529
Author: João Araújo
Date:   Wed Dec 14 21:37:51 2016 +0000
Branches: gsoc2016-improved_extrusion
https://developer.blender.org/rBe96e67ad772b80f04c780f097b3d49a154ae4529

Curves: Some tweaks to the work that was concluded during GSoC 2016

If this has not yet been committed:

- Fixed some bugs with the fillet and chamfer operators (filleting and chamfering first and last handles).
- Fixed user interaction with fillet and chamfer.

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

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

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

diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 3f73406..d680211 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -8263,7 +8263,7 @@ static void curve_chamfer_modal_loop(EditNurb *editnurb, Nurb *nu, CD *cd, float
 {
 	BezTriple *bezt, *bezt1, *bezt2, *original, *helper;
 	int selected = 0;
-	for (int i = 0; i < nu->pntsu; i++) {
+	for (int i = 1; i < nu->pntsu - 1; i++) {
 		bezt = &nu->bezt[i];
 		if (BEZT_ISSEL_ANY(bezt) && bezt->h1 == 2 && bezt->h2 == 2) {
 			selected += 1;
@@ -8429,7 +8429,7 @@ static int curve_chamfer_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS
 		return OPERATOR_CANCELLED;
 	}
 	int selected = 0;
-	for (int i = 0; i < nu->pntsu; i++) {
+	for (int i = 1; i < nu->pntsu - 1; i++) {
 		bezt = &nu->bezt[i];
 		if (BEZT_ISSEL_ANY(bezt)) {
 			sub_v3_v3v3(v1, bezt->vec[1], bezt->vec[0]);
@@ -8608,7 +8608,7 @@ static void curve_fillet_modal_loop(EditNurb *editnurb, Nurb *nu, CD *cd, float
 	BezTriple *bezt, *original, *bezt1, *bezt2, *helper;
 	int selected = 0;
 	float v1[3], v2[3];
-	for (int i = 0; i < nu->pntsu; i++) {
+	for (int i = 1; i < nu->pntsu - 1; i++) {
 		bezt = &nu->bezt[i];
 		if (BEZT_ISSEL_ANY(bezt)) {
 			selected += 1;
@@ -8631,7 +8631,7 @@ static void curve_fillet_modal_loop(EditNurb *editnurb, Nurb *nu, CD *cd, float
 		}
 	}
 	/* after all new control points have been calculated, move the  handles */
-	for (int i = 0; i < nu->pntsu; i++) {
+	for (int i = 1; i < nu->pntsu - 1; i++) {
 		bezt = &nu->bezt[i];
 		if (BEZT_ISSEL_ANY(bezt)) {
 			/* set the handles for the first filleted triple */




More information about the Bf-blender-cvs mailing list