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 | |
parent | d8aaf730382d40754cfb5b83c15ef4645b508bc3 (diff) |
Python API
----------
Bugfix #5447: bug in determining whether a Curve was a CurNurb or SurfNurb.
-rw-r--r-- | source/blender/python/api2_2x/Curve.c | 5 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 1 |
2 files changed, 5 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 */ diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index fbd13b653fe..7d5bb189192 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -4534,6 +4534,7 @@ static PyObject *get_obj_data( BPy_Object *self, int mesh ) data_object = Camera_CreatePyObject( object->data ); break; case OB_CURVE: + case OB_SURF: data_object = Curve_CreatePyObject( object->data ); break; case ID_IM: |