Python API

----------
Bugfix #5447: bug in determining whether a Curve was a CurNurb or SurfNurb.
This commit is contained in:
Ken Hughes
2006-12-17 05:55:56 +00:00
parent d8aaf73038
commit 940e625702
2 changed files with 5 additions and 1 deletions

View File

@@ -1527,7 +1527,10 @@ PyObject *Curve_getNurb( BPy_Curve * self, int n )
if( !pNurb ) /* we came to the end of the list */
return ( EXPP_ReturnPyObjError( PyExc_IndexError,
"index out of range" ) );
if( pNurb->pntsv == 1 )
/* until there is a Surface BPyType, distinquish between a curve and a
* surface based on whether it's a Bezier and the v size */
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 */