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:
authorCampbell Barton <ideasman42@gmail.com>2019-05-31 15:51:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-31 15:55:15 +0300
commitd8dbd49a2f23b7637f05fc058f39bdf6ab706624 (patch)
tree0805b9372c82ae6505d87e879824efe1d3e32f8e /source/blender/freestyle/intern/python
parent8987f7987d8160e1f6e79e8c85d6ce65b885ab25 (diff)
Cleanup: style, use braces in source/
Automated using clang-tidy.
Diffstat (limited to 'source/blender/freestyle/intern/python')
-rw-r--r--source/blender/freestyle/intern/python/BPy_BBox.cpp9
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp12
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp27
-rw-r--r--source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp22
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.cpp111
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp66
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp9
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsNoise.cpp30
-rw-r--r--source/blender/freestyle/intern/python/BPy_Id.cpp6
-rw-r--r--source/blender/freestyle/intern/python/BPy_IntegrationType.cpp9
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface0D.cpp61
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.cpp48
-rw-r--r--source/blender/freestyle/intern/python/BPy_Iterator.cpp42
-rw-r--r--source/blender/freestyle/intern/python/BPy_MediumType.cpp6
-rw-r--r--source/blender/freestyle/intern/python/BPy_Nature.cpp12
-rw-r--r--source/blender/freestyle/intern/python/BPy_Operators.cpp54
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.cpp24
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp45
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeShader.cpp69
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp6
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp21
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp46
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewMap.cpp24
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewShape.cpp21
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/Director.cpp69
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp15
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp21
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp6
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp9
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp12
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp21
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp27
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp12
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp28
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp51
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp6
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp21
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp15
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp6
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp3
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp3
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp15
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp6
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp6
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp9
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp9
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp12
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp6
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp45
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp18
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp33
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp18
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp18
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp18
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp21
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp18
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp18
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp21
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp21
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp18
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp21
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp24
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp21
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp24
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp27
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp3
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp3
150 files changed, 1246 insertions, 621 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp
index 1f26cb51e01..17a0e53876e 100644
--- a/source/blender/freestyle/intern/python/BPy_BBox.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp
@@ -29,11 +29,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int BBox_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&BBox_Type) < 0)
+ if (PyType_Ready(&BBox_Type) < 0) {
return -1;
+ }
Py_INCREF(&BBox_Type);
PyModule_AddObject(module, "BBox", (PyObject *)&BBox_Type);
@@ -53,8 +55,9 @@ static int BBox_init(BPy_BBox *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->bb = new BBox<Vec3r>();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
index 6d3c91ed347..ee207e06b35 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
@@ -32,11 +32,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int BinaryPredicate0D_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&BinaryPredicate0D_Type) < 0)
+ if (PyType_Ready(&BinaryPredicate0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&BinaryPredicate0D_Type);
PyModule_AddObject(module, "BinaryPredicate0D", (PyObject *)&BinaryPredicate0D_Type);
@@ -72,8 +74,9 @@ static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *arg
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->bp0D = new BinaryPredicate0D();
self->bp0D->py_bp0D = (PyObject *)self;
return 0;
@@ -81,8 +84,9 @@ static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *arg
static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D *self)
{
- if (self->bp0D)
+ if (self->bp0D) {
delete self->bp0D;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
index 5b3f3945549..647b5522d35 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
@@ -38,36 +38,43 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int BinaryPredicate1D_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&BinaryPredicate1D_Type) < 0)
+ if (PyType_Ready(&BinaryPredicate1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&BinaryPredicate1D_Type);
PyModule_AddObject(module, "BinaryPredicate1D", (PyObject *)&BinaryPredicate1D_Type);
- if (PyType_Ready(&FalseBP1D_Type) < 0)
+ if (PyType_Ready(&FalseBP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&FalseBP1D_Type);
PyModule_AddObject(module, "FalseBP1D", (PyObject *)&FalseBP1D_Type);
- if (PyType_Ready(&Length2DBP1D_Type) < 0)
+ if (PyType_Ready(&Length2DBP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&Length2DBP1D_Type);
PyModule_AddObject(module, "Length2DBP1D", (PyObject *)&Length2DBP1D_Type);
- if (PyType_Ready(&SameShapeIdBP1D_Type) < 0)
+ if (PyType_Ready(&SameShapeIdBP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&SameShapeIdBP1D_Type);
PyModule_AddObject(module, "SameShapeIdBP1D", (PyObject *)&SameShapeIdBP1D_Type);
- if (PyType_Ready(&TrueBP1D_Type) < 0)
+ if (PyType_Ready(&TrueBP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&TrueBP1D_Type);
PyModule_AddObject(module, "TrueBP1D", (PyObject *)&TrueBP1D_Type);
- if (PyType_Ready(&ViewMapGradientNormBP1D_Type) < 0)
+ if (PyType_Ready(&ViewMapGradientNormBP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&ViewMapGradientNormBP1D_Type);
PyModule_AddObject(module, "ViewMapGradientNormBP1D", (PyObject *)&ViewMapGradientNormBP1D_Type);
@@ -103,8 +110,9 @@ static int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *arg
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->bp1D = new BinaryPredicate1D();
self->bp1D->py_bp1D = (PyObject *)self;
return 0;
@@ -112,8 +120,9 @@ static int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *arg
static void BinaryPredicate1D___dealloc__(BPy_BinaryPredicate1D *self)
{
- if (self->bp1D)
+ if (self->bp1D) {
delete self->bp1D;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
diff --git a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
index a2e483dec7e..e838bade64a 100644
--- a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
@@ -116,8 +116,9 @@ static PyObject *ContextFunctions_load_map(PyObject * /*self*/, PyObject *args,
float sigma = 1.0;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "ss|If", (char **)kwlist, &fileName, &mapName, &nbLevels, &sigma))
+ args, kwds, "ss|If", (char **)kwlist, &fileName, &mapName, &nbLevels, &sigma)) {
return NULL;
+ }
ContextFunctions::LoadMapCF(fileName, mapName, nbLevels, sigma);
Py_RETURN_NONE;
}
@@ -150,8 +151,10 @@ static PyObject *ContextFunctions_read_map_pixel(PyObject * /*self*/,
int level;
unsigned x, y;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "siII", (char **)kwlist, &mapName, &level, &x, &y))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kwds, "siII", (char **)kwlist, &mapName, &level, &x, &y)) {
return NULL;
+ }
return PyFloat_FromDouble(ContextFunctions::ReadMapPixelCF(mapName, level, x, y));
}
@@ -180,8 +183,9 @@ static PyObject *ContextFunctions_read_complete_view_map_pixel(PyObject * /*self
int level;
unsigned x, y;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "iII", (char **)kwlist, &level, &x, &y))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "iII", (char **)kwlist, &level, &x, &y)) {
return NULL;
+ }
return PyFloat_FromDouble(ContextFunctions::ReadCompleteViewMapPixelCF(level, x, y));
}
@@ -214,8 +218,9 @@ static PyObject *ContextFunctions_read_directional_view_map_pixel(PyObject * /*s
unsigned x, y;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "iiII", (char **)kwlist, &orientation, &level, &x, &y))
+ args, kwds, "iiII", (char **)kwlist, &orientation, &level, &x, &y)) {
return NULL;
+ }
return PyFloat_FromDouble(
ContextFunctions::ReadDirectionalViewMapPixelCF(orientation, level, x, y));
}
@@ -231,8 +236,9 @@ static char ContextFunctions_get_selected_fedge___doc__[] =
static PyObject *ContextFunctions_get_selected_fedge(PyObject * /*self*/)
{
FEdge *fe = ContextFunctions::GetSelectedFEdgeCF();
- if (fe)
+ if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
+ }
Py_RETURN_NONE;
}
@@ -298,12 +304,14 @@ int ContextFunctions_Init(PyObject *module)
{
PyObject *m;
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
m = PyModule_Create(&module_definition);
- if (m == NULL)
+ if (m == NULL) {
return -1;
+ }
Py_INCREF(m);
PyModule_AddObject(module, "ContextFunctions", m);
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp
index d22061d1610..ab8d77e8194 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp
@@ -527,47 +527,60 @@ Nature::EdgeNature EdgeNature_from_BPy_Nature(PyObject *obj)
bool Vec2f_ptr_from_PyObject(PyObject *obj, Vec2f &vec)
{
- if (Vec2f_ptr_from_Vector(obj, vec))
+ if (Vec2f_ptr_from_Vector(obj, vec)) {
return true;
- if (Vec2f_ptr_from_PyList(obj, vec))
+ }
+ if (Vec2f_ptr_from_PyList(obj, vec)) {
return true;
- if (Vec2f_ptr_from_PyTuple(obj, vec))
+ }
+ if (Vec2f_ptr_from_PyTuple(obj, vec)) {
return true;
+ }
return false;
}
bool Vec3f_ptr_from_PyObject(PyObject *obj, Vec3f &vec)
{
- if (Vec3f_ptr_from_Vector(obj, vec))
+ if (Vec3f_ptr_from_Vector(obj, vec)) {
return true;
- if (Vec3f_ptr_from_Color(obj, vec))
+ }
+ if (Vec3f_ptr_from_Color(obj, vec)) {
return true;
- if (Vec3f_ptr_from_PyList(obj, vec))
+ }
+ if (Vec3f_ptr_from_PyList(obj, vec)) {
return true;
- if (Vec3f_ptr_from_PyTuple(obj, vec))
+ }
+ if (Vec3f_ptr_from_PyTuple(obj, vec)) {
return true;
+ }
return false;
}
bool Vec3r_ptr_from_PyObject(PyObject *obj, Vec3r &vec)
{
- if (Vec3r_ptr_from_Vector(obj, vec))
+ if (Vec3r_ptr_from_Vector(obj, vec)) {
return true;
- if (Vec3r_ptr_from_Color(obj, vec))
+ }
+ if (Vec3r_ptr_from_Color(obj, vec)) {
return true;
- if (Vec3r_ptr_from_PyList(obj, vec))
+ }
+ if (Vec3r_ptr_from_PyList(obj, vec)) {
return true;
- if (Vec3r_ptr_from_PyTuple(obj, vec))
+ }
+ if (Vec3r_ptr_from_PyTuple(obj, vec)) {
return true;
+ }
return false;
}
bool Vec2f_ptr_from_Vector(PyObject *obj, Vec2f &vec)
{
- if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 2)
+ if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 2) {
return false;
- if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1)
+ }
+ if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
return false;
+ }
vec[0] = ((VectorObject *)obj)->vec[0];
vec[1] = ((VectorObject *)obj)->vec[1];
return true;
@@ -575,10 +588,12 @@ bool Vec2f_ptr_from_Vector(PyObject *obj, Vec2f &vec)
bool Vec3f_ptr_from_Vector(PyObject *obj, Vec3f &vec)
{
- if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3)
+ if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3) {
return false;
- if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1)
+ }
+ if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
return false;
+ }
vec[0] = ((VectorObject *)obj)->vec[0];
vec[1] = ((VectorObject *)obj)->vec[1];
vec[2] = ((VectorObject *)obj)->vec[2];
@@ -587,10 +602,12 @@ bool Vec3f_ptr_from_Vector(PyObject *obj, Vec3f &vec)
bool Vec3r_ptr_from_Vector(PyObject *obj, Vec3r &vec)
{
- if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3)
+ if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3) {
return false;
- if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1)
+ }
+ if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
return false;
+ }
vec[0] = ((VectorObject *)obj)->vec[0];
vec[1] = ((VectorObject *)obj)->vec[1];
vec[2] = ((VectorObject *)obj)->vec[2];
@@ -599,10 +616,12 @@ bool Vec3r_ptr_from_Vector(PyObject *obj, Vec3r &vec)
bool Vec3f_ptr_from_Color(PyObject *obj, Vec3f &vec)
{
- if (!ColorObject_Check(obj))
+ if (!ColorObject_Check(obj)) {
return false;
- if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1)
+ }
+ if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
return false;
+ }
vec[0] = ((ColorObject *)obj)->col[0];
vec[1] = ((ColorObject *)obj)->col[1];
vec[2] = ((ColorObject *)obj)->col[2];
@@ -611,10 +630,12 @@ bool Vec3f_ptr_from_Color(PyObject *obj, Vec3f &vec)
bool Vec3r_ptr_from_Color(PyObject *obj, Vec3r &vec)
{
- if (!ColorObject_Check(obj))
+ if (!ColorObject_Check(obj)) {
return false;
- if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1)
+ }
+ if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
return false;
+ }
vec[0] = ((ColorObject *)obj)->col[0];
vec[1] = ((ColorObject *)obj)->col[1];
vec[2] = ((ColorObject *)obj)->col[2];
@@ -637,10 +658,12 @@ bool Vec2f_ptr_from_PyList(PyObject *obj, Vec2f &vec)
{
float v[2];
- if (!PyList_Check(obj) || PyList_GET_SIZE(obj) != 2)
+ if (!PyList_Check(obj) || PyList_GET_SIZE(obj) != 2) {
return false;
- if (!float_array_from_PyList(obj, v, 2))
+ }
+ if (!float_array_from_PyList(obj, v, 2)) {
return false;
+ }
vec[0] = v[0];
vec[1] = v[1];
return true;
@@ -650,10 +673,12 @@ bool Vec3f_ptr_from_PyList(PyObject *obj, Vec3f &vec)
{
float v[3];
- if (!PyList_Check(obj) || PyList_GET_SIZE(obj) != 3)
+ if (!PyList_Check(obj) || PyList_GET_SIZE(obj) != 3) {
return false;
- if (!float_array_from_PyList(obj, v, 3))
+ }
+ if (!float_array_from_PyList(obj, v, 3)) {
return false;
+ }
vec[0] = v[0];
vec[1] = v[1];
vec[2] = v[2];
@@ -664,10 +689,12 @@ bool Vec3r_ptr_from_PyList(PyObject *obj, Vec3r &vec)
{
float v[3];
- if (!PyList_Check(obj) || PyList_GET_SIZE(obj) != 3)
+ if (!PyList_Check(obj) || PyList_GET_SIZE(obj) != 3) {
return false;
- if (!float_array_from_PyList(obj, v, 3))
+ }
+ if (!float_array_from_PyList(obj, v, 3)) {
return false;
+ }
vec[0] = v[0];
vec[1] = v[1];
vec[2] = v[2];
@@ -690,10 +717,12 @@ bool Vec2f_ptr_from_PyTuple(PyObject *obj, Vec2f &vec)
{
float v[2];
- if (!PyTuple_Check(obj) || PyTuple_GET_SIZE(obj) != 2)
+ if (!PyTuple_Check(obj) || PyTuple_GET_SIZE(obj) != 2) {
return false;
- if (!float_array_from_PyTuple(obj, v, 2))
+ }
+ if (!float_array_from_PyTuple(obj, v, 2)) {
return false;
+ }
vec[0] = v[0];
vec[1] = v[1];
return true;
@@ -703,10 +732,12 @@ bool Vec3f_ptr_from_PyTuple(PyObject *obj, Vec3f &vec)
{
float v[3];
- if (!PyTuple_Check(obj) || PyTuple_GET_SIZE(obj) != 3)
+ if (!PyTuple_Check(obj) || PyTuple_GET_SIZE(obj) != 3) {
return false;
- if (!float_array_from_PyTuple(obj, v, 3))
+ }
+ if (!float_array_from_PyTuple(obj, v, 3)) {
return false;
+ }
vec[0] = v[0];
vec[1] = v[1];
vec[2] = v[2];
@@ -717,10 +748,12 @@ bool Vec3r_ptr_from_PyTuple(PyObject *obj, Vec3r &vec)
{
float v[3];
- if (!PyTuple_Check(obj) || PyTuple_GET_SIZE(obj) != 3)
+ if (!PyTuple_Check(obj) || PyTuple_GET_SIZE(obj) != 3) {
return false;
- if (!float_array_from_PyTuple(obj, v, 3))
+ }
+ if (!float_array_from_PyTuple(obj, v, 3)) {
return false;
+ }
vec[0] = v[0];
vec[1] = v[1];
vec[2] = v[2];
@@ -732,17 +765,21 @@ bool Vec3r_ptr_from_PyTuple(PyObject *obj, Vec3r &vec)
bool float_array_from_PyObject(PyObject *obj, float *v, int n)
{
if (VectorObject_Check(obj) && ((VectorObject *)obj)->size == n) {
- if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1)
+ if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
return 0;
- for (int i = 0; i < n; i++)
+ }
+ for (int i = 0; i < n; i++) {
v[i] = ((VectorObject *)obj)->vec[i];
+ }
return 1;
}
else if (ColorObject_Check(obj) && n == 3) {
- if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1)
+ if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
return 0;
- for (int i = 0; i < n; i++)
+ }
+ for (int i = 0; i < n; i++) {
v[i] = ((ColorObject *)obj)->col[i];
+ }
return 1;
}
else if (PyList_Check(obj) && PyList_GET_SIZE(obj) == n) {
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index 0b543c06ba6..71cdbafba45 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -83,42 +83,60 @@ static PyObject *Freestyle_getCurrentScene(PyObject * /*self*/)
static int ramp_blend_type(const char *type)
{
- if (STREQ(type, "MIX"))
+ if (STREQ(type, "MIX")) {
return MA_RAMP_BLEND;
- if (STREQ(type, "ADD"))
+ }
+ if (STREQ(type, "ADD")) {
return MA_RAMP_ADD;
- if (STREQ(type, "MULTIPLY"))
+ }
+ if (STREQ(type, "MULTIPLY")) {
return MA_RAMP_MULT;
- if (STREQ(type, "SUBTRACT"))
+ }
+ if (STREQ(type, "SUBTRACT")) {
return MA_RAMP_SUB;
- if (STREQ(type, "SCREEN"))
+ }
+ if (STREQ(type, "SCREEN")) {
return MA_RAMP_SCREEN;
- if (STREQ(type, "DIVIDE"))
+ }
+ if (STREQ(type, "DIVIDE")) {
return MA_RAMP_DIV;
- if (STREQ(type, "DIFFERENCE"))
+ }
+ if (STREQ(type, "DIFFERENCE")) {
return MA_RAMP_DIFF;
- if (STREQ(type, "DARKEN"))
+ }
+ if (STREQ(type, "DARKEN")) {
return MA_RAMP_DARK;
- if (STREQ(type, "LIGHTEN"))
+ }
+ if (STREQ(type, "LIGHTEN")) {
return MA_RAMP_LIGHT;
- if (STREQ(type, "OVERLAY"))
+ }
+ if (STREQ(type, "OVERLAY")) {
return MA_RAMP_OVERLAY;
- if (STREQ(type, "DODGE"))
+ }
+ if (STREQ(type, "DODGE")) {
return MA_RAMP_DODGE;
- if (STREQ(type, "BURN"))
+ }
+ if (STREQ(type, "BURN")) {
return MA_RAMP_BURN;
- if (STREQ(type, "HUE"))
+ }
+ if (STREQ(type, "HUE")) {
return MA_RAMP_HUE;
- if (STREQ(type, "SATURATION"))
+ }
+ if (STREQ(type, "SATURATION")) {
return MA_RAMP_SAT;
- if (STREQ(type, "VALUE"))
+ }
+ if (STREQ(type, "VALUE")) {
return MA_RAMP_VAL;
- if (STREQ(type, "COLOR"))
+ }
+ if (STREQ(type, "COLOR")) {
return MA_RAMP_COLOR;
- if (STREQ(type, "SOFT_LIGHT"))
+ }
+ if (STREQ(type, "SOFT_LIGHT")) {
return MA_RAMP_SOFT;
- if (STREQ(type, "LINEAR_LIGHT"))
+ }
+ if (STREQ(type, "LINEAR_LIGHT")) {
return MA_RAMP_LINEAR;
+ }
return -1;
}
@@ -147,8 +165,9 @@ static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args)
int type;
float a[3], fac, b[3];
- if (!PyArg_ParseTuple(args, "sOfO", &s, &obj1, &fac, &obj2))
+ if (!PyArg_ParseTuple(args, "sOfO", &s, &obj1, &fac, &obj2)) {
return NULL;
+ }
type = ramp_blend_type(s);
if (type < 0) {
PyErr_SetString(PyExc_TypeError, "argument 1 is an unknown ramp blend type");
@@ -194,8 +213,9 @@ static PyObject *Freestyle_evaluateColorRamp(PyObject * /*self*/, PyObject *args
ColorBand *coba;
float in, out[4];
- if (!(PyArg_ParseTuple(args, "O!f", &pyrna_struct_Type, &py_srna, &in)))
+ if (!(PyArg_ParseTuple(args, "O!f", &pyrna_struct_Type, &py_srna, &in))) {
return NULL;
+ }
if (!RNA_struct_is_a(py_srna->ptr.type, &RNA_ColorRamp)) {
PyErr_SetString(PyExc_TypeError, "1st argument is not a ColorRamp object");
return NULL;
@@ -232,8 +252,9 @@ static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *
int cur;
float value;
- if (!(PyArg_ParseTuple(args, "O!if", &pyrna_struct_Type, &py_srna, &cur, &value)))
+ if (!(PyArg_ParseTuple(args, "O!if", &pyrna_struct_Type, &py_srna, &cur, &value))) {
return NULL;
+ }
if (!RNA_struct_is_a(py_srna->ptr.type, &RNA_CurveMapping)) {
PyErr_SetString(PyExc_TypeError, "1st argument is not a CurveMapping object");
return NULL;
@@ -514,8 +535,9 @@ PyObject *Freestyle_Init(void)
// initialize modules
module = PyModule_Create(&module_definition);
- if (!module)
+ if (!module) {
return NULL;
+ }
PyDict_SetItemString(PySys_GetObject("modules"), module_definition.m_name, module);
// update 'sys.path' for Freestyle Python API modules
diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
index 3ede6823062..b1d44a55fd5 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
@@ -33,11 +33,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int FrsMaterial_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&FrsMaterial_Type) < 0)
+ if (PyType_Ready(&FrsMaterial_Type) < 0) {
return -1;
+ }
Py_INCREF(&FrsMaterial_Type);
PyModule_AddObject(module, "Material", (PyObject *)&FrsMaterial_Type);
@@ -154,8 +156,9 @@ static PyObject *FrsMaterial_repr(BPy_FrsMaterial *self)
static int FrsMaterial_mathutils_check(BaseMathObject *bmo)
{
- if (!BPy_FrsMaterial_Check(bmo->cb_user))
+ if (!BPy_FrsMaterial_Check(bmo->cb_user)) {
return -1;
+ }
return 0;
}
diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
index dc8a2ba6105..6bd4ae6b5fe 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
@@ -34,11 +34,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int FrsNoise_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&FrsNoise_Type) < 0)
+ if (PyType_Ready(&FrsNoise_Type) < 0) {
return -1;
+ }
Py_INCREF(&FrsNoise_Type);
PyModule_AddObject(module, "Noise", (PyObject *)&FrsNoise_Type);
@@ -64,8 +66,9 @@ static int FrsNoise_init(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
static const char *kwlist[] = {"seed", NULL};
long seed = -1;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|l", (char **)kwlist, &seed))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|l", (char **)kwlist, &seed)) {
return -1;
+ }
self->n = new Noise(seed);
self->pn = new PseudoNoise();
return 0;
@@ -120,8 +123,9 @@ static PyObject *FrsNoise_turbulence_smooth(BPy_FrsNoise *self, PyObject *args,
double x; // note: this has to be a double (not float)
unsigned nbOctaves = 8;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|I", (char **)kwlist, &x, &nbOctaves))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|I", (char **)kwlist, &x, &nbOctaves)) {
return NULL;
+ }
return PyFloat_FromDouble(self->pn->turbulenceSmooth(x, nbOctaves));
}
@@ -131,8 +135,9 @@ static PyObject *FrsNoise_turbulence1(BPy_FrsNoise *self, PyObject *args, PyObje
float f1, f2, f3;
unsigned int i = 4;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff|I", (char **)kwlist, &f1, &f2, &f3, &i))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff|I", (char **)kwlist, &f1, &f2, &f3, &i)) {
return NULL;
+ }
return PyFloat_FromDouble(self->n->turbulence1(f1, f2, f3, i));
}
@@ -160,8 +165,9 @@ static PyObject *FrsNoise_turbulence2(BPy_FrsNoise *self, PyObject *args, PyObje
unsigned int i = 4;
Vec2f vec;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "Off|I", (char **)kwlist, &obj1, &f2, &f3, &i))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "Off|I", (char **)kwlist, &obj1, &f2, &f3, &i)) {
return NULL;
+ }
if (!Vec2f_ptr_from_PyObject(obj1, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 2D vector (either a list of 2 elements or Vector)");
@@ -195,8 +201,9 @@ static PyObject *FrsNoise_turbulence3(BPy_FrsNoise *self, PyObject *args, PyObje
unsigned int i = 4;
Vec3f vec;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "Off|I", (char **)kwlist, &obj1, &f2, &f3, &i))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "Off|I", (char **)kwlist, &obj1, &f2, &f3, &i)) {
return NULL;
+ }
if (!Vec3f_ptr_from_PyObject(obj1, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 3D vector (either a list of 3 elements or Vector)");
@@ -221,8 +228,9 @@ static PyObject *FrsNoise_smoothNoise1(BPy_FrsNoise *self, PyObject *args, PyObj
static const char *kwlist[] = {"v", NULL};
float f;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
return NULL;
+ }
return PyFloat_FromDouble(self->n->smoothNoise1(f));
}
@@ -242,8 +250,9 @@ static PyObject *FrsNoise_smoothNoise2(BPy_FrsNoise *self, PyObject *args, PyObj
PyObject *obj;
Vec2f vec;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
return NULL;
+ }
if (!Vec2f_ptr_from_PyObject(obj, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 2D vector (either a list of 2 elements or Vector)");
@@ -269,8 +278,9 @@ static PyObject *FrsNoise_smoothNoise3(BPy_FrsNoise *self, PyObject *args, PyObj
PyObject *obj;
Vec3f vec;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
return NULL;
+ }
if (!Vec3f_ptr_from_PyObject(obj, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 3D vector (either a list of 3 elements or Vector)");
diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp
index 4e2500a4b3d..2c50767c5aa 100644
--- a/source/blender/freestyle/intern/python/BPy_Id.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Id.cpp
@@ -31,11 +31,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Id_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&Id_Type) < 0)
+ if (PyType_Ready(&Id_Type) < 0) {
return -1;
+ }
Py_INCREF(&Id_Type);
PyModule_AddObject(module, "Id", (PyObject *)&Id_Type);
diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
index bfd9e5e7898..0286932146c 100644
--- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
@@ -211,11 +211,13 @@ int IntegrationType_Init(PyObject *module)
{
PyObject *m, *d, *f;
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&IntegrationType_Type) < 0)
+ if (PyType_Ready(&IntegrationType_Type) < 0) {
return -1;
+ }
Py_INCREF(&IntegrationType_Type);
PyModule_AddObject(module, "IntegrationType", (PyObject *)&IntegrationType_Type);
@@ -226,8 +228,9 @@ int IntegrationType_Init(PyObject *module)
PyDict_SetItemString(IntegrationType_Type.tp_dict, "LAST", BPy_IntegrationType_LAST);
m = PyModule_Create(&module_definition);
- if (m == NULL)
+ if (m == NULL) {
return -1;
+ }
Py_INCREF(m);
PyModule_AddObject(module, "Integrator", m);
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
index 897f2f06c28..40e5267460b 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
@@ -39,41 +39,49 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Interface0D_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&Interface0D_Type) < 0)
+ if (PyType_Ready(&Interface0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&Interface0D_Type);
PyModule_AddObject(module, "Interface0D", (PyObject *)&Interface0D_Type);
- if (PyType_Ready(&CurvePoint_Type) < 0)
+ if (PyType_Ready(&CurvePoint_Type) < 0) {
return -1;
+ }
Py_INCREF(&CurvePoint_Type);
PyModule_AddObject(module, "CurvePoint", (PyObject *)&CurvePoint_Type);
- if (PyType_Ready(&SVertex_Type) < 0)
+ if (PyType_Ready(&SVertex_Type) < 0) {
return -1;
+ }
Py_INCREF(&SVertex_Type);
PyModule_AddObject(module, "SVertex", (PyObject *)&SVertex_Type);
- if (PyType_Ready(&ViewVertex_Type) < 0)
+ if (PyType_Ready(&ViewVertex_Type) < 0) {
return -1;
+ }
Py_INCREF(&ViewVertex_Type);
PyModule_AddObject(module, "ViewVertex", (PyObject *)&ViewVertex_Type);
- if (PyType_Ready(&StrokeVertex_Type) < 0)
+ if (PyType_Ready(&StrokeVertex_Type) < 0) {
return -1;
+ }
Py_INCREF(&StrokeVertex_Type);
PyModule_AddObject(module, "StrokeVertex", (PyObject *)&StrokeVertex_Type);
- if (PyType_Ready(&NonTVertex_Type) < 0)
+ if (PyType_Ready(&NonTVertex_Type) < 0) {
return -1;
+ }
Py_INCREF(&NonTVertex_Type);
PyModule_AddObject(module, "NonTVertex", (PyObject *)&NonTVertex_Type);
- if (PyType_Ready(&TVertex_Type) < 0)
+ if (PyType_Ready(&TVertex_Type) < 0) {
return -1;
+ }
Py_INCREF(&TVertex_Type);
PyModule_AddObject(module, "TVertex", (PyObject *)&TVertex_Type);
@@ -96,8 +104,9 @@ static int Interface0D_init(BPy_Interface0D *self, PyObject *args, PyObject *kwd
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->if0D = new Interface0D();
self->borrowed = false;
return 0;
@@ -105,8 +114,9 @@ static int Interface0D_init(BPy_Interface0D *self, PyObject *args, PyObject *kwd
static void Interface0D_dealloc(BPy_Interface0D *self)
{
- if (self->if0D && !self->borrowed)
+ if (self->if0D && !self->borrowed) {
delete self->if0D;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -132,13 +142,17 @@ static PyObject *Interface0D_get_fedge(BPy_Interface0D *self, PyObject *args, Py
static const char *kwlist[] = {"inter", NULL};
PyObject *py_if0D;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0D_Type, &py_if0D))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kwds, "O!", (char **)kwlist, &Interface0D_Type, &py_if0D)) {
return NULL;
+ }
FEdge *fe = self->if0D->getFEdge(*(((BPy_Interface0D *)py_if0D)->if0D));
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
- if (fe)
+ }
+ if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
+ }
Py_RETURN_NONE;
}
@@ -170,8 +184,9 @@ PyDoc_STRVAR(Interface0D_point_3d_doc,
static PyObject *Interface0D_point_3d_get(BPy_Interface0D *self, void *UNUSED(closure))
{
Vec3f p(self->if0D->getPoint3D());
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return Vector_from_Vec3f(p);
}
@@ -183,8 +198,9 @@ PyDoc_STRVAR(Interface0D_projected_x_doc,
static PyObject *Interface0D_projected_x_get(BPy_Interface0D *self, void *UNUSED(closure))
{
real x = self->if0D->getProjectedX();
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return PyFloat_FromDouble(x);
}
@@ -196,8 +212,9 @@ PyDoc_STRVAR(Interface0D_projected_y_doc,
static PyObject *Interface0D_projected_y_get(BPy_Interface0D *self, void *UNUSED(closure))
{
real y = self->if0D->getProjectedY();
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return PyFloat_FromDouble(y);
}
@@ -209,8 +226,9 @@ PyDoc_STRVAR(Interface0D_projected_z_doc,
static PyObject *Interface0D_projected_z_get(BPy_Interface0D *self, void *UNUSED(closure))
{
real z = self->if0D->getProjectedZ();
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return PyFloat_FromDouble(z);
}
@@ -222,8 +240,9 @@ PyDoc_STRVAR(Interface0D_point_2d_doc,
static PyObject *Interface0D_point_2d_get(BPy_Interface0D *self, void *UNUSED(closure))
{
Vec2f p(self->if0D->getPoint2D());
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return Vector_from_Vec2f(p);
}
@@ -235,8 +254,9 @@ PyDoc_STRVAR(Interface0D_id_doc,
static PyObject *Interface0D_id_get(BPy_Interface0D *self, void *UNUSED(closure))
{
Id id(self->if0D->getId());
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return BPy_Id_from_Id(id); // return a copy
}
@@ -248,8 +268,9 @@ PyDoc_STRVAR(Interface0D_nature_doc,
static PyObject *Interface0D_nature_get(BPy_Interface0D *self, void *UNUSED(closure))
{
Nature::VertexNature nature = self->if0D->getNature();
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return BPy_Nature_from_Nature(nature);
}
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
index 09e27da9eeb..ca14a473216 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
@@ -40,41 +40,49 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Interface1D_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&Interface1D_Type) < 0)
+ if (PyType_Ready(&Interface1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&Interface1D_Type);
PyModule_AddObject(module, "Interface1D", (PyObject *)&Interface1D_Type);
- if (PyType_Ready(&FrsCurve_Type) < 0)
+ if (PyType_Ready(&FrsCurve_Type) < 0) {
return -1;
+ }
Py_INCREF(&FrsCurve_Type);
PyModule_AddObject(module, "Curve", (PyObject *)&FrsCurve_Type);
- if (PyType_Ready(&Chain_Type) < 0)
+ if (PyType_Ready(&Chain_Type) < 0) {
return -1;
+ }
Py_INCREF(&Chain_Type);
PyModule_AddObject(module, "Chain", (PyObject *)&Chain_Type);
- if (PyType_Ready(&FEdge_Type) < 0)
+ if (PyType_Ready(&FEdge_Type) < 0) {
return -1;
+ }
Py_INCREF(&FEdge_Type);
PyModule_AddObject(module, "FEdge", (PyObject *)&FEdge_Type);
- if (PyType_Ready(&FEdgeSharp_Type) < 0)
+ if (PyType_Ready(&FEdgeSharp_Type) < 0) {
return -1;
+ }
Py_INCREF(&FEdgeSharp_Type);
PyModule_AddObject(module, "FEdgeSharp", (PyObject *)&FEdgeSharp_Type);
- if (PyType_Ready(&FEdgeSmooth_Type) < 0)
+ if (PyType_Ready(&FEdgeSmooth_Type) < 0) {
return -1;
+ }
Py_INCREF(&FEdgeSmooth_Type);
PyModule_AddObject(module, "FEdgeSmooth", (PyObject *)&FEdgeSmooth_Type);
- if (PyType_Ready(&Stroke_Type) < 0)
+ if (PyType_Ready(&Stroke_Type) < 0) {
return -1;
+ }
Py_INCREF(&Stroke_Type);
PyModule_AddObject(module, "Stroke", (PyObject *)&Stroke_Type);
@@ -82,8 +90,9 @@ int Interface1D_Init(PyObject *module)
PyDict_SetItemString(Stroke_Type.tp_dict, "HUMID_MEDIUM", BPy_MediumType_HUMID_MEDIUM);
PyDict_SetItemString(Stroke_Type.tp_dict, "OPAQUE_MEDIUM", BPy_MediumType_OPAQUE_MEDIUM);
- if (PyType_Ready(&ViewEdge_Type) < 0)
+ if (PyType_Ready(&ViewEdge_Type) < 0) {
return -1;
+ }
Py_INCREF(&ViewEdge_Type);
PyModule_AddObject(module, "ViewEdge", (PyObject *)&ViewEdge_Type);
@@ -106,8 +115,9 @@ static int Interface1D_init(BPy_Interface1D *self, PyObject *args, PyObject *kwd
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->if1D = new Interface1D();
self->borrowed = false;
return 0;
@@ -115,8 +125,9 @@ static int Interface1D_init(BPy_Interface1D *self, PyObject *args, PyObject *kwd
static void Interface1D_dealloc(BPy_Interface1D *self)
{
- if (self->if1D && !self->borrowed)
+ if (self->if1D && !self->borrowed) {
delete self->if1D;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -175,8 +186,9 @@ static PyObject *Interface1D_points_begin(BPy_Interface1D *self, PyObject *args,
static const char *kwlist[] = {"t", NULL};
float f = 0.0f;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
return NULL;
+ }
Interface0DIterator if0D_it(self->if1D->pointsBegin(f));
return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false);
}
@@ -200,8 +212,9 @@ static PyObject *Interface1D_points_end(BPy_Interface1D *self, PyObject *args, P
static const char *kwlist[] = {"t", NULL};
float f = 0.0f;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
return NULL;
+ }
Interface0DIterator if0D_it(self->if1D->pointsEnd(f));
return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, true);
}
@@ -246,8 +259,9 @@ PyDoc_STRVAR(Interface1D_id_doc,
static PyObject *Interface1D_id_get(BPy_Interface1D *self, void *UNUSED(closure))
{
Id id(self->if1D->getId());
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return BPy_Id_from_Id(id); // return a copy
}
@@ -259,8 +273,9 @@ PyDoc_STRVAR(Interface1D_nature_doc,
static PyObject *Interface1D_nature_get(BPy_Interface1D *self, void *UNUSED(closure))
{
Nature::VertexNature nature = self->if1D->getNature();
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return BPy_Nature_from_Nature(nature);
}
@@ -272,8 +287,9 @@ PyDoc_STRVAR(Interface1D_length_2d_doc,
static PyObject *Interface1D_length_2d_get(BPy_Interface1D *self, void *UNUSED(closure))
{
real length = self->if1D->getLength2D();
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return PyFloat_FromDouble((double)length);
}
diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
index dfeaf9ac328..10417c07f33 100644
--- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
@@ -41,62 +41,74 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Iterator_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&Iterator_Type) < 0)
+ if (PyType_Ready(&Iterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&Iterator_Type);
PyModule_AddObject(module, "Iterator", (PyObject *)&Iterator_Type);
- if (PyType_Ready(&AdjacencyIterator_Type) < 0)
+ if (PyType_Ready(&AdjacencyIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&AdjacencyIterator_Type);
PyModule_AddObject(module, "AdjacencyIterator", (PyObject *)&AdjacencyIterator_Type);
- if (PyType_Ready(&Interface0DIterator_Type) < 0)
+ if (PyType_Ready(&Interface0DIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&Interface0DIterator_Type);
PyModule_AddObject(module, "Interface0DIterator", (PyObject *)&Interface0DIterator_Type);
- if (PyType_Ready(&CurvePointIterator_Type) < 0)
+ if (PyType_Ready(&CurvePointIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&CurvePointIterator_Type);
PyModule_AddObject(module, "CurvePointIterator", (PyObject *)&CurvePointIterator_Type);
- if (PyType_Ready(&StrokeVertexIterator_Type) < 0)
+ if (PyType_Ready(&StrokeVertexIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&StrokeVertexIterator_Type);
PyModule_AddObject(module, "StrokeVertexIterator", (PyObject *)&StrokeVertexIterator_Type);
- if (PyType_Ready(&SVertexIterator_Type) < 0)
+ if (PyType_Ready(&SVertexIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&SVertexIterator_Type);
PyModule_AddObject(module, "SVertexIterator", (PyObject *)&SVertexIterator_Type);
- if (PyType_Ready(&orientedViewEdgeIterator_Type) < 0)
+ if (PyType_Ready(&orientedViewEdgeIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&orientedViewEdgeIterator_Type);
PyModule_AddObject(
module, "orientedViewEdgeIterator", (PyObject *)&orientedViewEdgeIterator_Type);
- if (PyType_Ready(&ViewEdgeIterator_Type) < 0)
+ if (PyType_Ready(&ViewEdgeIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&ViewEdgeIterator_Type);
PyModule_AddObject(module, "ViewEdgeIterator", (PyObject *)&ViewEdgeIterator_Type);
- if (PyType_Ready(&ChainingIterator_Type) < 0)
+ if (PyType_Ready(&ChainingIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&ChainingIterator_Type);
PyModule_AddObject(module, "ChainingIterator", (PyObject *)&ChainingIterator_Type);
- if (PyType_Ready(&ChainPredicateIterator_Type) < 0)
+ if (PyType_Ready(&ChainPredicateIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&ChainPredicateIterator_Type);
PyModule_AddObject(module, "ChainPredicateIterator", (PyObject *)&ChainPredicateIterator_Type);
- if (PyType_Ready(&ChainSilhouetteIterator_Type) < 0)
+ if (PyType_Ready(&ChainSilhouetteIterator_Type) < 0) {
return -1;
+ }
Py_INCREF(&ChainSilhouetteIterator_Type);
PyModule_AddObject(module, "ChainSilhouetteIterator", (PyObject *)&ChainSilhouetteIterator_Type);
@@ -116,16 +128,18 @@ static int Iterator_init(BPy_Iterator *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->it = new Iterator();
return 0;
}
static void Iterator_dealloc(BPy_Iterator *self)
{
- if (self->it)
+ if (self->it) {
delete self->it;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
index b29c4e8057a..915f0c41a56 100644
--- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
@@ -96,11 +96,13 @@ PyLongObject _BPy_MediumType_OPAQUE_MEDIUM = {
int MediumType_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&MediumType_Type) < 0)
+ if (PyType_Ready(&MediumType_Type) < 0) {
return -1;
+ }
Py_INCREF(&MediumType_Type);
PyModule_AddObject(module, "MediumType", (PyObject *)&MediumType_Type);
diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp
index daefe796ff9..79fb154233e 100644
--- a/source/blender/freestyle/intern/python/BPy_Nature.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp
@@ -186,11 +186,13 @@ static PyLongObject _Nature_EDGE_MARK = {
//-------------------MODULE INITIALIZATION--------------------------------
int Nature_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&Nature_Type) < 0)
+ if (PyType_Ready(&Nature_Type) < 0) {
return -1;
+ }
Py_INCREF(&Nature_Type);
PyModule_AddObject(module, "Nature", (PyObject *)&Nature_Type);
@@ -248,12 +250,14 @@ static PyObject *BPy_Nature_bitwise(PyObject *a, int op, PyObject *b)
PyErr_BadArgument();
return NULL;
}
- if (v == 0)
+ if (v == 0) {
result = PyObject_NewVar(BPy_Nature, &Nature_Type, 0);
+ }
else {
result = PyObject_NewVar(BPy_Nature, &Nature_Type, 1);
- if (result)
+ if (result) {
result->i.ob_digit[0] = v;
+ }
}
return (PyObject *)result;
}
diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp
index e2afda63e14..2892d1e9400 100644
--- a/source/blender/freestyle/intern/python/BPy_Operators.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp
@@ -41,11 +41,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Operators_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&Operators_Type) < 0)
+ if (PyType_Ready(&Operators_Type) < 0) {
return -1;
+ }
Py_INCREF(&Operators_Type);
PyModule_AddObject(module, "Operators", (PyObject *)&Operators_Type);
@@ -80,16 +82,18 @@ static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyOb
PyObject *obj = 0;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &UnaryPredicate1D_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &UnaryPredicate1D_Type, &obj)) {
return NULL;
+ }
if (!((BPy_UnaryPredicate1D *)obj)->up1D) {
PyErr_SetString(PyExc_TypeError,
"Operators.select(): 1st argument: invalid UnaryPredicate1D object");
return NULL;
}
if (Operators::select(*(((BPy_UnaryPredicate1D *)obj)->up1D)) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.select() failed");
+ }
return NULL;
}
Py_RETURN_NONE;
@@ -165,8 +169,9 @@ static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObj
if (!obj3) {
if (Operators::chain(*(((BPy_ChainingIterator *)obj1)->c_it),
*(((BPy_UnaryPredicate1D *)obj2)->up1D)) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.chain() failed");
+ }
return NULL;
}
}
@@ -179,8 +184,9 @@ static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObj
if (Operators::chain(*(((BPy_ChainingIterator *)obj1)->c_it),
*(((BPy_UnaryPredicate1D *)obj2)->up1D),
*(((BPy_UnaryFunction1DVoid *)obj3)->uf1D_void)) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.chain() failed");
+ }
return NULL;
}
}
@@ -255,8 +261,9 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/,
}
if (!obj2) {
if (Operators::bidirectionalChain(*(((BPy_ChainingIterator *)obj1)->c_it)) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.bidirectional_chain() failed");
+ }
return NULL;
}
}
@@ -269,8 +276,9 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/,
}
if (Operators::bidirectionalChain(*(((BPy_ChainingIterator *)obj1)->c_it),
*(((BPy_UnaryPredicate1D *)obj2)->up1D)) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.bidirectional_chain() failed");
+ }
return NULL;
}
}
@@ -351,8 +359,9 @@ static PyObject *Operators_sequential_split(BPy_Operators * /*self*/,
if (Operators::sequentialSplit(*(((BPy_UnaryPredicate0D *)obj1)->up0D),
*(((BPy_UnaryPredicate0D *)obj2)->up0D),
f) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.sequential_split() failed");
+ }
return NULL;
}
}
@@ -367,8 +376,9 @@ static PyObject *Operators_sequential_split(BPy_Operators * /*self*/,
return NULL;
}
if (Operators::sequentialSplit(*(((BPy_UnaryPredicate0D *)obj1)->up0D), f) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.sequential_split() failed");
+ }
return NULL;
}
}
@@ -468,8 +478,9 @@ static PyObject *Operators_recursive_split(BPy_Operators * /*self*/,
if (Operators::recursiveSplit(*(((BPy_UnaryFunction0DDouble *)obj1)->uf0D_double),
*(((BPy_UnaryPredicate1D *)obj2)->up1D),
f) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.recursive_split() failed");
+ }
return NULL;
}
}
@@ -508,8 +519,9 @@ static PyObject *Operators_recursive_split(BPy_Operators * /*self*/,
*(((BPy_UnaryPredicate0D *)obj2)->up0D),
*(((BPy_UnaryPredicate1D *)obj3)->up1D),
f) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.recursive_split() failed");
+ }
return NULL;
}
}
@@ -535,16 +547,18 @@ static PyObject *Operators_sort(BPy_Operators * /*self*/, PyObject *args, PyObje
PyObject *obj = 0;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &BinaryPredicate1D_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &BinaryPredicate1D_Type, &obj)) {
return NULL;
+ }
if (!((BPy_BinaryPredicate1D *)obj)->bp1D) {
PyErr_SetString(PyExc_TypeError,
"Operators.sort(): 1st argument: invalid BinaryPredicate1D object");
return NULL;
}
if (Operators::sort(*(((BPy_BinaryPredicate1D *)obj)->bp1D)) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.sort() failed");
+ }
return NULL;
}
Py_RETURN_NONE;
@@ -603,8 +617,9 @@ static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyOb
shaders.push_back(shader);
}
if (Operators::create(*(((BPy_UnaryPredicate1D *)obj1)->up1D), shaders) < 0) {
- if (!PyErr_Occurred())
+ if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.create() failed");
+ }
return NULL;
}
Py_RETURN_NONE;
@@ -651,8 +666,9 @@ static PyObject *Operators_get_viewedge_from_index(BPy_Operators * /*self*/,
static const char *kwlist[] = {"i", NULL};
unsigned int i;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i)) {
return NULL;
+ }
if (i >= Operators::getViewEdgesSize()) {
PyErr_SetString(PyExc_IndexError, "index out of range");
return NULL;
@@ -677,8 +693,9 @@ static PyObject *Operators_get_chain_from_index(BPy_Operators * /*self*/,
static const char *kwlist[] = {"i", NULL};
unsigned int i;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i)) {
return NULL;
+ }
if (i >= Operators::getChainsSize()) {
PyErr_SetString(PyExc_IndexError, "index out of range");
return NULL;
@@ -703,8 +720,9 @@ static PyObject *Operators_get_stroke_from_index(BPy_Operators * /*self*/,
static const char *kwlist[] = {"i", NULL};
unsigned int i;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i)) {
return NULL;
+ }
if (i >= Operators::getStrokesSize()) {
PyErr_SetString(PyExc_IndexError, "index out of range");
return NULL;
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp
index f8930a89a38..d007fead345 100644
--- a/source/blender/freestyle/intern/python/BPy_SShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp
@@ -35,11 +35,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int SShape_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&SShape_Type) < 0)
+ if (PyType_Ready(&SShape_Type) < 0) {
return -1;
+ }
Py_INCREF(&SShape_Type);
PyModule_AddObject(module, "SShape", (PyObject *)&SShape_Type);
@@ -68,20 +70,24 @@ static int SShape_init(BPy_SShape *self, PyObject *args, PyObject *kwds)
static const char *kwlist[] = {"brother", NULL};
PyObject *brother = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &SShape_Type, &brother))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &SShape_Type, &brother)) {
return -1;
- if (!brother)
+ }
+ if (!brother) {
self->ss = new SShape();
- else
+ }
+ else {
self->ss = new SShape(*(((BPy_SShape *)brother)->ss));
+ }
self->borrowed = false;
return 0;
}
static void SShape_dealloc(BPy_SShape *self)
{
- if (self->ss && !self->borrowed)
+ if (self->ss && !self->borrowed) {
delete self->ss;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -103,8 +109,9 @@ static PyObject *SShape_add_edge(BPy_SShape *self, PyObject *args, PyObject *kwd
static const char *kwlist[] = {"edge", NULL};
PyObject *py_fe = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe)) {
return NULL;
+ }
self->ss->AddEdge(((BPy_FEdge *)py_fe)->fe);
Py_RETURN_NONE;
}
@@ -123,8 +130,9 @@ static PyObject *SShape_add_vertex(BPy_SShape *self, PyObject *args, PyObject *k
static const char *kwlist[] = {"edge", NULL};
PyObject *py_sv = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &SVertex_Type, &py_sv))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &SVertex_Type, &py_sv)) {
return NULL;
+ }
self->ss->AddNewVertex(((BPy_SVertex *)py_sv)->sv);
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
index 03933fe1915..7d2716a3e71 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
@@ -31,11 +31,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int StrokeAttribute_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&StrokeAttribute_Type) < 0)
+ if (PyType_Ready(&StrokeAttribute_Type) < 0) {
return -1;
+ }
Py_INCREF(&StrokeAttribute_Type);
PyModule_AddObject(module, "StrokeAttribute", (PyObject *)&StrokeAttribute_Type);
@@ -101,10 +103,12 @@ static int StrokeAttribute_init(BPy_StrokeAttribute *self, PyObject *args, PyObj
if (PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist_1, &StrokeAttribute_Type, &obj1)) {
- if (!obj1)
+ if (!obj1) {
self->sa = new StrokeAttribute();
- else
+ }
+ else {
self->sa = new StrokeAttribute(*(((BPy_StrokeAttribute *)obj1)->sa));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args,
@@ -142,8 +146,9 @@ static int StrokeAttribute_init(BPy_StrokeAttribute *self, PyObject *args, PyObj
static void StrokeAttribute_dealloc(BPy_StrokeAttribute *self)
{
- if (self->sa && !self->borrowed)
+ if (self->sa && !self->borrowed) {
delete self->sa;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -174,8 +179,9 @@ static PyObject *StrokeAttribute_get_attribute_real(BPy_StrokeAttribute *self,
static const char *kwlist[] = {"name", NULL};
char *attr;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
return NULL;
+ }
double a = self->sa->getAttributeReal(attr);
return PyFloat_FromDouble(a);
}
@@ -197,8 +203,9 @@ static PyObject *StrokeAttribute_get_attribute_vec2(BPy_StrokeAttribute *self,
static const char *kwlist[] = {"name", NULL};
char *attr;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
return NULL;
+ }
Vec2f a = self->sa->getAttributeVec2f(attr);
return Vector_from_Vec2f(a);
}
@@ -220,8 +227,9 @@ static PyObject *StrokeAttribute_get_attribute_vec3(BPy_StrokeAttribute *self,
static const char *kwlist[] = {"name", NULL};
char *attr;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
return NULL;
+ }
Vec3f a = self->sa->getAttributeVec3f(attr);
return Vector_from_Vec3f(a);
}
@@ -243,8 +251,9 @@ static PyObject *StrokeAttribute_has_attribute_real(BPy_StrokeAttribute *self,
static const char *kwlist[] = {"name", NULL};
char *attr;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
return NULL;
+ }
return PyBool_from_bool(self->sa->isAttributeAvailableReal(attr));
}
@@ -266,8 +275,9 @@ static PyObject *StrokeAttribute_has_attribute_vec2(BPy_StrokeAttribute *self,
static const char *kwlist[] = {"name", NULL};
char *attr;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
return NULL;
+ }
return PyBool_from_bool(self->sa->isAttributeAvailableVec2f(attr));
}
@@ -289,8 +299,9 @@ static PyObject *StrokeAttribute_has_attribute_vec3(BPy_StrokeAttribute *self,
static const char *kwlist[] = {"name", NULL};
char *attr;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
return NULL;
+ }
return PyBool_from_bool(self->sa->isAttributeAvailableVec3f(attr));
}
@@ -314,8 +325,9 @@ static PyObject *StrokeAttribute_set_attribute_real(BPy_StrokeAttribute *self,
char *s = 0;
double d = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "sd", (char **)kwlist, &s, &d))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "sd", (char **)kwlist, &s, &d)) {
return NULL;
+ }
self->sa->setAttributeReal(s, d);
Py_RETURN_NONE;
}
@@ -341,8 +353,9 @@ static PyObject *StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self,
PyObject *obj = 0;
Vec2f vec;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj)) {
return NULL;
+ }
if (!Vec2f_ptr_from_PyObject(obj, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 2 must be a 2D vector (either a list of 2 elements or Vector)");
@@ -373,8 +386,9 @@ static PyObject *StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self,
PyObject *obj = 0;
Vec3f vec;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj)) {
return NULL;
+ }
if (!Vec3f_ptr_from_PyObject(obj, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 2 must be a 3D vector (either a list of 3 elements or Vector)");
@@ -432,8 +446,9 @@ static PyMethodDef BPy_StrokeAttribute_methods[] = {
static int StrokeAttribute_mathutils_check(BaseMathObject *bmo)
{
- if (!BPy_StrokeAttribute_Check(bmo->cb_user))
+ if (!BPy_StrokeAttribute_Check(bmo->cb_user)) {
return -1;
+ }
return 0;
}
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
index 33028512b47..baeb8cc4994 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
@@ -51,104 +51,124 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int StrokeShader_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&StrokeShader_Type) < 0)
+ if (PyType_Ready(&StrokeShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&StrokeShader_Type);
PyModule_AddObject(module, "StrokeShader", (PyObject *)&StrokeShader_Type);
- if (PyType_Ready(&BackboneStretcherShader_Type) < 0)
+ if (PyType_Ready(&BackboneStretcherShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&BackboneStretcherShader_Type);
PyModule_AddObject(module, "BackboneStretcherShader", (PyObject *)&BackboneStretcherShader_Type);
- if (PyType_Ready(&BezierCurveShader_Type) < 0)
+ if (PyType_Ready(&BezierCurveShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&BezierCurveShader_Type);
PyModule_AddObject(module, "BezierCurveShader", (PyObject *)&BezierCurveShader_Type);
- if (PyType_Ready(&BlenderTextureShader_Type) < 0)
+ if (PyType_Ready(&BlenderTextureShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&BlenderTextureShader_Type);
PyModule_AddObject(module, "BlenderTextureShader", (PyObject *)&BlenderTextureShader_Type);
- if (PyType_Ready(&CalligraphicShader_Type) < 0)
+ if (PyType_Ready(&CalligraphicShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&CalligraphicShader_Type);
PyModule_AddObject(module, "CalligraphicShader", (PyObject *)&CalligraphicShader_Type);
- if (PyType_Ready(&ColorNoiseShader_Type) < 0)
+ if (PyType_Ready(&ColorNoiseShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&ColorNoiseShader_Type);
PyModule_AddObject(module, "ColorNoiseShader", (PyObject *)&ColorNoiseShader_Type);
- if (PyType_Ready(&ConstantColorShader_Type) < 0)
+ if (PyType_Ready(&ConstantColorShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&ConstantColorShader_Type);
PyModule_AddObject(module, "ConstantColorShader", (PyObject *)&ConstantColorShader_Type);
- if (PyType_Ready(&ConstantThicknessShader_Type) < 0)
+ if (PyType_Ready(&ConstantThicknessShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&ConstantThicknessShader_Type);
PyModule_AddObject(module, "ConstantThicknessShader", (PyObject *)&ConstantThicknessShader_Type);
- if (PyType_Ready(&ConstrainedIncreasingThicknessShader_Type) < 0)
+ if (PyType_Ready(&ConstrainedIncreasingThicknessShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&ConstrainedIncreasingThicknessShader_Type);
PyModule_AddObject(module,
"ConstrainedIncreasingThicknessShader",
(PyObject *)&ConstrainedIncreasingThicknessShader_Type);
- if (PyType_Ready(&GuidingLinesShader_Type) < 0)
+ if (PyType_Ready(&GuidingLinesShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&GuidingLinesShader_Type);
PyModule_AddObject(module, "GuidingLinesShader", (PyObject *)&GuidingLinesShader_Type);
- if (PyType_Ready(&IncreasingColorShader_Type) < 0)
+ if (PyType_Ready(&IncreasingColorShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&IncreasingColorShader_Type);
PyModule_AddObject(module, "IncreasingColorShader", (PyObject *)&IncreasingColorShader_Type);
- if (PyType_Ready(&IncreasingThicknessShader_Type) < 0)
+ if (PyType_Ready(&IncreasingThicknessShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&IncreasingThicknessShader_Type);
PyModule_AddObject(
module, "IncreasingThicknessShader", (PyObject *)&IncreasingThicknessShader_Type);
- if (PyType_Ready(&PolygonalizationShader_Type) < 0)
+ if (PyType_Ready(&PolygonalizationShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&PolygonalizationShader_Type);
PyModule_AddObject(module, "PolygonalizationShader", (PyObject *)&PolygonalizationShader_Type);
- if (PyType_Ready(&SamplingShader_Type) < 0)
+ if (PyType_Ready(&SamplingShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&SamplingShader_Type);
PyModule_AddObject(module, "SamplingShader", (PyObject *)&SamplingShader_Type);
- if (PyType_Ready(&SmoothingShader_Type) < 0)
+ if (PyType_Ready(&SmoothingShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&SmoothingShader_Type);
PyModule_AddObject(module, "SmoothingShader", (PyObject *)&SmoothingShader_Type);
- if (PyType_Ready(&SpatialNoiseShader_Type) < 0)
+ if (PyType_Ready(&SpatialNoiseShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&SpatialNoiseShader_Type);
PyModule_AddObject(module, "SpatialNoiseShader", (PyObject *)&SpatialNoiseShader_Type);
- if (PyType_Ready(&StrokeTextureStepShader_Type) < 0)
+ if (PyType_Ready(&StrokeTextureStepShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&StrokeTextureStepShader_Type);
PyModule_AddObject(module, "StrokeTextureStepShader", (PyObject *)&StrokeTextureStepShader_Type);
- if (PyType_Ready(&ThicknessNoiseShader_Type) < 0)
+ if (PyType_Ready(&ThicknessNoiseShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&ThicknessNoiseShader_Type);
PyModule_AddObject(module, "ThicknessNoiseShader", (PyObject *)&ThicknessNoiseShader_Type);
- if (PyType_Ready(&TipRemoverShader_Type) < 0)
+ if (PyType_Ready(&TipRemoverShader_Type) < 0) {
return -1;
+ }
Py_INCREF(&TipRemoverShader_Type);
PyModule_AddObject(module, "TipRemoverShader", (PyObject *)&TipRemoverShader_Type);
@@ -180,8 +200,9 @@ static int StrokeShader___init__(BPy_StrokeShader *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->ss = new StrokeShader();
self->ss->py_ss = (PyObject *)self;
return 0;
@@ -189,8 +210,9 @@ static int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObjec
static void StrokeShader___dealloc__(BPy_StrokeShader *self)
{
- if (self->ss)
+ if (self->ss) {
delete self->ss;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -212,8 +234,9 @@ static PyObject *StrokeShader_shade(BPy_StrokeShader *self, PyObject *args, PyOb
static const char *kwlist[] = {"stroke", NULL};
PyObject *py_s = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Stroke_Type, &py_s))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Stroke_Type, &py_s)) {
return NULL;
+ }
if (typeid(*(self->ss)) == typeid(StrokeShader)) {
PyErr_SetString(PyExc_TypeError, "shade method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
index 90a9258d9e8..81e72c2c7f2 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
@@ -40,11 +40,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int UnaryFunction0D_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0D_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryFunction0D_Type);
PyModule_AddObject(module, "UnaryFunction0D", (PyObject *)&UnaryFunction0D_Type);
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
index 879f090275d..b2bd6e657fe 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
@@ -38,11 +38,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int UnaryFunction1D_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction1D_Type) < 0)
+ if (PyType_Ready(&UnaryFunction1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryFunction1D_Type);
PyModule_AddObject(module, "UnaryFunction1D", (PyObject *)&UnaryFunction1D_Type);
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
index 7d1a91f156d..f4f1205bb09 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
@@ -34,21 +34,25 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int UnaryPredicate0D_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryPredicate0D_Type) < 0)
+ if (PyType_Ready(&UnaryPredicate0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryPredicate0D_Type);
PyModule_AddObject(module, "UnaryPredicate0D", (PyObject *)&UnaryPredicate0D_Type);
- if (PyType_Ready(&FalseUP0D_Type) < 0)
+ if (PyType_Ready(&FalseUP0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&FalseUP0D_Type);
PyModule_AddObject(module, "FalseUP0D", (PyObject *)&FalseUP0D_Type);
- if (PyType_Ready(&TrueUP0D_Type) < 0)
+ if (PyType_Ready(&TrueUP0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&TrueUP0D_Type);
PyModule_AddObject(module, "TrueUP0D", (PyObject *)&TrueUP0D_Type);
@@ -83,8 +87,9 @@ static int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->up0D = new UnaryPredicate0D();
self->up0D->py_up0D = (PyObject *)self;
return 0;
@@ -92,8 +97,9 @@ static int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args,
static void UnaryPredicate0D___dealloc__(BPy_UnaryPredicate0D *self)
{
- if (self->up0D)
+ if (self->up0D) {
delete self->up0D;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -110,8 +116,9 @@ static PyObject *UnaryPredicate0D___call__(BPy_UnaryPredicate0D *self,
PyObject *py_if0D_it;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &py_if0D_it))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &py_if0D_it)) {
return NULL;
+ }
Interface0DIterator *if0D_it = ((BPy_Interface0DIterator *)py_if0D_it)->if0D_it;
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
index 3c728d1a852..8bdd9823140 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
@@ -43,63 +43,75 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int UnaryPredicate1D_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryPredicate1D_Type) < 0)
+ if (PyType_Ready(&UnaryPredicate1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryPredicate1D_Type);
PyModule_AddObject(module, "UnaryPredicate1D", (PyObject *)&UnaryPredicate1D_Type);
- if (PyType_Ready(&ContourUP1D_Type) < 0)
+ if (PyType_Ready(&ContourUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&ContourUP1D_Type);
PyModule_AddObject(module, "ContourUP1D", (PyObject *)&ContourUP1D_Type);
- if (PyType_Ready(&DensityLowerThanUP1D_Type) < 0)
+ if (PyType_Ready(&DensityLowerThanUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&DensityLowerThanUP1D_Type);
PyModule_AddObject(module, "DensityLowerThanUP1D", (PyObject *)&DensityLowerThanUP1D_Type);
- if (PyType_Ready(&EqualToChainingTimeStampUP1D_Type) < 0)
+ if (PyType_Ready(&EqualToChainingTimeStampUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&EqualToChainingTimeStampUP1D_Type);
PyModule_AddObject(
module, "EqualToChainingTimeStampUP1D", (PyObject *)&EqualToChainingTimeStampUP1D_Type);
- if (PyType_Ready(&EqualToTimeStampUP1D_Type) < 0)
+ if (PyType_Ready(&EqualToTimeStampUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&EqualToTimeStampUP1D_Type);
PyModule_AddObject(module, "EqualToTimeStampUP1D", (PyObject *)&EqualToTimeStampUP1D_Type);
- if (PyType_Ready(&ExternalContourUP1D_Type) < 0)
+ if (PyType_Ready(&ExternalContourUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&ExternalContourUP1D_Type);
PyModule_AddObject(module, "ExternalContourUP1D", (PyObject *)&ExternalContourUP1D_Type);
- if (PyType_Ready(&FalseUP1D_Type) < 0)
+ if (PyType_Ready(&FalseUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&FalseUP1D_Type);
PyModule_AddObject(module, "FalseUP1D", (PyObject *)&FalseUP1D_Type);
- if (PyType_Ready(&QuantitativeInvisibilityUP1D_Type) < 0)
+ if (PyType_Ready(&QuantitativeInvisibilityUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&QuantitativeInvisibilityUP1D_Type);
PyModule_AddObject(
module, "QuantitativeInvisibilityUP1D", (PyObject *)&QuantitativeInvisibilityUP1D_Type);
- if (PyType_Ready(&ShapeUP1D_Type) < 0)
+ if (PyType_Ready(&ShapeUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&ShapeUP1D_Type);
PyModule_AddObject(module, "ShapeUP1D", (PyObject *)&ShapeUP1D_Type);
- if (PyType_Ready(&TrueUP1D_Type) < 0)
+ if (PyType_Ready(&TrueUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&TrueUP1D_Type);
PyModule_AddObject(module, "TrueUP1D", (PyObject *)&TrueUP1D_Type);
- if (PyType_Ready(&WithinImageBoundaryUP1D_Type) < 0)
+ if (PyType_Ready(&WithinImageBoundaryUP1D_Type) < 0) {
return -1;
+ }
Py_INCREF(&WithinImageBoundaryUP1D_Type);
PyModule_AddObject(module, "WithinImageBoundaryUP1D", (PyObject *)&WithinImageBoundaryUP1D_Type);
@@ -133,8 +145,9 @@ static int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->up1D = new UnaryPredicate1D();
self->up1D->py_up1D = (PyObject *)self;
return 0;
@@ -142,8 +155,9 @@ static int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args,
static void UnaryPredicate1D___dealloc__(BPy_UnaryPredicate1D *self)
{
- if (self->up1D)
+ if (self->up1D) {
delete self->up1D;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -159,8 +173,10 @@ static PyObject *UnaryPredicate1D___call__(BPy_UnaryPredicate1D *self,
static const char *kwlist[] = {"inter", NULL};
PyObject *py_if1D;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &py_if1D))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &py_if1D)) {
return NULL;
+ }
Interface1D *if1D = ((BPy_Interface1D *)py_if1D)->if1D;
diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
index a46a63da03a..b6ca377fb40 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
@@ -34,11 +34,13 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int ViewMap_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&ViewMap_Type) < 0)
+ if (PyType_Ready(&ViewMap_Type) < 0) {
return -1;
+ }
Py_INCREF(&ViewMap_Type);
PyModule_AddObject(module, "ViewMap", (PyObject *)&ViewMap_Type);
@@ -58,16 +60,18 @@ static int ViewMap_init(BPy_ViewMap *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->vm = new ViewMap();
return 0;
}
static void ViewMap_dealloc(BPy_ViewMap *self)
{
- if (self->vm)
+ if (self->vm) {
delete self->vm;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -93,11 +97,13 @@ static PyObject *ViewMap_get_closest_viewedge(BPy_ViewMap *self, PyObject *args,
static const char *kwlist[] = {"x", "y", NULL};
double x, y;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "dd", (char **)kwlist, &x, &y))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "dd", (char **)kwlist, &x, &y)) {
return NULL;
+ }
ViewEdge *ve = const_cast<ViewEdge *>(self->vm->getClosestViewEdge(x, y));
- if (ve)
+ if (ve) {
return BPy_ViewEdge_from_ViewEdge(*ve);
+ }
Py_RETURN_NONE;
}
@@ -118,11 +124,13 @@ static PyObject *ViewMap_get_closest_fedge(BPy_ViewMap *self, PyObject *args, Py
static const char *kwlist[] = {"x", "y", NULL};
double x, y;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "dd", (char **)kwlist, &x, &y))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "dd", (char **)kwlist, &x, &y)) {
return NULL;
+ }
FEdge *fe = const_cast<FEdge *>(self->vm->getClosestFEdge(x, y));
- if (fe)
+ if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
index 743a0ba79dc..79eeba17529 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
@@ -35,11 +35,13 @@ extern "C" {
int ViewShape_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&ViewShape_Type) < 0)
+ if (PyType_Ready(&ViewShape_Type) < 0) {
return -1;
+ }
Py_INCREF(&ViewShape_Type);
PyModule_AddObject(module, "ViewShape", (PyObject *)&ViewShape_Type);
@@ -107,8 +109,9 @@ static void ViewShape_dealloc(BPy_ViewShape *self)
self->vs->setSShape((SShape *)NULL);
Py_DECREF(self->py_ss);
}
- if (self->vs && !self->borrowed)
+ if (self->vs && !self->borrowed) {
delete self->vs;
+ }
Py_TYPE(self)->tp_free((PyObject *)self);
}
@@ -130,8 +133,9 @@ static PyObject *ViewShape_add_edge(BPy_ViewShape *self, PyObject *args, PyObjec
static const char *kwlist[] = {"edge", NULL};
PyObject *py_ve = 0;
- if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve))
+ if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve)) {
return NULL;
+ }
self->vs->AddEdge(((BPy_ViewEdge *)py_ve)->ve);
Py_RETURN_NONE;
}
@@ -149,8 +153,9 @@ static PyObject *ViewShape_add_vertex(BPy_ViewShape *self, PyObject *args, PyObj
static const char *kwlist[] = {"vertex", NULL};
PyObject *py_vv = 0;
- if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewVertex_Type, &py_vv))
+ if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewVertex_Type, &py_vv)) {
return NULL;
+ }
self->vs->AddVertex(((BPy_ViewVertex *)py_vv)->vv);
Py_RETURN_NONE;
}
@@ -179,8 +184,9 @@ PyDoc_STRVAR(ViewShape_sshape_doc,
static PyObject *ViewShape_sshape_get(BPy_ViewShape *self, void *UNUSED(closure))
{
SShape *ss = self->vs->sshape();
- if (!ss)
+ if (!ss) {
Py_RETURN_NONE;
+ }
return BPy_SShape_from_SShape(*ss);
}
@@ -192,8 +198,9 @@ static int ViewShape_sshape_set(BPy_ViewShape *self, PyObject *value, void *UNUS
}
BPy_SShape *py_ss = (BPy_SShape *)value;
self->vs->setSShape(py_ss->ss);
- if (self->py_ss)
+ if (self->py_ss) {
Py_DECREF(self->py_ss);
+ }
if (!py_ss->borrowed) {
self->py_ss = py_ss;
Py_INCREF(self->py_ss);
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
index f8b2d5a1ab5..65c7f063dcf 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
@@ -46,8 +46,9 @@ static int FalseBP1D___init__(BPy_FalseBP1D *self, PyObject *args, PyObject *kwd
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->py_bp1D.bp1D = new Predicates1D::FalseBP1D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
index 7387252bfd0..59c3283ed35 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
@@ -47,8 +47,9 @@ static int Length2DBP1D___init__(BPy_Length2DBP1D *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_bp1D.bp1D = new Predicates1D::Length2DBP1D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
index 005bbded74f..62bfbbcfad0 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
@@ -46,8 +46,9 @@ static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D *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_bp1D.bp1D = new Predicates1D::SameShapeIdBP1D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
index 363c0386915..e169ffe7c75 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
@@ -46,8 +46,9 @@ static int TrueBP1D___init__(BPy_TrueBP1D *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->py_bp1D.bp1D = new Predicates1D::TrueBP1D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
index 2169ee18166..ec660b7a7fe 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
@@ -75,8 +75,9 @@ static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self,
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_bp1D.bp1D = new Predicates1D::ViewMapGradientNormBP1D(i, t, f);
return 0;
diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp
index c86602c78b1..c931a246961 100644
--- a/source/blender/freestyle/intern/python/Director.cpp
+++ b/source/blender/freestyle/intern/python/Director.cpp
@@ -75,12 +75,14 @@ int Director_BPy_BinaryPredicate0D___call__(BinaryPredicate0D *bp0D,
PyObject *result = PyObject_CallMethod((PyObject *)bp0D->py_bp0D, "__call__", "OO", arg1, arg2);
Py_DECREF(arg1);
Py_DECREF(arg2);
- if (!result)
+ if (!result) {
return -1;
+ }
int ret = PyObject_IsTrue(result);
Py_DECREF(result);
- if (ret < 0)
+ if (ret < 0) {
return -1;
+ }
bp0D->result = ret;
return 0;
}
@@ -104,12 +106,14 @@ int Director_BPy_BinaryPredicate1D___call__(BinaryPredicate1D *bp1D,
PyObject *result = PyObject_CallMethod((PyObject *)bp1D->py_bp1D, "__call__", "OO", arg1, arg2);
Py_DECREF(arg1);
Py_DECREF(arg2);
- if (!result)
+ if (!result) {
return -1;
+ }
int ret = PyObject_IsTrue(result);
Py_DECREF(result);
- if (ret < 0)
+ if (ret < 0) {
return -1;
+ }
bp1D->result = ret;
return 0;
}
@@ -122,16 +126,19 @@ int Director_BPy_UnaryPredicate0D___call__(UnaryPredicate0D *up0D, Interface0DIt
return -1;
}
PyObject *arg = BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false);
- if (!arg)
+ if (!arg) {
return -1;
+ }
PyObject *result = PyObject_CallMethod((PyObject *)up0D->py_up0D, "__call__", "O", arg);
Py_DECREF(arg);
- if (!result)
+ if (!result) {
return -1;
+ }
int ret = PyObject_IsTrue(result);
Py_DECREF(result);
- if (ret < 0)
+ if (ret < 0) {
return -1;
+ }
up0D->result = ret;
return 0;
}
@@ -144,16 +151,19 @@ int Director_BPy_UnaryPredicate1D___call__(UnaryPredicate1D *up1D, Interface1D &
return -1;
}
PyObject *arg = Any_BPy_Interface1D_from_Interface1D(if1D);
- if (!arg)
+ if (!arg) {
return -1;
+ }
PyObject *result = PyObject_CallMethod((PyObject *)up1D->py_up1D, "__call__", "O", arg);
Py_DECREF(arg);
- if (!result)
+ if (!result) {
return -1;
+ }
int ret = PyObject_IsTrue(result);
Py_DECREF(result);
- if (ret < 0)
+ if (ret < 0) {
return -1;
+ }
up1D->result = ret;
return 0;
}
@@ -166,12 +176,14 @@ int Director_BPy_StrokeShader_shade(StrokeShader *ss, Stroke &s)
return -1;
}
PyObject *arg = BPy_Stroke_from_Stroke(s);
- if (!arg)
+ if (!arg) {
return -1;
+ }
PyObject *result = PyObject_CallMethod((PyObject *)ss->py_ss, "shade", "O", arg);
Py_DECREF(arg);
- if (!result)
+ if (!result) {
return -1;
+ }
Py_DECREF(result);
return 0;
}
@@ -184,8 +196,9 @@ int Director_BPy_ChainingIterator_init(ChainingIterator *c_it)
return -1;
}
PyObject *result = PyObject_CallMethod((PyObject *)c_it->py_c_it, "init", NULL);
- if (!result)
+ if (!result) {
return -1;
+ }
Py_DECREF(result);
return 0;
}
@@ -197,12 +210,14 @@ int Director_BPy_ChainingIterator_traverse(ChainingIterator *c_it, AdjacencyIter
return -1;
}
PyObject *arg = BPy_AdjacencyIterator_from_AdjacencyIterator(a_it);
- if (!arg)
+ if (!arg) {
return -1;
+ }
PyObject *result = PyObject_CallMethod((PyObject *)c_it->py_c_it, "traverse", "O", arg);
Py_DECREF(arg);
- if (!result)
+ if (!result) {
return -1;
+ }
if (BPy_ViewEdge_Check(result)) {
c_it->result = ((BPy_ViewEdge *)result)->ve;
}
@@ -227,12 +242,14 @@ int Director_BPy_UnaryFunction0D___call__(void *uf0D, void *py_uf0D, Interface0D
}
PyObject *obj = (PyObject *)py_uf0D;
PyObject *arg = BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false);
- if (!arg)
+ if (!arg) {
return -1;
+ }
PyObject *result = PyObject_CallMethod(obj, "__call__", "O", arg);
Py_DECREF(arg);
- if (!result)
+ if (!result) {
return -1;
+ }
if (BPy_UnaryFunction0DDouble_Check(obj)) {
((UnaryFunction0D<double> *)uf0D)->result = PyFloat_AsDouble(result);
}
@@ -253,14 +270,16 @@ int Director_BPy_UnaryFunction0D___call__(void *uf0D, void *py_uf0D, Interface0D
}
else if (BPy_UnaryFunction0DVec2f_Check(obj)) {
Vec2f vec;
- if (!Vec2f_ptr_from_Vector(result, vec))
+ if (!Vec2f_ptr_from_Vector(result, vec)) {
return -1;
+ }
((UnaryFunction0D<Vec2f> *)uf0D)->result = vec;
}
else if (BPy_UnaryFunction0DVec3f_Check(obj)) {
Vec3f vec;
- if (!Vec3f_ptr_from_Vector(result, vec))
+ if (!Vec3f_ptr_from_Vector(result, vec)) {
return -1;
+ }
((UnaryFunction0D<Vec3f> *)uf0D)->result = vec;
}
else if (BPy_UnaryFunction0DVectorViewShape_Check(obj)) {
@@ -287,12 +306,14 @@ int Director_BPy_UnaryFunction1D___call__(void *uf1D, void *py_uf1D, Interface1D
}
PyObject *obj = (PyObject *)py_uf1D;
PyObject *arg = Any_BPy_Interface1D_from_Interface1D(if1D);
- if (!arg)
+ if (!arg) {
return -1;
+ }
PyObject *result = PyObject_CallMethod(obj, "__call__", "O", arg);
Py_DECREF(arg);
- if (!result)
+ if (!result) {
return -1;
+ }
if (BPy_UnaryFunction1DDouble_Check(obj)) {
((UnaryFunction1D<double> *)uf1D)->result = PyFloat_AsDouble(result);
}
@@ -307,14 +328,16 @@ int Director_BPy_UnaryFunction1D___call__(void *uf1D, void *py_uf1D, Interface1D
}
else if (BPy_UnaryFunction1DVec2f_Check(obj)) {
Vec2f vec;
- if (!Vec2f_ptr_from_Vector(result, vec))
+ if (!Vec2f_ptr_from_Vector(result, vec)) {
return -1;
+ }
((UnaryFunction1D<Vec2f> *)uf1D)->result = vec;
}
else if (BPy_UnaryFunction1DVec3f_Check(obj)) {
Vec3f vec;
- if (!Vec3f_ptr_from_Vector(result, vec))
+ if (!Vec3f_ptr_from_Vector(result, vec)) {
return -1;
+ }
((UnaryFunction1D<Vec3f> *)uf1D)->result = vec;
}
else if (BPy_UnaryFunction1DVectorViewShape_Check(obj)) {
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
index 8a5bb0b17ff..8e619ec95a4 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
@@ -88,10 +88,12 @@ static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds)
float t2d;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &CurvePoint_Type, &obj1)) {
- if (!obj1)
+ if (!obj1) {
self->cp = new CurvePoint();
- else
+ }
+ else {
self->cp = new CurvePoint(*(((BPy_CurvePoint *)obj1)->cp));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args,
@@ -148,8 +150,9 @@ PyDoc_STRVAR(CurvePoint_first_svertex_doc,
static PyObject *CurvePoint_first_svertex_get(BPy_CurvePoint *self, void *UNUSED(closure))
{
SVertex *A = self->cp->A();
- if (A)
+ if (A) {
return BPy_SVertex_from_SVertex(*A);
+ }
Py_RETURN_NONE;
}
@@ -173,8 +176,9 @@ PyDoc_STRVAR(CurvePoint_second_svertex_doc,
static PyObject *CurvePoint_second_svertex_get(BPy_CurvePoint *self, void *UNUSED(closure))
{
SVertex *B = self->cp->B();
- if (B)
+ if (B) {
return BPy_SVertex_from_SVertex(*B);
+ }
Py_RETURN_NONE;
}
@@ -201,8 +205,9 @@ static PyObject *CurvePoint_fedge_get(BPy_CurvePoint *self, void *UNUSED(closure
SVertex *A = self->cp->A();
Interface0D *B = (Interface0D *)self->cp->B();
// B can be NULL under certain circumstances
- if (B)
+ if (B) {
return Any_BPy_Interface1D_from_Interface1D(*(A->getFEdge(*B)));
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
index f4b8ca07d3f..08ad378ab75 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
@@ -65,10 +65,12 @@ static int SVertex_init(BPy_SVertex *self, PyObject *args, PyObject *kwds)
float v[3];
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &SVertex_Type, &obj)) {
- if (!obj)
+ if (!obj) {
self->sv = new SVertex();
- else
+ }
+ else {
self->sv = new SVertex(*(((BPy_SVertex *)obj)->sv));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(
@@ -100,8 +102,9 @@ static PyObject *SVertex_add_normal(BPy_SVertex *self, PyObject *args, PyObject
PyObject *py_normal;
Vec3r n;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &py_normal))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &py_normal)) {
return NULL;
+ }
if (!Vec3r_ptr_from_PyObject(py_normal, n)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 3D vector (either a list of 3 elements or Vector)");
@@ -124,8 +127,9 @@ static PyObject *SVertex_add_fedge(BPy_SVertex *self, PyObject *args, PyObject *
static const char *kwlist[] = {"fedge", NULL};
PyObject *py_fe;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe)) {
return NULL;
+ }
self->sv->AddFEdge(((BPy_FEdge *)py_fe)->fe);
Py_RETURN_NONE;
}
@@ -152,8 +156,9 @@ static PyMethodDef BPy_SVertex_methods[] = {
static int SVertex_mathutils_check(BaseMathObject *bmo)
{
- if (!BPy_SVertex_Check(bmo->cb_user))
+ if (!BPy_SVertex_Check(bmo->cb_user)) {
return -1;
+ }
return 0;
}
@@ -378,8 +383,9 @@ PyDoc_STRVAR(SVertex_viewvertex_doc,
static PyObject *SVertex_viewvertex_get(BPy_SVertex *self, void *UNUSED(closure))
{
ViewVertex *vv = self->sv->viewvertex();
- if (vv)
+ if (vv) {
return Any_BPy_ViewVertex_from_ViewVertex(*vv);
+ }
Py_RETURN_NONE;
}
@@ -399,8 +405,9 @@ PyDoc_STRVAR(SVertex_curvatures_doc,
static PyObject *SVertex_curvatures_get(BPy_SVertex *self, void *UNUSED(closure))
{
const CurvatureInfo *info = self->sv->getCurvatureInfo();
- if (!info)
+ if (!info) {
Py_RETURN_NONE;
+ }
Vec3r e1(info->e1.x(), info->e1.y(), info->e1.z());
Vec3r e2(info->e2.x(), info->e2.y(), info->e2.z());
Vec3r er(info->er.x(), info->er.y(), info->er.z());
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
index 1ff46482911..29bba040316 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
@@ -105,8 +105,9 @@ static PyObject *ViewVertex_edges_iterator(BPy_ViewVertex *self, PyObject *args,
static const char *kwlist[] = {"edge", NULL};
PyObject *py_ve;
- if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve))
+ if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve)) {
return NULL;
+ }
ViewEdge *ve = ((BPy_ViewEdge *)py_ve)->ve;
ViewVertexInternal::orientedViewEdgeIterator ove_it(self->vv->edgesIterator(ve));
return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ove_it, false);
@@ -132,8 +133,9 @@ PyDoc_STRVAR(ViewVertex_nature_doc,
static PyObject *ViewVertex_nature_get(BPy_ViewVertex *self, void *UNUSED(closure))
{
Nature::VertexNature nature = self->vv->getNature();
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return NULL;
+ }
return BPy_Nature_from_Nature(nature); // return a copy
}
diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
index 3637899fbc2..503dd3bf044 100644
--- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
@@ -149,10 +149,12 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
&obj1,
&StrokeAttribute_Type,
&obj2)) {
- if (!obj2)
+ if (!obj2) {
self->sv = new StrokeVertex(((BPy_SVertex *)obj1)->sv);
- else
+ }
+ else {
self->sv = new StrokeVertex(((BPy_SVertex *)obj1)->sv, *(((BPy_StrokeAttribute *)obj2)->sa));
+ }
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument(s)");
@@ -171,8 +173,9 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
static int StrokeVertex_mathutils_check(BaseMathObject *bmo)
{
- if (!BPy_StrokeVertex_Check(bmo->cb_user))
+ if (!BPy_StrokeVertex_Check(bmo->cb_user)) {
return -1;
+ }
return 0;
}
diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
index 87873677189..315c0b16061 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
@@ -55,12 +55,15 @@ static int NonTVertex_init(BPy_NonTVertex *self, PyObject *args, PyObject *kwds)
static const char *kwlist[] = {"svertex", NULL};
PyObject *obj = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &SVertex_Type, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &SVertex_Type, &obj)) {
return -1;
- if (!obj)
+ }
+ if (!obj) {
self->ntv = new NonTVertex();
- else
+ }
+ else {
self->ntv = new NonTVertex(((BPy_SVertex *)obj)->sv);
+ }
self->py_vv.vv = self->ntv;
self->py_vv.py_if0D.if0D = self->ntv;
self->py_vv.py_if0D.borrowed = false;
@@ -77,8 +80,9 @@ PyDoc_STRVAR(NonTVertex_svertex_doc,
static PyObject *NonTVertex_svertex_get(BPy_NonTVertex *self, void *UNUSED(closure))
{
SVertex *v = self->ntv->svertex();
- if (v)
+ if (v) {
return BPy_SVertex_from_SVertex(*v);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
index 9a8592aaea5..7b23fdb04f1 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
@@ -53,8 +53,9 @@ static int TVertex_init(BPy_TVertex *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->tv = new TVertex();
self->py_vv.vv = self->tv;
self->py_vv.py_if0D.if0D = self->tv;
@@ -77,11 +78,13 @@ static PyObject *TVertex_get_svertex(BPy_TVertex *self, PyObject *args, PyObject
static const char *kwlist[] = {"fedge", NULL};
PyObject *py_fe;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe)) {
return NULL;
+ }
SVertex *sv = self->tv->getSVertex(((BPy_FEdge *)py_fe)->fe);
- if (sv)
+ if (sv) {
return BPy_SVertex_from_SVertex(*sv);
+ }
Py_RETURN_NONE;
}
@@ -102,11 +105,13 @@ static PyObject *TVertex_get_mate(BPy_TVertex *self, PyObject *args, PyObject *k
static const char *kwlist[] = {"viewedge", NULL};
PyObject *py_ve;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve)) {
return NULL;
+ }
ViewEdge *ve = self->tv->mate(((BPy_ViewEdge *)py_ve)->ve);
- if (ve)
+ if (ve) {
return BPy_ViewEdge_from_ViewEdge(*ve);
+ }
Py_RETURN_NONE;
}
@@ -132,8 +137,9 @@ PyDoc_STRVAR(TVertex_front_svertex_doc,
static PyObject *TVertex_front_svertex_get(BPy_TVertex *self, void *UNUSED(closure))
{
SVertex *v = self->tv->frontSVertex();
- if (v)
+ if (v) {
return BPy_SVertex_from_SVertex(*v);
+ }
Py_RETURN_NONE;
}
@@ -155,8 +161,9 @@ PyDoc_STRVAR(TVertex_back_svertex_doc,
static PyObject *TVertex_back_svertex_get(BPy_TVertex *self, void *UNUSED(closure))
{
SVertex *v = self->tv->backSVertex();
- if (v)
+ if (v) {
return BPy_SVertex_from_SVertex(*v);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
index 7ca783d9aa4..070e54c9305 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
@@ -74,10 +74,12 @@ static int FEdge_init(BPy_FEdge *self, PyObject *args, PyObject *kwds)
PyObject *obj1 = 0, *obj2 = 0;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &FEdge_Type, &obj1)) {
- if (!obj1)
+ if (!obj1) {
self->fe = new FEdge();
- else
+ }
+ else {
self->fe = new FEdge(*(((BPy_FEdge *)obj1)->fe));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args,
@@ -108,12 +110,14 @@ static Py_ssize_t FEdge_sq_length(BPy_FEdge * /*self*/)
static PyObject *FEdge_sq_item(BPy_FEdge *self, int keynum)
{
- if (keynum < 0)
+ if (keynum < 0) {
keynum += FEdge_sq_length(self);
+ }
if (keynum == 0 || keynum == 1) {
SVertex *v = self->fe->operator[](keynum);
- if (v)
+ if (v) {
return BPy_SVertex_from_SVertex(*v);
+ }
Py_RETURN_NONE;
}
PyErr_Format(PyExc_IndexError, "FEdge[index]: index %d out of range", keynum);
@@ -143,8 +147,9 @@ PyDoc_STRVAR(FEdge_first_svertex_doc,
static PyObject *FEdge_first_svertex_get(BPy_FEdge *self, void *UNUSED(closure))
{
SVertex *A = self->fe->vertexA();
- if (A)
+ if (A) {
return BPy_SVertex_from_SVertex(*A);
+ }
Py_RETURN_NONE;
}
@@ -166,8 +171,9 @@ PyDoc_STRVAR(FEdge_second_svertex_doc,
static PyObject *FEdge_second_svertex_get(BPy_FEdge *self, void *UNUSED(closure))
{
SVertex *B = self->fe->vertexB();
- if (B)
+ if (B) {
return BPy_SVertex_from_SVertex(*B);
+ }
Py_RETURN_NONE;
}
@@ -190,8 +196,9 @@ PyDoc_STRVAR(FEdge_next_fedge_doc,
static PyObject *FEdge_next_fedge_get(BPy_FEdge *self, void *UNUSED(closure))
{
FEdge *fe = self->fe->nextEdge();
- if (fe)
+ if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
+ }
Py_RETURN_NONE;
}
@@ -214,8 +221,9 @@ PyDoc_STRVAR(FEdge_previous_fedge_doc,
static PyObject *FEdge_previous_fedge_get(BPy_FEdge *self, void *UNUSED(closure))
{
FEdge *fe = self->fe->previousEdge();
- if (fe)
+ if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
+ }
Py_RETURN_NONE;
}
@@ -237,8 +245,9 @@ PyDoc_STRVAR(FEdge_viewedge_doc,
static PyObject *FEdge_viewedge_get(BPy_FEdge *self, void *UNUSED(closure))
{
ViewEdge *ve = self->fe->viewedge();
- if (ve)
+ if (ve) {
return BPy_ViewEdge_from_ViewEdge(*ve);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
index 1d2d4f51028..932911fb6e6 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
@@ -65,10 +65,12 @@ static int FrsCurve_init(BPy_FrsCurve *self, PyObject *args, PyObject *kwds)
PyObject *obj = 0;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &FrsCurve_Type, &obj)) {
- if (!obj)
+ if (!obj) {
self->c = new Curve();
- else
+ }
+ else {
self->c = new Curve(*(((BPy_FrsCurve *)obj)->c));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist_2, &Id_Type, &obj)) {
@@ -96,8 +98,9 @@ static PyObject *FrsCurve_push_vertex_back(BPy_FrsCurve *self, PyObject *args, P
static const char *kwlist[] = {"vertex", NULL};
PyObject *obj = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
return NULL;
+ }
if (BPy_CurvePoint_Check(obj)) {
self->c->push_vertex_back(((BPy_CurvePoint *)obj)->cp);
@@ -125,8 +128,9 @@ static PyObject *FrsCurve_push_vertex_front(BPy_FrsCurve *self, PyObject *args,
static const char *kwlist[] = {"vertex", NULL};
PyObject *obj = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
return NULL;
+ }
if (BPy_CurvePoint_Check(obj)) {
self->c->push_vertex_front(((BPy_CurvePoint *)obj)->cp);
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index 423a61c7f1d..8ba22b0617a 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -62,12 +62,15 @@ static int Stroke_init(BPy_Stroke *self, PyObject *args, PyObject *kwds)
static const char *kwlist[] = {"brother", NULL};
PyObject *brother = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &Stroke_Type, &brother))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &Stroke_Type, &brother)) {
return -1;
- if (!brother)
+ }
+ if (!brother) {
self->s = new Stroke();
- else
+ }
+ else {
self->s = new Stroke(*(((BPy_Stroke *)brother)->s));
+ }
self->py_if1D.if1D = self->s;
self->py_if1D.borrowed = false;
return 0;
@@ -86,8 +89,9 @@ static Py_ssize_t Stroke_sq_length(BPy_Stroke *self)
static PyObject *Stroke_sq_item(BPy_Stroke *self, int keynum)
{
- if (keynum < 0)
+ if (keynum < 0) {
keynum += Stroke_sq_length(self);
+ }
if (keynum < 0 || keynum >= Stroke_sq_length(self)) {
PyErr_Format(PyExc_IndexError, "Stroke[index]: index %d out of range", keynum);
return NULL;
@@ -115,8 +119,9 @@ static PyObject *Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObj
static const char *kwlist[] = {"n", NULL};
int i;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i)) {
return NULL;
+ }
return PyFloat_FromDouble(self->s->ComputeSampling(i));
}
@@ -215,8 +220,10 @@ static PyObject *Stroke_remove_vertex(BPy_Stroke *self, PyObject *args, PyObject
static const char *kwlist[] = {"vertex", NULL};
PyObject *py_sv = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &StrokeVertex_Type, &py_sv))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kwds, "O!", (char **)kwlist, &StrokeVertex_Type, &py_sv)) {
return NULL;
+ }
if (((BPy_StrokeVertex *)py_sv)->sv) {
self->s->RemoveVertex(((BPy_StrokeVertex *)py_sv)->sv);
}
@@ -267,8 +274,9 @@ static PyObject *Stroke_stroke_vertices_begin(BPy_Stroke *self, PyObject *args,
static const char *kwlist[] = {"t", NULL};
float f = 0.0f;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
return NULL;
+ }
StrokeInternal::StrokeVertexIterator sv_it(self->s->strokeVerticesBegin(f));
return BPy_StrokeVertexIterator_from_StrokeVertexIterator(sv_it, false);
}
@@ -386,8 +394,9 @@ static PyObject *Stroke_texture_id_get(BPy_Stroke *self, void *UNUSED(closure))
static int Stroke_texture_id_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
{
unsigned int i = PyLong_AsUnsignedLong(value);
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return -1;
+ }
self->s->setTextureId(i);
return 0;
}
@@ -404,8 +413,9 @@ static PyObject *Stroke_tips_get(BPy_Stroke *self, void *UNUSED(closure))
static int Stroke_tips_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
{
- if (!PyBool_Check(value))
+ if (!PyBool_Check(value)) {
return -1;
+ }
self->s->setTips(bool_from_PyBool(value));
return 0;
}
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
index 6331145974a..208d6cbfd6d 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
@@ -59,12 +59,15 @@ static int ViewEdge_init(BPy_ViewEdge *self, PyObject *args, PyObject *kwds)
static const char *kwlist[] = {"brother", NULL};
PyObject *brother = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &ViewEdge_Type, &brother))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &ViewEdge_Type, &brother)) {
return -1;
- if (!brother)
+ }
+ if (!brother) {
self->ve = new ViewEdge();
- else
+ }
+ else {
self->ve = new ViewEdge(*(((BPy_ViewEdge *)brother)->ve));
+ }
self->py_if1D.if1D = self->ve;
self->py_if1D.borrowed = false;
return 0;
@@ -99,8 +102,9 @@ PyDoc_STRVAR(ViewEdge_first_viewvertex_doc,
static PyObject *ViewEdge_first_viewvertex_get(BPy_ViewEdge *self, void *UNUSED(closure))
{
ViewVertex *v = self->ve->A();
- if (v)
+ if (v) {
return Any_BPy_ViewVertex_from_ViewVertex(*v);
+ }
Py_RETURN_NONE;
}
@@ -108,8 +112,9 @@ static int ViewEdge_first_viewvertex_set(BPy_ViewEdge *self,
PyObject *value,
void *UNUSED(closure))
{
- if (!BPy_ViewVertex_Check(value))
+ if (!BPy_ViewVertex_Check(value)) {
return -1;
+ }
self->ve->setA(((BPy_ViewVertex *)value)->vv);
return 0;
}
@@ -122,15 +127,17 @@ PyDoc_STRVAR(ViewEdge_last_viewvertex_doc,
static PyObject *ViewEdge_last_viewvertex_get(BPy_ViewEdge *self, void *UNUSED(closure))
{
ViewVertex *v = self->ve->B();
- if (v)
+ if (v) {
return Any_BPy_ViewVertex_from_ViewVertex(*v);
+ }
Py_RETURN_NONE;
}
static int ViewEdge_last_viewvertex_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
{
- if (!BPy_ViewVertex_Check(value))
+ if (!BPy_ViewVertex_Check(value)) {
return -1;
+ }
self->ve->setB(((BPy_ViewVertex *)value)->vv);
return 0;
}
@@ -143,15 +150,17 @@ PyDoc_STRVAR(ViewEdge_first_fedge_doc,
static PyObject *ViewEdge_first_fedge_get(BPy_ViewEdge *self, void *UNUSED(closure))
{
FEdge *fe = self->ve->fedgeA();
- if (fe)
+ if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
+ }
Py_RETURN_NONE;
}
static int ViewEdge_first_fedge_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
{
- if (!BPy_FEdge_Check(value))
+ if (!BPy_FEdge_Check(value)) {
return -1;
+ }
self->ve->setFEdgeA(((BPy_FEdge *)value)->fe);
return 0;
}
@@ -164,15 +173,17 @@ PyDoc_STRVAR(ViewEdge_last_fedge_doc,
static PyObject *ViewEdge_last_fedge_get(BPy_ViewEdge *self, void *UNUSED(closure))
{
FEdge *fe = self->ve->fedgeB();
- if (fe)
+ if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
+ }
Py_RETURN_NONE;
}
static int ViewEdge_last_fedge_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
{
- if (!BPy_FEdge_Check(value))
+ if (!BPy_FEdge_Check(value)) {
return -1;
+ }
self->ve->setFEdgeB(((BPy_FEdge *)value)->fe);
return 0;
}
@@ -185,15 +196,17 @@ PyDoc_STRVAR(ViewEdge_viewshape_doc,
static PyObject *ViewEdge_viewshape_get(BPy_ViewEdge *self, void *UNUSED(closure))
{
ViewShape *vs = self->ve->viewShape();
- if (vs)
+ if (vs) {
return BPy_ViewShape_from_ViewShape(*vs);
+ }
Py_RETURN_NONE;
}
static int ViewEdge_viewshape_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
{
- if (!BPy_ViewShape_Check(value))
+ if (!BPy_ViewShape_Check(value)) {
return -1;
+ }
self->ve->setShape(((BPy_ViewShape *)value)->vs);
return 0;
}
@@ -207,15 +220,17 @@ PyDoc_STRVAR(ViewEdge_occludee_doc,
static PyObject *ViewEdge_occludee_get(BPy_ViewEdge *self, void *UNUSED(closure))
{
ViewShape *vs = self->ve->aShape();
- if (vs)
+ if (vs) {
return BPy_ViewShape_from_ViewShape(*vs);
+ }
Py_RETURN_NONE;
}
static int ViewEdge_occludee_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
{
- if (!BPy_ViewShape_Check(value))
+ if (!BPy_ViewShape_Check(value)) {
return -1;
+ }
self->ve->setaShape(((BPy_ViewShape *)value)->vs);
return 0;
}
@@ -285,8 +300,9 @@ static int ViewEdge_qi_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(clo
{
int qi;
- if ((qi = PyLong_AsLong(value)) == -1 && PyErr_Occurred())
+ if ((qi = PyLong_AsLong(value)) == -1 && PyErr_Occurred()) {
return -1;
+ }
self->ve->setQI(qi);
return 0;
}
@@ -307,8 +323,9 @@ static int ViewEdge_chaining_time_stamp_set(BPy_ViewEdge *self,
{
int timestamp;
- if ((timestamp = PyLong_AsLong(value)) == -1 && PyErr_Occurred())
+ if ((timestamp = PyLong_AsLong(value)) == -1 && PyErr_Occurred()) {
return -1;
+ }
self->ve->setChainingTimeStamp(timestamp);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
index 7a6b2a01728..285100193d3 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -64,10 +64,12 @@ static int Chain_init(BPy_Chain *self, PyObject *args, PyObject *kwds)
PyObject *obj = 0;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &Chain_Type, &obj)) {
- if (!obj)
+ if (!obj) {
self->c = new Chain();
- else
+ }
+ else {
self->c = new Chain(*(((BPy_Chain *)obj)->c));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist_2, &Id_Type, &obj)) {
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
index e91ae155929..018d0c77bb0 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
@@ -68,10 +68,12 @@ static int FEdgeSharp_init(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds)
PyObject *obj1 = 0, *obj2 = 0;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &FEdgeSharp_Type, &obj1)) {
- if (!obj1)
+ if (!obj1) {
self->fes = new FEdgeSharp();
- else
+ }
+ else {
self->fes = new FEdgeSharp(*(((BPy_FEdgeSharp *)obj1)->fes));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args,
@@ -102,8 +104,9 @@ static int FEdgeSharp_init(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds)
static int FEdgeSharp_mathutils_check(BaseMathObject *bmo)
{
- if (!BPy_FEdgeSharp_Check(bmo->cb_user))
+ if (!BPy_FEdgeSharp_Check(bmo->cb_user)) {
return -1;
+ }
return 0;
}
@@ -266,8 +269,9 @@ static int FEdgeSharp_material_index_right_set(BPy_FEdgeSharp *self,
void *UNUSED(closure))
{
unsigned int i = PyLong_AsUnsignedLong(value);
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return -1;
+ }
self->fes->setaFrsMaterialIndex(i);
return 0;
}
@@ -287,8 +291,9 @@ static int FEdgeSharp_material_index_left_set(BPy_FEdgeSharp *self,
void *UNUSED(closure))
{
unsigned int i = PyLong_AsUnsignedLong(value);
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return -1;
+ }
self->fes->setbFrsMaterialIndex(i);
return 0;
}
@@ -330,8 +335,9 @@ static int FEdgeSharp_face_mark_right_set(BPy_FEdgeSharp *self,
PyObject *value,
void *UNUSED(closure))
{
- if (!PyBool_Check(value))
+ if (!PyBool_Check(value)) {
return -1;
+ }
self->fes->setaFaceMark(bool_from_PyBool(value));
return 0;
}
@@ -350,8 +356,9 @@ static int FEdgeSharp_face_mark_left_set(BPy_FEdgeSharp *self,
PyObject *value,
void *UNUSED(closure))
{
- if (!PyBool_Check(value))
+ if (!PyBool_Check(value)) {
return -1;
+ }
self->fes->setbFaceMark(bool_from_PyBool(value));
return 0;
}
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
index 08d18123172..4c2785509f0 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
@@ -66,10 +66,12 @@ static int FEdgeSmooth_init(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwd
if (PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist_1, &FEdgeSmooth_Type, &obj1)) {
- if (!obj1)
+ if (!obj1) {
self->fes = new FEdgeSmooth();
- else
+ }
+ else {
self->fes = new FEdgeSmooth(*(((BPy_FEdgeSmooth *)obj1)->fes));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args,
@@ -96,8 +98,9 @@ static int FEdgeSmooth_init(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwd
static int FEdgeSmooth_mathutils_check(BaseMathObject *bmo)
{
- if (!BPy_FEdgeSmooth_Check(bmo->cb_user))
+ if (!BPy_FEdgeSmooth_Check(bmo->cb_user)) {
return -1;
+ }
return 0;
}
@@ -189,8 +192,9 @@ static int FEdgeSmooth_material_index_set(BPy_FEdgeSmooth *self,
void *UNUSED(closure))
{
unsigned int i = PyLong_AsUnsignedLong(value);
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
return -1;
+ }
self->fes->setFrsMaterialIndex(i);
return 0;
}
@@ -217,8 +221,9 @@ static PyObject *FEdgeSmooth_face_mark_get(BPy_FEdgeSmooth *self, void *UNUSED(c
static int FEdgeSmooth_face_mark_set(BPy_FEdgeSmooth *self, PyObject *value, void *UNUSED(closure))
{
- if (!PyBool_Check(value))
+ if (!PyBool_Check(value)) {
return -1;
+ }
self->fes->setFaceMark(bool_from_PyBool(value));
return 0;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
index 6b23ffadffb..4264e96afc3 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
@@ -121,8 +121,9 @@ static PyObject *AdjacencyIterator_iternext(BPy_AdjacencyIterator *self)
PyErr_SetNone(PyExc_StopIteration);
return NULL;
}
- if (self->at_start)
+ if (self->at_start) {
self->at_start = false;
+ }
else {
self->a_it->increment();
if (self->a_it->isEnd()) {
@@ -148,8 +149,9 @@ static PyObject *AdjacencyIterator_object_get(BPy_AdjacencyIterator *self, void
return NULL;
}
ViewEdge *ve = self->a_it->operator*();
- if (ve)
+ if (ve) {
return BPy_ViewEdge_from_ViewEdge(*ve);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
index 189d41e78a3..28b8e9d7c0a 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
@@ -85,8 +85,9 @@ PyDoc_STRVAR(ChainPredicateIterator_doc,
static int check_begin(PyObject *obj, void *v)
{
- if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj))
+ if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
return 0;
+ }
*((PyObject **)v) = obj;
return 1;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
index d72e830e293..401959be0c0 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
@@ -72,8 +72,9 @@ PyDoc_STRVAR(ChainSilhouetteIterator_doc,
static int check_begin(PyObject *obj, void *v)
{
- if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj))
+ if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
return 0;
+ }
*((PyObject **)v) = obj;
return 1;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
index 370ef23d8ef..b2042107453 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
@@ -73,8 +73,9 @@ PyDoc_STRVAR(
static int check_begin(PyObject *obj, void *v)
{
- if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj))
+ if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
return 0;
+ }
*((PyObject **)v) = obj;
return 1;
}
@@ -166,10 +167,12 @@ static PyObject *ChainingIterator_traverse(BPy_ChainingIterator *self,
return NULL;
}
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &AdjacencyIterator_Type, &py_a_it))
+ args, kwds, "O!", (char **)kwlist, &AdjacencyIterator_Type, &py_a_it)) {
return NULL;
- if (((BPy_AdjacencyIterator *)py_a_it)->a_it)
+ }
+ if (((BPy_AdjacencyIterator *)py_a_it)->a_it) {
self->c_it->traverse(*(((BPy_AdjacencyIterator *)py_a_it)->a_it));
+ }
Py_RETURN_NONE;
}
@@ -196,8 +199,9 @@ static PyObject *ChainingIterator_object_get(BPy_ChainingIterator *self, void *U
return NULL;
}
ViewEdge *ve = self->c_it->operator*();
- if (ve)
+ if (ve) {
return BPy_ViewEdge_from_ViewEdge(*ve);
+ }
Py_RETURN_NONE;
}
@@ -211,8 +215,9 @@ static PyObject *ChainingIterator_next_vertex_get(BPy_ChainingIterator *self,
void *UNUSED(closure))
{
ViewVertex *v = self->c_it->getVertex();
- if (v)
+ if (v) {
return Any_BPy_ViewVertex_from_ViewVertex(*v);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
index 5b287433c13..b33ebc0f4ef 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -67,11 +67,13 @@ static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args,
if (PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist_1, &CurvePointIterator_Type, &brother)) {
- if (!brother)
+ if (!brother) {
self->cp_it = new CurveInternal::CurvePointIterator();
- else
+ }
+ else {
self->cp_it = new CurveInternal::CurvePointIterator(
*(((BPy_CurvePointIterator *)brother)->cp_it));
+ }
}
else if (PyErr_Clear(), PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &step)) {
self->cp_it = new CurveInternal::CurvePointIterator(step);
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
index 6218541df9b..13a981920f3 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -55,12 +55,14 @@ PyDoc_STRVAR(Interface0DIterator_doc,
static int convert_nested_it(PyObject *obj, void *v)
{
- if (!obj || !BPy_Iterator_Check(obj))
+ if (!obj || !BPy_Iterator_Check(obj)) {
return 0;
+ }
Interface0DIteratorNested *nested_it = dynamic_cast<Interface0DIteratorNested *>(
((BPy_Iterator *)obj)->it);
- if (!nested_it)
+ if (!nested_it) {
return 0;
+ }
*((Interface0DIteratorNested **)v) = nested_it;
return 1;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
index 2a860976d7f..260776e8965 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -75,10 +75,12 @@ static int SVertexIterator_init(BPy_SVertexIterator *self, PyObject *args, PyObj
if (PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist_1, &SVertexIterator_Type, &obj1)) {
- if (!obj1)
+ if (!obj1) {
self->sv_it = new ViewEdgeInternal::SVertexIterator();
- else
+ }
+ else {
self->sv_it = new ViewEdgeInternal::SVertexIterator(*(((BPy_SVertexIterator *)obj1)->sv_it));
+ }
}
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args,
@@ -122,8 +124,9 @@ static PyObject *SVertexIterator_object_get(BPy_SVertexIterator *self, void *UNU
return NULL;
}
SVertex *sv = self->sv_it->operator->();
- if (sv)
+ if (sv) {
return BPy_SVertex_from_SVertex(*sv);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
index 5727ac2e461..70de25aaf84 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -77,11 +77,13 @@ static int StrokeVertexIterator_init(BPy_StrokeVertexIterator *self,
else if (PyErr_Clear(),
PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist_2, &Stroke_Type, &stroke)) {
- if (!stroke)
+ if (!stroke) {
self->sv_it = new StrokeInternal::StrokeVertexIterator();
- else
+ }
+ else {
self->sv_it = new StrokeInternal::StrokeVertexIterator(
((BPy_Stroke *)stroke)->s->strokeVerticesBegin());
+ }
self->reversed = false;
self->at_start = true;
}
@@ -225,8 +227,9 @@ static PyObject *StrokeVertexIterator_object_get(BPy_StrokeVertexIterator *self,
return NULL;
}
StrokeVertex *sv = self->sv_it->operator->();
- if (sv)
+ if (sv) {
return BPy_StrokeVertex_from_StrokeVertex(*sv);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
index 525df5dd89b..df56cbe822e 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -61,8 +61,9 @@ PyDoc_STRVAR(ViewEdgeIterator_doc,
static int check_begin(PyObject *obj, void *v)
{
- if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj))
+ if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
return 0;
+ }
*((PyObject **)v) = obj;
return 1;
}
@@ -126,8 +127,9 @@ static PyObject *ViewEdgeIterator_object_get(BPy_ViewEdgeIterator *self, void *U
return NULL;
}
ViewEdge *ve = self->ve_it->operator*();
- if (ve)
+ if (ve) {
return BPy_ViewEdge_from_ViewEdge(*ve);
+ }
Py_RETURN_NONE;
}
@@ -140,8 +142,9 @@ static PyObject *ViewEdgeIterator_current_edge_get(BPy_ViewEdgeIterator *self,
void *UNUSED(closure))
{
ViewEdge *ve = self->ve_it->getCurrentEdge();
- if (ve)
+ if (ve) {
return BPy_ViewEdge_from_ViewEdge(*ve);
+ }
Py_RETURN_NONE;
}
@@ -192,8 +195,9 @@ PyDoc_STRVAR(ViewEdgeIterator_begin_doc,
static PyObject *ViewEdgeIterator_begin_get(BPy_ViewEdgeIterator *self, void *UNUSED(closure))
{
ViewEdge *ve = self->ve_it->getBegin();
- if (ve)
+ if (ve) {
return BPy_ViewEdge_from_ViewEdge(*ve);
+ }
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
index 21e3e821214..821a92184d1 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -57,8 +57,9 @@ static int orientedViewEdgeIterator_init(BPy_orientedViewEdgeIterator *self,
PyObject *brother = 0;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "|O!", (char **)kwlist, &orientedViewEdgeIterator_Type, &brother))
+ args, kwds, "|O!", (char **)kwlist, &orientedViewEdgeIterator_Type, &brother)) {
return -1;
+ }
if (!brother) {
self->ove_it = new ViewVertexInternal::orientedViewEdgeIterator();
self->at_start = true;
@@ -95,8 +96,9 @@ static PyObject *orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator
PyErr_SetNone(PyExc_StopIteration);
return NULL;
}
- if (self->at_start)
+ if (self->at_start) {
self->at_start = false;
+ }
else {
self->ove_it->increment();
if (self->ove_it->isEnd()) {
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
index 9a37acbd788..efe96b72061 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
@@ -57,8 +57,9 @@ static int BackboneStretcherShader___init__(BPy_BackboneStretcherShader *self,
static const char *kwlist[] = {"amount", NULL};
float f = 2.0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::BackboneStretcherShader(f);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
index ff5b98cf912..2336b1ce902 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
@@ -57,8 +57,9 @@ static int BezierCurveShader___init__(BPy_BezierCurveShader *self, PyObject *arg
static const char *kwlist[] = {"error", NULL};
float f = 4.0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::BezierCurveShader(f);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
index 2984f52203d..eaed138f61a 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
@@ -63,8 +63,9 @@ static int BlenderTextureShader___init__(BPy_BlenderTextureShader *self,
MTex *_mtex;
bNodeTree *_nodetree;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
return -1;
+ }
_mtex = (MTex *)PyC_RNA_AsPointer(obj, "LineStyleTextureSlot");
if (_mtex) {
self->py_ss.ss = new StrokeShaders::BlenderTextureShader(_mtex);
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
index 8de33188639..81320e9b5a1 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
@@ -56,8 +56,9 @@ static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args,
static const char *kwlist[] = {"amplitude", "period", NULL};
float f1, f2;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::ColorNoiseShader(f1, f2);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
index 6dbbd1396d9..c5d65734aa5 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
@@ -62,8 +62,9 @@ static int ConstantColorShader___init__(BPy_ConstantColorShader *self,
static const char *kwlist[] = {"red", "green", "blue", "alpha", NULL};
float f1, f2, f3, f4 = 1.0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff|f", (char **)kwlist, &f1, &f2, &f3, &f4))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff|f", (char **)kwlist, &f1, &f2, &f3, &f4)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::ConstantColorShader(f1, f2, f3, f4);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
index 5177d275a10..00fbfe525c3 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
@@ -56,8 +56,9 @@ static int ConstantThicknessShader___init__(BPy_ConstantThicknessShader *self,
static const char *kwlist[] = {"thickness", NULL};
float f;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::ConstantThicknessShader(f);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
index 4afe148c066..ebafe84fee0 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
@@ -62,8 +62,9 @@ static int ConstrainedIncreasingThicknessShader___init__(
static const char *kwlist[] = {"thickness_min", "thickness_max", "ratio", NULL};
float f1, f2, f3;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff", (char **)kwlist, &f1, &f2, &f3))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff", (char **)kwlist, &f1, &f2, &f3)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::ConstrainedIncreasingThicknessShader(f1, f2, f3);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
index a3cf272a1ab..ff875fa98d3 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
@@ -64,8 +64,9 @@ static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self,
static const char *kwlist[] = {"offset", NULL};
float f;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::GuidingLinesShader(f);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
index 57d8f3201b1..3c7ba689b28 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
@@ -84,8 +84,9 @@ static int IncreasingColorShader___init__(BPy_IncreasingColorShader *self,
float f1, f2, f3, f4, f5, f6, f7, f8;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "ffffffff", (char **)kwlist, &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8))
+ args, kwds, "ffffffff", (char **)kwlist, &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::IncreasingColorShader(f1, f2, f3, f4, f5, f6, f7, f8);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
index b791fc598df..e04fa45be36 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
@@ -62,8 +62,9 @@ static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader *sel
static const char *kwlist[] = {"thickness_A", "thickness_B", NULL};
float f1, f2;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::IncreasingThicknessShader(f1, f2);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
index 7eb20d47539..8128a6dd8ad 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
@@ -63,8 +63,9 @@ static int PolygonalizationShader___init__(BPy_PolygonalizationShader *self,
static const char *kwlist[] = {"error", NULL};
float f;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::PolygonalizationShader(f);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
index 8769433123a..ad8b8ef786b 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
@@ -54,8 +54,9 @@ static int SamplingShader___init__(BPy_SamplingShader *self, PyObject *args, PyO
static const char *kwlist[] = {"sampling", NULL};
float f;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::SamplingShader(f);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
index e8183b41d05..93a14edd964 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
@@ -56,8 +56,9 @@ static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self,
static const char *kwlist[] = {"step", NULL};
float step = 0.1;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &step))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &step)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::StrokeTextureStepShader(step);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
index 56f04fb9c88..966dc050985 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
@@ -58,8 +58,9 @@ static int ThicknessNoiseShader___init__(BPy_ThicknessNoiseShader *self,
static const char *kwlist[] = {"amplitude", "period", NULL};
float f1, f2;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::ThicknessNoiseShader(f1, f2);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
index 3c3c31f4a70..001e6ce23ba 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
@@ -55,8 +55,9 @@ static int TipRemoverShader___init__(BPy_TipRemoverShader *self, PyObject *args,
static const char *kwlist[] = {"tip_length", NULL};
double d;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "d", (char **)kwlist, &d))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "d", (char **)kwlist, &d)) {
return -1;
+ }
self->py_ss.ss = new StrokeShaders::TipRemoverShader(d);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
index 2b3aaf6f3cd..d1ea13c90a7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
@@ -44,61 +44,73 @@ extern "C" {
int UnaryFunction0DDouble_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DDouble_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DDouble_Type) < 0) {
return -1;
+ }
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
PyModule_AddObject(module, "ZDiscontinuityF0D", (PyObject *)&ZDiscontinuityF0D_Type);
@@ -123,8 +135,9 @@ static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_double = new UnaryFunction0D<double>();
self->uf0D_double->py_uf0D = (PyObject *)self;
return 0;
@@ -132,8 +145,9 @@ static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble *self,
static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble *self)
{
- if (self->uf0D_double)
+ if (self->uf0D_double) {
delete self->uf0D_double;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -150,8 +164,9 @@ static PyObject *UnaryFunction0DDouble___call__(BPy_UnaryFunction0DDouble *self,
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_double)) == typeid(UnaryFunction0D<double>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
index f6292f0086a..00600c405ef 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
@@ -35,17 +35,20 @@ extern "C" {
int UnaryFunction0DEdgeNature_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DEdgeNature_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DEdgeNature_Type) < 0) {
return -1;
+ }
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);
PyModule_AddObject(module, "CurveNatureF0D", (PyObject *)&CurveNatureF0D_Type);
@@ -70,8 +73,9 @@ static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature *sel
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
@@ -79,8 +83,9 @@ static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature *sel
static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature *self)
{
- if (self->uf0D_edgenature)
+ if (self->uf0D_edgenature) {
delete self->uf0D_edgenature;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -98,8 +103,9 @@ static PyObject *UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNatur
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_edgenature)) == typeid(UnaryFunction0D<Nature::EdgeNature>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
index 150b8f4e553..3961bf58bc4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
@@ -40,44 +40,52 @@ extern "C" {
int UnaryFunction0DFloat_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DFloat_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DFloat_Type) < 0) {
return -1;
+ }
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);
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);
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);
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);
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);
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);
PyModule_AddObject(
module, "ReadSteerableViewMapPixelF0D", (PyObject *)&ReadSteerableViewMapPixelF0D_Type);
@@ -103,8 +111,9 @@ static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_float = new UnaryFunction0D<float>();
self->uf0D_float->py_uf0D = (PyObject *)self;
return 0;
@@ -112,8 +121,9 @@ static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat *self,
static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat *self)
{
- if (self->uf0D_float)
+ if (self->uf0D_float) {
delete self->uf0D_float;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -130,8 +140,9 @@ static PyObject *UnaryFunction0DFloat___call__(BPy_UnaryFunction0DFloat *self,
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_float)) == typeid(UnaryFunction0D<float>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
index e9455f3dd39..86e902bafe4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
@@ -35,16 +35,19 @@ extern "C" {
int UnaryFunction0DId_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DId_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DId_Type) < 0) {
return -1;
+ }
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);
PyModule_AddObject(module, "ShapeIdF0D", (PyObject *)&ShapeIdF0D_Type);
@@ -67,8 +70,9 @@ static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId *self, PyObject *arg
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_id = new UnaryFunction0D<Id>();
self->uf0D_id->py_uf0D = (PyObject *)self;
return 0;
@@ -76,8 +80,9 @@ static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId *self, PyObject *arg
static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId *self)
{
- if (self->uf0D_id)
+ if (self->uf0D_id) {
delete self->uf0D_id;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -94,8 +99,9 @@ static PyObject *UnaryFunction0DId___call__(BPy_UnaryFunction0DId *self,
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_id)) == typeid(UnaryFunction0D<Id>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
index 63f9ff0deb8..551429add8b 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
@@ -35,16 +35,19 @@ extern "C" {
int UnaryFunction0DMaterial_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DMaterial_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DMaterial_Type) < 0) {
return -1;
+ }
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);
PyModule_AddObject(module, "MaterialF0D", (PyObject *)&MaterialF0D_Type);
@@ -69,8 +72,9 @@ static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_material = new UnaryFunction0D<FrsMaterial>();
self->uf0D_material->py_uf0D = (PyObject *)self;
return 0;
@@ -78,8 +82,9 @@ static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial *self,
static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial *self)
{
- if (self->uf0D_material)
+ if (self->uf0D_material) {
delete self->uf0D_material;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -97,8 +102,9 @@ static PyObject *UnaryFunction0DMaterial___call__(BPy_UnaryFunction0DMaterial *s
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_material)) == typeid(UnaryFunction0D<FrsMaterial>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
index 65d8d630fce..8721e820fee 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
@@ -35,16 +35,19 @@ extern "C" {
int UnaryFunction0DUnsigned_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DUnsigned_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DUnsigned_Type) < 0) {
return -1;
+ }
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);
PyModule_AddObject(
module, "QuantitativeInvisibilityF0D", (PyObject *)&QuantitativeInvisibilityF0D_Type);
@@ -70,8 +73,9 @@ static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
@@ -79,8 +83,9 @@ static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned *self,
static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned *self)
{
- if (self->uf0D_unsigned)
+ if (self->uf0D_unsigned) {
delete self->uf0D_unsigned;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -98,8 +103,9 @@ static PyObject *UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *s
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_unsigned)) == typeid(UnaryFunction0D<unsigned int>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
index 48cb3453ea8..44a39af68dd 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
@@ -36,21 +36,25 @@ extern "C" {
int UnaryFunction0DVec2f_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DVec2f_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DVec2f_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryFunction0DVec2f_Type);
PyModule_AddObject(module, "UnaryFunction0DVec2f", (PyObject *)&UnaryFunction0DVec2f_Type);
- if (PyType_Ready(&Normal2DF0D_Type) < 0)
+ if (PyType_Ready(&Normal2DF0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&Normal2DF0D_Type);
PyModule_AddObject(module, "Normal2DF0D", (PyObject *)&Normal2DF0D_Type);
- if (PyType_Ready(&VertexOrientation2DF0D_Type) < 0)
+ if (PyType_Ready(&VertexOrientation2DF0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&VertexOrientation2DF0D_Type);
PyModule_AddObject(module, "VertexOrientation2DF0D", (PyObject *)&VertexOrientation2DF0D_Type);
@@ -75,8 +79,9 @@ static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_vec2f = new UnaryFunction0D<Vec2f>();
self->uf0D_vec2f->py_uf0D = (PyObject *)self;
return 0;
@@ -84,8 +89,9 @@ static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f *self,
static void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f *self)
{
- if (self->uf0D_vec2f)
+ if (self->uf0D_vec2f) {
delete self->uf0D_vec2f;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -102,8 +108,9 @@ static PyObject *UnaryFunction0DVec2f___call__(BPy_UnaryFunction0DVec2f *self,
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_vec2f)) == typeid(UnaryFunction0D<Vec2f>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
index 6b12136693f..6a27fc6e140 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
@@ -35,16 +35,19 @@ extern "C" {
int UnaryFunction0DVec3f_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DVec3f_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DVec3f_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryFunction0DVec3f_Type);
PyModule_AddObject(module, "UnaryFunction0DVec3f", (PyObject *)&UnaryFunction0DVec3f_Type);
- if (PyType_Ready(&VertexOrientation3DF0D_Type) < 0)
+ if (PyType_Ready(&VertexOrientation3DF0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&VertexOrientation3DF0D_Type);
PyModule_AddObject(module, "VertexOrientation3DF0D", (PyObject *)&VertexOrientation3DF0D_Type);
@@ -69,8 +72,9 @@ static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_vec3f = new UnaryFunction0D<Vec3f>();
self->uf0D_vec3f->py_uf0D = (PyObject *)self;
return 0;
@@ -78,8 +82,9 @@ static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f *self,
static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f *self)
{
- if (self->uf0D_vec3f)
+ if (self->uf0D_vec3f) {
delete self->uf0D_vec3f;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -96,8 +101,9 @@ static PyObject *UnaryFunction0DVec3f___call__(BPy_UnaryFunction0DVec3f *self,
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_vec3f)) == typeid(UnaryFunction0D<Vec3f>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
index d908b3fa6ed..88c050e243e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
@@ -35,17 +35,20 @@ extern "C" {
int UnaryFunction0DVectorViewShape_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DVectorViewShape_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DVectorViewShape_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryFunction0DVectorViewShape_Type);
PyModule_AddObject(
module, "UnaryFunction0DVectorViewShape", (PyObject *)&UnaryFunction0DVectorViewShape_Type);
- if (PyType_Ready(&GetOccludersF0D_Type) < 0)
+ if (PyType_Ready(&GetOccludersF0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&GetOccludersF0D_Type);
PyModule_AddObject(module, "GetOccludersF0D", (PyObject *)&GetOccludersF0D_Type);
@@ -71,8 +74,9 @@ static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorView
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_vectorviewshape = new UnaryFunction0D<std::vector<ViewShape *>>();
self->uf0D_vectorviewshape->py_uf0D = (PyObject *)self;
return 0;
@@ -80,8 +84,9 @@ static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorView
static void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVectorViewShape *self)
{
- if (self->uf0D_vectorviewshape)
+ if (self->uf0D_vectorviewshape) {
delete self->uf0D_vectorviewshape;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -99,8 +104,9 @@ static PyObject *UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVect
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_vectorviewshape)) == typeid(UnaryFunction0D<std::vector<ViewShape *>>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
index 8c04d8eabaa..11f4e114342 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
@@ -36,22 +36,26 @@ extern "C" {
int UnaryFunction0DViewShape_Init(PyObject *module)
{
- if (module == NULL)
+ if (module == NULL) {
return -1;
+ }
- if (PyType_Ready(&UnaryFunction0DViewShape_Type) < 0)
+ if (PyType_Ready(&UnaryFunction0DViewShape_Type) < 0) {
return -1;
+ }
Py_INCREF(&UnaryFunction0DViewShape_Type);
PyModule_AddObject(
module, "UnaryFunction0DViewShape", (PyObject *)&UnaryFunction0DViewShape_Type);
- if (PyType_Ready(&GetOccludeeF0D_Type) < 0)
+ if (PyType_Ready(&GetOccludeeF0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&GetOccludeeF0D_Type);
PyModule_AddObject(module, "GetOccludeeF0D", (PyObject *)&GetOccludeeF0D_Type);
- if (PyType_Ready(&GetShapeF0D_Type) < 0)
+ if (PyType_Ready(&GetShapeF0D_Type) < 0) {
return -1;
+ }
Py_INCREF(&GetShapeF0D_Type);
PyModule_AddObject(module, "GetShapeF0D", (PyObject *)&GetShapeF0D_Type);
@@ -76,8 +80,9 @@ static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->uf0D_viewshape = new UnaryFunction0D<ViewShape *>();
self->uf0D_viewshape->py_uf0D = (PyObject *)self;
return 0;
@@ -85,8 +90,9 @@ static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape *self,
static void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape *self)
{
- if (self->uf0D_viewshape)
+ if (self->uf0D_viewshape) {
delete self->uf0D_viewshape;
+ }
UnaryFunction0D_Type.tp_dealloc((PyObject *)self);
}
@@ -104,8 +110,9 @@ static PyObject *UnaryFunction0DViewShape___call__(BPy_UnaryFunction0DViewShape
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj))
+ args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
return NULL;
+ }
if (typeid(*(self->uf0D_viewshape)) == typeid(UnaryFunction0D<ViewShape *>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
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 6529c4f435b..6d4406b17a7 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
@@ -59,8 +59,9 @@ static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *k
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 6fb65b8f132..a9050c4594e 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
@@ -62,8 +62,9 @@ static int MaterialF0D___init__(BPy_MaterialF0D *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_uf0D_material.uf0D_material = new Functions0D::MaterialF0D();
self->py_uf0D_material.uf0D_material->py_uf0D = (PyObject *)self;
return 0;
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 a3e5871b20d..1173b2434d6 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
@@ -53,8 +53,9 @@ static int CurveNatureF0D___init__(BPy_CurveNatureF0D *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_uf0D_edgenature.uf0D_edgenature = new Functions0D::CurveNatureF0D();
self->py_uf0D_edgenature.uf0D_edgenature->py_uf0D = (PyObject *)self;
return 0;
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 cd50e23f1d7..673522a055e 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
@@ -55,8 +55,9 @@ static int Normal2DF0D___init__(BPy_Normal2DF0D *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_uf0D_vec2f.uf0D_vec2f = new Functions0D::Normal2DF0D();
self->py_uf0D_vec2f.uf0D_vec2f->py_uf0D = (PyObject *)self;
return 0;
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 ec3755987d1..5ec616c90c1 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
@@ -57,8 +57,9 @@ static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 d5e073b5802..6db4c9317e2 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
@@ -57,8 +57,9 @@ static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 88f4b9d32ec..827c089aa1a 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
@@ -52,8 +52,9 @@ static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D *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_uf0D_viewshape.uf0D_viewshape = new Functions0D::GetOccludeeF0D();
self->py_uf0D_viewshape.uf0D_viewshape->py_uf0D = (PyObject *)self;
return 0;
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 558e403d09c..31b36dbf855 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
@@ -52,8 +52,9 @@ static int GetShapeF0D___init__(BPy_GetShapeF0D *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_uf0D_viewshape.uf0D_viewshape = new Functions0D::GetShapeF0D();
self->py_uf0D_viewshape.uf0D_viewshape->py_uf0D = (PyObject *)self;
return 0;
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 0205adada46..5f1d123c8d3 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
@@ -57,8 +57,9 @@ static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 c18a4e1ab40..736afca7fae 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
@@ -62,8 +62,9 @@ static int DensityF0D___init__(BPy_DensityF0D *self, PyObject *args, PyObject *k
static const char *kwlist[] = {"sigma", NULL};
double d = 2;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|d", (char **)kwlist, &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;
return 0;
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 6bf7fd3895c..d3cd14a1aba 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
@@ -52,8 +52,9 @@ static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D *self, PyObject *args,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 af2b05bcc02..92d5a1e4216 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
@@ -52,8 +52,9 @@ static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D *self, PyObject *args,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 db066f445f5..cb2a5e3a102 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
@@ -52,8 +52,9 @@ static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D *self, PyObject *args,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 e95b9146248..dd75001f3bd 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
@@ -52,8 +52,9 @@ static int GetXF0D___init__(BPy_GetXF0D *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 c4ce2dc6140..09e2a84e29f 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
@@ -52,8 +52,9 @@ static int GetYF0D___init__(BPy_GetYF0D *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 1b93a295f53..920432530ed 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
@@ -52,8 +52,9 @@ static int GetZF0D___init__(BPy_GetZF0D *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 dc304574c7f..58e5a1a498a 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
@@ -60,8 +60,9 @@ static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D *self,
static const char *kwlist[] = {"mask_size", NULL};
double d = 5.0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|d", (char **)kwlist, &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;
return 0;
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 d2ae0f0fa31..0d1b55f0a00 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
@@ -57,8 +57,9 @@ static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *arg
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 2db536d2a90..a00d4204d69 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
@@ -55,8 +55,9 @@ static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D *sel
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 bc67c4dd91d..b4310685969 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
@@ -52,8 +52,9 @@ static int GetParameterF0D___init__(BPy_GetParameterF0D *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_uf0D_float.uf0D_float = new Functions0D::GetParameterF0D();
self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
return 0;
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 21e05323b07..ad744918e00 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
@@ -60,8 +60,9 @@ static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D *sel
static const char *kwlist[] = {"level", NULL};
int i;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &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;
return 0;
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 506aa15e245..685701152f4 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
@@ -58,8 +58,9 @@ static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D
static const char *kwlist[] = {"level", NULL};
int i;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &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;
return 0;
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 dea8923777b..b74ee3b33c6 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
@@ -59,8 +59,9 @@ static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D *self, PyObject *args, P
const char *s;
int i;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "si", (char **)kwlist, &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;
return 0;
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 0eee141f15f..a878db99e06 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
@@ -62,8 +62,9 @@ static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0
unsigned int u;
int i;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "Ii", (char **)kwlist, &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;
return 0;
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 0b6a116fa65..57605e42186 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
@@ -60,8 +60,9 @@ static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ 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;
return 0;
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 37f8f82978f..e56460601e5 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
@@ -53,8 +53,9 @@ static int GetOccludersF0D___init__(BPy_GetOccludersF0D *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_uf0D_vectorviewshape.uf0D_vectorviewshape = new Functions0D::GetOccludersF0D();
self->py_uf0D_vectorviewshape.uf0D_vectorviewshape->py_uf0D = (PyObject *)self;
return 0;
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;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
index 8289d4b6386..1e8aab3b086 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
@@ -44,8 +44,9 @@ static int FalseUP0D___init__(BPy_FalseUP0D *self, PyObject *args, PyObject *kwd
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->py_up0D.up0D = new Predicates0D::FalseUP0D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
index 697e9bc2c92..ca6c7a5b344 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
@@ -44,8 +44,9 @@ static int TrueUP0D___init__(BPy_TrueUP0D *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->py_up0D.up0D = new Predicates0D::TrueUP0D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
index faf0c98641a..21bd371935a 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
@@ -45,8 +45,9 @@ static int ContourUP1D___init__(BPy_ContourUP1D *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_up1D.up1D = new Predicates1D::ContourUP1D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
index 065329847b3..2044d663e77 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
@@ -61,8 +61,9 @@ static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D *self,
static const char *kwlist[] = {"threshold", "sigma", NULL};
double d1, d2 = 2.0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|d", (char **)kwlist, &d1, &d2))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|d", (char **)kwlist, &d1, &d2)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::DensityLowerThanUP1D(d1, d2);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
index fb42b29f9ee..c5feec45844 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
@@ -56,8 +56,9 @@ static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1
static const char *kwlist[] = {"ts", NULL};
unsigned u;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &u))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &u)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::EqualToChainingTimeStampUP1D(u);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
index 30b8e3fce95..fd68878dc45 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
@@ -55,8 +55,9 @@ static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D *self,
static const char *kwlist[] = {"ts", NULL};
unsigned u;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &u))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &u)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::EqualToTimeStampUP1D(u);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
index 8bd31209291..ea034dfad1e 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
@@ -49,8 +49,9 @@ static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D *self,
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::ExternalContourUP1D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
index b4db7e65090..a93ce638f33 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
@@ -44,8 +44,9 @@ static int FalseUP1D___init__(BPy_FalseUP1D *self, PyObject *args, PyObject *kwd
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::FalseUP1D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
index 907a86477e3..153fbf56ba8 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
@@ -60,8 +60,9 @@ static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1
static const char *kwlist[] = {"qi", NULL};
int i = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|i", (char **)kwlist, &i))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|i", (char **)kwlist, &i)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::QuantitativeInvisibilityUP1D(i);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
index 54a6a70c3bf..8a57b3173e5 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
@@ -56,8 +56,9 @@ static int ShapeUP1D___init__(BPy_ShapeUP1D *self, PyObject *args, PyObject *kwd
static const char *kwlist[] = {"first", "second", NULL};
unsigned u1, u2 = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "I|I", (char **)kwlist, &u1, &u2))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "I|I", (char **)kwlist, &u1, &u2)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::ShapeUP1D(u1, u2);
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
index 55c8c1ee889..9c1bf4ecd18 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
@@ -44,8 +44,9 @@ static int TrueUP1D___init__(BPy_TrueUP1D *self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::TrueUP1D();
return 0;
}
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
index 4fc163dbd01..4fb486f1366 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
@@ -57,8 +57,9 @@ static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self,
double xmin, ymin, xmax, ymax;
if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax))
+ args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax)) {
return -1;
+ }
self->py_up1D.up1D = new Predicates1D::WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax);
return 0;
}