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:
authorCampbell Barton <ideasman42@gmail.com>2018-06-04 10:31:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-04 10:31:30 +0300
commit44505b38df557a5711703613685a1dec9fc2c3d9 (patch)
tree3f05bebcc7bfadf56569f2dcca7f95fc56b1b0d0 /source/blender/editors/curve/editcurve.c
parent6654e109df952be3a3128fae2508a02c196ae593 (diff)
Cleanup: strip trailing space in editors
Diffstat (limited to 'source/blender/editors/curve/editcurve.c')
-rw-r--r--source/blender/editors/curve/editcurve.c216
1 files changed, 108 insertions, 108 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index ebf2b63bb49..139034a22d5 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1342,12 +1342,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;
}
@@ -1852,7 +1852,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++;
}
@@ -2332,7 +2332,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;
@@ -2352,7 +2352,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++) {
@@ -2380,7 +2380,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;
@@ -2404,7 +2404,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++) {
@@ -2432,7 +2432,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;
@@ -2584,7 +2584,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;
@@ -2788,7 +2788,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);
@@ -2803,11 +2803,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;
}
@@ -2905,14 +2905,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");
}
@@ -2967,11 +2967,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;
@@ -3227,7 +3227,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;
@@ -3255,7 +3255,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++;
}
@@ -3331,7 +3331,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) {
/*
@@ -3358,7 +3358,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)' */
@@ -3389,11 +3389,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;
@@ -3551,7 +3551,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;
@@ -3601,12 +3601,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;
@@ -3646,12 +3646,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;
@@ -3701,9 +3701,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;
@@ -3712,7 +3712,7 @@ static void switchdirection_knots(float *base, int tot)
while (fp1 != fp2 && a > 0) {
SWAP(float, *fp1, *fp2);
a--;
- fp1++;
+ fp1++;
fp2--;
}
@@ -3744,15 +3744,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++) {
@@ -3769,7 +3769,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) {
@@ -3777,7 +3777,7 @@ static bool is_u_selected(Nurb *nu, int u)
return true;
}
}
-
+
return false;
}
@@ -3798,14 +3798,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--) {
@@ -3813,8 +3813,8 @@ static void make_selection_list_nurb(Curve *cu, ListBase *editnurb)
bp++;
}
mul_v3_fl(nus->vec, 1.0f / (float)nu->pntsu);
-
-
+
+
}
}
@@ -3822,10 +3822,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;
@@ -3845,7 +3845,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);
@@ -3862,12 +3862,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 */
}
@@ -3898,7 +3898,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 */
@@ -3928,19 +3928,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);
}
@@ -3948,7 +3948,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);
}
@@ -3960,12 +3960,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];
@@ -3986,11 +3986,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);
@@ -4003,15 +4003,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;
@@ -4041,7 +4041,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);
@@ -4052,14 +4052,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);
DAG_id_tag_update(obedit->data, 0);
-
+
return OPERATOR_FINISHED;
}
@@ -4077,7 +4077,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) {
@@ -4106,7 +4106,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)
@@ -4276,7 +4276,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;
@@ -4299,10 +4299,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];
@@ -4400,7 +4400,7 @@ bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend,
return true;
}
-
+
return false;
}
@@ -4425,7 +4425,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);
@@ -4488,18 +4488,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;
@@ -4520,13 +4520,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));
RNA_float_set_array(op->ptr, "axis", axis);
-
+
return spin_exec(C, op);
}
@@ -4536,7 +4536,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;
@@ -4544,7 +4544,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);
@@ -5069,7 +5069,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;
@@ -5092,7 +5092,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;
@@ -5131,7 +5131,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;
@@ -5198,7 +5198,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;
@@ -5212,7 +5212,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
bp++;
}
-
+
}
}
}
@@ -5260,7 +5260,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;
@@ -5300,11 +5300,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;
}
@@ -5775,12 +5775,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;
@@ -5989,17 +5989,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);
DAG_id_tag_update(obedit->data, 0);
@@ -6012,11 +6012,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;
}
@@ -6027,11 +6027,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;
}
@@ -6068,21 +6068,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);
@@ -6093,7 +6093,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--) {
@@ -6114,16 +6114,16 @@ int join_curve_exec(bContext *C, wmOperator *op)
nu = nu->next;
}
}
-
+
ED_base_object_free_and_unlink(bmain, scene, base);
}
}
}
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);
@@ -6182,11 +6182,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;
}