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:
-rw-r--r--source/blender/editors/curve/editcurve.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 2fa7b4b2126..f5f013cb354 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -3937,7 +3937,6 @@ static int make_segment_exec(bContext *C, wmOperator *op)
ListBase *nubase = object_editcurve_get(obedit);
Nurb *nu, *nu1 = NULL, *nu2 = NULL;
BPoint *bp;
- float *fp, offset;
int a, ok = 0;
/* first decide if this is a surface merge! */
@@ -4053,25 +4052,12 @@ static int make_segment_exec(bContext *C, wmOperator *op)
/* now join the knots */
if (nu1->type == CU_NURBS) {
- if (nu1->knotsu == NULL) {
- BKE_nurb_knot_calc_u(nu1);
- }
- else {
- fp = MEM_mallocN(sizeof(float) * KNOTSU(nu1), "addsegment3");
- memcpy(fp, nu1->knotsu, sizeof(float) * a);
+ if (nu1->knotsu != NULL) {
MEM_freeN(nu1->knotsu);
- nu1->knotsu = fp;
-
-
- offset = nu1->knotsu[a - 1] + 1.0f;
- fp = nu1->knotsu + a;
- for (a = 0; a < nu2->pntsu; a++, fp++) {
- if (nu2->knotsu)
- *fp = offset + nu2->knotsu[a + 1];
- else
- *fp = offset;
- }
+ nu1->knotsu = NULL;
}
+
+ BKE_nurb_knot_calc_u(nu1);
}
BKE_nurb_free(nu2); nu2 = NULL;
}