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:
Diffstat (limited to 'source/blender/editors/curve/editcurve.c')
-rw-r--r--source/blender/editors/curve/editcurve.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index a33fbb29f85..2dcddd01670 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -4863,6 +4863,12 @@ bool ED_curve_editnurb_select_pick(
BKE_curve_nurb_active_set(cu, nu);
}
+ /* Change active material on object. */
+ if (nu->mat_nr != obedit->actcol - 1) {
+ obedit->actcol = nu->mat_nr + 1;
+ WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_LINKS, NULL);
+ }
+
if (vc.view_layer->basact != basact) {
ED_object_base_activate(C, basact);
}
@@ -4900,7 +4906,7 @@ bool ed_editnurb_spin(
copy_m3_m4(bmat, obedit->obmat);
invert_m3_m3(imat, bmat);
- axis_angle_to_mat3(cmat, axis, M_PI / 4.0);
+ axis_angle_to_mat3(cmat, axis, M_PI_4);
mul_m3_m3m3(tmat, cmat, bmat);
mul_m3_m3m3(rotmat, imat, tmat);
@@ -4952,7 +4958,7 @@ bool ed_editnurb_spin(
/* It is challenging to create a good approximation of a circle with uniform knots vector
* (which is forced in Blender for cyclic NURBS curves). Here a NURBS circle is constructed
* by connecting four Bezier arcs. */
- nu->flagv |= CU_NURB_CYCLIC | CU_NURB_BEZIER;
+ nu->flagv |= CU_NURB_CYCLIC | CU_NURB_BEZIER | CU_NURB_ENDPOINT;
BKE_nurb_knot_calc_v(nu);
}
}