diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-15 19:09:53 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-15 19:09:53 +0300 |
commit | c4ad7b4ebeeecd1569458a0e4b04147a7f2de8b8 (patch) | |
tree | 52f54d84ecb43d28cd870d475803975ddf6ef42b /source/blender/editors/curve | |
parent | cb12d708c79e0511fc775caaf65648ab2a1781d8 (diff) |
Fix #26087: in a curve, can't make segment if Fkey was pressed 2 times before on a single vertex
- Disallow setting cyclic flag for single-point segment when this lonely
segment is selected
- Clear cyclic flag for single-pointed segments when finding segments which
can be merged
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 8051dbc1a6a..95d2fa7a59b 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4001,6 +4001,9 @@ static int make_segment_exec(bContext *C, wmOperator *op) /* find both nurbs and points, nu1 will be put behind nu2 */ for(nu= nubase->first; nu; nu= nu->next) { + if(nu->pntsu == 1) + nu->flagu&= ~CU_NURB_CYCLIC; + if((nu->flagu & CU_NURB_CYCLIC)==0) { /* not cyclic */ if(nu->type == CU_BEZIER) { if(nu1==0) { @@ -4116,7 +4119,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) ok= 1; } else if(nu1 && !nu2 && nu1->type == CU_BEZIER) { if(!(nu1->flagu & CU_NURB_CYCLIC)) { - if(BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt) && + if(nu1->pntsu>1 && BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt) && BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt+(nu1->pntsu-1))) { nu1->flagu|= CU_NURB_CYCLIC; calchandlesNurb(nu1); |