diff options
-rw-r--r-- | source/blender/python/api2_2x/Geometry.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/python/api2_2x/Geometry.c b/source/blender/python/api2_2x/Geometry.c index 7d6ba48ca35..df33d90a3c1 100644 --- a/source/blender/python/api2_2x/Geometry.c +++ b/source/blender/python/api2_2x/Geometry.c @@ -91,21 +91,20 @@ PyObject *M_Geometry_PolyFill( PyObject * self, PyObject * args ) for( i = 0; i < len_polylines; ++i ) { polyLine= PySequence_GetItem( polyLineSeq, i ); - if (!PySequence_Check(polyLineSeq)) { + if (!PySequence_Check(polyLine)) { freedisplist(&dispbase); - Py_DECREF(polyLine); + Py_XDECREF(polyLine); /* may be null so use Py_XDECREF*/ return EXPP_ReturnPyObjError( PyExc_TypeError, - "expected a sequence of poly lines" ); + "One or more of the polylines is not a sequence of Mathutils.Vector's" ); } - len_polypoints= PySequence_Size( polyLine ); if (len_polypoints>0) { /* dont bother adding edges as polylines */ if (EXPP_check_sequence_consistency( polyLine, &vector_Type ) != 1) { freedisplist(&dispbase); Py_DECREF(polyLine); return EXPP_ReturnPyObjError( PyExc_TypeError, - "expected a sequence of poly lines" ); + "A point in one of the polylines is not a Mathutils.Vector type" ); } dl= MEM_callocN(sizeof(DispList), "poly disp"); @@ -147,7 +146,7 @@ PyObject *M_Geometry_PolyFill( PyObject * self, PyObject * args ) if( !tri_list ) { freedisplist(&dispbase); return EXPP_ReturnPyObjError( PyExc_RuntimeError, - "PyList_New() failed" ); + "Geometry.PolyFill failed to make a new list" ); } index= 0; |