diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp index a1b87b9cf17..925a407c298 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp @@ -15,13 +15,13 @@ extern "C" { static char Orientation2DF1D___doc__[] = "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec2f` > :class:`Orientation2DF1D`\n" "\n" -".. method:: __init__(iType=IntegrationType.MEAN)\n" +".. method:: __init__(integration_type=IntegrationType.MEAN)\n" "\n" " Builds an Orientation2DF1D 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,20 +32,18 @@ static char Orientation2DF1D___doc__[] = " :return: The 2D orientation of the Interface1D.\n" " :rtype: :class:`mathutils.Vector`\n"; -static int Orientation2DF1D___init__( BPy_Orientation2DF1D* self, PyObject *args) +static int Orientation2DF1D___init__(BPy_Orientation2DF1D* 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_vec2f.uf1D_vec2f = new Functions1D::Orientation2DF1D(t); return 0; - } - /*-----------------------BPy_Orientation2DF1D type definition ------------------------------*/ PyTypeObject Orientation2DF1D_Type = { |