diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-07-28 04:29:30 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-07-28 04:29:30 +0400 |
commit | bf0365ceb0140a9127f59ff6bc1a0a9c113e0a1a (patch) | |
tree | 73d9149a3808b6f60444be07883e4e11561009ca /source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double | |
parent | 9f79d8ae6766e6a8b155674ad1b9e747f4b70235 (diff) |
* BPy_IntegrationType.cpp: Added a Python wrapper of integrate function.
* Fixed uninitialized fields in the "__init__" methods of UnaryFunction0D
types. Also added missing argument validation codes to some of the types,
and removed redundant validation error messages.
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double')
10 files changed, 44 insertions, 24 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp index 70bf4d677e6..e610f7c8a5a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for Curvature2DAngleF0D instance -----------*/ - static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D* self); + static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D* self, PyObject *args); /*-----------------------BPy_Curvature2DAngleF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject Curvature2DAngleF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int Curvature2DAngleF0D___init__( BPy_Curvature2DAngleF0D* self ) +int Curvature2DAngleF0D___init__( BPy_Curvature2DAngleF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_double.uf0D_double = new Functions0D::Curvature2DAngleF0D(); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp index dd335d03fa8..b136f0bcdf5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp @@ -102,12 +102,10 @@ int DensityF0D___init__( BPy_DensityF0D* self, PyObject *args) { double d = 2; - if( !PyArg_ParseTuple(args, "|d", &d) ) { - cout << "ERROR: DensityF0D___init__" << endl; + if( !PyArg_ParseTuple(args, "|d", &d) ) return -1; - } - self->py_uf0D_double.uf0D_double = new Functions0D::DensityF0D(d); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp index 7bc2e368fb5..6c87e205381 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetProjectedXF0D instance -----------*/ - static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D* self); + static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D* self, PyObject *args); /*-----------------------BPy_GetProjectedXF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject GetProjectedXF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetProjectedXF0D___init__( BPy_GetProjectedXF0D* self ) +int GetProjectedXF0D___init__( BPy_GetProjectedXF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedXF0D(); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp index b0a4f1d82db..9b672f87568 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetProjectedYF0D instance -----------*/ - static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D* self); + static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D* self, PyObject *args); /*-----------------------BPy_GetProjectedYF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject GetProjectedYF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetProjectedYF0D___init__( BPy_GetProjectedYF0D* self ) +int GetProjectedYF0D___init__( BPy_GetProjectedYF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedYF0D(); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp index b452a32e987..3904c798aee 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetProjectedZF0D instance -----------*/ - static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D* self); + static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D* self, PyObject *args); /*-----------------------BPy_GetProjectedZF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject GetProjectedZF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetProjectedZF0D___init__( BPy_GetProjectedZF0D* self ) +int GetProjectedZF0D___init__( BPy_GetProjectedZF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedZF0D(); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp index b5ac0a0b08c..3798f635f2c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetXF0D instance -----------*/ - static int GetXF0D___init__(BPy_GetXF0D* self); + static int GetXF0D___init__(BPy_GetXF0D* self, PyObject *args); /*-----------------------BPy_GetXF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject GetXF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetXF0D___init__( BPy_GetXF0D* self ) +int GetXF0D___init__( BPy_GetXF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_double.uf0D_double = new Functions0D::GetXF0D(); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp index 45bb5450fbd..c0124d7be9d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetYF0D instance -----------*/ - static int GetYF0D___init__(BPy_GetYF0D* self); + static int GetYF0D___init__(BPy_GetYF0D* self, PyObject *args); /*-----------------------BPy_GetYF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject GetYF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetYF0D___init__( BPy_GetYF0D* self ) +int GetYF0D___init__( BPy_GetYF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_double.uf0D_double = new Functions0D::GetYF0D(); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp index 83605b1b356..49010ccd72e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for GetZF0D instance -----------*/ - static int GetZF0D___init__(BPy_GetZF0D* self); + static int GetZF0D___init__(BPy_GetZF0D* self, PyObject *args); /*-----------------------BPy_GetZF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject GetZF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int GetZF0D___init__( BPy_GetZF0D* self ) +int GetZF0D___init__( BPy_GetZF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_double.uf0D_double = new Functions0D::GetZF0D(); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp index 3a9c516cd17..6166e0027d4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp @@ -102,12 +102,10 @@ int LocalAverageDepthF0D___init__( BPy_LocalAverageDepthF0D* self, PyObject *arg { double d = 5.0; - if( !PyArg_ParseTuple(args, "|d", &d) ) { - cout << "ERROR: LocalAverageDepthF0D___init__" << endl; + if( !PyArg_ParseTuple(args, "|d", &d) ) return -1; - } - self->py_uf0D_double.uf0D_double = new Functions0D::LocalAverageDepthF0D(d); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp index 0d6222c8a9a..ce614eaf76f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for ZDiscontinuityF0D instance -----------*/ - static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D* self); + static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D* self, PyObject *args); /*-----------------------BPy_ZDiscontinuityF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject ZDiscontinuityF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int ZDiscontinuityF0D___init__( BPy_ZDiscontinuityF0D* self ) +int ZDiscontinuityF0D___init__( BPy_ZDiscontinuityF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_double.uf0D_double = new Functions0D::ZDiscontinuityF0D(); + self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self; return 0; } |