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>2009-09-12 22:09:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-09-12 22:09:59 +0400
commit5392a90e2862df43fd82d5fbe24faaf3ca6888c9 (patch)
treea1d24e7de97117b154fb88eec17eead04d75e823 /source/blender/editors/curve
parentf9eb93bc7bd8351864cc4787953e2faf7d4cfd30 (diff)
- adding curves didnt work if EnterEditmode option was off.
- adding a curve in editmode now is 3D, if the curve its added in is 3D.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editcurve.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index e346ccafde3..edcfb46c270 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -4704,6 +4704,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
float *curs, cent[3],vec[3],imat[3][3],mat[3][3];
float fac,cmat[3][3], grid;
int a, b, cutype, stype;
+ int force_3d = ((Curve *)obedit->data)->flag & CU_3D; /* could be adding to an existing 3D curve */
cutype= type & CU_TYPE; // poly, bezier, nurbs, etc
stype= type & CU_PRIMITIVE;
@@ -4760,7 +4761,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
rename_id((ID *)obedit->data, "Curve");
}
if(cutype==CU_BEZIER) {
- nu->flag= CU_2D;
+ if (!force_3d) nu->flag |= CU_2D;
nu->pntsu= 2;
nu->bezt =
(BezTriple*)MEM_callocN(2 * sizeof(BezTriple), "addNurbprim1");
@@ -4869,7 +4870,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
rename_id((ID *)obedit->data, "CurveCircle");
}
if(cutype==CU_BEZIER) {
- nu->flag= CU_2D;
+ if (!force_3d) nu->flag |= CU_2D;
nu->pntsu= 4;
nu->bezt= callocstructN(BezTriple, 4, "addNurbprim1");
nu->flagu= CU_CYCLIC;