Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-22 05:57:20 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-22 05:57:20 +0400
commit33f34e1a7bc08f123d76198ae0671e3da1ded401 (patch)
tree2e94232e350814cd1334cc262309fd9efd8b9ab6 /source/blender/freestyle/intern/python/UnaryFunction0D
parent6cd036ab96fa50b280a6a0cfda7f09f1c1f57600 (diff)
Freestyle Python API improvements - part 6.
Fix for PyGetSetDef and proper handling of keyword arguments were done in Function0D and Function1D classes. Additional code clean-up was also made.
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D')
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp95
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp57
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp77
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp56
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp56
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp56
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp4
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp4
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp4
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp4
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp5
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp11
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp5
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp5
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp11
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp11
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp6
36 files changed, 264 insertions, 317 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
index b61b9baf033..34c57e0bbd0 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
@@ -24,64 +24,64 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
-int UnaryFunction0DDouble_Init( PyObject *module ) {
-
- if( module == NULL )
+int UnaryFunction0DDouble_Init(PyObject *module)
+{
+ if (module == NULL)
return -1;
- if( PyType_Ready( &UnaryFunction0DDouble_Type ) < 0 )
+ if (PyType_Ready(&UnaryFunction0DDouble_Type) < 0)
return -1;
- Py_INCREF( &UnaryFunction0DDouble_Type );
+ Py_INCREF(&UnaryFunction0DDouble_Type);
PyModule_AddObject(module, "UnaryFunction0DDouble", (PyObject *)&UnaryFunction0DDouble_Type);
- if( PyType_Ready( &DensityF0D_Type ) < 0 )
+ if (PyType_Ready(&DensityF0D_Type) < 0)
return -1;
- Py_INCREF( &DensityF0D_Type );
+ Py_INCREF(&DensityF0D_Type);
PyModule_AddObject(module, "DensityF0D", (PyObject *)&DensityF0D_Type);
- if( PyType_Ready( &LocalAverageDepthF0D_Type ) < 0 )
+ if (PyType_Ready(&LocalAverageDepthF0D_Type) < 0)
return -1;
- Py_INCREF( &LocalAverageDepthF0D_Type );
+ Py_INCREF(&LocalAverageDepthF0D_Type);
PyModule_AddObject(module, "LocalAverageDepthF0D", (PyObject *)&LocalAverageDepthF0D_Type);
- if( PyType_Ready( &Curvature2DAngleF0D_Type ) < 0 )
+ if (PyType_Ready(&Curvature2DAngleF0D_Type) < 0)
return -1;
- Py_INCREF( &Curvature2DAngleF0D_Type );
+ Py_INCREF(&Curvature2DAngleF0D_Type);
PyModule_AddObject(module, "Curvature2DAngleF0D", (PyObject *)&Curvature2DAngleF0D_Type);
- if( PyType_Ready( &GetProjectedXF0D_Type ) < 0 )
+ if (PyType_Ready(&GetProjectedXF0D_Type) < 0)
return -1;
- Py_INCREF( &GetProjectedXF0D_Type );
+ Py_INCREF(&GetProjectedXF0D_Type);
PyModule_AddObject(module, "GetProjectedXF0D", (PyObject *)&GetProjectedXF0D_Type);
- if( PyType_Ready( &GetProjectedYF0D_Type ) < 0 )
+ if (PyType_Ready(&GetProjectedYF0D_Type) < 0)
return -1;
- Py_INCREF( &GetProjectedYF0D_Type );
+ Py_INCREF(&GetProjectedYF0D_Type);
PyModule_AddObject(module, "GetProjectedYF0D", (PyObject *)&GetProjectedYF0D_Type);
- if( PyType_Ready( &GetProjectedZF0D_Type ) < 0 )
+ if (PyType_Ready(&GetProjectedZF0D_Type) < 0)
return -1;
- Py_INCREF( &GetProjectedZF0D_Type );
+ Py_INCREF(&GetProjectedZF0D_Type);
PyModule_AddObject(module, "GetProjectedZF0D", (PyObject *)&GetProjectedZF0D_Type);
- if( PyType_Ready( &GetXF0D_Type ) < 0 )
+ if (PyType_Ready(&GetXF0D_Type) < 0)
return -1;
- Py_INCREF( &GetXF0D_Type );
+ Py_INCREF(&GetXF0D_Type);
PyModule_AddObject(module, "GetXF0D", (PyObject *)&GetXF0D_Type);
- if( PyType_Ready( &GetYF0D_Type ) < 0 )
+ if (PyType_Ready(&GetYF0D_Type) < 0)
return -1;
- Py_INCREF( &GetYF0D_Type );
+ Py_INCREF(&GetYF0D_Type);
PyModule_AddObject(module, "GetYF0D", (PyObject *)&GetYF0D_Type);
- if( PyType_Ready( &GetZF0D_Type ) < 0 )
+ if (PyType_Ready(&GetZF0D_Type) < 0)
return -1;
- Py_INCREF( &GetZF0D_Type );
+ Py_INCREF(&GetZF0D_Type);
PyModule_AddObject(module, "GetZF0D", (PyObject *)&GetZF0D_Type);
- if( PyType_Ready( &ZDiscontinuityF0D_Type ) < 0 )
+ if (PyType_Ready(&ZDiscontinuityF0D_Type) < 0)
return -1;
- Py_INCREF( &ZDiscontinuityF0D_Type );
+ Py_INCREF(&ZDiscontinuityF0D_Type);
PyModule_AddObject(module, "ZDiscontinuityF0D", (PyObject *)&ZDiscontinuityF0D_Type);
return 0;
@@ -101,8 +101,10 @@ static char UnaryFunction0DDouble___doc__[] =
static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self, PyObject *args, PyObject *kwds)
{
- if ( !PyArg_ParseTuple(args, "") )
- return -1;
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ return -1;
self->uf0D_double = new UnaryFunction0D<double>();
self->uf0D_double->py_uf0D = (PyObject *)self;
return 0;
@@ -117,51 +119,32 @@ static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble* self)
static PyObject * UnaryFunction0DDouble___repr__(BPy_UnaryFunction0DDouble* self)
{
- return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_double->getName().c_str(), self->uf0D_double );
+ return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_double->getName().c_str(), self->uf0D_double);
}
-static char UnaryFunction0DDouble_getName___doc__[] =
-".. method:: getName()\n"
-"\n"
-" Returns the name of the unary 0D predicate.\n"
-"\n"
-" :return: The name of the unary 0D predicate.\n"
-" :rtype: str\n";
-
-static PyObject * UnaryFunction0DDouble_getName( BPy_UnaryFunction0DDouble *self )
-{
- return PyUnicode_FromString( self->uf0D_double->getName().c_str() );
-}
-
-static PyObject * UnaryFunction0DDouble___call__( BPy_UnaryFunction0DDouble *self, PyObject *args, PyObject *kwds)
+static PyObject * UnaryFunction0DDouble___call__(BPy_UnaryFunction0DDouble *self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"it", NULL};
PyObject *obj;
- if( kwds != NULL ) {
- PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
- return NULL;
- }
- if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
return NULL;
-
- if( typeid(*(self->uf0D_double)) == typeid(UnaryFunction0D<double>) ) {
+
+ if (typeid(*(self->uf0D_double)) == typeid(UnaryFunction0D<double>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
return NULL;
}
- if (self->uf0D_double->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it)) < 0) {
+ if (self->uf0D_double->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_double->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
- return PyFloat_FromDouble( self->uf0D_double->result );
-
+ return PyFloat_FromDouble(self->uf0D_double->result);
}
-/*----------------------UnaryFunction0DDouble instance definitions ----------------------------*/
static PyMethodDef BPy_UnaryFunction0DDouble_methods[] = {
- {"getName", ( PyCFunction ) UnaryFunction0DDouble_getName, METH_NOARGS, UnaryFunction0DDouble_getName___doc__},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
index a5ecd46b3bd..7522b05e3e4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
@@ -13,19 +13,19 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
-int UnaryFunction0DEdgeNature_Init( PyObject *module ) {
-
- if( module == NULL )
+int UnaryFunction0DEdgeNature_Init(PyObject *module)
+{
+ if (module == NULL)
return -1;
- if( PyType_Ready( &UnaryFunction0DEdgeNature_Type ) < 0 )
+ if (PyType_Ready(&UnaryFunction0DEdgeNature_Type) < 0)
return -1;
- Py_INCREF( &UnaryFunction0DEdgeNature_Type );
+ Py_INCREF(&UnaryFunction0DEdgeNature_Type);
PyModule_AddObject(module, "UnaryFunction0DEdgeNature", (PyObject *)&UnaryFunction0DEdgeNature_Type);
- if( PyType_Ready( &CurveNatureF0D_Type ) < 0 )
+ if (PyType_Ready(&CurveNatureF0D_Type) < 0)
return -1;
- Py_INCREF( &CurveNatureF0D_Type );
+ Py_INCREF(&CurveNatureF0D_Type);
PyModule_AddObject(module, "CurveNatureF0D", (PyObject *)&CurveNatureF0D_Type);
return 0;
@@ -45,8 +45,10 @@ static char UnaryFunction0DEdgeNature___doc__[] =
static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self, PyObject *args, PyObject *kwds)
{
- if ( !PyArg_ParseTuple(args, "") )
- return -1;
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ return -1;
self->uf0D_edgenature = new UnaryFunction0D<Nature::EdgeNature>();
self->uf0D_edgenature->py_uf0D = (PyObject *)self;
return 0;
@@ -61,51 +63,32 @@ static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature*
static PyObject * UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature* self)
{
- return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_edgenature->getName().c_str(), self->uf0D_edgenature );
+ return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_edgenature->getName().c_str(), self->uf0D_edgenature);
}
-static char UnaryFunction0DEdgeNature_getName___doc__[] =
-".. method:: getName()\n"
-"\n"
-" Returns the name of the unary 0D predicate.\n"
-"\n"
-" :return: The name of the unary 0D predicate.\n"
-" :rtype: str\n";
-
-static PyObject * UnaryFunction0DEdgeNature_getName( BPy_UnaryFunction0DEdgeNature *self )
-{
- return PyUnicode_FromString( self->uf0D_edgenature->getName().c_str() );
-}
-
-static PyObject * UnaryFunction0DEdgeNature___call__( BPy_UnaryFunction0DEdgeNature *self, PyObject *args, PyObject *kwds)
+static PyObject * UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNature *self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"it", NULL};
PyObject *obj;
- if( kwds != NULL ) {
- PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
- return NULL;
- }
- if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
return NULL;
- if( typeid(*(self->uf0D_edgenature)) == typeid(UnaryFunction0D<Nature::EdgeNature>) ) {
+ if (typeid(*(self->uf0D_edgenature)) == typeid(UnaryFunction0D<Nature::EdgeNature>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
return NULL;
}
- if (self->uf0D_edgenature->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
+ if (self->uf0D_edgenature->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_edgenature->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
- return BPy_Nature_from_Nature( self->uf0D_edgenature->result );
-
+ return BPy_Nature_from_Nature(self->uf0D_edgenature->result);
}
-/*----------------------UnaryFunction0DEdgeNature instance definitions ----------------------------*/
static PyMethodDef BPy_UnaryFunction0DEdgeNature_methods[] = {
- {"getName", ( PyCFunction ) UnaryFunction0DEdgeNature_getName, METH_NOARGS, UnaryFunction0DEdgeNature_getName___doc__},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
index 72ca2acf3b7..f2707bf3ae8 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
@@ -18,44 +18,44 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
-int UnaryFunction0DFloat_Init( PyObject *module ) {
-
- if( module == NULL )
+int UnaryFunction0DFloat_Init(PyObject *module)
+{
+ if (module == NULL)
return -1;
- if( PyType_Ready( &UnaryFunction0DFloat_Type ) < 0 )
+ if (PyType_Ready(&UnaryFunction0DFloat_Type) < 0)
return -1;
- Py_INCREF( &UnaryFunction0DFloat_Type );
+ Py_INCREF(&UnaryFunction0DFloat_Type);
PyModule_AddObject(module, "UnaryFunction0DFloat", (PyObject *)&UnaryFunction0DFloat_Type);
- if( PyType_Ready( &GetCurvilinearAbscissaF0D_Type ) < 0 )
+ if (PyType_Ready(&GetCurvilinearAbscissaF0D_Type) < 0)
return -1;
- Py_INCREF( &GetCurvilinearAbscissaF0D_Type );
+ Py_INCREF(&GetCurvilinearAbscissaF0D_Type);
PyModule_AddObject(module, "GetCurvilinearAbscissaF0D", (PyObject *)&GetCurvilinearAbscissaF0D_Type);
- if( PyType_Ready( &GetParameterF0D_Type ) < 0 )
+ if (PyType_Ready(&GetParameterF0D_Type) < 0)
return -1;
- Py_INCREF( &GetParameterF0D_Type );
+ Py_INCREF(&GetParameterF0D_Type);
PyModule_AddObject(module, "GetParameterF0D", (PyObject *)&GetParameterF0D_Type);
- if( PyType_Ready( &GetViewMapGradientNormF0D_Type ) < 0 )
+ if (PyType_Ready(&GetViewMapGradientNormF0D_Type) < 0)
return -1;
- Py_INCREF( &GetViewMapGradientNormF0D_Type );
+ Py_INCREF(&GetViewMapGradientNormF0D_Type);
PyModule_AddObject(module, "GetViewMapGradientNormF0D", (PyObject *)&GetViewMapGradientNormF0D_Type);
- if( PyType_Ready( &ReadCompleteViewMapPixelF0D_Type ) < 0 )
+ if (PyType_Ready(&ReadCompleteViewMapPixelF0D_Type) < 0)
return -1;
- Py_INCREF( &ReadCompleteViewMapPixelF0D_Type );
+ Py_INCREF(&ReadCompleteViewMapPixelF0D_Type);
PyModule_AddObject(module, "ReadCompleteViewMapPixelF0D", (PyObject *)&ReadCompleteViewMapPixelF0D_Type);
- if( PyType_Ready( &ReadMapPixelF0D_Type ) < 0 )
+ if (PyType_Ready(&ReadMapPixelF0D_Type) < 0)
return -1;
- Py_INCREF( &ReadMapPixelF0D_Type );
+ Py_INCREF(&ReadMapPixelF0D_Type);
PyModule_AddObject(module, "ReadMapPixelF0D", (PyObject *)&ReadMapPixelF0D_Type);
- if( PyType_Ready( &ReadSteerableViewMapPixelF0D_Type ) < 0 )
+ if (PyType_Ready(&ReadSteerableViewMapPixelF0D_Type) < 0)
return -1;
- Py_INCREF( &ReadSteerableViewMapPixelF0D_Type );
+ Py_INCREF(&ReadSteerableViewMapPixelF0D_Type);
PyModule_AddObject(module, "ReadSteerableViewMapPixelF0D", (PyObject *)&ReadSteerableViewMapPixelF0D_Type);
return 0;
@@ -75,8 +75,10 @@ static char UnaryFunction0DFloat___doc__[] =
static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self, PyObject *args, PyObject *kwds)
{
- if ( !PyArg_ParseTuple(args, "") )
- return -1;
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ return -1;
self->uf0D_float = new UnaryFunction0D<float>();
self->uf0D_float->py_uf0D = (PyObject *)self;
return 0;
@@ -91,51 +93,32 @@ static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat* self)
static PyObject * UnaryFunction0DFloat___repr__(BPy_UnaryFunction0DFloat* self)
{
- return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_float->getName().c_str(), self->uf0D_float );
+ return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_float->getName().c_str(), self->uf0D_float);
}
-static char UnaryFunction0DFloat_getName___doc__[] =
-".. method:: getName()\n"
-"\n"
-" Returns the name of the unary 0D predicate.\n"
-"\n"
-" :return: The name of the unary 0D predicate.\n"
-" :rtype: str\n";
-
-static PyObject * UnaryFunction0DFloat_getName( BPy_UnaryFunction0DFloat *self )
-{
- return PyUnicode_FromString( self->uf0D_float->getName().c_str() );
-}
-
-static PyObject * UnaryFunction0DFloat___call__( BPy_UnaryFunction0DFloat *self, PyObject *args, PyObject *kwds)
+static PyObject * UnaryFunction0DFloat___call__(BPy_UnaryFunction0DFloat *self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"it", NULL};
PyObject *obj;
- if( kwds != NULL ) {
- PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
- return NULL;
- }
- if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
return NULL;
- if( typeid(*(self->uf0D_float)) == typeid(UnaryFunction0D<float>) ) {
+ if (typeid(*(self->uf0D_float)) == typeid(UnaryFunction0D<float>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
return NULL;
}
- if (self->uf0D_float->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
+ if (self->uf0D_float->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_float->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
- return PyFloat_FromDouble( self->uf0D_float->result );
-
+ return PyFloat_FromDouble(self->uf0D_float->result);
}
-/*----------------------UnaryFunction0DFloat instance definitions ----------------------------*/
static PyMethodDef BPy_UnaryFunction0DFloat_methods[] = {
- {"getName", ( PyCFunction ) UnaryFunction0DFloat_getName, METH_NOARGS, UnaryFunction0DFloat_getName___doc__},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
index 3c4ccdbcbf1..a7a67710869 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
@@ -13,19 +13,19 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
-int UnaryFunction0DId_Init( PyObject *module ) {
-
- if( module == NULL )
+int UnaryFunction0DId_Init(PyObject *module)
+{
+ if (module == NULL)
return -1;
- if( PyType_Ready( &UnaryFunction0DId_Type ) < 0 )
+ if (PyType_Ready(&UnaryFunction0DId_Type) < 0)
return -1;
- Py_INCREF( &UnaryFunction0DId_Type );
+ Py_INCREF(&UnaryFunction0DId_Type);
PyModule_AddObject(module, "UnaryFunction0DId", (PyObject *)&UnaryFunction0DId_Type);
- if( PyType_Ready( &ShapeIdF0D_Type ) < 0 )
+ if (PyType_Ready(&ShapeIdF0D_Type) < 0)
return -1;
- Py_INCREF( &ShapeIdF0D_Type );
+ Py_INCREF(&ShapeIdF0D_Type);
PyModule_AddObject(module, "ShapeIdF0D", (PyObject *)&ShapeIdF0D_Type);
return 0;
@@ -45,8 +45,10 @@ static char UnaryFunction0DId___doc__[] =
static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self, PyObject *args, PyObject *kwds)
{
- if ( !PyArg_ParseTuple(args, "") )
- return -1;
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ return -1;
self->uf0D_id = new UnaryFunction0D<Id>();
self->uf0D_id->py_uf0D = (PyObject *)self;
return 0;
@@ -61,50 +63,32 @@ static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId* self)
static PyObject * UnaryFunction0DId___repr__(BPy_UnaryFunction0DId* self)
{
- return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_id->getName().c_str(), self->uf0D_id );
-}
-
-static char UnaryFunction0DId_getName___doc__[] =
-".. method:: getName()\n"
-"\n"
-" Returns the name of the unary 0D predicate.\n"
-"\n"
-" :return: The name of the unary 0D predicate.\n"
-" :rtype: str\n";
-
-static PyObject * UnaryFunction0DId_getName( BPy_UnaryFunction0DId *self )
-{
- return PyUnicode_FromString( self->uf0D_id->getName().c_str() );
+ return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_id->getName().c_str(), self->uf0D_id);
}
-static PyObject * UnaryFunction0DId___call__( BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds)
+static PyObject * UnaryFunction0DId___call__(BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"it", NULL};
PyObject *obj;
- if( kwds != NULL ) {
- PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
- return NULL;
- }
- if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
return NULL;
- if( typeid(*(self->uf0D_id)) == typeid(UnaryFunction0D<Id>) ) {
+ if (typeid(*(self->uf0D_id)) == typeid(UnaryFunction0D<Id>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
return NULL;
}
- if (self->uf0D_id->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
+ if (self->uf0D_id->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_id->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
- return BPy_Id_from_Id( self->uf0D_id->result );
+ return BPy_Id_from_Id(self->uf0D_id->result);
}
-/*----------------------UnaryFunction0DId instance definitions ----------------------------*/
static PyMethodDef BPy_UnaryFunction0DId_methods[] = {
- {"getName", ( PyCFunction ) UnaryFunction0DId_getName, METH_NOARGS, UnaryFunction0DId_getName___doc__},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
index d61453172b9..5206a61a820 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
@@ -13,19 +13,19 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
-int UnaryFunction0DMaterial_Init( PyObject *module ) {
-
- if( module == NULL )
+int UnaryFunction0DMaterial_Init(PyObject *module)
+{
+ if (module == NULL)
return -1;
- if( PyType_Ready( &UnaryFunction0DMaterial_Type ) < 0 )
+ if (PyType_Ready(&UnaryFunction0DMaterial_Type) < 0)
return -1;
- Py_INCREF( &UnaryFunction0DMaterial_Type );
+ Py_INCREF(&UnaryFunction0DMaterial_Type);
PyModule_AddObject(module, "UnaryFunction0DMaterial", (PyObject *)&UnaryFunction0DMaterial_Type);
- if( PyType_Ready( &MaterialF0D_Type ) < 0 )
+ if (PyType_Ready(&MaterialF0D_Type) < 0)
return -1;
- Py_INCREF( &MaterialF0D_Type );
+ Py_INCREF(&MaterialF0D_Type);
PyModule_AddObject(module, "MaterialF0D", (PyObject *)&MaterialF0D_Type);
return 0;
@@ -45,8 +45,10 @@ static char UnaryFunction0DMaterial___doc__[] =
static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self, PyObject *args, PyObject *kwds)
{
- if ( !PyArg_ParseTuple(args, "") )
- return -1;
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ return -1;
self->uf0D_material = new UnaryFunction0D<FrsMaterial>();
self->uf0D_material->py_uf0D = (PyObject *)self;
return 0;
@@ -62,51 +64,33 @@ static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial* sel
static PyObject * UnaryFunction0DMaterial___repr__(BPy_UnaryFunction0DMaterial* self)
{
- return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_material->getName().c_str(), self->uf0D_material );
-}
-
-static char UnaryFunction0DMaterial_getName___doc__[] =
-".. method:: getName()\n"
-"\n"
-" Returns the name of the unary 0D predicate.\n"
-"\n"
-" :return: The name of the unary 0D predicate.\n"
-" :rtype: str\n";
-
-static PyObject * UnaryFunction0DMaterial_getName( BPy_UnaryFunction0DMaterial *self )
-{
- return PyUnicode_FromString( self->uf0D_material->getName().c_str() );
+ return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_material->getName().c_str(), self->uf0D_material);
}
-static PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, PyObject *args, PyObject *kwds)
+static PyObject * UnaryFunction0DMaterial___call__(BPy_UnaryFunction0DMaterial *self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"it", NULL};
PyObject *obj;
- if( kwds != NULL ) {
- PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
- return NULL;
- }
- if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
return NULL;
- if( typeid(*(self->uf0D_material)) == typeid(UnaryFunction0D<FrsMaterial>) ) {
+ if (typeid(*(self->uf0D_material)) == typeid(UnaryFunction0D<FrsMaterial>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
return NULL;
}
- if (self->uf0D_material->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
+ if (self->uf0D_material->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_material->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
- return BPy_FrsMaterial_from_FrsMaterial( self->uf0D_material->result );
+ return BPy_FrsMaterial_from_FrsMaterial(self->uf0D_material->result);
}
-/*----------------------UnaryFunction0DMaterial instance definitions ----------------------------*/
static PyMethodDef BPy_UnaryFunction0DMaterial_methods[] = {
- {"getName", ( PyCFunction ) UnaryFunction0DMaterial_getName, METH_NOARGS, UnaryFunction0DMaterial_getName___doc__},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
index 37f6a2ab342..5d9a2f4517c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
@@ -13,19 +13,19 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
-int UnaryFunction0DUnsigned_Init( PyObject *module ) {
-
- if( module == NULL )
+int UnaryFunction0DUnsigned_Init(PyObject *module)
+{
+ if (module == NULL)
return -1;
- if( PyType_Ready( &UnaryFunction0DUnsigned_Type ) < 0 )
+ if (PyType_Ready(&UnaryFunction0DUnsigned_Type) < 0)
return -1;
- Py_INCREF( &UnaryFunction0DUnsigned_Type );
+ Py_INCREF(&UnaryFunction0DUnsigned_Type);
PyModule_AddObject(module, "UnaryFunction0DUnsigned", (PyObject *)&UnaryFunction0DUnsigned_Type);
- if( PyType_Ready( &QuantitativeInvisibilityF0D_Type ) < 0 )
+ if (PyType_Ready(&QuantitativeInvisibilityF0D_Type) < 0)
return -1;
- Py_INCREF( &QuantitativeInvisibilityF0D_Type );
+ Py_INCREF(&QuantitativeInvisibilityF0D_Type);
PyModule_AddObject(module, "QuantitativeInvisibilityF0D", (PyObject *)&QuantitativeInvisibilityF0D_Type);
return 0;
@@ -45,8 +45,10 @@ static char UnaryFunction0DUnsigned___doc__[] =
static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self, PyObject *args, PyObject *kwds)
{
- if ( !PyArg_ParseTuple(args, "") )
- return -1;
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ return -1;
self->uf0D_unsigned = new UnaryFunction0D<unsigned int>();
self->uf0D_unsigned->py_uf0D = (PyObject *)self;
return 0;
@@ -61,51 +63,33 @@ static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned* sel
static PyObject * UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned* self)
{
- return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_unsigned->getName().c_str(), self->uf0D_unsigned );
-}
-
-static char UnaryFunction0DUnsigned_getName___doc__[] =
-".. method:: getName()\n"
-"\n"
-" Returns the name of the unary 0D predicate.\n"
-"\n"
-" :return: The name of the unary 0D predicate.\n"
-" :rtype: str\n";
-
-static PyObject * UnaryFunction0DUnsigned_getName( BPy_UnaryFunction0DUnsigned *self )
-{
- return PyUnicode_FromString( self->uf0D_unsigned->getName().c_str() );
+ return PyUnicode_FromFormat("type: %s - address: %p", self->uf0D_unsigned->getName().c_str(), self->uf0D_unsigned);
}
-static PyObject * UnaryFunction0DUnsigned___call__( BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds)
+static PyObject * UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"it", NULL};
PyObject *obj;
- if( kwds != NULL ) {
- PyErr_SetString(PyExc_TypeError, "keyword argument(s) not supported");
- return NULL;
- }
- if(!PyArg_ParseTuple(args, "O!", &Interface0DIterator_Type, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
return NULL;
- if( typeid(*(self->uf0D_unsigned)) == typeid(UnaryFunction0D<unsigned int>) ) {
+ if (typeid(*(self->uf0D_unsigned)) == typeid(UnaryFunction0D<unsigned int>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
return NULL;
}
- if (self->uf0D_unsigned->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
+ if (self->uf0D_unsigned->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_unsigned->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
- return PyLong_FromLong( self->uf0D_unsigned->result );
+ return PyLong_FromLong(self->uf0D_unsigned->result);
}
-/*----------------------UnaryFunction0DUnsigned instance definitions ----------------------------*/
static PyMethodDef BPy_UnaryFunction0DUnsigned_methods[] = {
- {"getName", ( PyCFunction ) UnaryFunction0DUnsigned_getName, METH_NOARGS, UnaryFunction0DUnsigned_getName___doc__},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
index 9c9e2e85568..d8518844d00 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
@@ -100,8 +100,8 @@ static PyObject * UnaryFunction0DVec2f___call__( BPy_UnaryFunction0DVec2f *self,
}
if (self->uf0D_vec2f->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_vec2f->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
index 13f8dd69fa1..2f3c5d0f7e9 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
@@ -94,8 +94,8 @@ static PyObject * UnaryFunction0DVec3f___call__( BPy_UnaryFunction0DVec3f *self,
}
if (self->uf0D_vec3f->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_vec3f->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
index 40564b018d6..688c9851d30 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
@@ -95,8 +95,8 @@ static PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVe
}
if (self->uf0D_vectorviewshape->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_vectorviewshape->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
index 5f3f18453ba..1fbe23a1d6d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
@@ -100,8 +100,8 @@ static PyObject * UnaryFunction0DViewShape___call__( BPy_UnaryFunction0DViewShap
}
if (self->uf0D_viewshape->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) < 0) {
if (!PyErr_Occurred()) {
- string msg(self->uf0D_viewshape->getName() + " __call__ method failed");
- PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ string class_name(Py_TYPE(self)->tp_name);
+ PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
return NULL;
}
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
index 49e8310380a..d1f29d39d85 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
@@ -33,9 +33,11 @@ static char ShapeIdF0D___doc__[] =
" :return: The Id of the Shape the pointed Interface0D belongs to.\n"
" :rtype: :class:`Id`\n";
-static int ShapeIdF0D___init__( BPy_ShapeIdF0D* self, PyObject *args )
+static int ShapeIdF0D___init__(BPy_ShapeIdF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_id.uf0D_id = new Functions0D::ShapeIdF0D();
self->py_uf0D_id.uf0D_id->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
index 85ea137134a..aa3491cd428 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
@@ -37,9 +37,11 @@ static char MaterialF0D___doc__[] =
" Interface0D.\n"
" :rtype: :class:`Material`\n";
-static int MaterialF0D___init__( BPy_MaterialF0D* self, PyObject *args )
+static int MaterialF0D___init__(BPy_MaterialF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_material.uf0D_material = new Functions0D::MaterialF0D();
self->py_uf0D_material.uf0D_material->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
index 0d2023313ca..6e97584c556 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
@@ -28,9 +28,11 @@ static char CurveNatureF0D___doc__[] =
" belongs.\n"
" :rtype: :class:`Nature`\n";
-static int CurveNatureF0D___init__( BPy_CurveNatureF0D* self, PyObject *args )
+static int CurveNatureF0D___init__(BPy_CurveNatureF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_edgenature.uf0D_edgenature = new Functions0D::CurveNatureF0D();
self->py_uf0D_edgenature.uf0D_edgenature->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
index fdec2c324c6..81801c57747 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
@@ -30,9 +30,11 @@ static char Normal2DF0D___doc__[] =
" Interface0D.\n"
" :rtype: :class:`mathutils.Vector`\n";
-static int Normal2DF0D___init__( BPy_Normal2DF0D* self, PyObject *args )
+static int Normal2DF0D___init__(BPy_Normal2DF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_vec2f.uf0D_vec2f = new Functions0D::Normal2DF0D();
self->py_uf0D_vec2f.uf0D_vec2f->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
index f362293e179..27412d3ccf1 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
@@ -30,9 +30,11 @@ static char VertexOrientation2DF0D___doc__[] =
" pointed Interface0D.\n"
" :rtype: :class:`mathutils.Vector`\n";
-static int VertexOrientation2DF0D___init__( BPy_VertexOrientation2DF0D* self, PyObject *args )
+static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_vec2f.uf0D_vec2f = new Functions0D::VertexOrientation2DF0D();
self->py_uf0D_vec2f.uf0D_vec2f->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
index 8cb3e88efe3..1ed509c8b66 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
@@ -30,9 +30,11 @@ static char VertexOrientation3DF0D___doc__[] =
" pointed Interface0D.\n"
" :rtype: :class:`mathutils.Vector`\n";
-static int VertexOrientation3DF0D___init__( BPy_VertexOrientation3DF0D* self, PyObject *args )
+static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_vec3f.uf0D_vec3f = new Functions0D::VertexOrientation3DF0D();
self->py_uf0D_vec3f.uf0D_vec3f->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
index 8bfd2bb2638..3cb32391c7e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
@@ -27,9 +27,11 @@ static char GetOccludeeF0D___doc__[] =
" :return: The ViewShape occluded by the pointed Interface0D.\n"
" :rtype: :class:`ViewShape`\n";
-static int GetOccludeeF0D___init__( BPy_GetOccludeeF0D* self, PyObject *args )
+static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_viewshape.uf0D_viewshape = new Functions0D::GetOccludeeF0D();
self->py_uf0D_viewshape.uf0D_viewshape->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
index 3cc931edec5..7b74669302c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
@@ -27,9 +27,11 @@ static char GetShapeF0D___doc__[] =
" :return: The ViewShape containing the pointed Interface0D.\n"
" :rtype: :class:`ViewShape`\n";
-static int GetShapeF0D___init__( BPy_GetShapeF0D* self, PyObject *args )
+static int GetShapeF0D___init__(BPy_GetShapeF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_viewshape.uf0D_viewshape = new Functions0D::GetShapeF0D();
self->py_uf0D_viewshape.uf0D_viewshape->py_uf0D = (PyObject *)self;
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 e28b1ca138a..1e2e78852cf 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
@@ -30,9 +30,11 @@ static char Curvature2DAngleF0D___doc__[] =
" pointed Interface0D.\n"
" :rtype: float\n";
-static int Curvature2DAngleF0D___init__( BPy_Curvature2DAngleF0D* self, PyObject *args )
+static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::Curvature2DAngleF0D();
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 64c2d453552..213dc77446f 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
@@ -35,11 +35,12 @@ static char DensityF0D___doc__[] =
" Interface0D.\n"
" :rtype: float\n";
-static int DensityF0D___init__( BPy_DensityF0D* self, PyObject *args)
+static int DensityF0D___init__(BPy_DensityF0D* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"sigma", NULL};
double d = 2;
- if( !PyArg_ParseTuple(args, "|d", &d) )
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|d", (char **)kwlist, &d))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::DensityF0D(d);
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 e539ca10dc8..99c9f43eecb 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
@@ -27,9 +27,11 @@ static char GetProjectedXF0D___doc__[] =
" :return: The X 3D projected coordinate of the pointed Interface0D.\n"
" :rtype: float\n";
-static int GetProjectedXF0D___init__( BPy_GetProjectedXF0D* self, PyObject *args )
+static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedXF0D();
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 4e1fbbd699c..da328a79ab9 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
@@ -27,9 +27,11 @@ static char GetProjectedYF0D___doc__[] =
" :return: The Y 3D projected coordinate of the pointed Interface0D.\n"
" :rtype: float\n";
-static int GetProjectedYF0D___init__( BPy_GetProjectedYF0D* self, PyObject *args )
+static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedYF0D();
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 73a68b8f6a8..9c761a58e38 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
@@ -27,9 +27,11 @@ static char GetProjectedZF0D___doc__[] =
" :return: The Z 3D projected coordinate of the pointed Interface0D.\n"
" :rtype: float\n";
-static int GetProjectedZF0D___init__( BPy_GetProjectedZF0D* self, PyObject *args )
+static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedZF0D();
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 099977e35eb..fb2c8be6a9a 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
@@ -27,9 +27,11 @@ static char GetXF0D___doc__[] =
" :return: The X 3D coordinate of the pointed Interface0D.\n"
" :rtype: float\n";
-static int GetXF0D___init__( BPy_GetXF0D* self, PyObject *args )
+static int GetXF0D___init__(BPy_GetXF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::GetXF0D();
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 7640dafef6f..97882fc51e2 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
@@ -27,9 +27,11 @@ static char GetYF0D___doc__[] =
" :return: The Y 3D coordinate of the pointed Interface0D.\n"
" :rtype: float\n";
-static int GetYF0D___init__( BPy_GetYF0D* self, PyObject *args )
+static int GetYF0D___init__(BPy_GetYF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::GetYF0D();
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 01932c2b4ed..58eea1d5240 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
@@ -27,9 +27,11 @@ static char GetZF0D___doc__[] =
" :return: The Z 3D coordinate of the pointed Interface0D.\n"
" :rtype: float\n";
-static int GetZF0D___init__( BPy_GetZF0D* self, PyObject *args )
+static int GetZF0D___init__(BPy_GetZF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::GetZF0D();
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 f268fdf7003..0c4c4135b7c 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
@@ -13,12 +13,12 @@ extern "C" {
static char LocalAverageDepthF0D___doc__[] =
"Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DDouble` > :class:`LocalAverageDepthF0D`\n"
"\n"
-".. method:: __init__(maskSize=5.0)\n"
+".. method:: __init__(mask_size=5.0)\n"
"\n"
" Builds a LocalAverageDepthF0D object.\n"
"\n"
-" :arg maskSize: The size of the mask.\n"
-" :type maskSize: float\n"
+" :arg mask_size: The size of the mask.\n"
+" :type mask_size: float\n"
"\n"
".. method:: __call__(it)\n"
"\n"
@@ -31,11 +31,12 @@ static char LocalAverageDepthF0D___doc__[] =
" :return: The average depth around the pointed Interface0D.\n"
" :rtype: float\n";
-static int LocalAverageDepthF0D___init__( BPy_LocalAverageDepthF0D* self, PyObject *args)
+static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"mask_size", NULL};
double d = 5.0;
- if( !PyArg_ParseTuple(args, "|d", &d) )
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|d", (char **)kwlist, &d))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::LocalAverageDepthF0D(d);
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
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 20e2ab31bda..599ba5ee76b 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
@@ -32,9 +32,11 @@ static char ZDiscontinuityF0D___doc__[] =
" and the occludee.\n"
" :rtype: float\n";
-static int ZDiscontinuityF0D___init__( BPy_ZDiscontinuityF0D* self, PyObject *args )
+static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_double.uf0D_double = new Functions0D::ZDiscontinuityF0D();
self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
index 4aaceb3559a..5e37c81306c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
@@ -28,9 +28,11 @@ static char GetCurvilinearAbscissaF0D___doc__[] =
" :return: The curvilinear abscissa of the pointed Interface0D.\n"
" :rtype: float\n";
-static int GetCurvilinearAbscissaF0D___init__( BPy_GetCurvilinearAbscissaF0D* self, PyObject *args )
+static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_float.uf0D_float = new Functions0D::GetCurvilinearAbscissaF0D();
self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
index aeea47deffc..54aba274936 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
@@ -27,9 +27,11 @@ static char GetParameterF0D___doc__[] =
" :return: The parameter of an Interface0D.\n"
" :rtype: float\n";
-static int GetParameterF0D___init__( BPy_GetParameterF0D* self, PyObject *args )
+static int GetParameterF0D___init__(BPy_GetParameterF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_float.uf0D_float = new Functions0D::GetParameterF0D();
self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
index bac65716ba9..29c1373870e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
@@ -32,11 +32,12 @@ static char GetViewMapGradientNormF0D___doc__[] =
" image.\n"
" :rtype: float\n";
-static int GetViewMapGradientNormF0D___init__( BPy_GetViewMapGradientNormF0D* self, PyObject *args)
+static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"level", NULL};
int i;
- if( !PyArg_ParseTuple(args, "i", &i) )
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i))
return -1;
self->py_uf0D_float.uf0D_float = new Functions0D::GetViewMapGradientNormF0D(i);
self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
index 6a40266cf7b..3c9b9b52253 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
@@ -30,11 +30,12 @@ static char ReadCompleteViewMapPixelF0D___doc__[] =
" :return: A pixel in one of the level of the complete viewmap.\n"
" :rtype: float\n";
-static int ReadCompleteViewMapPixelF0D___init__( BPy_ReadCompleteViewMapPixelF0D* self, PyObject *args)
+static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"level", NULL};
int i;
- if( !PyArg_ParseTuple(args, "i", &i) )
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i))
return -1;
self->py_uf0D_float.uf0D_float = new Functions0D::ReadCompleteViewMapPixelF0D(i);
self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
index 74cf688507e..189a7c525c7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
@@ -13,12 +13,12 @@ extern "C" {
static char ReadMapPixelF0D___doc__[] =
"Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DFloat` > :class:`ReadMapPixelF0D`\n"
"\n"
-".. method:: __init__(iMapName, level)\n"
+".. method:: __init__(map_name, level)\n"
"\n"
" Builds a ReadMapPixelF0D object.\n"
"\n"
-" :arg iMapName: The name of the map to be read.\n"
-" :type iMapName: str\n"
+" :arg map_name: The name of the map to be read.\n"
+" :type map_name: str\n"
" :arg level: The level of the pyramid from which the pixel must be\n"
" read.\n"
" :type level: int\n"
@@ -32,12 +32,13 @@ static char ReadMapPixelF0D___doc__[] =
" :return: A pixel in a map.\n"
" :rtype: float\n";
-static int ReadMapPixelF0D___init__( BPy_ReadMapPixelF0D* self, PyObject *args)
+static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"map_name", "level", NULL};
const char *s;
int i;
- if( !PyArg_ParseTuple(args, "si", &s, &i) )
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "si", (char **)kwlist, &s, &i))
return -1;
self->py_uf0D_float.uf0D_float = new Functions0D::ReadMapPixelF0D(s,i);
self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
index db0145e3e2a..f42a65e4bf7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
@@ -13,13 +13,13 @@ extern "C" {
static char ReadSteerableViewMapPixelF0D___doc__[] =
"Class hierarchy: :class:`UnaryFunction0D` > :class:`UnaryFunction0DFloat` > :class:`ReadSteerableViewMapPixelF0D`\n"
"\n"
-".. method:: __init__(nOrientation, level)\n"
+".. method:: __init__(orientation, level)\n"
"\n"
" Builds a ReadSteerableViewMapPixelF0D object.\n"
"\n"
-" :arg nOrientation: The integer belonging to [0, 4] indicating the\n"
+" :arg orientation: The integer belonging to [0, 4] indicating the\n"
" orientation (E, NE, N, NW) we are interested in.\n"
-" :type nOrientation: int\n"
+" :type orientation: int\n"
" :arg level: The level of the pyramid from which the pixel must be\n"
" read.\n"
" :type level: int\n"
@@ -33,12 +33,13 @@ static char ReadSteerableViewMapPixelF0D___doc__[] =
" :return: A pixel in one of the level of one of the steerable viewmaps.\n"
" :rtype: float\n";
-static int ReadSteerableViewMapPixelF0D___init__( BPy_ReadSteerableViewMapPixelF0D* self, PyObject *args)
+static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0D* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"orientation", "level", NULL};
unsigned int u;
int i;
- if( !PyArg_ParseTuple(args, "Ii", &u, &i) )
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "Ii", (char **)kwlist, &u, &i))
return -1;
self->py_uf0D_float.uf0D_float = new Functions0D::ReadSteerableViewMapPixelF0D(u,i);
self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
index e993a99c1d8..80e05d1010b 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
@@ -33,9 +33,11 @@ static char QuantitativeInvisibilityF0D___doc__[] =
" :return: The quantitative invisibility of the pointed Interface0D.\n"
" :rtype: int\n";
-static int QuantitativeInvisibilityF0D___init__( BPy_QuantitativeInvisibilityF0D* self, PyObject *args )
+static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_unsigned.uf0D_unsigned = new Functions0D::QuantitativeInvisibilityF0D();
self->py_uf0D_unsigned.uf0D_unsigned->py_uf0D = (PyObject *)self;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
index 50686ce92f9..9b232c77ec9 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
@@ -28,9 +28,11 @@ static char GetOccludersF0D___doc__[] =
" Interface0D.\n"
" :rtype: list of :class:`ViewShape` objects\n";
-static int GetOccludersF0D___init__( BPy_GetOccludersF0D* self, PyObject *args )
+static int GetOccludersF0D___init__(BPy_GetOccludersF0D* self, PyObject *args, PyObject *kwds)
{
- if( !PyArg_ParseTuple(args, "") )
+ static const char *kwlist[] = {NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
return -1;
self->py_uf0D_vectorviewshape.uf0D_vectorviewshape = new Functions0D::GetOccludersF0D();
self->py_uf0D_vectorviewshape.uf0D_vectorviewshape->py_uf0D = (PyObject *)self;