Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDilith Jayakody <dilithjay@gmail.com>2022-06-08 16:04:17 +0300
committerDilith Jayakody <dilithjay@gmail.com>2022-06-08 16:07:09 +0300
commit520be607e8baf4dacfadc1897013c84e77b81b27 (patch)
tree6fcb0c8d03e0fe310adb6a69e47a5072726142e7 /source/blender/editors/curve
parent7a751327fab1befb49cec68b82b0d9e98374e1c6 (diff)
Fix T98624: Curve Pen NURBS extrusion creates duplicates
The initial point count check was only being done for Bezier curves. This revision fixes T98624 by adding the check for NURBS curves as well. Reviewed By: HooglyBoogly Maniphest Tasks: T98624 Differential Revision: https://developer.blender.org/D15140
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editcurve_pen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index a98b165e99d..4a1bc5243de 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -985,7 +985,7 @@ static void extrude_vertices_from_selected_endpoints(EditNurb *editnurb,
else {
BPoint *last_bp = nu1->bp + nu1->pntsu - 1;
const bool first_sel = nu1->bp->f1 & SELECT;
- const bool last_sel = last_bp->f1 & SELECT;
+ const bool last_sel = last_bp->f1 & SELECT && nu1->pntsu > 1;
if (first_sel) {
if (last_sel) {
BPoint *new_bp = (BPoint *)MEM_mallocN((nu1->pntsu + 2) * sizeof(BPoint), __func__);