[Bf-blender-cvs] [33083dab587] soc-2021-curves: Fixed bug, extrusion from internal point

dilithjay noreply at git.blender.org
Sun Jan 2 11:03:17 CET 2022


Commit: 33083dab587de050dc4b519372b9246e8a1c85c2
Author: dilithjay
Date:   Sun Jan 2 00:00:02 2022 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB33083dab587de050dc4b519372b9246e8a1c85c2

Fixed bug, extrusion from internal point

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

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

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

diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index f2c87719c7e..77c6ab4015f 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -821,7 +821,16 @@ static void extrude_point_from_selected_vertex(const ViewContext *vc,
   ED_curve_nurb_vert_selected_find(cu, vc->v3d, &nu, &bezt, &bp);
 
   if (nu && !extrude_center && nu->pntsu > 2) {
-    for (int i = 1; i < nu->pntsu - 1; i++) {
+    int start, end;
+    if (nu->flagu & CU_NURB_CYCLIC) {
+      start = 0;
+      end = nu->pntsu;
+    }
+    else {
+      start = 1;
+      end = nu->pntsu - 1;
+    }
+    for (int i = start; i < end; i++) {
       if (nu->type == CU_BEZIER) {
         BEZT_DESEL_ALL(nu->bezt + i);
       }



More information about the Bf-blender-cvs mailing list