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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-08-15 11:59:32 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-08-15 11:59:32 +0400
commitd34f9c7a7466c34319b172f943d2447db0f54b54 (patch)
tree79940d77bce1aeec082b1a5d3da0e3c26f8d604b /source/blender/makesrna/intern/rna_curve.c
parent58d7ae891d052fc33c0ceb9e53eb6f224a2222de (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.c4
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;