diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp index b8ee3d8be27..1f858c1d49c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp @@ -15,13 +15,13 @@ extern "C" { static char GetYF1D___doc__[] = "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DDouble` > :class:`GetYF1D`\n" "\n" -".. method:: __init__(iType)\n" +".. method:: __init__(integration_type=IntegrationType.MEAN)\n" "\n" " Builds a GetYF1D object.\n" "\n" -" :arg iType: The integration method used to compute a single value\n" +" :arg integration_type: The integration method used to compute a single value\n" " from a set of values.\n" -" :type iType: :class:`IntegrationType`\n" +" :type integration_type: :class:`IntegrationType`\n" "\n" ".. method:: __call__(inter)\n" "\n" @@ -32,14 +32,14 @@ static char GetYF1D___doc__[] = " :return: The Y 3D coordinate of the Interface1D.\n" " :rtype: float\n"; -static int GetYF1D___init__( BPy_GetYF1D* self, PyObject *args ) +static int GetYF1D___init__(BPy_GetYF1D* self, PyObject *args, PyObject *kwds) { + static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) return -1; - - IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetYF1D(t); return 0; } |