Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Hughes <khughes@pacific.edu>2006-12-17 08:55:56 +0300
committerKen Hughes <khughes@pacific.edu>2006-12-17 08:55:56 +0300
commit940e625702e3f993cc2bfc679d5952698cabdf34 (patch)
treee02cee97ab5ac5a3464008beaf0079f9ca111d69 /source/blender/python/api2_2x/Curve.c
parentd8aaf730382d40754cfb5b83c15ef4645b508bc3 (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.c5
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 */