From d66f828c9bee8177fbd3b0155a48dacbb450189b Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Sat, 23 Dec 2006 15:30:50 +0000 Subject: [PATCH] Python API ---------- Bugfix #5492: correctly distinguish curves and surfaces in Curve iterator. --- source/blender/python/api2_2x/Curve.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/blender/python/api2_2x/Curve.c b/source/blender/python/api2_2x/Curve.c index 80e6a39b9da..f495a74a06c 100644 --- a/source/blender/python/api2_2x/Curve.c +++ b/source/blender/python/api2_2x/Curve.c @@ -1465,7 +1465,7 @@ static PyObject *Curve_iterNext( BPy_Curve * self ) if( self->iter_pointer ) { pnurb = self->iter_pointer; self->iter_pointer = pnurb->next; /* advance iterator */ - if( pnurb->pntsv == 1 ) + if( (pnurb->type & 7) == CU_BEZIER || pnurb->pntsv <= 1 ) return CurNurb_CreatePyObject( pnurb ); /* make a bpy_curnurb */ else return SurfNurb_CreatePyObject( pnurb ); /* make a bpy_surfnurb */ @@ -1476,8 +1476,6 @@ static PyObject *Curve_iterNext( BPy_Curve * self ) "iterator at end" ); } - - /* tp_sequence methods */ /*