diff options
Diffstat (limited to 'source/blender/editors/curve/editcurve.c')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 216 |
1 files changed, 108 insertions, 108 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 1987fe56bdb..ab6586d2ab6 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1346,12 +1346,12 @@ void CURVE_OT_separate(wmOperatorType *ot) ot->name = "Separate"; ot->idname = "CURVE_OT_separate"; ot->description = "Separate selected points from connected unselected points into a new object"; - + /* api callbacks */ ot->invoke = WM_operator_confirm; ot->exec = separate_exec; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -1856,7 +1856,7 @@ bool ed_editnurb_extrude_flag(EditNurb *editnurb, const short flag) while (a--) { select_bpoint(bp, SELECT, flag, HIDDEN); select_bpoint(newbp, DESELECT, flag, HIDDEN); - bp++; + bp++; newbp++; } @@ -2336,7 +2336,7 @@ void CURVE_OT_switch_direction(wmOperatorType *ot) ot->name = "Switch Direction"; ot->description = "Switch direction of selected splines"; ot->idname = "CURVE_OT_switch_direction"; - + /* api callbacks */ ot->exec = switch_direction_exec; ot->poll = ED_operator_editsurfcurve; @@ -2356,7 +2356,7 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op) BPoint *bp; float weight = RNA_float_get(op->ptr, "weight"); int a; - + for (nu = editnurb->first; nu; nu = nu->next) { if (nu->bezt) { for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) { @@ -2384,7 +2384,7 @@ void CURVE_OT_spline_weight_set(wmOperatorType *ot) ot->name = "Set Goal Weight"; ot->description = "Set softbody goal weight for selected points"; ot->idname = "CURVE_OT_spline_weight_set"; - + /* api callbacks */ ot->exec = set_goal_weight_exec; ot->invoke = WM_operator_props_popup; @@ -2408,7 +2408,7 @@ static int set_radius_exec(bContext *C, wmOperator *op) BPoint *bp; float radius = RNA_float_get(op->ptr, "radius"); int a; - + for (nu = editnurb->first; nu; nu = nu->next) { if (nu->bezt) { for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) { @@ -2436,7 +2436,7 @@ void CURVE_OT_radius_set(wmOperatorType *ot) ot->name = "Set Curve Radius"; ot->description = "Set per-point radius which is used for bevel tapering"; ot->idname = "CURVE_OT_radius_set"; - + /* api callbacks */ ot->exec = set_radius_exec; ot->invoke = WM_operator_props_popup; @@ -2588,7 +2588,7 @@ void CURVE_OT_smooth(wmOperatorType *ot) ot->name = "Smooth"; ot->description = "Flatten angles of selected points"; ot->idname = "CURVE_OT_smooth"; - + /* api callbacks */ ot->exec = smooth_exec; ot->poll = ED_operator_editsurfcurve; @@ -2792,7 +2792,7 @@ static int curve_smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) { Object *obedit = CTX_data_edit_object(C); ListBase *editnurb = object_editcurve_get(obedit); - + curve_smooth_value(editnurb, offsetof(BezTriple, radius), offsetof(BPoint, radius)); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); @@ -2807,11 +2807,11 @@ void CURVE_OT_smooth_radius(wmOperatorType *ot) ot->name = "Smooth Curve Radius"; ot->description = "Interpolate radii of selected points"; ot->idname = "CURVE_OT_smooth_radius"; - + /* api clastbacks */ ot->exec = curve_smooth_radius_exec; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -2909,14 +2909,14 @@ void CURVE_OT_hide(wmOperatorType *ot) ot->name = "Hide Selected"; ot->idname = "CURVE_OT_hide"; ot->description = "Hide (un)selected control points"; - + /* api callbacks */ ot->exec = hide_exec; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - + /* props */ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected"); } @@ -2971,11 +2971,11 @@ void CURVE_OT_reveal(wmOperatorType *ot) ot->name = "Reveal Hidden"; ot->idname = "CURVE_OT_reveal"; ot->description = "Reveal hidden control points"; - + /* api callbacks */ ot->exec = reveal_exec; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -3231,7 +3231,7 @@ static void subdividenurb(Object *obedit, int number_cuts) for (b = 0; b < nu->pntsu; b++) { *bpn = *bp; keyIndex_updateBP(editnurb, bp, bpn, 1); - bpn++; + bpn++; bp++; if (b < nu->pntsu - 1) { prevbp = bp - 1; @@ -3259,7 +3259,7 @@ static void subdividenurb(Object *obedit, int number_cuts) interp_v4_v4v4(tmp->vec, prevbp->vec, bp->vec, factor); tmp += countu; } - bp++; + bp++; prevbp++; bpn++; } @@ -3335,7 +3335,7 @@ static void subdividenurb(Object *obedit, int number_cuts) for (b = 0; b < nu->pntsu; b++) { *bpn = *bp; keyIndex_updateBP(editnurb, bp, bpn, 1); - bpn++; + bpn++; bp++; if ( (b < nu->pntsu - 1) && usel[b] == nu->pntsv && usel[b + 1] == nu->pntsv) { /* @@ -3362,7 +3362,7 @@ static void subdividenurb(Object *obedit, int number_cuts) } } } - MEM_freeN(usel); + MEM_freeN(usel); MEM_freeN(vsel); } /* End of 'if (nu->type == CU_NURBS)' */ @@ -3406,11 +3406,11 @@ void CURVE_OT_subdivide(wmOperatorType *ot) ot->name = "Subdivide"; ot->description = "Subdivide selected segments"; ot->idname = "CURVE_OT_subdivide"; - + /* api callbacks */ ot->exec = subdivide_exec; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -3568,7 +3568,7 @@ static int set_spline_type_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Not yet implemented"); return OPERATOR_CANCELLED; } - + for (nu = editnurb->first; nu; nu = nu->next) { if (ED_curve_nurb_select_check(obedit->data, nu)) { const int pntsu_prev = nu->pntsu; @@ -3618,12 +3618,12 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot) ot->name = "Set Spline Type"; ot->description = "Set type of active spline"; ot->idname = "CURVE_OT_spline_type_set"; - + /* api callbacks */ ot->exec = set_spline_type_exec; ot->invoke = WM_menu_invoke; ot->poll = ED_operator_editcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -3663,12 +3663,12 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot) ot->name = "Set Handle Type"; ot->description = "Set type of handles for selected control points"; ot->idname = "CURVE_OT_handle_type_set"; - + /* api callbacks */ ot->invoke = WM_menu_invoke; ot->exec = set_handle_type_exec; ot->poll = ED_operator_editcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -3718,9 +3718,9 @@ static void switchdirection_knots(float *base, int tot) { float *fp1, *fp2, *tempf; int a; - + if (base == NULL || tot == 0) return; - + /* reverse knots */ a = tot; fp1 = base; @@ -3729,7 +3729,7 @@ static void switchdirection_knots(float *base, int tot) while (fp1 != fp2 && a > 0) { SWAP(float, *fp1, *fp2); a--; - fp1++; + fp1++; fp2--; } @@ -3761,15 +3761,15 @@ static void rotate_direction_nurb(Nurb *nu) { BPoint *bp1, *bp2, *temp; int u, v; - + SWAP(int, nu->pntsu, nu->pntsv); SWAP(short, nu->orderu, nu->orderv); SWAP(short, nu->resolu, nu->resolv); SWAP(short, nu->flagu, nu->flagv); - + SWAP(float *, nu->knotsu, nu->knotsv); switchdirection_knots(nu->knotsv, KNOTSV(nu)); - + temp = MEM_dupallocN(nu->bp); bp1 = nu->bp; for (v = 0; v < nu->pntsv; v++) { @@ -3786,7 +3786,7 @@ static bool is_u_selected(Nurb *nu, int u) { BPoint *bp; int v; - + /* what about resolu == 2? */ bp = &nu->bp[u]; for (v = 0; v < nu->pntsv - 1; v++, bp += nu->pntsu) { @@ -3794,7 +3794,7 @@ static bool is_u_selected(Nurb *nu, int u) return true; } } - + return false; } @@ -3815,14 +3815,14 @@ static void make_selection_list_nurb(Curve *cu, ListBase *editnurb) BPoint *bp; float dist, headdist, taildist; int a; - + for (nu = editnurb->first; nu; nu = nu->next) { if (ED_curve_nurb_select_check(cu, nu)) { - + nus = (NurbSort *)MEM_callocN(sizeof(NurbSort), "sort"); BLI_addhead(&nbase, nus); nus->nu = nu; - + bp = nu->bp; a = nu->pntsu; while (a--) { @@ -3830,8 +3830,8 @@ static void make_selection_list_nurb(Curve *cu, ListBase *editnurb) bp++; } mul_v3_fl(nus->vec, 1.0f / (float)nu->pntsu); - - + + } } @@ -3839,10 +3839,10 @@ static void make_selection_list_nurb(Curve *cu, ListBase *editnurb) nus = nbase.first; BLI_remlink(&nbase, nus); BLI_addtail(&nsortbase, nus); - + /* now add, either at head or tail, the closest one */ while (nbase.first) { - + headdist = taildist = 1.0e30; headdo = taildo = NULL; @@ -3862,7 +3862,7 @@ static void make_selection_list_nurb(Curve *cu, ListBase *editnurb) } nustest = nustest->next; } - + if (headdist < taildist) { BLI_remlink(&nbase, headdo); BLI_addhead(&nsortbase, headdo); @@ -3879,12 +3879,12 @@ static void merge_2_nurb(wmOperator *op, Curve *cu, ListBase *editnurb, Nurb *nu BPoint *bp, *bp1, *bp2, *temp; float len1, len2; int origu, u, v; - + /* first nurbs will be changed to make u = resolu-1 selected */ /* 2nd nurbs will be changed to make u = 0 selected */ /* first nurbs: u = resolu-1 selected */ - + if (is_u_selected(nu1, nu1->pntsu - 1)) { /* pass */ } @@ -3915,7 +3915,7 @@ static void merge_2_nurb(wmOperator *op, Curve *cu, ListBase *editnurb, Nurb *nu } } } - + /* 2nd nurbs: u = 0 selected */ if (is_u_selected(nu2, 0)) { /* pass */ @@ -3945,19 +3945,19 @@ static void merge_2_nurb(wmOperator *op, Curve *cu, ListBase *editnurb, Nurb *nu } } } - + if (nu1->pntsv != nu2->pntsv) { BKE_report(op->reports, RPT_ERROR, "Resolution does not match"); return; } - + /* ok, now nu1 has the rightmost column and nu2 the leftmost column selected */ /* maybe we need a 'v' flip of nu2? */ - + bp1 = &nu1->bp[nu1->pntsu - 1]; bp2 = nu2->bp; len1 = 0.0; - + for (v = 0; v < nu1->pntsv; v++, bp1 += nu1->pntsu, bp2 += nu2->pntsu) { len1 += len_v3v3(bp1->vec, bp2->vec); } @@ -3965,7 +3965,7 @@ static void merge_2_nurb(wmOperator *op, Curve *cu, ListBase *editnurb, Nurb *nu bp1 = &nu1->bp[nu1->pntsu - 1]; bp2 = &nu2->bp[nu2->pntsu * (nu2->pntsv - 1)]; len2 = 0.0; - + for (v = 0; v < nu1->pntsv; v++, bp1 += nu1->pntsu, bp2 -= nu2->pntsu) { len2 += len_v3v3(bp1->vec, bp2->vec); } @@ -3977,12 +3977,12 @@ static void merge_2_nurb(wmOperator *op, Curve *cu, ListBase *editnurb, Nurb *nu if (nu1->orderv < 3 && nu1->orderv < nu1->pntsv) nu1->orderv++; temp = nu1->bp; nu1->bp = MEM_mallocN(nu1->pntsu * nu1->pntsv * sizeof(BPoint), "mergeBP"); - + bp = nu1->bp; bp1 = temp; - + for (v = 0; v < nu1->pntsv; v++) { - + /* switch direction? */ if (len1 < len2) bp2 = &nu2->bp[v * nu2->pntsu]; else bp2 = &nu2->bp[(nu1->pntsv - v - 1) * nu2->pntsu]; @@ -4003,11 +4003,11 @@ static void merge_2_nurb(wmOperator *op, Curve *cu, ListBase *editnurb, Nurb *nu if (nu1->type == CU_NURBS) { /* merge knots */ BKE_nurb_knot_calc_u(nu1); - + /* make knots, for merged curved for example */ BKE_nurb_knot_calc_v(nu1); } - + MEM_freeN(temp); BLI_remlink(editnurb, nu2); BKE_nurb_free(nu2); @@ -4020,15 +4020,15 @@ static int merge_nurb(bContext *C, wmOperator *op) ListBase *editnurb = object_editcurve_get(obedit); NurbSort *nus1, *nus2; bool ok = true; - + make_selection_list_nurb(cu, editnurb); - + if (nsortbase.first == nsortbase.last) { BLI_freelistN(&nsortbase); BKE_report(op->reports, RPT_ERROR, "Too few selections to merge"); return OPERATOR_CANCELLED; } - + nus1 = nsortbase.first; nus2 = nus1->next; @@ -4058,7 +4058,7 @@ static int merge_nurb(bContext *C, wmOperator *op) else { ok = 0; } - + if (ok == 0) { BKE_report(op->reports, RPT_ERROR, "Resolution does not match"); BLI_freelistN(&nsortbase); @@ -4069,14 +4069,14 @@ static int merge_nurb(bContext *C, wmOperator *op) merge_2_nurb(op, cu, editnurb, nus1->nu, nus2->nu); nus2 = nus2->next; } - + BLI_freelistN(&nsortbase); - + BKE_curve_nurb_active_set(obedit->data, NULL); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); DEG_id_tag_update(obedit->data, 0); - + return OPERATOR_FINISHED; } @@ -4094,7 +4094,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) /* first decide if this is a surface merge! */ if (obedit->type == OB_SURF) nu = nubase->first; else nu = NULL; - + while (nu) { const int nu_select_num = ED_curve_nurb_select_count(cu, nu); if (nu_select_num) { @@ -4123,7 +4123,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) if (nu) return merge_nurb(C, op); - + /* find both nurbs and points, nu1 will be put behind nu2 */ for (nu = nubase->first; nu; nu = nu->next) { if (nu->pntsu == 1) @@ -4293,7 +4293,7 @@ void CURVE_OT_make_segment(wmOperatorType *ot) ot->name = "Make Segment"; ot->idname = "CURVE_OT_make_segment"; ot->description = "Join two curves by their selected ends"; - + /* api callbacks */ ot->exec = make_segment_exec; ot->poll = ED_operator_editsurfcurve; @@ -4316,10 +4316,10 @@ bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend, const void *vert = BKE_curve_vert_active_get(cu); int location[2]; short hand; - + view3d_operator_needs_opengl(C); ED_view3d_viewcontext_init(C, &vc); - + location[0] = mval[0]; location[1] = mval[1]; @@ -4417,7 +4417,7 @@ bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend, return true; } - + return false; } @@ -4442,7 +4442,7 @@ bool ed_editnurb_spin(float viewmat[4][4], Object *obedit, const float axis[3], /* imat and center and size */ copy_m3_m4(bmat, obedit->obmat); invert_m3_m3(imat, bmat); - + axis_angle_to_mat3(cmat, axis, M_PI / 4.0); mul_m3_m3m3(tmat, cmat, bmat); mul_m3_m3m3(rotmat, imat, tmat); @@ -4505,18 +4505,18 @@ static int spin_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); RegionView3D *rv3d = ED_view3d_context_rv3d(C); float cent[3], axis[3], viewmat[4][4]; - + RNA_float_get_array(op->ptr, "center", cent); RNA_float_get_array(op->ptr, "axis", axis); - + invert_m4_m4(obedit->imat, obedit->obmat); mul_m4_v3(obedit->imat, cent); - + if (rv3d) copy_m4_m4(viewmat, rv3d->viewmat); else unit_m4(viewmat); - + if (!ed_editnurb_spin(viewmat, obedit, axis, cent)) { BKE_report(op->reports, RPT_ERROR, "Cannot spin"); return OPERATOR_CANCELLED; @@ -4537,13 +4537,13 @@ static int spin_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event) View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d = ED_view3d_context_rv3d(C); float axis[3] = {0.0f, 0.0f, 1.0f}; - + if (rv3d) copy_v3_v3(axis, rv3d->viewinv[2]); - + RNA_float_set_array(op->ptr, "center", ED_view3d_cursor3d_get(scene, v3d)->location); RNA_float_set_array(op->ptr, "axis", axis); - + return spin_exec(C, op); } @@ -4553,7 +4553,7 @@ void CURVE_OT_spin(wmOperatorType *ot) ot->name = "Spin"; ot->idname = "CURVE_OT_spin"; ot->description = "Extrude selected boundary row around pivot point and current view axis"; - + /* api callbacks */ ot->exec = spin_exec; ot->invoke = spin_invoke; @@ -4561,7 +4561,7 @@ void CURVE_OT_spin(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - + RNA_def_float_vector_xyz(ot->srna, "center", 3, NULL, -OBJECT_ADD_SIZE_MAXF, OBJECT_ADD_SIZE_MAXF, "Center", "Center in global view space", -1000.0f, 1000.0f); RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -1.0f, 1.0f); @@ -5085,7 +5085,7 @@ void CURVE_OT_vertex_add(wmOperatorType *ot) ot->name = "Add Vertex"; ot->idname = "CURVE_OT_vertex_add"; ot->description = "Add a new control point (linked to only selected end-curve one, if any)"; - + /* api callbacks */ ot->exec = add_vertex_exec; ot->invoke = add_vertex_invoke; @@ -5108,7 +5108,7 @@ static int curve_extrude_exec(bContext *C, wmOperator *UNUSED(op)) EditNurb *editnurb = cu->editnurb; bool changed = false; bool as_curve = false; - + /* first test: curve? */ if (obedit->type != OB_CURVE) { Nurb *nu; @@ -5147,7 +5147,7 @@ void CURVE_OT_extrude(wmOperatorType *ot) ot->name = "Extrude"; ot->description = "Extrude selected control point(s)"; ot->idname = "CURVE_OT_extrude"; - + /* api callbacks */ ot->exec = curve_extrude_exec; ot->poll = ED_operator_editsurfcurve; @@ -5214,7 +5214,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op) a = nu->pntsu * nu->pntsv; bp = nu->bp; while (a--) { - + if (bp->f1 & SELECT) { if (direction == 0 && nu->pntsu > 1) { nu->flagu ^= CU_NURB_CYCLIC; @@ -5228,7 +5228,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op) } bp++; } - + } } } @@ -5276,7 +5276,7 @@ void CURVE_OT_cyclic_toggle(wmOperatorType *ot) ot->name = "Toggle Cyclic"; ot->description = "Make active spline closed/opened loop"; ot->idname = "CURVE_OT_cyclic_toggle"; - + /* api callbacks */ ot->exec = toggle_cyclic_exec; ot->invoke = toggle_cyclic_invoke; @@ -5316,11 +5316,11 @@ void CURVE_OT_duplicate(wmOperatorType *ot) ot->name = "Duplicate Curve"; ot->description = "Duplicate selected control points"; ot->idname = "CURVE_OT_duplicate"; - + /* api callbacks */ ot->exec = duplicate_exec; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -5791,12 +5791,12 @@ void CURVE_OT_delete(wmOperatorType *ot) ot->name = "Delete"; ot->description = "Delete selected control points or segments"; ot->idname = "CURVE_OT_delete"; - + /* api callbacks */ ot->exec = curve_delete_exec; ot->invoke = WM_menu_invoke; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -6005,17 +6005,17 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) ListBase *editnurb = object_editcurve_get(obedit); Nurb *nu; int clear = (STREQ(op->idname, "CURVE_OT_shade_flat")); - + if (obedit->type != OB_CURVE) return OPERATOR_CANCELLED; - + for (nu = editnurb->first; nu; nu = nu->next) { if (ED_curve_nurb_select_check(obedit->data, nu)) { if (!clear) nu->flag |= CU_SMOOTH; else nu->flag &= ~CU_SMOOTH; } } - + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); DEG_id_tag_update(obedit->data, 0); @@ -6028,11 +6028,11 @@ void CURVE_OT_shade_smooth(wmOperatorType *ot) ot->name = "Shade Smooth"; ot->idname = "CURVE_OT_shade_smooth"; ot->description = "Set shading to smooth"; - + /* api callbacks */ ot->exec = shade_smooth_exec; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -6043,11 +6043,11 @@ void CURVE_OT_shade_flat(wmOperatorType *ot) ot->name = "Shade Flat"; ot->idname = "CURVE_OT_shade_flat"; ot->description = "Set shading to flat"; - + /* api callbacks */ ot->exec = shade_smooth_exec; ot->poll = ED_operator_editsurfcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -6084,21 +6084,21 @@ int join_curve_exec(bContext *C, wmOperator *op) } BLI_listbase_clear(&tempbase); - + /* trasnform all selected curves inverse in obact */ invert_m4_m4(imat, ob->obmat); - + CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) { if (base->object->type == ob->type) { if (base->object != ob) { - + cu = base->object->data; - + if (cu->nurb.first) { /* watch it: switch order here really goes wrong */ mul_m4_m4m4(cmat, imat, base->object->obmat); - + nu = cu->nurb.first; while (nu) { newnu = BKE_nurb_duplicate(nu); @@ -6109,7 +6109,7 @@ int join_curve_exec(bContext *C, wmOperator *op) newnu->mat_nr = 0; } BLI_addtail(&tempbase, newnu); - + if ((bezt = newnu->bezt)) { a = newnu->pntsu; while (a--) { @@ -6130,16 +6130,16 @@ int join_curve_exec(bContext *C, wmOperator *op) nu = nu->next; } } - + ED_object_base_free_and_unlink(bmain, scene, base->object); } } } CTX_DATA_END; - + cu = ob->data; BLI_movelisttolist(&cu->nurb, &tempbase); - + if (ob->type == OB_CURVE) { /* Account for mixed 2D/3D curves when joining */ BKE_curve_curve_dimension_update(cu); @@ -6198,11 +6198,11 @@ void CURVE_OT_tilt_clear(wmOperatorType *ot) ot->name = "Clear Tilt"; ot->idname = "CURVE_OT_tilt_clear"; ot->description = "Clear the tilt of selected control points"; - + /* api callbacks */ ot->exec = clear_tilt_exec; ot->poll = ED_operator_editcurve; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } |