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
This commit is contained in:
Dilith Jayakody 2022-06-08 18:34:17 +05:30
parent 7a751327fa
commit 520be607e8
Notes: blender-bot 2023-02-14 11:25:11 +01:00
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
Referenced by issue #98624, Curve pen creates duplicate control points
1 changed files with 1 additions and 1 deletions

View File

@ -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__);