[Bf-blender-cvs] [7e8efaf196c] soc-2021-curves: Fixed - Extrude from center when multiple splines
Dilith Jayakody
noreply at git.blender.org
Tue Jan 4 12:05:14 CET 2022
Commit: 7e8efaf196ce920d5958cbac700c1f7d22188350
Author: Dilith Jayakody
Date: Mon Jan 3 23:18:16 2022 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB7e8efaf196ce920d5958cbac700c1f7d22188350
Fixed - Extrude from center when multiple splines
===================================================================
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 e4ab85ebd08..18d03c5f61c 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -872,24 +872,30 @@ static void extrude_point_from_selected_vertex(const ViewContext *vc,
BPoint *bp = NULL;
Curve *cu = vc->obedit->data;
- get_selected_points(cu, vc->v3d, &nu, &bezt, &bp);
+ ED_curve_nurb_vert_selected_find(cu, vc->v3d, &nu, &bezt, &bp);
- if (nu && !extrude_center && nu->pntsu > 2) {
- 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);
- }
- else {
- (nu->bp + i)->f1 = ~SELECT;
+ if (!extrude_center) {
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
+
+ LISTBASE_FOREACH (Nurb *, nu1, nurbs) {
+ if (nu1->pntsu > 2) {
+ int start, end;
+ if (nu1->flagu & CU_NURB_CYCLIC) {
+ start = 0;
+ end = nu1->pntsu;
+ }
+ else {
+ start = 1;
+ end = nu1->pntsu - 1;
+ }
+ for (int i = start; i < end; i++) {
+ if (nu1->type == CU_BEZIER) {
+ BEZT_DESEL_ALL(nu1->bezt + i);
+ }
+ else {
+ (nu1->bp + i)->f1 = ~SELECT;
+ }
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list