diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double')
10 files changed, 284 insertions, 144 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 245b6534300..9223c7d0088 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 @@ -8,8 +8,34 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for Curvature2DAngleF0D instance -----------*/ -static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char Curvature2DAngleF0D___doc__[] = +".. method:: __init__()\n" +"\n" +" Builds a Curvature2DAngleF0D object.\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns a real value giving the 2D curvature (as an angle) of the\n" +" 1D element to which the :class:`Interface0D` pointed by the\n" +" Interface0DIterator belongs. The 2D curvature is evaluated at the\n" +" Interface0D.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The 2D curvature of the 1D element evaluated at the\n" +" pointed Interface0D.\n" +" :rtype: float\n"; + +static 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; +} /*-----------------------BPy_Curvature2DAngleF0D type definition ------------------------------*/ @@ -34,7 +60,7 @@ PyTypeObject Curvature2DAngleF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "Curvature2DAngleF0D objects", /* tp_doc */ + Curvature2DAngleF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,17 +80,6 @@ PyTypeObject Curvature2DAngleF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 d8b9a13f5b1..4b2f56104a2 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 @@ -8,8 +8,41 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for DensityF0D instance -----------*/ -static int DensityF0D___init__(BPy_DensityF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char DensityF0D___doc__[] = +".. method:: __init__(sigma=2.0)\n" +"\n" +" Builds a DensityF0D object.\n" +"\n" +" :arg sigma: The gaussian sigma value ndicating the X value for\n" +" which the gaussian function is 0.5. It leads to the window size\n" +" value (the larger, the smoother).\n" +" :type sigma: float\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns the density of the (result) image evaluated at the\n" +" :class:`Interface0D` pointed by the Interface0DIterator. This\n" +" density is evaluated using a pixels square window around the\n" +" evaluation point and integrating these values using a gaussian.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The density of the image evaluated at the pointed\n" +" Interface0D.\n" +" :rtype: float\n"; + +static int DensityF0D___init__( BPy_DensityF0D* self, PyObject *args) +{ + double d = 2; + + 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; +} /*-----------------------BPy_DensityF0D type definition ------------------------------*/ @@ -34,7 +67,7 @@ PyTypeObject DensityF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "DensityF0D objects", /* tp_doc */ + DensityF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,19 +87,6 @@ PyTypeObject DensityF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -int DensityF0D___init__( BPy_DensityF0D* self, PyObject *args) -{ - double d = 2; - - 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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 741a07614d7..f11555a1e3c 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 @@ -8,8 +8,31 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for GetProjectedXF0D instance -----------*/ -static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char GetProjectedXF0D___doc__[] = +".. method:: __init__()\n" +"\n" +" Builds a GetProjectedXF0D object.\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns the X 3D projected coordinate of the :class:`Interface0D`\n" +" pointed by the Interface0DIterator.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The X 3D projected coordinate of the pointed Interface0D.\n" +" :rtype: float\n"; + +static 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; +} /*-----------------------BPy_GetProjectedXF0D type definition ------------------------------*/ @@ -34,7 +57,7 @@ PyTypeObject GetProjectedXF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "GetProjectedXF0D objects", /* tp_doc */ + GetProjectedXF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,17 +77,6 @@ PyTypeObject GetProjectedXF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 4bf2e3134ad..fa00514869a 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 @@ -8,8 +8,31 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for GetProjectedYF0D instance -----------*/ -static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char GetProjectedYF0D___doc__[] = +".. method:: __init__()\n" +"\n" +" Builds a GetProjectedYF0D object.\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns the Y 3D projected coordinate of the :class:`Interface0D`\n" +" pointed by the Interface0DIterator.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The Y 3D projected coordinate of the pointed Interface0D.\n" +" :rtype: float\n"; + +static 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; +} /*-----------------------BPy_GetProjectedYF0D type definition ------------------------------*/ @@ -34,7 +57,7 @@ PyTypeObject GetProjectedYF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "GetProjectedYF0D objects", /* tp_doc */ + GetProjectedYF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,17 +77,6 @@ PyTypeObject GetProjectedYF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 d463f446694..19f61fc8203 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 @@ -8,8 +8,31 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for GetProjectedZF0D instance -----------*/ -static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char GetProjectedZF0D___doc__[] = +".. method:: __init__()\n" +"\n" +" Builds a GetProjectedZF0D object.\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns the Z 3D projected coordinate of the :class:`Interface0D`\n" +" pointed by the Interface0DIterator.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The Z 3D projected coordinate of the pointed Interface0D.\n" +" :rtype: float\n"; + +static 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; +} /*-----------------------BPy_GetProjectedZF0D type definition ------------------------------*/ @@ -34,7 +57,7 @@ PyTypeObject GetProjectedZF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "GetProjectedZF0D objects", /* tp_doc */ + GetProjectedZF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,17 +77,6 @@ PyTypeObject GetProjectedZF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 8f524a8128b..0dde08e6f35 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 @@ -8,8 +8,31 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for GetXF0D instance -----------*/ -static int GetXF0D___init__(BPy_GetXF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char GetXF0D___doc__[] = +".. method:: __init__()\n" +"\n" +" Builds a GetXF0D object.\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns the X 3D coordinate of the :class:`Interface0D` pointed by\n" +" the Interface0DIterator.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The X 3D coordinate of the pointed Interface0D.\n" +" :rtype: float\n"; + +static 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; +} /*-----------------------BPy_GetXF0D type definition ------------------------------*/ @@ -34,7 +57,7 @@ PyTypeObject GetXF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "GetXF0D objects", /* tp_doc */ + GetXF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,17 +77,6 @@ PyTypeObject GetXF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 df497e93944..4775c65c199 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 @@ -8,8 +8,31 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for GetYF0D instance -----------*/ -static int GetYF0D___init__(BPy_GetYF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char GetYF0D___doc__[] = +".. method:: __init__()\n" +"\n" +" Builds a GetYF0D object.\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns the Y 3D coordinate of the :class:`Interface0D` pointed by\n" +" the Interface0DIterator.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The Y 3D coordinate of the pointed Interface0D.\n" +" :rtype: float\n"; + +static 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; +} /*-----------------------BPy_GetYF0D type definition ------------------------------*/ @@ -34,7 +57,7 @@ PyTypeObject GetYF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "GetYF0D objects", /* tp_doc */ + GetYF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,17 +77,6 @@ PyTypeObject GetYF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 45d3a5e0a2e..7a5fdfadf92 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 @@ -8,8 +8,31 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for GetZF0D instance -----------*/ -static int GetZF0D___init__(BPy_GetZF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char GetZF0D___doc__[] = +".. method:: __init__()\n" +"\n" +" Builds a GetZF0D object.\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns the Z 3D coordinate of the :class:`Interface0D` pointed by\n" +" the Interface0DIterator.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The Z 3D coordinate of the pointed Interface0D.\n" +" :rtype: float\n"; + +static 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; +} /*-----------------------BPy_GetZF0D type definition ------------------------------*/ @@ -34,7 +57,7 @@ PyTypeObject GetZF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "GetZF0D objects", /* tp_doc */ + GetZF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,17 +77,6 @@ PyTypeObject GetZF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 3b8a0490fb9..5c07913100e 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 @@ -8,8 +8,37 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for LocalAverageDepthF0D instance -----------*/ -static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char LocalAverageDepthF0D___doc__[] = +".. method:: __init__(maskSize=5.0)\n" +"\n" +" Builds a LocalAverageDepthF0D object.\n" +"\n" +" :arg maskSize: The size of the mask.\n" +" :type maskSize: float\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns the average depth around the :class:`Interface0D` pointed\n" +" by the Interface0DIterator. The result is obtained by querying the\n" +" depth buffer on a window around that point.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The average depth around the pointed Interface0D.\n" +" :rtype: float\n"; + +static int LocalAverageDepthF0D___init__( BPy_LocalAverageDepthF0D* self, PyObject *args) +{ + double d = 5.0; + + 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; +} /*-----------------------BPy_LocalAverageDepthF0D type definition ------------------------------*/ @@ -34,7 +63,7 @@ PyTypeObject LocalAverageDepthF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "LocalAverageDepthF0D objects", /* tp_doc */ + LocalAverageDepthF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,19 +83,6 @@ PyTypeObject LocalAverageDepthF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -int LocalAverageDepthF0D___init__( BPy_LocalAverageDepthF0D* self, PyObject *args) -{ - double d = 5.0; - - 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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus 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 4aaabbd919f..f9bcbb6ee21 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 @@ -8,8 +8,36 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for ZDiscontinuityF0D instance -----------*/ -static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D* self, PyObject *args); +//------------------------INSTANCE METHODS ---------------------------------- + +static char ZDiscontinuityF0D___doc__[] = +".. method:: __init__()\n" +"\n" +" Builds a ZDiscontinuityF0D object.\n" +"\n" +".. method:: __call__(it)\n" +"\n" +" Returns a real value giving the distance between the\n" +" :class:`Interface0D` pointed by the Interface0DIterator and the\n" +" shape that lies behind (occludee). This distance is evaluated in\n" +" the camera space and normalized between 0 and 1. Therefore, if no\n" +" oject is occluded by the shape to which the Interface0D belongs to,\n" +" 1 is returned.\n" +"\n" +" :arg it: An Interface0DIterator object.\n" +" :type it: :class:`Interface0DIterator`\n" +" :return: The normalized distance between the pointed Interface0D\n" +" and the occludee.\n" +" :rtype: float\n"; + +static 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; +} /*-----------------------BPy_ZDiscontinuityF0D type definition ------------------------------*/ @@ -34,7 +62,7 @@ PyTypeObject ZDiscontinuityF0D_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "ZDiscontinuityF0D objects", /* tp_doc */ + ZDiscontinuityF0D___doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -54,17 +82,6 @@ PyTypeObject ZDiscontinuityF0D_Type = { 0, /* tp_new */ }; -//------------------------INSTANCE METHODS ---------------------------------- - -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; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus |