diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction1D')
33 files changed, 194 insertions, 97 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index 84aa10098ee..bed2d5d578a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -49,86 +49,102 @@ extern "C" { int UnaryFunction1DDouble_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&UnaryFunction1DDouble_Type) < 0) + if (PyType_Ready(&UnaryFunction1DDouble_Type) < 0) { return -1; + } Py_INCREF(&UnaryFunction1DDouble_Type); PyModule_AddObject(module, "UnaryFunction1DDouble", (PyObject *)&UnaryFunction1DDouble_Type); - if (PyType_Ready(&DensityF1D_Type) < 0) + if (PyType_Ready(&DensityF1D_Type) < 0) { return -1; + } Py_INCREF(&DensityF1D_Type); PyModule_AddObject(module, "DensityF1D", (PyObject *)&DensityF1D_Type); - if (PyType_Ready(&Curvature2DAngleF1D_Type) < 0) + if (PyType_Ready(&Curvature2DAngleF1D_Type) < 0) { return -1; + } Py_INCREF(&Curvature2DAngleF1D_Type); PyModule_AddObject(module, "Curvature2DAngleF1D", (PyObject *)&Curvature2DAngleF1D_Type); - if (PyType_Ready(&GetCompleteViewMapDensityF1D_Type) < 0) + if (PyType_Ready(&GetCompleteViewMapDensityF1D_Type) < 0) { return -1; + } Py_INCREF(&GetCompleteViewMapDensityF1D_Type); PyModule_AddObject( module, "GetCompleteViewMapDensityF1D", (PyObject *)&GetCompleteViewMapDensityF1D_Type); - if (PyType_Ready(&GetDirectionalViewMapDensityF1D_Type) < 0) + if (PyType_Ready(&GetDirectionalViewMapDensityF1D_Type) < 0) { return -1; + } Py_INCREF(&GetDirectionalViewMapDensityF1D_Type); PyModule_AddObject(module, "GetDirectionalViewMapDensityF1D", (PyObject *)&GetDirectionalViewMapDensityF1D_Type); - if (PyType_Ready(&GetProjectedXF1D_Type) < 0) + if (PyType_Ready(&GetProjectedXF1D_Type) < 0) { return -1; + } Py_INCREF(&GetProjectedXF1D_Type); PyModule_AddObject(module, "GetProjectedXF1D", (PyObject *)&GetProjectedXF1D_Type); - if (PyType_Ready(&GetProjectedYF1D_Type) < 0) + if (PyType_Ready(&GetProjectedYF1D_Type) < 0) { return -1; + } Py_INCREF(&GetProjectedYF1D_Type); PyModule_AddObject(module, "GetProjectedYF1D", (PyObject *)&GetProjectedYF1D_Type); - if (PyType_Ready(&GetProjectedZF1D_Type) < 0) + if (PyType_Ready(&GetProjectedZF1D_Type) < 0) { return -1; + } Py_INCREF(&GetProjectedZF1D_Type); PyModule_AddObject(module, "GetProjectedZF1D", (PyObject *)&GetProjectedZF1D_Type); - if (PyType_Ready(&GetSteerableViewMapDensityF1D_Type) < 0) + if (PyType_Ready(&GetSteerableViewMapDensityF1D_Type) < 0) { return -1; + } Py_INCREF(&GetSteerableViewMapDensityF1D_Type); PyModule_AddObject( module, "GetSteerableViewMapDensityF1D", (PyObject *)&GetSteerableViewMapDensityF1D_Type); - if (PyType_Ready(&GetViewMapGradientNormF1D_Type) < 0) + if (PyType_Ready(&GetViewMapGradientNormF1D_Type) < 0) { return -1; + } Py_INCREF(&GetViewMapGradientNormF1D_Type); PyModule_AddObject( module, "GetViewMapGradientNormF1D", (PyObject *)&GetViewMapGradientNormF1D_Type); - if (PyType_Ready(&GetXF1D_Type) < 0) + if (PyType_Ready(&GetXF1D_Type) < 0) { return -1; + } Py_INCREF(&GetXF1D_Type); PyModule_AddObject(module, "GetXF1D", (PyObject *)&GetXF1D_Type); - if (PyType_Ready(&GetYF1D_Type) < 0) + if (PyType_Ready(&GetYF1D_Type) < 0) { return -1; + } Py_INCREF(&GetYF1D_Type); PyModule_AddObject(module, "GetYF1D", (PyObject *)&GetYF1D_Type); - if (PyType_Ready(&GetZF1D_Type) < 0) + if (PyType_Ready(&GetZF1D_Type) < 0) { return -1; + } Py_INCREF(&GetZF1D_Type); PyModule_AddObject(module, "GetZF1D", (PyObject *)&GetZF1D_Type); - if (PyType_Ready(&LocalAverageDepthF1D_Type) < 0) + if (PyType_Ready(&LocalAverageDepthF1D_Type) < 0) { return -1; + } Py_INCREF(&LocalAverageDepthF1D_Type); PyModule_AddObject(module, "LocalAverageDepthF1D", (PyObject *)&LocalAverageDepthF1D_Type); - if (PyType_Ready(&ZDiscontinuityF1D_Type) < 0) + if (PyType_Ready(&ZDiscontinuityF1D_Type) < 0) { return -1; + } Py_INCREF(&ZDiscontinuityF1D_Type); PyModule_AddObject(module, "ZDiscontinuityF1D", (PyObject *)&ZDiscontinuityF1D_Type); @@ -163,11 +179,13 @@ static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } - if (!obj) + if (!obj) { self->uf1D_double = new UnaryFunction1D<double>(); + } else { self->uf1D_double = new UnaryFunction1D<double>(IntegrationType_from_BPy_IntegrationType(obj)); } @@ -179,8 +197,9 @@ static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self, static void UnaryFunction1DDouble___dealloc__(BPy_UnaryFunction1DDouble *self) { - if (self->uf1D_double) + if (self->uf1D_double) { delete self->uf1D_double; + } UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } @@ -196,8 +215,9 @@ static PyObject *UnaryFunction1DDouble___call__(BPy_UnaryFunction1DDouble *self, static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) { return NULL; + } if (typeid(*(self->uf1D_double)) == typeid(UnaryFunction1D<double>)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index 262fdbc68c6..e122454c00d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -36,17 +36,20 @@ extern "C" { int UnaryFunction1DEdgeNature_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&UnaryFunction1DEdgeNature_Type) < 0) + if (PyType_Ready(&UnaryFunction1DEdgeNature_Type) < 0) { return -1; + } Py_INCREF(&UnaryFunction1DEdgeNature_Type); PyModule_AddObject( module, "UnaryFunction1DEdgeNature", (PyObject *)&UnaryFunction1DEdgeNature_Type); - if (PyType_Ready(&CurveNatureF1D_Type) < 0) + if (PyType_Ready(&CurveNatureF1D_Type) < 0) { return -1; + } Py_INCREF(&CurveNatureF1D_Type); PyModule_AddObject(module, "CurveNatureF1D", (PyObject *)&CurveNatureF1D_Type); @@ -81,11 +84,13 @@ static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *sel PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } - if (!obj) + if (!obj) { self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>(); + } else { self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>( IntegrationType_from_BPy_IntegrationType(obj)); @@ -98,8 +103,9 @@ static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *sel static void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature *self) { - if (self->uf1D_edgenature) + if (self->uf1D_edgenature) { delete self->uf1D_edgenature; + } UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } @@ -116,8 +122,9 @@ static PyObject *UnaryFunction1DEdgeNature___call__(BPy_UnaryFunction1DEdgeNatur static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) { return NULL; + } if (typeid(*(self->uf1D_edgenature)) == typeid(UnaryFunction1D<Nature::EdgeNature>)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index fcd670ea1e7..95d49612672 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -34,11 +34,13 @@ extern "C" { int UnaryFunction1DFloat_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&UnaryFunction1DFloat_Type) < 0) + if (PyType_Ready(&UnaryFunction1DFloat_Type) < 0) { return -1; + } Py_INCREF(&UnaryFunction1DFloat_Type); PyModule_AddObject(module, "UnaryFunction1DFloat", (PyObject *)&UnaryFunction1DFloat_Type); @@ -73,11 +75,13 @@ static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } - if (!obj) + if (!obj) { self->uf1D_float = new UnaryFunction1D<float>(); + } else { self->uf1D_float = new UnaryFunction1D<float>(IntegrationType_from_BPy_IntegrationType(obj)); } @@ -89,8 +93,9 @@ static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self, static void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat *self) { - if (self->uf1D_float) + if (self->uf1D_float) { delete self->uf1D_float; + } UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } @@ -106,8 +111,9 @@ static PyObject *UnaryFunction1DFloat___call__(BPy_UnaryFunction1DFloat *self, static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) { return NULL; + } if (typeid(*(self->uf1D_float)) == typeid(UnaryFunction1D<float>)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index 37d37db51e4..851fc45d583 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -36,16 +36,19 @@ extern "C" { int UnaryFunction1DUnsigned_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&UnaryFunction1DUnsigned_Type) < 0) + if (PyType_Ready(&UnaryFunction1DUnsigned_Type) < 0) { return -1; + } Py_INCREF(&UnaryFunction1DUnsigned_Type); PyModule_AddObject(module, "UnaryFunction1DUnsigned", (PyObject *)&UnaryFunction1DUnsigned_Type); - if (PyType_Ready(&QuantitativeInvisibilityF1D_Type) < 0) + if (PyType_Ready(&QuantitativeInvisibilityF1D_Type) < 0) { return -1; + } Py_INCREF(&QuantitativeInvisibilityF1D_Type); PyModule_AddObject( module, "QuantitativeInvisibilityF1D", (PyObject *)&QuantitativeInvisibilityF1D_Type); @@ -81,11 +84,13 @@ static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } - if (!obj) + if (!obj) { self->uf1D_unsigned = new UnaryFunction1D<unsigned int>(); + } else { self->uf1D_unsigned = new UnaryFunction1D<unsigned int>( IntegrationType_from_BPy_IntegrationType(obj)); @@ -98,8 +103,9 @@ static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self, static void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned *self) { - if (self->uf1D_unsigned) + if (self->uf1D_unsigned) { delete self->uf1D_unsigned; + } UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } @@ -116,8 +122,9 @@ static PyObject *UnaryFunction1DUnsigned___call__(BPy_UnaryFunction1DUnsigned *s static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) { return NULL; + } if (typeid(*(self->uf1D_unsigned)) == typeid(UnaryFunction1D<unsigned int>)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index d41f035af3f..75225fd6381 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -37,21 +37,25 @@ extern "C" { int UnaryFunction1DVec2f_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&UnaryFunction1DVec2f_Type) < 0) + if (PyType_Ready(&UnaryFunction1DVec2f_Type) < 0) { return -1; + } Py_INCREF(&UnaryFunction1DVec2f_Type); PyModule_AddObject(module, "UnaryFunction1DVec2f", (PyObject *)&UnaryFunction1DVec2f_Type); - if (PyType_Ready(&Normal2DF1D_Type) < 0) + if (PyType_Ready(&Normal2DF1D_Type) < 0) { return -1; + } Py_INCREF(&Normal2DF1D_Type); PyModule_AddObject(module, "Normal2DF1D", (PyObject *)&Normal2DF1D_Type); - if (PyType_Ready(&Orientation2DF1D_Type) < 0) + if (PyType_Ready(&Orientation2DF1D_Type) < 0) { return -1; + } Py_INCREF(&Orientation2DF1D_Type); PyModule_AddObject(module, "Orientation2DF1D", (PyObject *)&Orientation2DF1D_Type); @@ -86,11 +90,13 @@ static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } - if (!obj) + if (!obj) { self->uf1D_vec2f = new UnaryFunction1D<Vec2f>(); + } else { self->uf1D_vec2f = new UnaryFunction1D<Vec2f>(IntegrationType_from_BPy_IntegrationType(obj)); } @@ -102,8 +108,9 @@ static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self, static void UnaryFunction1DVec2f___dealloc__(BPy_UnaryFunction1DVec2f *self) { - if (self->uf1D_vec2f) + if (self->uf1D_vec2f) { delete self->uf1D_vec2f; + } UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } @@ -119,8 +126,9 @@ static PyObject *UnaryFunction1DVec2f___call__(BPy_UnaryFunction1DVec2f *self, static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) { return NULL; + } if (typeid(*(self->uf1D_vec2f)) == typeid(UnaryFunction1D<Vec2f>)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index 61b393cd732..a2767e826ab 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -36,16 +36,19 @@ extern "C" { int UnaryFunction1DVec3f_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&UnaryFunction1DVec3f_Type) < 0) + if (PyType_Ready(&UnaryFunction1DVec3f_Type) < 0) { return -1; + } Py_INCREF(&UnaryFunction1DVec3f_Type); PyModule_AddObject(module, "UnaryFunction1DVec3f", (PyObject *)&UnaryFunction1DVec3f_Type); - if (PyType_Ready(&Orientation3DF1D_Type) < 0) + if (PyType_Ready(&Orientation3DF1D_Type) < 0) { return -1; + } Py_INCREF(&Orientation3DF1D_Type); PyModule_AddObject(module, "Orientation3DF1D", (PyObject *)&Orientation3DF1D_Type); @@ -80,11 +83,13 @@ static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } - if (!obj) + if (!obj) { self->uf1D_vec3f = new UnaryFunction1D<Vec3f>(); + } else { self->uf1D_vec3f = new UnaryFunction1D<Vec3f>(IntegrationType_from_BPy_IntegrationType(obj)); } @@ -96,8 +101,9 @@ static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self, static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f *self) { - if (self->uf1D_vec3f) + if (self->uf1D_vec3f) { delete self->uf1D_vec3f; + } UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } @@ -113,8 +119,9 @@ static PyObject *UnaryFunction1DVec3f___call__(BPy_UnaryFunction1DVec3f *self, static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) { return NULL; + } if (typeid(*(self->uf1D_vec3f)) == typeid(UnaryFunction1D<Vec3f>)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index eb4974e64fe..0739f327f55 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -38,27 +38,32 @@ extern "C" { int UnaryFunction1DVectorViewShape_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&UnaryFunction1DVectorViewShape_Type) < 0) + if (PyType_Ready(&UnaryFunction1DVectorViewShape_Type) < 0) { return -1; + } Py_INCREF(&UnaryFunction1DVectorViewShape_Type); PyModule_AddObject( module, "UnaryFunction1DVectorViewShape", (PyObject *)&UnaryFunction1DVectorViewShape_Type); - if (PyType_Ready(&GetOccludeeF1D_Type) < 0) + if (PyType_Ready(&GetOccludeeF1D_Type) < 0) { return -1; + } Py_INCREF(&GetOccludeeF1D_Type); PyModule_AddObject(module, "GetOccludeeF1D", (PyObject *)&GetOccludeeF1D_Type); - if (PyType_Ready(&GetOccludersF1D_Type) < 0) + if (PyType_Ready(&GetOccludersF1D_Type) < 0) { return -1; + } Py_INCREF(&GetOccludersF1D_Type); PyModule_AddObject(module, "GetOccludersF1D", (PyObject *)&GetOccludersF1D_Type); - if (PyType_Ready(&GetShapeF1D_Type) < 0) + if (PyType_Ready(&GetShapeF1D_Type) < 0) { return -1; + } Py_INCREF(&GetShapeF1D_Type); PyModule_AddObject(module, "GetShapeF1D", (PyObject *)&GetShapeF1D_Type); @@ -94,8 +99,9 @@ static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorView PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } if (!obj) { self->uf1D_vectorviewshape = new UnaryFunction1D<std::vector<ViewShape *>>(); @@ -112,8 +118,9 @@ static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorView static void UnaryFunction1DVectorViewShape___dealloc__(BPy_UnaryFunction1DVectorViewShape *self) { - if (self->uf1D_vectorviewshape) + if (self->uf1D_vectorviewshape) { delete self->uf1D_vectorviewshape; + } UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } @@ -130,8 +137,9 @@ static PyObject *UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVect static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) { return NULL; + } if (typeid(*(self->uf1D_vectorviewshape)) == typeid(UnaryFunction1D<std::vector<ViewShape *>>)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index c9009dc6889..ca1e35f66bd 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -38,27 +38,32 @@ extern "C" { int UnaryFunction1DVoid_Init(PyObject *module) { - if (module == NULL) + if (module == NULL) { return -1; + } - if (PyType_Ready(&UnaryFunction1DVoid_Type) < 0) + if (PyType_Ready(&UnaryFunction1DVoid_Type) < 0) { return -1; + } Py_INCREF(&UnaryFunction1DVoid_Type); PyModule_AddObject(module, "UnaryFunction1DVoid", (PyObject *)&UnaryFunction1DVoid_Type); - if (PyType_Ready(&ChainingTimeStampF1D_Type) < 0) + if (PyType_Ready(&ChainingTimeStampF1D_Type) < 0) { return -1; + } Py_INCREF(&ChainingTimeStampF1D_Type); PyModule_AddObject(module, "ChainingTimeStampF1D", (PyObject *)&ChainingTimeStampF1D_Type); - if (PyType_Ready(&IncrementChainingTimeStampF1D_Type) < 0) + if (PyType_Ready(&IncrementChainingTimeStampF1D_Type) < 0) { return -1; + } Py_INCREF(&IncrementChainingTimeStampF1D_Type); PyModule_AddObject( module, "IncrementChainingTimeStampF1D", (PyObject *)&IncrementChainingTimeStampF1D_Type); - if (PyType_Ready(&TimeStampF1D_Type) < 0) + if (PyType_Ready(&TimeStampF1D_Type) < 0) { return -1; + } Py_INCREF(&TimeStampF1D_Type); PyModule_AddObject(module, "TimeStampF1D", (PyObject *)&TimeStampF1D_Type); @@ -93,11 +98,13 @@ static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } - if (!obj) + if (!obj) { self->uf1D_void = new UnaryFunction1D_void(); + } else { self->uf1D_void = new UnaryFunction1D_void(IntegrationType_from_BPy_IntegrationType(obj)); } @@ -109,8 +116,9 @@ static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, static void UnaryFunction1DVoid___dealloc__(BPy_UnaryFunction1DVoid *self) { - if (self->uf1D_void) + if (self->uf1D_void) { delete self->uf1D_void; + } UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } @@ -126,8 +134,9 @@ static PyObject *UnaryFunction1DVoid___call__(BPy_UnaryFunction1DVoid *self, static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) { return NULL; + } if (typeid(*(self->uf1D_void)) == typeid(UnaryFunction1D_void)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp index 248f1cc0ca1..2504a09016c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp @@ -65,8 +65,9 @@ static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyO PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp index 530f76ee706..f1cdd6a0cb8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp @@ -59,8 +59,9 @@ static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Normal2DF1D(t); return 0; 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 6449ab95611..27d6c509348 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 @@ -59,8 +59,9 @@ static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Orientation2DF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp index adfe7b0961b..1a2d9c5e745 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp @@ -59,8 +59,9 @@ static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_vec3f.uf1D_vec3f = new Functions1D::Orientation3DF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp index d1e893a1550..4d0e1a66f56 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp @@ -61,8 +61,9 @@ static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::Curvature2DAngleF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp index 6218eed5b70..b96406de066 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp @@ -73,8 +73,9 @@ static int DensityF1D___init__(BPy_DensityF1D *self, PyObject *args, PyObject *k float f = 2.0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|dO!f", (char **)kwlist, &d, &IntegrationType_Type, &obj, &f)) + args, kwds, "|dO!f", (char **)kwlist, &d, &IntegrationType_Type, &obj, &f)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::DensityF1D(d, t, f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp index 4b2f444f719..9f16f53e833 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp @@ -77,8 +77,9 @@ static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1 float f = 2.0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f)) + args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetCompleteViewMapDensityF1D(i, t, f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp index 8b31c31a4a4..8cea26338df 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp @@ -83,8 +83,9 @@ static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDen float f = 2.0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "II|O!f", (char **)kwlist, &u1, &u2, &IntegrationType_Type, &obj, &f)) + args, kwds, "II|O!f", (char **)kwlist, &u1, &u2, &IntegrationType_Type, &obj, &f)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetDirectionalViewMapDensityF1D( u1, u2, t, f); diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp index bbd6dfd2701..5f47fb03f8b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp @@ -59,8 +59,9 @@ static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedXF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp index 8cfd958ba29..b6e1c2d336e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp @@ -59,8 +59,9 @@ static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedYF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp index e5bd864fcfd..dfe7cd82710 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp @@ -59,8 +59,9 @@ static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args, PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedZF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp index 615faed2282..a1ed9d15d5e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp @@ -74,8 +74,9 @@ static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensity float f = 2.0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f)) + args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetSteerableViewMapDensityF1D(i, t, f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp index 7e77e79af63..268d140749d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp @@ -74,8 +74,9 @@ static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *sel float f = 2.0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f)) + args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetViewMapGradientNormF1D(i, t, f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp index 6a5e999ecf3..5a0b7d6aa55 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp @@ -59,8 +59,9 @@ static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds) PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetXF1D(t); return 0; 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 b7a1e2a3072..9b523126841 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 @@ -59,8 +59,9 @@ static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds) PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetYF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp index db42bdcc3eb..73407affd8d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp @@ -59,8 +59,9 @@ static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds) PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetZF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp index 8e139f5a627..aef67aab928 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp @@ -69,8 +69,9 @@ static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self, double d; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "d|O!", (char **)kwlist, &d, &IntegrationType_Type, &obj)) + args, kwds, "d|O!", (char **)kwlist, &d, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::LocalAverageDepthF1D(d, t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp index 1f5b262f71a..cf2162c30ad 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp @@ -63,8 +63,9 @@ static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *arg PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::ZDiscontinuityF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp index bce95e50048..f843ff52d06 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp @@ -65,8 +65,9 @@ static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D PyObject *obj = 0; if (!PyArg_ParseTupleAndKeywords( - args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) + args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) { return -1; + } IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_unsigned.uf1D_unsigned = new Functions1D::QuantitativeInvisibilityF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp index 0d7944de788..f56d89c469a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp @@ -53,8 +53,9 @@ static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D *self, PyObject *args, PyO { static const char *kwlist[] = {NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) { return -1; + } self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludeeF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp index 38651154ce7..3ff4d36bc19 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp @@ -53,8 +53,9 @@ static int GetOccludersF1D___init__(BPy_GetOccludersF1D *self, PyObject *args, P { static const char *kwlist[] = {NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) { return -1; + } self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludersF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp index 537e57c7106..08122b76385 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp @@ -53,8 +53,9 @@ static int GetShapeF1D___init__(BPy_GetShapeF1D *self, PyObject *args, PyObject { static const char *kwlist[] = {NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) { return -1; + } self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetShapeF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp index da9d3301e5f..4be8f239fd6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp @@ -53,8 +53,9 @@ static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self, { static const char *kwlist[] = {NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) { return -1; + } self->py_uf1D_void.uf1D_void = new Functions1D::ChainingTimeStampF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp index 04d724b7862..bca4ebb4236 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp @@ -53,8 +53,9 @@ static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStamp { static const char *kwlist[] = {NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) { return -1; + } self->py_uf1D_void.uf1D_void = new Functions1D::IncrementChainingTimeStampF1D(); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp index eb53bca5874..e2d0c7d1308 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp @@ -51,8 +51,9 @@ static int TimeStampF1D___init__(BPy_TimeStampF1D *self, PyObject *args, PyObjec { static const char *kwlist[] = {NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) { return -1; + } self->py_uf1D_void.uf1D_void = new Functions1D::TimeStampF1D(); return 0; } |