Fix #36384: Inconsistent curve fill behaviour

Creating new splines via Python API didn't take
curve dimension into account.

Now adding new splines will set 2D/3D flag for
spline according to curve's dimension.
This commit is contained in:
2013-08-15 07:59:32 +00:00
parent 58d7ae891d
commit d34f9c7a74

View File

@@ -568,6 +568,10 @@ static Nurb *rna_Curve_spline_new(Curve *cu, int type)
nu->resolu = nu->resolv = 12;
nu->flag = CU_SMOOTH;
if ((cu->flag & CU_3D) == 0) {
nu->flag |= CU_2D;
}
BLI_addtail(BKE_curve_nurbs_get(cu), nu);
return nu;