diff options
author | Ken Hughes <khughes@pacific.edu> | 2006-12-17 08:55:56 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2006-12-17 08:55:56 +0300 |
commit | 940e625702e3f993cc2bfc679d5952698cabdf34 (patch) | |
tree | e02cee97ab5ac5a3464008beaf0079f9ca111d69 /source/blender/python/api2_2x/Curve.c | |
parent | d8aaf730382d40754cfb5b83c15ef4645b508bc3 (diff) |
Python API
----------
Bugfix #5447: bug in determining whether a Curve was a CurNurb or SurfNurb.
Diffstat (limited to 'source/blender/python/api2_2x/Curve.c')
-rw-r--r-- | source/blender/python/api2_2x/Curve.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Curve.c b/source/blender/python/api2_2x/Curve.c index 69afe176ca6..80e6a39b9da 100644 --- a/source/blender/python/api2_2x/Curve.c +++ b/source/blender/python/api2_2x/Curve.c @@ -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 */ |