From ff110c17f705976435ee14f2cde9c85f7334a56c Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Mon, 3 Aug 2009 15:19:51 +0000 Subject: Fixed argument checking in __init__ methods of Interface1D, Predicates, Functions, and StrokeShader types. --- .../freestyle/intern/python/BPy_BinaryPredicate0D.cpp | 2 ++ .../freestyle/intern/python/BPy_BinaryPredicate1D.cpp | 2 ++ .../blender/freestyle/intern/python/BPy_Interface1D.cpp | 2 ++ .../freestyle/intern/python/BPy_StrokeShader.cpp | 2 ++ .../freestyle/intern/python/BPy_UnaryPredicate0D.cpp | 2 ++ .../freestyle/intern/python/BPy_UnaryPredicate1D.cpp | 2 ++ .../freestyle/intern/python/Interface1D/BPy_FEdge.cpp | 12 ++++++++---- .../freestyle/intern/python/Interface1D/BPy_Stroke.cpp | 17 +++++++++-------- .../intern/python/Interface1D/BPy_ViewEdge.cpp | 2 ++ .../intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp | 4 ++-- .../intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 4 ++-- .../UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp | 6 ++++-- .../UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp | 6 ++++-- .../python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp | 6 ++++-- .../python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp | 6 ++++-- .../UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp | 6 ++++-- .../UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp | 6 ++++-- .../python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp | 6 ++++-- .../python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp | 6 ++++-- .../BPy_UnaryFunction0DVectorViewShape.cpp | 6 ++++-- .../UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp | 6 ++++-- .../BPy_GetOccludeeF1D.cpp | 6 ++++-- .../BPy_GetOccludersF1D.cpp | 6 ++++-- .../BPy_GetShapeF1D.cpp | 6 ++++-- .../UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp | 6 ++++-- .../BPy_IncrementChainingTimeStampF1D.cpp | 6 ++++-- .../UnaryFunction1D_void/BPy_TimeStampF1D.cpp | 6 ++++-- 27 files changed, 99 insertions(+), 48 deletions(-) (limited to 'source') diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index f614e8af8ec..79a4bae3b3e 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -125,6 +125,8 @@ PyMODINIT_FUNC BinaryPredicate0D_Init( PyObject *module ) int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->bp0D = new BinaryPredicate0D(); self->bp0D->py_bp0D = (PyObject *) self; diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 6b285b71f80..1f38aa42096 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -157,6 +157,8 @@ PyMODINIT_FUNC BinaryPredicate1D_Init( PyObject *module ) int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->bp1D = new BinaryPredicate1D(); self->bp1D->py_bp1D = (PyObject *) self; return 0; diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 7fe7c4de07a..4293921d44c 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -197,6 +197,8 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) int Interface1D___init__(BPy_Interface1D *self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->if1D = new Interface1D(); self->borrowed = 0; return 0; diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index 1bc5b007d12..1a99d7e395c 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -259,6 +259,8 @@ PyMODINIT_FUNC StrokeShader_Init( PyObject *module ) int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->ss = new StrokeShader(); self->ss->py_ss = (PyObject *) self; return 0; diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index c914d45e56f..c146760a415 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -137,6 +137,8 @@ PyMODINIT_FUNC UnaryPredicate0D_Init( PyObject *module ) int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->up0D = new UnaryPredicate0D(); self->up0D->py_up0D = (PyObject *) self; return 0; diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index 6b929929c6a..b80ff013c62 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -179,6 +179,8 @@ PyMODINIT_FUNC UnaryPredicate1D_Init( PyObject *module ) int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->up1D = new UnaryPredicate1D(); self->up1D->py_up1D = (PyObject *) self; return 0; diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index ccdcbe98c69..2f09a50b616 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -152,16 +152,20 @@ PyTypeObject FEdge_Type = { int FEdge___init__(BPy_FEdge *self, PyObject *args, PyObject *kwds) { - PyObject *obj1 = 0, *obj2 = 0; - if (! PyArg_ParseTuple(args, "|O!O!", &SVertex_Type, &obj1, &SVertex_Type, &obj2) ) + if (! PyArg_ParseTuple(args, "|OO", &obj1, &obj2) ) return -1; - if( !obj1 && !obj2 ){ + if( !obj1 ){ self->fe = new FEdge(); - } else if( obj1 && obj2 ) { + + } else if( !obj2 && BPy_FEdge_Check(obj1) ) { + self->fe = new FEdge(*( ((BPy_FEdge *) obj1)->fe )); + + } else if( obj2 && BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { self->fe = new FEdge( ((BPy_SVertex *) obj1)->sv, ((BPy_SVertex *) obj2)->sv ); + } else { PyErr_SetString(PyExc_TypeError, "invalid argument(s)"); return -1; diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 38cba3f1275..d388cb10c06 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -183,18 +183,19 @@ int Stroke___init__(BPy_Stroke *self, PyObject *args, PyObject *kwds) if (! PyArg_ParseTuple(args, "|OO", &obj1, &obj2) ) return -1; - if( !obj1 && !obj2 ){ + if( !obj1 ){ self->s = new Stroke(); - } else if ( obj1 && !obj2 ) { - if (! BPy_Stroke_Check(obj1) ) { - PyErr_SetString(PyExc_TypeError, "not a Stroke object"); - return -1; - } + + } else if ( !obj2 && BPy_Stroke_Check(obj1) ) { self->s = new Stroke(*( ((BPy_Stroke *)obj1)->s )); - } else { - PyErr_SetString(PyExc_NotImplementedError, + + } else if ( obj2 ) { + PyErr_SetString(PyExc_TypeError, "Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd) not implemented"); return -1; + } else { + PyErr_SetString(PyExc_TypeError, "invalid argument(s)"); + return -1; } self->py_if1D.if1D = self->s; diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp index ba0c4756b9b..634b0ff906d 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -161,6 +161,8 @@ PyTypeObject ViewEdge_Type = { int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->ve = new ViewEdge(); self->py_if1D.if1D = self->ve; self->py_if1D.borrowed = 0; diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp index 7f60098a4d1..5e037064aa8 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -135,10 +135,10 @@ int FEdgeSharp___init__(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds) if( !obj1 ){ self->fes = new FEdgeSharp(); - } else if( BPy_FEdgeSharp_Check(obj1) ) { + } else if( !obj2 && BPy_FEdgeSharp_Check(obj1) ) { self->fes = new FEdgeSharp(*( ((BPy_FEdgeSharp *) obj1)->fes )); - } else if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + } else if( obj2 && BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { self->fes = new FEdgeSharp( ((BPy_SVertex *) obj1)->sv, ((BPy_SVertex *) obj2)->sv ); } else { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index c19ef463f22..36d5b75bc25 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -127,10 +127,10 @@ int FEdgeSmooth___init__(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwds) if( !obj1 ){ self->fes = new FEdgeSmooth(); - } else if( BPy_FEdgeSmooth_Check(obj1) ) { + } else if( !obj2 && BPy_FEdgeSmooth_Check(obj1) ) { self->fes = new FEdgeSmooth(*( ((BPy_FEdgeSmooth *) obj1)->fes )); - } else if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + } else if( obj2 && BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { self->fes = new FEdgeSmooth( ((BPy_SVertex *) obj1)->sv, ((BPy_SVertex *) obj2)->sv ); } else { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index 20455f8332c..7973a87c3fa 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -23,7 +23,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DDouble instance -----------*/ -static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self); +static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble* self); static PyObject * UnaryFunction0DDouble___repr__(BPy_UnaryFunction0DDouble* self); @@ -188,8 +188,10 @@ PyMODINIT_FUNC UnaryFunction0DDouble_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self) +int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_double = new UnaryFunction0D(); self->uf0D_double->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index 87891af6a07..6bc5df27824 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DEdgeNature instance -----------*/ -static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self); +static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature* self); static PyObject * UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DEdgeNature_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self) +int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_edgenature = new UnaryFunction0D(); self->uf0D_edgenature->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index 74999d70d28..e837135bc0b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -17,7 +17,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DFloat instance -----------*/ -static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self); +static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat* self); static PyObject * UnaryFunction0DFloat___repr__(BPy_UnaryFunction0DFloat* self); @@ -160,8 +160,10 @@ PyMODINIT_FUNC UnaryFunction0DFloat_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self) +int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_float = new UnaryFunction0D(); self->uf0D_float->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index 9f319bd09dd..24df5652017 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DId instance -----------*/ -static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self); +static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId* self); static PyObject * UnaryFunction0DId___repr__(BPy_UnaryFunction0DId* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DId_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self) +int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_id = new UnaryFunction0D(); self->uf0D_id->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index a86580b5d42..41322c5cdad 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DMaterial instance -----------*/ -static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self); +static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial* self); static PyObject * UnaryFunction0DMaterial___repr__(BPy_UnaryFunction0DMaterial* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DMaterial_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self) +int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_material = new UnaryFunction0D(); self->uf0D_material->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index 08d10d2be39..b041fba1e11 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DUnsigned instance -----------*/ -static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self); +static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned* self); static PyObject * UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DUnsigned_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self) +int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_unsigned = new UnaryFunction0D(); self->uf0D_unsigned->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index 6dc2aa52a78..c6f01d22d14 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -13,7 +13,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DVec2f instance -----------*/ -static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self); +static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f* self); static PyObject * UnaryFunction0DVec2f___repr__(BPy_UnaryFunction0DVec2f* self); @@ -137,8 +137,10 @@ PyMODINIT_FUNC UnaryFunction0DVec2f_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self) +int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_vec2f = new UnaryFunction0D(); self->uf0D_vec2f->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index 7f2c78f8d00..2949ab8c6cd 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DVec3f instance -----------*/ -static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self); +static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f* self); static PyObject * UnaryFunction0DVec3f___repr__(BPy_UnaryFunction0DVec3f* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DVec3f_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self) +int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_vec3f = new UnaryFunction0D(); self->uf0D_vec3f->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index dd1854b86d8..74c8a9b9718 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DVectorViewShape instance -----------*/ -static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self); +static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVectorViewShape* self); static PyObject * UnaryFunction0DVectorViewShape___repr__(BPy_UnaryFunction0DVectorViewShape* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DVectorViewShape_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self) +int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_vectorviewshape = new UnaryFunction0D< std::vector >(); self->uf0D_vectorviewshape->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index 7a1aeed0e72..64c7dfe401c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -13,7 +13,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DViewShape instance -----------*/ -static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self); +static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape* self); static PyObject * UnaryFunction0DViewShape___repr__(BPy_UnaryFunction0DViewShape* self); @@ -137,8 +137,10 @@ PyMODINIT_FUNC UnaryFunction0DViewShape_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self) +int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_viewshape = new UnaryFunction0D(); self->uf0D_viewshape->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp index b4a5c7180b6..1fa11789091 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp @@ -11,7 +11,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetOccludeeF1D instance -----------*/ - static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D* self); + static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D* self, PyObject *args); /*-----------------------BPy_GetOccludeeF1D type definition ------------------------------*/ @@ -100,8 +100,10 @@ PyTypeObject GetOccludeeF1D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetOccludeeF1D___init__( BPy_GetOccludeeF1D* self ) +int GetOccludeeF1D___init__( BPy_GetOccludeeF1D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludeeF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp index d5e057117f5..3aff816e147 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp @@ -11,7 +11,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetOccludersF1D instance -----------*/ - static int GetOccludersF1D___init__(BPy_GetOccludersF1D* self); + static int GetOccludersF1D___init__(BPy_GetOccludersF1D* self, PyObject *args); /*-----------------------BPy_GetOccludersF1D type definition ------------------------------*/ @@ -100,8 +100,10 @@ PyTypeObject GetOccludersF1D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetOccludersF1D___init__( BPy_GetOccludersF1D* self ) +int GetOccludersF1D___init__( BPy_GetOccludersF1D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludersF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp index 2349b36fa3d..8090cc60e85 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp @@ -11,7 +11,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetShapeF1D instance -----------*/ - static int GetShapeF1D___init__(BPy_GetShapeF1D* self); + static int GetShapeF1D___init__(BPy_GetShapeF1D* self, PyObject *args); /*-----------------------BPy_GetShapeF1D type definition ------------------------------*/ @@ -100,8 +100,10 @@ PyTypeObject GetShapeF1D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetShapeF1D___init__( BPy_GetShapeF1D* self ) +int GetShapeF1D___init__( BPy_GetShapeF1D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetShapeF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp index 4ea90ad9f0d..9eaa449dd13 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp @@ -11,7 +11,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for ChainingTimeStampF1D instance -----------*/ - static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D* self); + static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D* self, PyObject *args); /*-----------------------BPy_ChainingTimeStampF1D type definition ------------------------------*/ @@ -100,8 +100,10 @@ PyTypeObject ChainingTimeStampF1D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int ChainingTimeStampF1D___init__( BPy_ChainingTimeStampF1D* self ) +int ChainingTimeStampF1D___init__( BPy_ChainingTimeStampF1D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf1D_void.uf1D_void = new Functions1D::ChainingTimeStampF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp index 509a1e34195..960a3d74a3a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp @@ -11,7 +11,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for IncrementChainingTimeStampF1D instance -----------*/ - static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStampF1D* self); + static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStampF1D* self, PyObject *args); /*-----------------------BPy_IncrementChainingTimeStampF1D type definition ------------------------------*/ @@ -100,8 +100,10 @@ PyTypeObject IncrementChainingTimeStampF1D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int IncrementChainingTimeStampF1D___init__( BPy_IncrementChainingTimeStampF1D* self ) +int IncrementChainingTimeStampF1D___init__( BPy_IncrementChainingTimeStampF1D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf1D_void.uf1D_void = new Functions1D::IncrementChainingTimeStampF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp index 516f6cada60..dbfc4fc8638 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp @@ -11,7 +11,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for TimeStampF1D instance -----------*/ - static int TimeStampF1D___init__(BPy_TimeStampF1D* self); + static int TimeStampF1D___init__(BPy_TimeStampF1D* self, PyObject *args); /*-----------------------BPy_TimeStampF1D type definition ------------------------------*/ @@ -100,8 +100,10 @@ PyTypeObject TimeStampF1D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int TimeStampF1D___init__( BPy_TimeStampF1D* self ) +int TimeStampF1D___init__( BPy_TimeStampF1D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf1D_void.uf1D_void = new Functions1D::TimeStampF1D(); return 0; } -- cgit v1.2.3