diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-15 11:59:32 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-15 11:59:32 +0400 |
commit | d34f9c7a7466c34319b172f943d2447db0f54b54 (patch) | |
tree | 79940d77bce1aeec082b1a5d3da0e3c26f8d604b /source/blender/makesrna/intern/rna_curve.c | |
parent | 58d7ae891d052fc33c0ceb9e53eb6f224a2222de (diff) |
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 21bf2ec6719..9773e7a340b 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -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; |