From 4a92d82626980d6d1690113b9d27aae282fd48eb Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Thu, 7 Mar 2013 23:17:23 +0000 Subject: A big code clean-up patch from Bastien Montagne, many thanks! --- source/blender/freestyle/FRS_freestyle.h | 14 ++-- .../freestyle/intern/application/AppCanvas.cpp | 22 +++--- .../freestyle/intern/application/AppCanvas.h | 6 +- .../freestyle/intern/application/AppConfig.cpp | 13 ++-- .../freestyle/intern/application/AppConfig.h | 4 +- .../blender/freestyle/intern/application/AppView.h | 6 +- .../freestyle/intern/application/Controller.cpp | 25 +++---- .../intern/blender_interface/BlenderFileLoader.cpp | 55 +++++++------- .../intern/blender_interface/BlenderFileLoader.h | 2 +- .../blender_interface/BlenderStrokeRenderer.cpp | 38 +++++----- .../intern/blender_interface/BlenderStyleModule.h | 2 +- .../intern/blender_interface/FRS_freestyle.cpp | 71 +++++++++--------- .../blender/freestyle/intern/geometry/Bezier.cpp | 6 +- .../blender/freestyle/intern/geometry/FastGrid.cpp | 4 +- .../blender/freestyle/intern/geometry/FastGrid.h | 2 +- .../blender/freestyle/intern/geometry/FitCurve.cpp | 32 ++++---- .../freestyle/intern/geometry/GeomCleaner.cpp | 2 +- .../freestyle/intern/geometry/GeomUtils.cpp | 17 +++-- .../blender/freestyle/intern/geometry/GeomUtils.h | 2 +- source/blender/freestyle/intern/geometry/Grid.cpp | 11 +-- source/blender/freestyle/intern/geometry/Grid.h | 22 +++--- .../freestyle/intern/geometry/GridHelpers.h | 2 +- .../blender/freestyle/intern/geometry/HashGrid.cpp | 4 +- .../blender/freestyle/intern/geometry/HashGrid.h | 4 +- source/blender/freestyle/intern/geometry/Polygon.h | 4 +- .../blender/freestyle/intern/geometry/SweepLine.h | 62 +++++++-------- source/blender/freestyle/intern/geometry/VecMat.h | 9 ++- .../freestyle/intern/geometry/normal_cycle.cpp | 6 +- .../freestyle/intern/image/GaussianFilter.h | 3 +- source/blender/freestyle/intern/image/Image.h | 2 +- .../freestyle/intern/image/ImagePyramid.cpp | 4 +- .../blender/freestyle/intern/image/ImagePyramid.h | 10 +-- .../blender/freestyle/intern/python/BPy_BBox.cpp | 6 +- .../intern/python/BPy_BinaryPredicate0D.cpp | 10 +-- .../intern/python/BPy_BinaryPredicate1D.cpp | 8 +- .../intern/python/BPy_ContextFunctions.cpp | 34 ++++++--- .../freestyle/intern/python/BPy_Convert.cpp | 50 ++++++------- .../blender/freestyle/intern/python/BPy_Convert.h | 40 +++++----- .../freestyle/intern/python/BPy_Freestyle.cpp | 9 ++- .../freestyle/intern/python/BPy_FrsMaterial.cpp | 24 +++--- .../freestyle/intern/python/BPy_FrsNoise.cpp | 18 ++--- source/blender/freestyle/intern/python/BPy_Id.cpp | 12 +-- .../freestyle/intern/python/BPy_Interface0D.cpp | 15 ++-- .../freestyle/intern/python/BPy_Interface1D.cpp | 9 ++- .../freestyle/intern/python/BPy_Iterator.cpp | 14 ++-- .../freestyle/intern/python/BPy_Operators.cpp | 87 +++++++++++++--------- .../blender/freestyle/intern/python/BPy_SShape.cpp | 12 +-- .../intern/python/BPy_StrokeAttribute.cpp | 57 ++++++++------ .../freestyle/intern/python/BPy_StrokeShader.cpp | 9 ++- .../intern/python/BPy_UnaryFunction0D.cpp | 6 +- .../intern/python/BPy_UnaryFunction1D.cpp | 6 +- .../intern/python/BPy_UnaryPredicate0D.cpp | 8 +- .../intern/python/BPy_UnaryPredicate1D.cpp | 8 +- .../freestyle/intern/python/BPy_ViewMap.cpp | 21 +++--- .../freestyle/intern/python/BPy_ViewShape.cpp | 30 ++++---- .../python/BinaryPredicate1D/BPy_FalseBP1D.cpp | 2 +- .../python/BinaryPredicate1D/BPy_Length2DBP1D.cpp | 2 +- .../BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp | 2 +- .../python/BinaryPredicate1D/BPy_TrueBP1D.cpp | 2 +- .../BPy_ViewMapGradientNormBP1D.cpp | 2 +- .../BPy_ViewMapGradientNormBP1D.h | 3 +- .../blender/freestyle/intern/python/Director.cpp | 10 ++- .../intern/python/Interface0D/BPy_CurvePoint.cpp | 9 ++- .../intern/python/Interface0D/BPy_SVertex.cpp | 10 ++- .../intern/python/Interface0D/BPy_ViewVertex.cpp | 12 +-- .../Interface0D/CurvePoint/BPy_StrokeVertex.cpp | 13 +++- .../Interface0D/ViewVertex/BPy_NonTVertex.cpp | 3 +- .../python/Interface0D/ViewVertex/BPy_TVertex.cpp | 10 ++- .../intern/python/Interface1D/BPy_FEdge.cpp | 12 ++- .../intern/python/Interface1D/BPy_FrsCurve.cpp | 15 ++-- .../intern/python/Interface1D/BPy_Stroke.cpp | 45 +++++------ .../intern/python/Interface1D/BPy_ViewEdge.cpp | 35 +++++---- .../intern/python/Interface1D/Curve/BPy_Chain.cpp | 12 +-- .../python/Interface1D/FEdge/BPy_FEdgeSharp.cpp | 34 ++++++--- .../python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 13 ++-- .../python/Iterator/BPy_AdjacencyIterator.cpp | 5 +- .../python/Iterator/BPy_ChainPredicateIterator.cpp | 15 ++-- .../python/Iterator/BPy_ChainPredicateIterator.h | 3 +- .../Iterator/BPy_ChainSilhouetteIterator.cpp | 3 +- .../python/Iterator/BPy_ChainSilhouetteIterator.h | 3 +- .../python/Iterator/BPy_ChainingIterator.cpp | 6 +- .../python/Iterator/BPy_CurvePointIterator.cpp | 3 +- .../python/Iterator/BPy_Interface0DIterator.cpp | 5 +- .../python/Iterator/BPy_StrokeVertexIterator.cpp | 5 +- .../python/Iterator/BPy_ViewEdgeIterator.cpp | 14 ++-- .../Iterator/BPy_orientedViewEdgeIterator.cpp | 5 +- .../python/Iterator/BPy_orientedViewEdgeIterator.h | 3 +- .../StrokeShader/BPy_BackboneStretcherShader.cpp | 2 +- .../StrokeShader/BPy_BackboneStretcherShader.h | 3 +- .../python/StrokeShader/BPy_BezierCurveShader.cpp | 2 +- .../python/StrokeShader/BPy_CalligraphicShader.cpp | 2 +- .../python/StrokeShader/BPy_ColorNoiseShader.cpp | 2 +- .../BPy_ColorVariationPatternShader.cpp | 2 +- .../StrokeShader/BPy_ColorVariationPatternShader.h | 3 +- .../StrokeShader/BPy_ConstantColorShader.cpp | 2 +- .../StrokeShader/BPy_ConstantThicknessShader.cpp | 2 +- .../StrokeShader/BPy_ConstantThicknessShader.h | 3 +- .../BPy_ConstrainedIncreasingThicknessShader.cpp | 3 +- .../BPy_ConstrainedIncreasingThicknessShader.h | 3 +- .../python/StrokeShader/BPy_GuidingLinesShader.cpp | 2 +- .../StrokeShader/BPy_IncreasingColorShader.cpp | 2 +- .../StrokeShader/BPy_IncreasingThicknessShader.cpp | 2 +- .../StrokeShader/BPy_IncreasingThicknessShader.h | 3 +- .../StrokeShader/BPy_PolygonalizationShader.cpp | 2 +- .../StrokeShader/BPy_PolygonalizationShader.h | 3 +- .../python/StrokeShader/BPy_SamplingShader.cpp | 2 +- .../python/StrokeShader/BPy_SmoothingShader.cpp | 2 +- .../python/StrokeShader/BPy_SpatialNoiseShader.cpp | 2 +- .../StrokeShader/BPy_StrokeTextureShader.cpp | 2 +- .../StrokeShader/BPy_TextureAssignerShader.cpp | 2 +- .../StrokeShader/BPy_ThicknessNoiseShader.cpp | 2 +- .../BPy_ThicknessVariationPatternShader.cpp | 3 +- .../BPy_ThicknessVariationPatternShader.h | 3 +- .../python/StrokeShader/BPy_TipRemoverShader.cpp | 2 +- .../python/StrokeShader/BPy_fstreamShader.cpp | 2 +- .../python/StrokeShader/BPy_streamShader.cpp | 2 +- .../UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp | 10 +-- .../BPy_UnaryFunction0DEdgeNature.cpp | 11 +-- .../BPy_UnaryFunction0DEdgeNature.h | 3 +- .../UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp | 10 +-- .../UnaryFunction0D/BPy_UnaryFunction0DId.cpp | 10 +-- .../BPy_UnaryFunction0DMaterial.cpp | 10 +-- .../UnaryFunction0D/BPy_UnaryFunction0DMaterial.h | 3 +- .../BPy_UnaryFunction0DUnsigned.cpp | 10 +-- .../UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h | 3 +- .../UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp | 10 +-- .../UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp | 10 +-- .../BPy_UnaryFunction0DVectorViewShape.cpp | 17 +++-- .../BPy_UnaryFunction0DVectorViewShape.h | 3 +- .../BPy_UnaryFunction0DViewShape.cpp | 10 +-- .../UnaryFunction0D/BPy_UnaryFunction0DViewShape.h | 3 +- .../UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp | 2 +- .../UnaryFunction0D_Material/BPy_MaterialF0D.cpp | 2 +- .../BPy_CurveNatureF0D.cpp | 2 +- .../UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp | 2 +- .../BPy_VertexOrientation2DF0D.cpp | 2 +- .../BPy_VertexOrientation2DF0D.h | 3 +- .../BPy_VertexOrientation3DF0D.cpp | 2 +- .../BPy_VertexOrientation3DF0D.h | 3 +- .../BPy_GetOccludeeF0D.cpp | 2 +- .../UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp | 2 +- .../BPy_Curvature2DAngleF0D.cpp | 2 +- .../UnaryFunction0D_double/BPy_DensityF0D.cpp | 2 +- .../BPy_GetProjectedXF0D.cpp | 2 +- .../BPy_GetProjectedYF0D.cpp | 2 +- .../BPy_GetProjectedZF0D.cpp | 2 +- .../UnaryFunction0D_double/BPy_GetXF0D.cpp | 2 +- .../UnaryFunction0D_double/BPy_GetYF0D.cpp | 2 +- .../UnaryFunction0D_double/BPy_GetZF0D.cpp | 2 +- .../BPy_LocalAverageDepthF0D.cpp | 2 +- .../BPy_ZDiscontinuityF0D.cpp | 2 +- .../BPy_GetCurvilinearAbscissaF0D.cpp | 2 +- .../BPy_GetCurvilinearAbscissaF0D.h | 3 +- .../UnaryFunction0D_float/BPy_GetParameterF0D.cpp | 2 +- .../BPy_GetViewMapGradientNormF0D.cpp | 2 +- .../BPy_GetViewMapGradientNormF0D.h | 3 +- .../BPy_ReadCompleteViewMapPixelF0D.cpp | 2 +- .../BPy_ReadCompleteViewMapPixelF0D.h | 3 +- .../UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp | 4 +- .../BPy_ReadSteerableViewMapPixelF0D.cpp | 4 +- .../BPy_ReadSteerableViewMapPixelF0D.h | 3 +- .../BPy_QuantitativeInvisibilityF0D.cpp | 2 +- .../BPy_QuantitativeInvisibilityF0D.h | 3 +- .../BPy_GetOccludersF0D.cpp | 2 +- .../UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp | 13 ++-- .../BPy_UnaryFunction1DEdgeNature.cpp | 14 ++-- .../BPy_UnaryFunction1DEdgeNature.h | 3 +- .../UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp | 13 ++-- .../BPy_UnaryFunction1DUnsigned.cpp | 13 ++-- .../UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h | 3 +- .../UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp | 13 ++-- .../UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp | 13 ++-- .../BPy_UnaryFunction1DVectorViewShape.cpp | 23 +++--- .../BPy_UnaryFunction1DVectorViewShape.h | 3 +- .../UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp | 13 ++-- .../BPy_CurveNatureF1D.cpp | 2 +- .../UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp | 2 +- .../UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp | 2 +- .../UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp | 2 +- .../BPy_Curvature2DAngleF1D.cpp | 2 +- .../UnaryFunction1D_double/BPy_DensityF1D.cpp | 4 +- .../BPy_GetCompleteViewMapDensityF1D.cpp | 4 +- .../BPy_GetCompleteViewMapDensityF1D.h | 3 +- .../BPy_GetDirectionalViewMapDensityF1D.cpp | 6 +- .../BPy_GetDirectionalViewMapDensityF1D.h | 3 +- .../BPy_GetProjectedXF1D.cpp | 2 +- .../BPy_GetProjectedYF1D.cpp | 2 +- .../BPy_GetProjectedZF1D.cpp | 2 +- .../BPy_GetSteerableViewMapDensityF1D.cpp | 5 +- .../BPy_GetSteerableViewMapDensityF1D.h | 3 +- .../BPy_GetViewMapGradientNormF1D.cpp | 4 +- .../BPy_GetViewMapGradientNormF1D.h | 4 +- .../UnaryFunction1D_double/BPy_GetXF1D.cpp | 2 +- .../UnaryFunction1D_double/BPy_GetYF1D.cpp | 2 +- .../UnaryFunction1D_double/BPy_GetZF1D.cpp | 2 +- .../BPy_LocalAverageDepthF1D.cpp | 4 +- .../BPy_ZDiscontinuityF1D.cpp | 2 +- .../BPy_QuantitativeInvisibilityF1D.cpp | 2 +- .../BPy_QuantitativeInvisibilityF1D.h | 3 +- .../BPy_GetOccludeeF1D.cpp | 2 +- .../BPy_GetOccludersF1D.cpp | 2 +- .../BPy_GetShapeF1D.cpp | 2 +- .../BPy_ChainingTimeStampF1D.cpp | 2 +- .../BPy_IncrementChainingTimeStampF1D.cpp | 3 +- .../BPy_IncrementChainingTimeStampF1D.h | 3 +- .../UnaryFunction1D_void/BPy_TimeStampF1D.cpp | 2 +- .../python/UnaryPredicate0D/BPy_FalseUP0D.cpp | 2 +- .../python/UnaryPredicate0D/BPy_TrueUP0D.cpp | 2 +- .../python/UnaryPredicate1D/BPy_ContourUP1D.cpp | 2 +- .../UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp | 2 +- .../BPy_EqualToChainingTimeStampUP1D.cpp | 2 +- .../BPy_EqualToChainingTimeStampUP1D.h | 3 +- .../UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp | 2 +- .../UnaryPredicate1D/BPy_ExternalContourUP1D.cpp | 2 +- .../python/UnaryPredicate1D/BPy_FalseUP1D.cpp | 2 +- .../BPy_QuantitativeInvisibilityUP1D.cpp | 2 +- .../BPy_QuantitativeInvisibilityUP1D.h | 3 +- .../python/UnaryPredicate1D/BPy_ShapeUP1D.cpp | 2 +- .../python/UnaryPredicate1D/BPy_TrueUP1D.cpp | 2 +- .../BPy_WithinImageBoundaryUP1D.cpp | 2 +- .../UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.h | 3 +- 221 files changed, 986 insertions(+), 798 deletions(-) diff --git a/source/blender/freestyle/FRS_freestyle.h b/source/blender/freestyle/FRS_freestyle.h index 3eaa1f3fbed..5b2b62818c1 100644 --- a/source/blender/freestyle/FRS_freestyle.h +++ b/source/blender/freestyle/FRS_freestyle.h @@ -52,13 +52,13 @@ extern int freestyle_viewport[4]; /* Rendering */ void FRS_initialize(void); -void FRS_set_context(bContext* C); -void FRS_read_file(bContext* C); -int FRS_is_freestyle_enabled(struct SceneRenderLayer* srl); -void FRS_init_stroke_rendering(struct Render* re); -struct Render* FRS_do_stroke_rendering(struct Render* re, struct SceneRenderLayer* srl); -void FRS_finish_stroke_rendering(struct Render* re); -void FRS_composite_result(struct Render* re, struct SceneRenderLayer* srl, struct Render* freestyle_render); +void FRS_set_context(bContext *C); +void FRS_read_file(bContext *C); +int FRS_is_freestyle_enabled(struct SceneRenderLayer *srl); +void FRS_init_stroke_rendering(struct Render *re); +struct Render *FRS_do_stroke_rendering(struct Render *re, struct SceneRenderLayer *srl); +void FRS_finish_stroke_rendering(struct Render *re); +void FRS_composite_result(struct Render *re, struct SceneRenderLayer *srl, struct Render *freestyle_render); void FRS_exit(void); /* FreestyleConfig.modules */ diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp index 06391717bb9..d2dc14b1c19 100644 --- a/source/blender/freestyle/intern/application/AppCanvas.cpp +++ b/source/blender/freestyle/intern/application/AppCanvas.cpp @@ -47,7 +47,7 @@ AppCanvas::AppCanvas() _MapsPath = StringUtils::toAscii(Config::Path::getInstance()->getMapsDir()).c_str(); } -AppCanvas::AppCanvas(AppView* iViewer) +AppCanvas::AppCanvas(AppView *iViewer) :Canvas() { _pViewer = iViewer; @@ -116,7 +116,7 @@ void AppCanvas::init() void AppCanvas::postDraw() { for (unsigned int i = 0; i < _StyleModules.size(); i++) { - if(!_StyleModules[i]->getDisplayed() || !_Layers[i]) + if (!_StyleModules[i]->getDisplayed() || !_Layers[i]) continue; _Layers[i]->ScaleThickness(thickness()); } @@ -130,9 +130,9 @@ void AppCanvas::Erase() // Abstract -void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const +void AppCanvas::readColorPixels(int x, int y, int w, int h, RGBImage& oImage) const { - float *rgb = new float[3*w*h]; + float *rgb = new float[3 * w * h]; memset(rgb, 0, sizeof(float) * 3 * w * h); int xsch = width(); int ysch = height(); @@ -147,8 +147,8 @@ void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) cons float yfac = ((float)recty) / ((float)(ymax - ymin)); #if 0 if (G.debug & G_DEBUG_FREESTYLE) { - printf("readColorPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", w, h, x, y, xsch, ysch, - xmax - xmin, ymax - ymin, rectx, recty, (int)(xfac * 100.0f)); + printf("readColorPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", w, h, x, y, + xsch, ysch, xmax - xmin, ymax - ymin, rectx, recty, (int)(xfac * 100.0f)); } #endif int ii, jj; @@ -167,9 +167,9 @@ void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) cons oImage.setArray(rgb, xsch, ysch, w, h, x, y, false); } -void AppCanvas::readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const +void AppCanvas::readDepthPixels(int x, int y, int w, int h, GrayImage& oImage) const { - float *z = new float[w*h]; + float *z = new float[w * h]; memset(z, 0, sizeof(float) * w * h); int xsch = width(); int ysch = height(); @@ -184,8 +184,8 @@ void AppCanvas::readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) con float yfac = ((float)recty) / ((float)(ymax - ymin)); #if 0 if (G.debug & G_DEBUG_FREESTYLE) { - printf("readDepthPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", w, h, x, y, xsch, ysch, - xmax - xmin, ymax - ymin, rectx, recty, (int)(xfac * 100.0f)); + printf("readDepthPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", w, h, x, y, + xsch, ysch, xmax - xmin, ymax - ymin, rectx, recty, (int)(xfac * 100.0f)); } #endif int ii, jj; @@ -206,7 +206,7 @@ void AppCanvas::readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) con void AppCanvas::RenderStroke(Stroke *iStroke) { - if(_basic) + if (_basic) iStroke->RenderBasic(_Renderer); else iStroke->Render(_Renderer); diff --git a/source/blender/freestyle/intern/application/AppCanvas.h b/source/blender/freestyle/intern/application/AppCanvas.h index 3a65020463c..a839c1efe0d 100644 --- a/source/blender/freestyle/intern/application/AppCanvas.h +++ b/source/blender/freestyle/intern/application/AppCanvas.h @@ -56,14 +56,14 @@ public: virtual void init(); /*! Reads a pixel area from the canvas */ - virtual void readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const; + virtual void readColorPixels(int x, int y, int w, int h, RGBImage& oImage) const; /*! Reads a depth pixel area from the canvas */ - virtual void readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const; + virtual void readDepthPixels(int x, int y, int w, int h, GrayImage& oImage) const; virtual BBox scene3DBBox() const; /* abstract */ - virtual void RenderStroke(Stroke*); + virtual void RenderStroke(Stroke *); virtual void update(); diff --git a/source/blender/freestyle/intern/application/AppConfig.cpp b/source/blender/freestyle/intern/application/AppConfig.cpp index c8ebc45d7eb..2500c9c68ee 100644 --- a/source/blender/freestyle/intern/application/AppConfig.cpp +++ b/source/blender/freestyle/intern/application/AppConfig.cpp @@ -42,7 +42,7 @@ extern "C" { namespace Config { -Path* Path::_pInstance = 0; +Path *Path::_pInstance = 0; Path::Path() { // get the root directory @@ -80,7 +80,7 @@ Path::~Path() _pInstance = 0; } -Path* Path::getInstance() +Path *Path::getInstance() { return _pInstance; } @@ -89,11 +89,10 @@ string Path::getEnvVar(const string& iEnvVarName) { string value; if (!getenv(StringUtils::toAscii(iEnvVarName).c_str())) { - cerr << "Warning: You may want to set the $" - << StringUtils::toAscii(iEnvVarName) - << " environment variable to use Freestyle." << endl - << " Otherwise, the current directory will be used instead." - << endl; + cerr << "Warning: You may want to set the $" << + StringUtils::toAscii(iEnvVarName) << + " environment variable to use Freestyle." << endl << + " Otherwise, the current directory will be used instead." << endl; value = "."; } else { diff --git a/source/blender/freestyle/intern/application/AppConfig.h b/source/blender/freestyle/intern/application/AppConfig.h index 9bd5506d94c..54dde44df7c 100644 --- a/source/blender/freestyle/intern/application/AppConfig.h +++ b/source/blender/freestyle/intern/application/AppConfig.h @@ -43,7 +43,7 @@ using namespace std; namespace Config { -class Path{ +class Path { protected: static Path * _pInstance; string _ProjectDir; @@ -58,7 +58,7 @@ protected: public: Path(); virtual ~Path(); - static Path* getInstance(); + static Path *getInstance(); void setRootDir(const string& iRootDir); void setHomeDir(const string& iHomeDir); diff --git a/source/blender/freestyle/intern/application/AppView.h b/source/blender/freestyle/intern/application/AppView.h index 7b8a892858e..0aa3f8a4005 100644 --- a/source/blender/freestyle/intern/application/AppView.h +++ b/source/blender/freestyle/intern/application/AppView.h @@ -94,7 +94,7 @@ public: _minAbs = std::min(rabs(_minBBox), rabs(_maxBBox)); } - inline void AddSilhouette(NodeGroup* iSilhouette) + inline void AddSilhouette(NodeGroup *iSilhouette) { _SilhouetteRootNode->AddChild(iSilhouette); } @@ -109,7 +109,7 @@ public: //_pVisibleSilhouetteNode->AddChild(iVSilhouette); } - inline void setDebug(NodeGroup* iDebug) + inline void setDebug(NodeGroup *iDebug) { if (0 != _DebugRootNode->numberOfChildren()) { _DebugRootNode->DetachChildren(); @@ -119,7 +119,7 @@ public: AddDebug(iDebug); } - inline void AddDebug(NodeGroup* iDebug) + inline void AddDebug(NodeGroup *iDebug) { _DebugRootNode->AddChild(iDebug); } diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index b71f716459c..bc847bb6114 100644 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -185,7 +185,7 @@ Controller::~Controller() void Controller::setView(AppView *iView) { - if(NULL == iView) + if (NULL == iView) return; _pView = iView; @@ -213,12 +213,12 @@ void Controller::setPassZ(float *buf, int width, int height) void Controller::setContext(bContext *C) { - PythonInterpreter* py_inter = dynamic_cast(_inter); + PythonInterpreter *py_inter = dynamic_cast(_inter); assert(py_inter != 0); py_inter->setContext(C); } -int Controller::LoadMesh(Render *re, SceneRenderLayer* srl) +int Controller::LoadMesh(Render *re, SceneRenderLayer *srl) { BlenderFileLoader loader(re, srl); @@ -300,7 +300,7 @@ int Controller::LoadMesh(Render *re, SceneRenderLayer* srl) _ListOfModels.push_back("Blender_models"); - _bboxDiag = (_RootNode->bbox().getMax()-_RootNode->bbox().getMin()).norm(); + _bboxDiag = (_RootNode->bbox().getMax() - _RootNode->bbox().getMin()).norm(); if (G.debug & G_DEBUG_FREESTYLE) { cout << "Triangles nb : " << _SceneNumFaces << endl; cout << "Bounding Box : " << _bboxDiag << endl; @@ -531,7 +531,7 @@ void Controller::ComputeViewMap() ViewMapBuilder vmBuilder; vmBuilder.setEnableQI(_EnableQI); vmBuilder.setViewpoint(Vec3r(vp)); - vmBuilder.setTransform( mv, proj,viewport, _pView->GetFocalLength(), _pView->GetAspect(), _pView->GetFovyRadian()); + vmBuilder.setTransform(mv, proj, viewport, _pView->GetFocalLength(), _pView->GetAspect(), _pView->GetFovyRadian()); vmBuilder.setFrustum(_pView->znear(), _pView->zfar()); vmBuilder.setGrid(&_Grid); vmBuilder.setRenderMonitor(_pRenderMonitor); @@ -843,17 +843,17 @@ void Controller::ResetRenderCount() _render_count = 0; } -Render* Controller::RenderStrokes(Render *re) +Render *Controller::RenderStrokes(Render *re) { _Chrono.start(); - BlenderStrokeRenderer* blenderRenderer = new BlenderStrokeRenderer(re, ++_render_count); + BlenderStrokeRenderer *blenderRenderer = new BlenderStrokeRenderer(re, ++_render_count); _Canvas->Render(blenderRenderer); real d = _Chrono.stop(); if (G.debug & G_DEBUG_FREESTYLE) { cout << "Temporary scene generation: " << d << endl; } _Chrono.start(); - Render* freestyle_render = blenderRenderer->RenderScene(re); + Render *freestyle_render = blenderRenderer->RenderScene(re); d = _Chrono.stop(); if (G.debug & G_DEBUG_FREESTYLE) { cout << "Stroke rendering : " << d << endl; @@ -866,18 +866,17 @@ Render* Controller::RenderStrokes(Render *re) void Controller::InsertStyleModule(unsigned index, const char *iFileName) { if (!BLI_testextensie(iFileName, ".py")) { - cerr << "Error: Cannot load \"" << StringUtils::toAscii(string(iFileName)) - << "\", unknown extension" << endl; + cerr << "Error: Cannot load \"" << StringUtils::toAscii(string(iFileName)) << "\", unknown extension" << endl; return; } - StyleModule* sm = new StyleModule(iFileName, _inter); + StyleModule *sm = new StyleModule(iFileName, _inter); _Canvas->InsertStyleModule(index, sm); } void Controller::InsertStyleModule(unsigned index, const char *iName, struct Text *iText) { - StyleModule* sm = new BlenderStyleModule(iText, iName, _inter); + StyleModule *sm = new BlenderStyleModule(iText, iName, _inter); _Canvas->InsertStyleModule(index, sm); } @@ -898,7 +897,7 @@ void Controller::Clear() void Controller::ReloadStyleModule(unsigned index, const char * iFileName) { - StyleModule* sm = new StyleModule(iFileName, _inter); + StyleModule *sm = new StyleModule(iFileName, _inter); _Canvas->ReplaceStyleModule(index, sm); } diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp index e9586e347a2..2018c7a740d 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp @@ -35,7 +35,7 @@ #include "BKE_global.h" -BlenderFileLoader::BlenderFileLoader(Render *re, SceneRenderLayer* srl) +BlenderFileLoader::BlenderFileLoader(Render *re, SceneRenderLayer *srl) { _re = re; _srl = srl; @@ -50,7 +50,7 @@ BlenderFileLoader::~BlenderFileLoader() _Scene = NULL; } -NodeGroup* BlenderFileLoader::Load() +NodeGroup *BlenderFileLoader::Load() { ObjectInstanceRen *obi; @@ -582,10 +582,10 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id) edgeMarks, em1, false, em4, clip_1); } for (i = 0; i < numTris_1; i++) { - addTriangle(&ls, triCoords[0], triCoords[i+1], triCoords[i+2], - triNormals[0], triNormals[i+1], triNormals[i+2], - fm, (i == 0) ? edgeMarks[0] : false, edgeMarks[i+1], - (i == numTris_1 - 1) ? edgeMarks[i+2] : false); + addTriangle(&ls, triCoords[0], triCoords[i + 1], triCoords[i + 2], + triNormals[0], triNormals[i + 1], triNormals[i + 2], + fm, (i == 0) ? edgeMarks[0] : false, edgeMarks[i + 1], + (i == numTris_1 - 1) ? edgeMarks[i + 2] : false); _numFacesRead++; } } @@ -600,10 +600,10 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id) edgeMarks, em2, em3, false, clip_2); } for (i = 0; i < numTris_2; i++) { - addTriangle(&ls, triCoords[0], triCoords[i+1], triCoords[i+2], - triNormals[0], triNormals[i+1], triNormals[i+2], - fm, (i == 0) ? edgeMarks[0] : false, edgeMarks[i+1], - (i == numTris_2 - 1) ? edgeMarks[i+2] : false); + addTriangle(&ls, triCoords[0], triCoords[i + 1], triCoords[i + 2], + triNormals[0], triNormals[i + 1], triNormals[i + 2], + fm, (i == 0) ? edgeMarks[0] : false, edgeMarks[i + 1], + (i == numTris_2 - 1) ? edgeMarks[i + 2] : false); _numFacesRead++; } } @@ -624,12 +624,9 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id) GeomCleaner::CleanIndexedVertexArray(normals, nSize, NIndices, niSize, &cleanNormals, &cnSize, &cleanNIndices); // format materials array - FrsMaterial** marray = new FrsMaterial*[meshFrsMaterials.size()]; + FrsMaterial **marray = new FrsMaterial *[meshFrsMaterials.size()]; unsigned int mindex = 0; - for (vector::iterator m = meshFrsMaterials.begin(), mend = meshFrsMaterials.end(); - m!=mend; - ++m) - { + for (vector::iterator m = meshFrsMaterials.begin(), mend = meshFrsMaterials.end(); m != mend; ++m) { marray[mindex] = new FrsMaterial(*m); ++mindex; } @@ -653,11 +650,11 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id) for (i = 0; i < viSize; i += 3) { detri_t detri; vi0 = cleanVIndices[i]; - vi1 = cleanVIndices[i+1]; - vi2 = cleanVIndices[i+2]; - Vec3r v0(cleanVertices[vi0], cleanVertices[vi0+1], cleanVertices[vi0+2]); - Vec3r v1(cleanVertices[vi1], cleanVertices[vi1+1], cleanVertices[vi1+2]); - Vec3r v2(cleanVertices[vi2], cleanVertices[vi2+1], cleanVertices[vi2+2]); + vi1 = cleanVIndices[i + 1]; + vi2 = cleanVIndices[i + 2]; + Vec3r v0(cleanVertices[vi0], cleanVertices[vi0 + 1], cleanVertices[vi0 + 2]); + Vec3r v1(cleanVertices[vi1], cleanVertices[vi1 + 1], cleanVertices[vi1 + 2]); + Vec3r v2(cleanVertices[vi2], cleanVertices[vi2 + 1], cleanVertices[vi2 + 2]); if (v0 == v1 || v0 == v2 || v1 == v2) { continue; // do nothing for now } @@ -686,11 +683,11 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id) if (i == j) continue; vi0 = cleanVIndices[j]; - vi1 = cleanVIndices[j+1]; - vi2 = cleanVIndices[j+2]; - Vec3r v0(cleanVertices[vi0], cleanVertices[vi0+1], cleanVertices[vi0+2]); - Vec3r v1(cleanVertices[vi1], cleanVertices[vi1+1], cleanVertices[vi1+2]); - Vec3r v2(cleanVertices[vi2], cleanVertices[vi2+1], cleanVertices[vi2+2]); + vi1 = cleanVIndices[j + 1]; + vi2 = cleanVIndices[j + 2]; + Vec3r v0(cleanVertices[vi0], cleanVertices[vi0 + 1], cleanVertices[vi0 + 2]); + Vec3r v1(cleanVertices[vi1], cleanVertices[vi1 + 1], cleanVertices[vi1 + 2]); + Vec3r v2(cleanVertices[vi2], cleanVertices[vi2 + 1], cleanVertices[vi2 + 2]); if (detri.viP == vi0 && (detri.viA == vi1 || detri.viB == vi1)) { detri.v += (v2 - v0); detri.n++; @@ -728,13 +725,13 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id) detri_t detri = (*v); if (detri.n == 0) { cleanVertices[detri.viP] = cleanVertices[detri.viA]; - cleanVertices[detri.viP+1] = cleanVertices[detri.viA+1]; - cleanVertices[detri.viP+2] = cleanVertices[detri.viA+2]; + cleanVertices[detri.viP + 1] = cleanVertices[detri.viA + 1]; + cleanVertices[detri.viP + 2] = cleanVertices[detri.viA + 2]; } else if (detri.v.norm() > 0.0) { cleanVertices[detri.viP] += 1.0e-5 * detri.v.x(); - cleanVertices[detri.viP+1] += 1.0e-5 * detri.v.y(); - cleanVertices[detri.viP+2] += 1.0e-5 * detri.v.z(); + cleanVertices[detri.viP + 1] += 1.0e-5 * detri.v.y(); + cleanVertices[detri.viP + 2] += 1.0e-5 * detri.v.z(); } } if (G.debug & G_DEBUG_FREESTYLE) { diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h index 316cf93a617..1637a136a8a 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h @@ -87,7 +87,7 @@ class LIB_SCENE_GRAPH_EXPORT BlenderFileLoader { public: /*! Builds a MaxFileLoader */ - BlenderFileLoader(Render *re, SceneRenderLayer* srl); + BlenderFileLoader(Render *re, SceneRenderLayer *srl); virtual ~BlenderFileLoader(); /*! Loads the 3D scene and returns a pointer to the scene root node */ diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index 254aca35d82..cab6ebff4f2 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -67,7 +67,7 @@ extern "C" { } #endif -BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count) : StrokeRenderer() +BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : StrokeRenderer() { // TEMPORARY - need a texture manager _textureManager = new BlenderTextureManager; @@ -128,9 +128,9 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count) : Str BKE_scene_set_background(G.main, freestyle_scene); // Camera - Object* object_camera = BKE_object_add(freestyle_scene, OB_CAMERA); + Object *object_camera = BKE_object_add(freestyle_scene, OB_CAMERA); - Camera* camera = (Camera *)object_camera->data; + Camera *camera = (Camera *)object_camera->data; camera->type = CAM_ORTHO; camera->ortho_scale = max(re->rectx, re->recty); camera->clipsta = 0.1f; @@ -172,7 +172,7 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer() // compositor has finished. // release objects and data blocks - for (Base *b = (Base*)freestyle_scene->base.first; b; b = b->next) { + for (Base *b = (Base *)freestyle_scene->base.first; b; b = b->next) { Object *ob = b->object; void *data = ob->data; char *name = ob->id.name; @@ -192,7 +192,7 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer() freestyle_scene->camera = NULL; break; default: - cerr << "Warning: unexpected object in the scene: " << name[0] << name[1] << ":" << (name+2) << endl; + cerr << "Warning: unexpected object in the scene: " << name[0] << name[1] << ":" << (name + 2) << endl; } } BLI_freelistN(&freestyle_scene->base); @@ -239,9 +239,7 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const unsigned int vertex_index, edge_index, loop_index; Vec2r p; - for (vector::iterator s = strips.begin(), send = strips.end(); - s != send; - ++s){ + for (vector::iterator s = strips.begin(), send = strips.end(); s != send; ++s) { Strip::vertex_container& strip_vertices = (*s)->vertices(); int strip_vertex_count = (*s)->sizeStrip(); int xl, xu, yl, yu, n, visible_faces, visible_segments; @@ -286,11 +284,11 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const //me = Mesh.New() #if 0 - Object* object_mesh = BKE_object_add(freestyle_scene, OB_MESH); + Object *object_mesh = BKE_object_add(freestyle_scene, OB_MESH); #else - Object* object_mesh = NewMesh(); + Object *object_mesh = NewMesh(); #endif - Mesh* mesh = (Mesh*)object_mesh->data; + Mesh *mesh = (Mesh *)object_mesh->data; #if 0 MEM_freeN(mesh->bb); mesh->bb = NULL; @@ -298,10 +296,10 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const #endif #if 1 //me.materials = [mat] - mesh->mat = (Material**)MEM_mallocN(1 * sizeof(Material*), "MaterialList"); + mesh->mat = (Material **)MEM_mallocN(1 * sizeof(Material *), "MaterialList"); mesh->mat[0] = material; mesh->totcol = 1; - test_object_materials((ID*)mesh); + test_object_materials((ID *)mesh); #else assign_material(object_mesh, material, object_mesh->totcol + 1); object_mesh->actcol = object_mesh->totcol; @@ -309,22 +307,22 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const // vertices allocation mesh->totvert = visible_faces + visible_segments * 2; - mesh->mvert = (MVert*)CustomData_add_layer(&mesh->vdata, CD_MVERT, CD_CALLOC, NULL, mesh->totvert); + mesh->mvert = (MVert *)CustomData_add_layer(&mesh->vdata, CD_MVERT, CD_CALLOC, NULL, mesh->totvert); // edges allocation mesh->totedge = visible_faces * 2 + visible_segments; - mesh->medge = (MEdge*)CustomData_add_layer(&mesh->edata, CD_MEDGE, CD_CALLOC, NULL, mesh->totedge); + mesh->medge = (MEdge *)CustomData_add_layer(&mesh->edata, CD_MEDGE, CD_CALLOC, NULL, mesh->totedge); // faces allocation mesh->totpoly = visible_faces; - mesh->mpoly = (MPoly*)CustomData_add_layer(&mesh->pdata, CD_MPOLY, CD_CALLOC, NULL, mesh->totpoly); + mesh->mpoly = (MPoly *)CustomData_add_layer(&mesh->pdata, CD_MPOLY, CD_CALLOC, NULL, mesh->totpoly); // loops allocation mesh->totloop = visible_faces * 3; - mesh->mloop = (MLoop*)CustomData_add_layer(&mesh->ldata, CD_MLOOP, CD_CALLOC, NULL, mesh->totloop); + mesh->mloop = (MLoop *)CustomData_add_layer(&mesh->ldata, CD_MLOOP, CD_CALLOC, NULL, mesh->totloop); // colors allocation - mesh->mloopcol = (MLoopCol*)CustomData_add_layer(&mesh->ldata, CD_MLOOPCOL, CD_CALLOC, NULL, mesh->totloop); + mesh->mloopcol = (MLoopCol *)CustomData_add_layer(&mesh->ldata, CD_MLOOPCOL, CD_CALLOC, NULL, mesh->totloop); //////////////////// // Data copy @@ -503,9 +501,9 @@ Object *BlenderStrokeRenderer::NewMesh() const return ob; } -Render* BlenderStrokeRenderer::RenderScene(Render *re) +Render *BlenderStrokeRenderer::RenderScene(Render *re) { - Camera *camera = (Camera*)freestyle_scene->camera->data; + Camera *camera = (Camera *)freestyle_scene->camera->data; if (camera->clipend < _z) camera->clipend = _z + _z_delta * 100.0f; #if 0 diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h b/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h index 7a1ce0a082b..51eaf4fe504 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h @@ -62,7 +62,7 @@ public: protected: virtual int interpret() { - PythonInterpreter* py_inter = dynamic_cast(_inter); + PythonInterpreter *py_inter = dynamic_cast(_inter); assert(py_inter != 0); return py_inter->interpretText(_text, getFileName()); } diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index fdff9db3d60..f6f97bda1bf 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -206,7 +206,7 @@ static void init_camera(Render *re) static char *escape_quotes(char *name) { - char *s = (char*)MEM_mallocN(strlen(name) * 2 + 1, "escape_quotes"); + char *s = (char *)MEM_mallocN(strlen(name) * 2 + 1, "escape_quotes"); char *p = s; while (*name) { if (*name == '\'') @@ -323,13 +323,13 @@ static void prepare(Render *re, SceneRenderLayer *srl) if (G.debug & G_DEBUG_FREESTYLE) { cout << "Modules :" << endl; } - for (FreestyleModuleConfig *module_conf = (FreestyleModuleConfig*)config->modules.first; + for (FreestyleModuleConfig *module_conf = (FreestyleModuleConfig *)config->modules.first; module_conf; module_conf = module_conf->next) { - if(module_conf->is_displayed) { + if (module_conf->is_displayed) { if (G.debug & G_DEBUG_FREESTYLE) { - cout << " " << layer_count+1 << ": " << module_conf->module_path << endl; + cout << " " << layer_count + 1 << ": " << module_conf->module_path << endl; } controller->InsertStyleModule(layer_count, module_conf->module_path); controller->toggleLayer(layer_count, true); @@ -362,14 +362,14 @@ static void prepare(Render *re, SceneRenderLayer *srl) if (G.debug & G_DEBUG_FREESTYLE) { cout << "Linesets:" << endl; } - for (FreestyleLineSet *lineset = (FreestyleLineSet*)config->linesets.first; + for (FreestyleLineSet *lineset = (FreestyleLineSet *)config->linesets.first; lineset; lineset = lineset->next) { if (lineset->flags & FREESTYLE_LINESET_ENABLED) { if (G.debug & G_DEBUG_FREESTYLE) { - cout << " " << layer_count+1 << ": " << lineset->name << " - " - << lineset->linestyle->id.name+2 << endl; + cout << " " << layer_count+1 << ": " << lineset->name << " - " << + lineset->linestyle->id.name + 2 << endl; } Text *text = create_lineset_handler(srl->name, lineset->name); controller->InsertStyleModule(layer_count, lineset->name, text); @@ -444,21 +444,21 @@ static void prepare(Render *re, SceneRenderLayer *srl) cout << "Crease angle : " << controller->getCreaseAngle() << endl; cout << "Sphere radius : " << controller->getSphereRadius() << endl; cout << "Face smoothness : " << (controller->getFaceSmoothness() ? "enabled" : "disabled") << endl; - cout << "Redges and valleys : " << (controller->getComputeRidgesAndValleysFlag() ? "enabled" : "disabled") - << endl; - cout << "Suggestive contours : " << (controller->getComputeSuggestiveContoursFlag() ? "enabled" : "disabled") - << endl; - cout << "Suggestive contour Kr derivative epsilon : " << controller->getSuggestiveContourKrDerivativeEpsilon() - << endl; - cout << "Material boundaries : " << (controller->getComputeMaterialBoundariesFlag() ? "enabled" : "disabled") - << endl; + cout << "Redges and valleys : " << (controller->getComputeRidgesAndValleysFlag() ? "enabled" : "disabled") << + endl; + cout << "Suggestive contours : " << + (controller->getComputeSuggestiveContoursFlag() ? "enabled" : "disabled") << endl; + cout << "Suggestive contour Kr derivative epsilon : " << + controller->getSuggestiveContourKrDerivativeEpsilon() << endl; + cout << "Material boundaries : " << + (controller->getComputeMaterialBoundariesFlag() ? "enabled" : "disabled") << endl; cout << endl; } // set diffuse and z depth passes RenderLayer *rl = RE_GetRenderLayer(re->result, srl->name); bool diffuse = false, z = false; - for (RenderPass *rpass = (RenderPass*)rl->passes.first; rpass; rpass = rpass->next) { + for (RenderPass *rpass = (RenderPass *)rl->passes.first; rpass; rpass = rpass->next) { switch (rpass->passtype) { case SCE_PASS_DIFFUSE: controller->setPassDiffuse(rpass->rect, rpass->rectx, rpass->recty); @@ -483,7 +483,7 @@ static void prepare(Render *re, SceneRenderLayer *srl) controller->ComputeViewMap(); } -void FRS_composite_result(Render* re, SceneRenderLayer* srl, Render* freestyle_render) +void FRS_composite_result(Render *re, SceneRenderLayer *srl, Render *freestyle_render) { RenderLayer *rl; float *src, *dest, *pixSrc, *pixDest; @@ -539,7 +539,7 @@ static int displayed_layer_count(SceneRenderLayer *srl) switch (srl->freestyleConfig.mode) { case FREESTYLE_CONTROL_SCRIPT_MODE: - for (FreestyleModuleConfig *module = (FreestyleModuleConfig*)srl->freestyleConfig.modules.first; + for (FreestyleModuleConfig *module = (FreestyleModuleConfig *)srl->freestyleConfig.modules.first; module; module = module->next) { @@ -548,7 +548,7 @@ static int displayed_layer_count(SceneRenderLayer *srl) } break; case FREESTYLE_CONTROL_EDITOR_MODE: - for (FreestyleLineSet *lineset = (FreestyleLineSet*)srl->freestyleConfig.linesets.first; + for (FreestyleLineSet *lineset = (FreestyleLineSet *)srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) { @@ -630,7 +630,8 @@ Render *FRS_do_stroke_rendering(Render *re, SceneRenderLayer *srl) return freestyle_render; } -void FRS_finish_stroke_rendering(Render *re) { +void FRS_finish_stroke_rendering(Render *re) +{ // clear canvas controller->Clear(); } @@ -656,7 +657,7 @@ void FRS_free_freestyle_config(FreestyleConfig *config) { FreestyleLineSet *lineset; - for (lineset = (FreestyleLineSet*)config->linesets.first; lineset; lineset = lineset->next) { + for (lineset = (FreestyleLineSet *)config->linesets.first; lineset; lineset = lineset->next) { if (lineset->group) { lineset->group->id.us--; lineset->group = NULL; @@ -681,17 +682,17 @@ void FRS_copy_freestyle_config(FreestyleConfig *new_config, FreestyleConfig *con new_config->crease_angle = config->crease_angle; new_config->linesets.first = new_config->linesets.last = NULL; - for (lineset = (FreestyleLineSet*)config->linesets.first; lineset; lineset = lineset->next) { + for (lineset = (FreestyleLineSet *)config->linesets.first; lineset; lineset = lineset->next) { new_lineset = FRS_alloc_lineset(); copy_lineset(new_lineset, lineset); - BLI_addtail(&new_config->linesets, (void*)new_lineset); + BLI_addtail(&new_config->linesets, (void *)new_lineset); } new_config->modules.first = new_config->modules.last = NULL; - for (module = (FreestyleModuleConfig*)config->modules.first; module; module = module->next) { + for (module = (FreestyleModuleConfig *)config->modules.first; module; module = module->next) { new_module = FRS_alloc_module(); copy_module(new_module, module); - BLI_addtail(&new_config->modules, (void*)new_module); + BLI_addtail(&new_config->modules, (void *)new_module); } } @@ -715,14 +716,14 @@ static void copy_lineset(FreestyleLineSet *new_lineset, FreestyleLineSet *linese FreestyleModuleConfig *FRS_alloc_module() { - return (FreestyleModuleConfig*)MEM_callocN(sizeof(FreestyleModuleConfig), "style module configuration"); + return (FreestyleModuleConfig *)MEM_callocN(sizeof(FreestyleModuleConfig), "style module configuration"); } void FRS_add_module(FreestyleConfig *config) { - FreestyleModuleConfig *module_conf = (FreestyleModuleConfig*)MEM_callocN(sizeof(FreestyleModuleConfig), - "style module configuration"); - BLI_addtail(&config->modules, (void*)module_conf); + FreestyleModuleConfig *module_conf = (FreestyleModuleConfig *)MEM_callocN(sizeof(FreestyleModuleConfig), + "style module configuration"); + BLI_addtail(&config->modules, (void *)module_conf); strcpy(module_conf->module_path, default_module_path.c_str()); module_conf->is_displayed = 1; @@ -759,7 +760,7 @@ static void unique_lineset_name(FreestyleConfig *config, FreestyleLineSet *lines FreestyleLineSet *FRS_alloc_lineset() { - return (FreestyleLineSet*)MEM_callocN(sizeof(FreestyleLineSet), "Freestyle line set"); + return (FreestyleLineSet *)MEM_callocN(sizeof(FreestyleLineSet), "Freestyle line set"); } FreestyleLineSet *FRS_add_lineset(FreestyleConfig *config) @@ -767,7 +768,7 @@ FreestyleLineSet *FRS_add_lineset(FreestyleConfig *config) int lineset_index = BLI_countlist(&config->linesets); FreestyleLineSet *lineset = FRS_alloc_lineset(); - BLI_addtail(&config->linesets, (void*)lineset); + BLI_addtail(&config->linesets, (void *)lineset); FRS_set_active_lineset_index(config, lineset_index); lineset->linestyle = FRS_new_linestyle("LineStyle", NULL); @@ -880,7 +881,7 @@ FreestyleLineSet *FRS_get_active_lineset(FreestyleConfig *config) { FreestyleLineSet *lineset; - for (lineset = (FreestyleLineSet*)config->linesets.first; lineset; lineset = lineset->next) { + for (lineset = (FreestyleLineSet *)config->linesets.first; lineset; lineset = lineset->next) { if (lineset->flags & FREESTYLE_LINESET_CURRENT) return lineset; } @@ -892,7 +893,7 @@ short FRS_get_active_lineset_index(FreestyleConfig *config) FreestyleLineSet *lineset; short i; - for (lineset = (FreestyleLineSet*)config->linesets.first, i = 0; lineset; lineset = lineset->next, i++) { + for (lineset = (FreestyleLineSet *)config->linesets.first, i = 0; lineset; lineset = lineset->next, i++) { if (lineset->flags & FREESTYLE_LINESET_CURRENT) return i; } @@ -904,7 +905,7 @@ void FRS_set_active_lineset_index(FreestyleConfig *config, short index) FreestyleLineSet *lineset; short i; - for (lineset = (FreestyleLineSet*)config->linesets.first, i = 0; lineset; lineset = lineset->next, i++) { + for (lineset = (FreestyleLineSet *)config->linesets.first, i = 0; lineset; lineset = lineset->next, i++) { if (i == index) lineset->flags |= FREESTYLE_LINESET_CURRENT; else @@ -916,7 +917,7 @@ void FRS_unlink_target_object(FreestyleConfig *config, Object *ob) { FreestyleLineSet *lineset; - for (lineset = (FreestyleLineSet*)config->linesets.first; lineset; lineset = lineset->next) { + for (lineset = (FreestyleLineSet *)config->linesets.first; lineset; lineset = lineset->next) { FRS_unlink_linestyle_target_object(lineset->linestyle, ob); } } diff --git a/source/blender/freestyle/intern/geometry/Bezier.cpp b/source/blender/freestyle/intern/geometry/Bezier.cpp index 9140f1f947d..b332553f0b4 100644 --- a/source/blender/freestyle/intern/geometry/Bezier.cpp +++ b/source/blender/freestyle/intern/geometry/Bezier.cpp @@ -58,7 +58,7 @@ void BezierCurveSegment::Build() return; // Compute the rightmost part of the matrix: - vector::const_iterator p0,p1,p2,p3; + vector::const_iterator p0, p1, p2, p3; p0 = _ControlPolygon.begin(); p1 = p0; ++p1; @@ -101,7 +101,7 @@ BezierCurve::BezierCurve(vector& iPoints, double error) fitcurve.FitCurve(iPoints, curve, error); int i = 0; - vector::iterator v,vend; + vector::iterator v, vend; for (v = curve.begin(), vend = curve.end(); v != vend; ++v) { if ((i == 0) || (i % 4 != 0)) AddControlPoint(*v); @@ -111,7 +111,7 @@ BezierCurve::BezierCurve(vector& iPoints, double error) BezierCurve::~BezierCurve() { - if(_currentSegment) + if (_currentSegment) delete _currentSegment; } diff --git a/source/blender/freestyle/intern/geometry/FastGrid.cpp b/source/blender/freestyle/intern/geometry/FastGrid.cpp index 7051d960346..37871eadcec 100644 --- a/source/blender/freestyle/intern/geometry/FastGrid.cpp +++ b/source/blender/freestyle/intern/geometry/FastGrid.cpp @@ -25,7 +25,7 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/freestyle/intern/geometry/FastGrid.h +/** \file blender/freestyle/intern/geometry/FastGrid.cpp * \ingroup freestyle * \brief Class to define a cell grid surrounding the bounding box of the scene * \author Stephane Grabli @@ -56,7 +56,7 @@ void FastGrid::configure(const Vec3r& orig, const Vec3r& size, unsigned nb) { Grid::configure(orig, size, nb); _cells_size = _cells_nb[0] * _cells_nb[1] * _cells_nb[2]; - _cells = new Cell*[_cells_size]; + _cells = new Cell *[_cells_size]; memset(_cells, 0, _cells_size * sizeof(*_cells)); } diff --git a/source/blender/freestyle/intern/geometry/FastGrid.h b/source/blender/freestyle/intern/geometry/FastGrid.h index 3a2ed392533..cf5f911497a 100644 --- a/source/blender/freestyle/intern/geometry/FastGrid.h +++ b/source/blender/freestyle/intern/geometry/FastGrid.h @@ -73,7 +73,7 @@ public: virtual void configure(const Vec3r& orig, const Vec3r& size, unsigned nb); /*! returns the cell whose coordinates are pased as argument */ - Cell* getCell(const Vec3u& p); + Cell *getCell(const Vec3u& p); /*! Fills the case p with the cell iCell */ virtual void fillCell(const Vec3u& p, Cell& cell); diff --git a/source/blender/freestyle/intern/geometry/FitCurve.cpp b/source/blender/freestyle/intern/geometry/FitCurve.cpp index 4eae543c9f9..cb338be8cf3 100644 --- a/source/blender/freestyle/intern/geometry/FitCurve.cpp +++ b/source/blender/freestyle/intern/geometry/FitCurve.cpp @@ -154,7 +154,7 @@ static BezierCurve GenerateBezier(Vector2 *d, int first, int last, double *uPri Vector2 tmp; /* Utility variable */ BezierCurve bezCurve; /* RETURN bezier curve ctl pts */ - bezCurve = (Vector2*)malloc(4 * sizeof(Vector2)); + bezCurve = (Vector2 *)malloc(4 * sizeof(Vector2)); nPts = last - first + 1; /* Compute the A's */ @@ -246,9 +246,9 @@ static double *Reparameterize(Vector2 *d, int first, int last, double *u, Bezier int i; double *uPrime; /* New parameter values */ - uPrime = (double*)malloc(nPts * sizeof(double)); + uPrime = (double *)malloc(nPts * sizeof(double)); for (i = first; i <= last; i++) { - uPrime[i-first] = NewtonRaphsonRootFind(bezCurve, d[i], u[i - first]); + uPrime[i - first] = NewtonRaphsonRootFind(bezCurve, d[i], u[i - first]); } return (uPrime); } @@ -313,21 +313,21 @@ static Vector2 BezierII(int degree, Vector2 *V, double t) Vector2 *Vtemp; /* Local copy of control points */ /* Copy array */ - Vtemp = (Vector2*)malloc((unsigned)((degree + 1) * sizeof (Vector2))); + Vtemp = (Vector2 *)malloc((unsigned)((degree + 1) * sizeof(Vector2))); for (i = 0; i <= degree; i++) { Vtemp[i] = V[i]; } /* Triangle computation */ for (i = 1; i <= degree; i++) { - for (j = 0; j <= degree-i; j++) { + for (j = 0; j <= degree - i; j++) { Vtemp[j][0] = (1.0 - t) * Vtemp[j][0] + t * Vtemp[j + 1][0]; Vtemp[j][1] = (1.0 - t) * Vtemp[j][1] + t * Vtemp[j + 1][1]; } } Q = Vtemp[0]; - free((void*)Vtemp); + free((void *)Vtemp); return Q; } @@ -411,7 +411,7 @@ static double *ChordLengthParameterize(Vector2 *d, int first, int last) int i; double *u; /* Parameterization */ - u = (double*)malloc((unsigned)(last - first + 1) * sizeof(double)); + u = (double *)malloc((unsigned)(last - first + 1) * sizeof(double)); u[0] = 0.0; for (i = first + 1; i <= last; i++) { @@ -551,13 +551,13 @@ void FitCurveWrapper::FitCubic(Vector2 *d, int first, int last, Vector2 tHat1, V if (nPts == 2) { double dist = V2DistanceBetween2Points(&d[last], &d[first]) / 3.0; - bezCurve = (Vector2*)malloc(4 * sizeof(Vector2)); + bezCurve = (Vector2 *)malloc(4 * sizeof(Vector2)); bezCurve[0] = d[first]; bezCurve[3] = d[last]; V2Add(&bezCurve[0], V2Scale(&tHat1, dist), &bezCurve[1]); V2Add(&bezCurve[3], V2Scale(&tHat2, dist), &bezCurve[2]); DrawBezierCurve(3, bezCurve); - free((void*)bezCurve); + free((void *)bezCurve); return; } @@ -569,8 +569,8 @@ void FitCurveWrapper::FitCubic(Vector2 *d, int first, int last, Vector2 tHat1, V maxError = ComputeMaxError(d, first, last, bezCurve, u, &splitPoint); if (maxError < error) { DrawBezierCurve(3, bezCurve); - free((void*)u); - free((void*)bezCurve); + free((void *)u); + free((void *)bezCurve); return; } @@ -583,18 +583,18 @@ void FitCurveWrapper::FitCubic(Vector2 *d, int first, int last, Vector2 tHat1, V bezCurve, uPrime, &splitPoint); if (maxError < error) { DrawBezierCurve(3, bezCurve); - free((void*)u); - free((void*)bezCurve); + free((void *)u); + free((void *)bezCurve); return; } - free((void*)u); + free((void *)u); u = uPrime; } } /* Fitting failed -- split at max error point and fit recursively */ - free((void*)u); - free((void*)bezCurve); + free((void *)u); + free((void *)bezCurve); tHatCenter = ComputeCenterTangent(d, splitPoint); FitCubic(d, first, splitPoint, tHat1, tHatCenter, error); V2Negate(&tHatCenter); diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp index c90513c6294..dc9618a1a45 100644 --- a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp +++ b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp @@ -177,7 +177,7 @@ void GeomCleaner::SortAndCompressIndexedVertexArray(const float *iVertices, unsi } /*! Defines a hash table used for searching the Cells */ -struct GeomCleanerHasher{ +struct GeomCleanerHasher { #define _MUL 950706376UL #define _MOD 2147483647UL inline size_t operator() (const Vec3r& p) const diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.cpp b/source/blender/freestyle/intern/geometry/GeomUtils.cpp index c0cd9450480..8d6317c9b07 100644 --- a/source/blender/freestyle/intern/geometry/GeomUtils.cpp +++ b/source/blender/freestyle/intern/geometry/GeomUtils.cpp @@ -37,7 +37,7 @@ namespace GeomUtils { // This internal procedure is defined below. -bool intersect2dSegPoly(Vec2r* seg, Vec2r* poly, unsigned n); +bool intersect2dSegPoly(Vec2r *seg, Vec2r *poly, unsigned n); bool intersect2dSeg2dArea(const Vec2r& min, const Vec2r& max, const Vec2r& A, const Vec2r& B) { @@ -64,7 +64,9 @@ bool include2dSeg2dArea(const Vec2r& min, const Vec2r& max, const Vec2r& A, cons { if ((((max[0] > A[0]) && (A[0] > min[0])) && ((max[0] > B[0]) && (B[0] > min[0]))) && (((max[1] > A[1]) && (A[1] > min[1])) && ((max[1] > B[1]) && (B[1] > min[1])))) + { return true; + } return false; } @@ -512,9 +514,9 @@ bool intersectRayBBox(const Vec3r& orig, const Vec3r& dir, // ray origin an bounds[1] = boxMax; tmin = (bounds[sign[0]].x() - orig.x()) * inv_direction.x(); - tmax = (bounds[1-sign[0]].x() - orig.x()) * inv_direction.x(); + tmax = (bounds[1 - sign[0]].x() - orig.x()) * inv_direction.x(); tymin = (bounds[sign[1]].y() - orig.y()) * inv_direction.y(); - tymax = (bounds[1-sign[1]].y() - orig.y()) * inv_direction.y(); + tymax = (bounds[1 - sign[1]].y() - orig.y()) * inv_direction.y(); if ((tmin > tymax) || (tymin > tmax)) return false; if (tymin > tmin) @@ -522,7 +524,7 @@ bool intersectRayBBox(const Vec3r& orig, const Vec3r& dir, // ray origin an if (tymax < tmax) tmax = tymax; tzmin = (bounds[sign[2]].z() - orig.z()) * inv_direction.z(); - tzmax = (bounds[1-sign[2]].z() - orig.z()) * inv_direction.z(); + tzmax = (bounds[1 - sign[2]].z() - orig.z()) * inv_direction.z(); if ((tmin > tzmax) || (tzmin > tmax)) return false; if (tzmin > tmin) @@ -587,7 +589,8 @@ void transformVertices(const vector& vertices, const Matrix44r& trans, ve } } -Vec3r rotateVector(const Matrix44r& mat, const Vec3r& v) { +Vec3r rotateVector(const Matrix44r& mat, const Vec3r& v) +{ Vec3r res; for (unsigned int i = 0; i < 3; i++) { res[i] = 0; @@ -693,7 +696,7 @@ void fromCameraToWorld(const Vec3r& p, Vec3r& q, const real model_view_matrix[4] #define PERP(u, v) ((u)[0] * (v)[1] - (u)[1] * (v)[0]) // 2D perp product -inline bool intersect2dSegPoly(Vec2r* seg, Vec2r* poly, unsigned n) +inline bool intersect2dSegPoly(Vec2r *seg, Vec2r *poly, unsigned n) { if (seg[0] == seg[1]) return false; @@ -705,7 +708,7 @@ inline bool intersect2dSegPoly(Vec2r* seg, Vec2r* poly, unsigned n) Vec2r e; // edge vector for (unsigned int i = 0; i < n; i++) { // process polygon edge poly[i]poly[i+1] - e = poly[i+1] - poly[i]; + e = poly[i + 1] - poly[i]; N = PERP(e, seg[0] - poly[i]); D = -PERP(e, dseg); if (fabs(D) < M_EPSILON) { diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.h b/source/blender/freestyle/intern/geometry/GeomUtils.h index 1b90f99c2ed..be20873e73b 100644 --- a/source/blender/freestyle/intern/geometry/GeomUtils.h +++ b/source/blender/freestyle/intern/geometry/GeomUtils.h @@ -53,7 +53,7 @@ namespace GeomUtils { /*! Computes the distance from a point P to a segment AB */ template -real distPointSegment( const T& P, const T& A , const T& B) +real distPointSegment(const T& P, const T& A, const T& B) { T AB, AP, BP; AB = B - A; diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp index 11c4f11b281..0b798c5abb8 100644 --- a/source/blender/freestyle/intern/geometry/Grid.cpp +++ b/source/blender/freestyle/intern/geometry/Grid.cpp @@ -158,7 +158,7 @@ void Grid::configure(const Vec3r& orig, const Vec3r& size, unsigned nb) _cell_size[i] = _size[i] / _cells_nb[i]; } -void Grid::insertOccluder(Polygon3r* occluder) +void Grid::insertOccluder(Polygon3r *occluder) { const vector vertices = occluder->getVertices(); if (vertices.size() == 0) @@ -208,7 +208,7 @@ void Grid::insertOccluder(Polygon3r* occluder) if (GeomUtils::overlapTriangleBox(boxcenter, boxhalfsize, triverts)) { // We must then create the Cell and add it to the cells list if it does not exist yet. // We must then add the occluder to the occluders list of this cell. - Cell* cell = getCell(coord); + Cell *cell = getCell(coord); if (!cell) { cell = new Cell(boxmin); fillCell(coord, *cell); @@ -226,7 +226,7 @@ void Grid::insertOccluder(Polygon3r* occluder) coord[0] = x; coord[1] = y; coord[2] = z; - Cell* cell = getCell(coord); + Cell *cell = getCell(coord); if (!cell) { Vec3r orig; getCellOrigin(coord, orig); @@ -311,7 +311,7 @@ void Grid::castInfiniteRay(const Vec3r& orig, const Vec3r& dir, OccludersSet& oc castRayInternal(visitor); } -Polygon3r* Grid::castRayToFindFirstIntersection(const Vec3r& orig, const Vec3r& dir, double& t, +Polygon3r *Grid::castRayToFindFirstIntersection(const Vec3r& orig, const Vec3r& dir, double& t, double& u, double& v, unsigned timestamp) { Polygon3r *occluder = 0; @@ -348,7 +348,8 @@ void Grid::initRay (const Vec3r &orig, const Vec3r& end, unsigned timestamp) //_ray_occluders.clear(); } -bool Grid::initInfiniteRay (const Vec3r &orig, const Vec3r& dir, unsigned timestamp) { +bool Grid::initInfiniteRay (const Vec3r &orig, const Vec3r& dir, unsigned timestamp) +{ _ray_dir = dir; _t_end = FLT_MAX; _t = 0; diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index 8b237673b8a..f37f7f615f0 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -71,7 +71,7 @@ public: virtual ~Cell() {} - inline void addOccluder(Polygon3r* o) { + inline void addOccluder(Polygon3r *o) { if (o) _occluders.push_back(o); } @@ -142,7 +142,7 @@ private: public: firstIntersectionGridVisitor(const Vec3r& ray_org, const Vec3r& ray_dir, const Vec3r& cell_size) : - GridVisitor(), u_(0),v_(0),t_(DBL_MAX), occluder_(0), ray_org_(ray_org), ray_dir_(ray_dir), + GridVisitor(), u_(0), v_(0), t_(DBL_MAX), occluder_(0), ray_org_(ray_org), ray_dir_(ray_dir), cell_size_(cell_size), current_cell_(0) { } @@ -213,14 +213,14 @@ public: virtual void fillCell(const Vec3u& coord, Cell& cell) = 0; /*! returns the cell whose coordinates are pased as argument */ - virtual Cell* getCell(const Vec3u& coord) = 0; + virtual Cell *getCell(const Vec3u& coord) = 0; /*! returns the cell containing the point passed as argument. If the cell is empty (contains no occluder), * NULL is returned * p * The point for which we're looking the cell */ - inline Cell* getCell(const Vec3r& p) { + inline Cell *getCell(const Vec3r& p) { Vec3u coord; getCellCoordinates(p, coord); return getCell(coord); @@ -255,10 +255,10 @@ public: * convex_poly * The list of 3D points constituing a convex polygon */ - void insertOccluder(Polygon3r * convex_poly); + void insertOccluder(Polygon3r *convex_poly); /*! Adds an occluder to the list of occluders */ - void addOccluder(Polygon3r* occluder) { + void addOccluder(Polygon3r *occluder) { _occluders.push_back(occluder); } @@ -311,7 +311,7 @@ public: } //ARB profiling only: - inline OccludersSet* getOccluders() { + inline OccludersSet *getOccluders() { return &_occluders; } @@ -371,12 +371,12 @@ protected: class VirtualOccludersSet { public: VirtualOccludersSet(Grid& _grid) : grid (_grid) {}; - Polygon3r* begin(); - Polygon3r* next(); - Polygon3r* next(bool stopOnNewCell); + Polygon3r *begin(); + Polygon3r *next(); + Polygon3r *next(bool stopOnNewCell); private: - Polygon3r* firstOccluderFromNextCell(); + Polygon3r *firstOccluderFromNextCell(); Grid& grid; OccludersSet::iterator it, end; }; diff --git a/source/blender/freestyle/intern/geometry/GridHelpers.h b/source/blender/freestyle/intern/geometry/GridHelpers.h index 4391b4f61a3..2503cb2ebbd 100644 --- a/source/blender/freestyle/intern/geometry/GridHelpers.h +++ b/source/blender/freestyle/intern/geometry/GridHelpers.h @@ -48,7 +48,7 @@ namespace GridHelpers { /*! Computes the distance from a point P to a segment AB */ template -T closestPointToSegment(const T& P, const T& A , const T& B, real& distance) +T closestPointToSegment(const T& P, const T& A, const T& B, real& distance) { T AB, AP, BP; AB = B - A; diff --git a/source/blender/freestyle/intern/geometry/HashGrid.cpp b/source/blender/freestyle/intern/geometry/HashGrid.cpp index b0ad9e0f276..3752fc2f32a 100644 --- a/source/blender/freestyle/intern/geometry/HashGrid.cpp +++ b/source/blender/freestyle/intern/geometry/HashGrid.cpp @@ -37,8 +37,8 @@ void HashGrid::clear() { if (!_cells.empty()) { - for (GridHashTable::iterator it = _cells.begin(); it !=_cells.end(); it++) { - Cell* cell = (*it).second; + for (GridHashTable::iterator it = _cells.begin(); it != _cells.end(); it++) { + Cell *cell = (*it).second; delete cell; } _cells.clear(); diff --git a/source/blender/freestyle/intern/geometry/HashGrid.h b/source/blender/freestyle/intern/geometry/HashGrid.h index ca6edb258a9..ea44196b523 100644 --- a/source/blender/freestyle/intern/geometry/HashGrid.h +++ b/source/blender/freestyle/intern/geometry/HashGrid.h @@ -93,9 +93,9 @@ public: virtual void configure(const Vec3r& orig, const Vec3r& size, unsigned nb); /*! returns the cell whose coordinates are pased as argument */ - virtual Cell* getCell(const Vec3u& p) + virtual Cell *getCell(const Vec3u& p) { - Cell* found_cell = NULL; + Cell *found_cell = NULL; GridHashTable::const_iterator found = _cells.find(p); if (found != _cells.end()) diff --git a/source/blender/freestyle/intern/geometry/Polygon.h b/source/blender/freestyle/intern/geometry/Polygon.h index 5ee4353ef5a..e217a67b03e 100644 --- a/source/blender/freestyle/intern/geometry/Polygon.h +++ b/source/blender/freestyle/intern/geometry/Polygon.h @@ -162,8 +162,8 @@ public: } // FIXME Is it possible to get rid of userdatas ? - void* userdata; - void* userdata2; // Used during ray casting + void *userdata; + void *userdata2; // Used during ray casting protected: vector _vertices; diff --git a/source/blender/freestyle/intern/geometry/SweepLine.h b/source/blender/freestyle/intern/geometry/SweepLine.h index ec81507c5c6..d03bc2224c7 100644 --- a/source/blender/freestyle/intern/geometry/SweepLine.h +++ b/source/blender/freestyle/intern/geometry/SweepLine.h @@ -44,7 +44,7 @@ class Intersection { public: template - Intersection(EdgeClass* eA, real ta, EdgeClass* eB, real tb) + Intersection(EdgeClass *eA, real ta, EdgeClass *eB, real tb) { EdgeA = eA; EdgeB = eB; @@ -109,7 +109,7 @@ public: } } - Segment(Segment& iBrother) + Segment(Segment& iBrother) { _edge = iBrother.edge(); A = iBrother.A; @@ -118,7 +118,7 @@ public: _order = iBrother._order; } - Segment(const Segment& iBrother) + Segment(const Segment& iBrother) { _edge = iBrother._edge; A = iBrother.A; @@ -137,7 +137,7 @@ public: return (i % 2 == 0) ? A : B; } - inline bool operator==(const Segment& iBrother) + inline bool operator==(const Segment& iBrother) { if (_edge == iBrother._edge) return true; @@ -145,13 +145,13 @@ public: } /* Adds an intersection for this segment */ - inline void AddIntersection(Intersection > *i) + inline void AddIntersection(Intersection > *i) { _Intersections.push_back(i); } /*! Checks for a common vertex with another edge */ - inline bool CommonVertex(const Segment& S, Point& CP) + inline bool CommonVertex(const Segment& S, Point& CP) { if ((A == S[0]) || (A == S[1])) { CP = A; @@ -164,7 +164,7 @@ public: return false; } - inline vector >*>& intersections() + inline vector >*>& intersections() { return _Intersections; } @@ -183,7 +183,7 @@ private: T _edge; Point A; Point B; - std::vector >*> _Intersections; // list of intersections parameters + std::vector >*> _Intersections; // list of intersections parameters bool _order; // true if A and B are in the same order than _edge.A and _edge.B. false otherwise. }; @@ -198,7 +198,7 @@ template struct binary_rule { binary_rule() {} - template binary_rule(const binary_rule& brother) {} + template binary_rule(const binary_rule& brother) {} virtual ~binary_rule() {} virtual bool operator()(T1&, T2&) @@ -208,14 +208,14 @@ struct binary_rule }; -template +template class SweepLine { public: SweepLine() {} ~SweepLine() { - for (typename vector >*>::iterator i = _Intersections.begin(), + for (typename vector >*>::iterator i = _Intersections.begin(), iend = _Intersections.end(); i != iend; i++) @@ -224,18 +224,18 @@ public: } } - inline void process(Point& p, vector*>& segments, + inline void process(Point& p, vector*>& segments, #if 0 - binary_rule,Segment >& binrule = \ - binary_rule,Segment >(), + binary_rule,Segment >& binrule = \ + binary_rule, Segment >(), #else - binary_rule,Segment >& binrule, + binary_rule, Segment >& binrule, #endif real epsilon = M_EPSILON) { // first we remove the segments that need to be removed and then we add the segments to add - vector*> toadd; - typename vector*>::iterator s, send; + vector*> toadd; + typename vector*>::iterator s, send; for (s = segments.begin(), send = segments.end(); s != send; s++) { if (p == (*(*s))[0]) toadd.push_back((*s)); @@ -247,16 +247,16 @@ public: } } - inline void add(Segment* S, + inline void add(Segment *S, #if 0 - binary_rule,Segment >& binrule = \ - binary_rule, Segment >(), + binary_rule, Segment >& binrule = \ + binary_rule, Segment >(), #else - binary_rule,Segment >& binrule, + binary_rule, Segment >& binrule, #endif real epsilon) { - real t,u; + real t, u; Point CP; Vec2r v0, v1, v2, v3; if (true == S->order()) { @@ -271,8 +271,8 @@ public: v0[0] = ((*S)[1])[0]; v0[1] = ((*S)[1])[1]; } - for (typename std::list* >::iterator s = _set.begin(), send = _set.end(); s != send; s++) { - Segment* currentS = (*s); + for (typename std::list *>::iterator s = _set.begin(), send = _set.end(); s != send; s++) { + Segment *currentS = (*s); if (true != binrule(*S, *currentS)) continue; @@ -293,7 +293,7 @@ public: if (GeomUtils::intersect2dSeg2dSegParametric(v0, v1, v2, v3, t, u, epsilon) == GeomUtils::DO_INTERSECT) { // create the intersection - Intersection > *inter = new Intersection >(S,t,currentS,u); + Intersection > *inter = new Intersection >(S, t, currentS, u); // add it to the intersections list _Intersections.push_back(inter); // add this intersection to the first edge intersections list @@ -306,27 +306,27 @@ public: _set.push_back(S); } - inline void remove(Segment* s) + inline void remove(Segment *s) { if (s->intersections().size() > 0) _IntersectedEdges.push_back(s); _set.remove(s); } - vector* >& intersectedEdges() + vector *>& intersectedEdges() { return _IntersectedEdges; } - vector >*>& intersections() + vector >*>& intersections() { return _Intersections; } private: - std::list* > _set; // set of active edges for a given position of the sweep line - std::vector* > _IntersectedEdges; // the list of intersected edges - std::vector >*> _Intersections; // the list of all intersections. + std::list *> _set; // set of active edges for a given position of the sweep line + std::vector *> _IntersectedEdges; // the list of intersected edges + std::vector > *> _Intersections; // the list of all intersections. }; #endif // __SWEEPLINE_H__ diff --git a/source/blender/freestyle/intern/geometry/VecMat.h b/source/blender/freestyle/intern/geometry/VecMat.h index 5b64a6e4502..34e10d31c4f 100644 --- a/source/blender/freestyle/intern/geometry/VecMat.h +++ b/source/blender/freestyle/intern/geometry/VecMat.h @@ -153,21 +153,21 @@ public: return res; } - inline Vec operator-(const Vec& v) const + inline Vec operator-(const Vec& v) const { Vec res(*this); res -= v; return res; } - inline Vec operator*(const typename Vec::value_type r) const + inline Vec operator*(const typename Vec::value_type r) const { Vec res(*this); res *= r; return res; } - inline Vec operator/(const typename Vec::value_type r) const + inline Vec operator/(const typename Vec::value_type r) const { Vec res(*this); if (r) @@ -435,7 +435,8 @@ public: return this->_coord[1]; } - inline value_type& sy(){ + inline value_type& sy() + { return this->_coord[1]; } diff --git a/source/blender/freestyle/intern/geometry/normal_cycle.cpp b/source/blender/freestyle/intern/geometry/normal_cycle.cpp index 2f0aa268c9f..63195b24386 100644 --- a/source/blender/freestyle/intern/geometry/normal_cycle.cpp +++ b/source/blender/freestyle/intern/geometry/normal_cycle.cpp @@ -82,15 +82,15 @@ void NormalCycle::end() double l2 = ::fabs(eigen_value_[2]); if (l1 > l0) { - ogf_swap(l0 , l1 ); + ogf_swap(l0, l1 ); ogf_swap(i_[0], i_[1]); } if (l2 > l1) { - ogf_swap(l1 , l2 ); + ogf_swap(l1, l2 ); ogf_swap(i_[1], i_[2]); } if (l1 > l0) { - ogf_swap(l0 , l1 ); + ogf_swap(l0, l1 ); ogf_swap(i_[0], i_[1]); } } diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h index 9890e615a7c..08fdf32ecd7 100644 --- a/source/blender/freestyle/intern/image/GaussianFilter.h +++ b/source/blender/freestyle/intern/image/GaussianFilter.h @@ -50,7 +50,8 @@ protected: float _sigma; float *_mask; int _bound; - int _maskSize; // the real mask size (must be odd)(the size of the mask we store is ((_maskSize+1)/2)*((_maskSize+1)/2)) + // the real mask size (must be odd)(the size of the mask we store is ((_maskSize+1)/2)*((_maskSize+1)/2)) + int _maskSize; int _storedMaskSize; // (_maskSize+1)/2) public: diff --git a/source/blender/freestyle/intern/image/Image.h b/source/blender/freestyle/intern/image/Image.h index 1487e43a0b0..757f6a8eca3 100644 --- a/source/blender/freestyle/intern/image/Image.h +++ b/source/blender/freestyle/intern/image/Image.h @@ -234,7 +234,7 @@ public: virtual ~RGBImage() { - if(_rgb) + if (_rgb) delete[] _rgb; } diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp index c7616fbce23..b9854782d5b 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.cpp +++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp @@ -134,7 +134,7 @@ GaussianPyramid::GaussianPyramid(const GrayImage& level0, unsigned nbLevels, flo BuildPyramid(level0, nbLevels); } -GaussianPyramid::GaussianPyramid(GrayImage* level0, unsigned nbLevels, float iSigma) : ImagePyramid() +GaussianPyramid::GaussianPyramid(GrayImage *level0, unsigned nbLevels, float iSigma) : ImagePyramid() { _sigma = iSigma; BuildPyramid(level0, nbLevels); @@ -151,7 +151,7 @@ void GaussianPyramid::BuildPyramid(const GrayImage& level0, unsigned nbLevels) BuildPyramid(pLevel, nbLevels); } -void GaussianPyramid::BuildPyramid(GrayImage* level0, unsigned nbLevels) +void GaussianPyramid::BuildPyramid(GrayImage *level0, unsigned nbLevels) { GrayImage *pLevel = level0; _levels.push_back(pLevel); diff --git a/source/blender/freestyle/intern/image/ImagePyramid.h b/source/blender/freestyle/intern/image/ImagePyramid.h index 4bab663318e..0665874a8e9 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.h +++ b/source/blender/freestyle/intern/image/ImagePyramid.h @@ -47,7 +47,7 @@ protected: std::vector _levels; public: - ImagePyramid(){} + ImagePyramid() {} ImagePyramid(const ImagePyramid& iBrother); //ImagePyramid(const GrayImage& level0, unsigned nbLevels); virtual ~ImagePyramid(); @@ -59,9 +59,9 @@ public: virtual void BuildPyramid(const GrayImage& level0, unsigned nbLevels) = 0; /*! Builds a pyramid without copying the base level */ - virtual void BuildPyramid(GrayImage* level0, unsigned nbLevels) = 0; + virtual void BuildPyramid(GrayImage *level0, unsigned nbLevels) = 0; - virtual GrayImage * getLevel(int l); + virtual GrayImage *getLevel(int l); /*! Returns the pixel x,y using bilinear interpolation. * \param x * the abscissa specified in the finest level coordinate system @@ -97,12 +97,12 @@ public: } GaussianPyramid(const GrayImage& level0, unsigned nbLevels, float iSigma=1.0f); - GaussianPyramid(GrayImage* level0, unsigned nbLevels, float iSigma=1.0f); + GaussianPyramid(GrayImage *level0, unsigned nbLevels, float iSigma=1.0f); GaussianPyramid(const GaussianPyramid& iBrother); virtual ~GaussianPyramid() {} virtual void BuildPyramid(const GrayImage& level0, unsigned nbLevels); - virtual void BuildPyramid(GrayImage* level0, unsigned nbLevels); + virtual void BuildPyramid(GrayImage *level0, unsigned nbLevels); /* accessors */ inline float getSigma() const diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp index eb92bacc6ab..1fff08dbd8f 100644 --- a/source/blender/freestyle/intern/python/BPy_BBox.cpp +++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp @@ -70,13 +70,13 @@ static int BBox_init(BPy_BBox *self, PyObject *args, PyObject *kwds) return 0; } -static void BBox_dealloc(BPy_BBox* self) +static void BBox_dealloc(BPy_BBox *self) { delete self->bb; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * BBox_repr(BPy_BBox* self) +static PyObject *BBox_repr(BPy_BBox *self) { return PyUnicode_FromFormat("BBox - address: %p", self->bb); } diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index 79714f1013f..dc87e283855 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -90,19 +90,19 @@ static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *arg return 0; } -static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D* self) +static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D *self) { if (self->bp0D) delete self->bp0D; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D* self) +static PyObject *BinaryPredicate0D___repr__(BPy_BinaryPredicate0D *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->bp0D); } -static PyObject * BinaryPredicate0D___call__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds) +static PyObject *BinaryPredicate0D___call__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter1", "inter2", NULL}; BPy_Interface0D *obj1, *obj2; @@ -116,7 +116,7 @@ static PyObject * BinaryPredicate0D___call__(BPy_BinaryPredicate0D *self, PyObje PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); return NULL; } - if (self->bp0D->operator()(*(obj1->if0D) , *(obj2->if0D)) < 0) { + if (self->bp0D->operator()(*(obj1->if0D), *(obj2->if0D)) < 0) { if (!PyErr_Occurred()) { string class_name(Py_TYPE(self)->tp_name); PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str()); diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 2e38ee6c10f..252fb8a7898 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -121,14 +121,14 @@ static int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *arg return 0; } -static void BinaryPredicate1D___dealloc__(BPy_BinaryPredicate1D* self) +static void BinaryPredicate1D___dealloc__(BPy_BinaryPredicate1D *self) { if (self->bp1D) delete self->bp1D; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * BinaryPredicate1D___repr__(BPy_BinaryPredicate1D* self) +static PyObject *BinaryPredicate1D___repr__(BPy_BinaryPredicate1D *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->bp1D); } @@ -147,7 +147,7 @@ static PyObject *BinaryPredicate1D___call__(BPy_BinaryPredicate1D *self, PyObjec PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); return NULL; } - if (self->bp1D->operator()(*(obj1->if1D) , *(obj2->if1D)) < 0) { + if (self->bp1D->operator()(*(obj1->if1D), *(obj2->if1D)) < 0) { if (!PyErr_Occurred()) { string class_name(Py_TYPE(self)->tp_name); PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str()); diff --git a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp index af5085dc548..ed3aa882c6a 100644 --- a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp +++ b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp @@ -51,7 +51,7 @@ static char ContextFunctions_get_time_stamp___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_time_stamp(PyObject* self) +ContextFunctions_get_time_stamp(PyObject *self) { return PyLong_FromLong(ContextFunctions::GetTimeStampCF()); } @@ -65,7 +65,7 @@ static char ContextFunctions_get_canvas_width___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_canvas_width(PyObject* self) +ContextFunctions_get_canvas_width(PyObject *self) { return PyLong_FromLong(ContextFunctions::GetCanvasWidthCF()); } @@ -79,7 +79,7 @@ static char ContextFunctions_get_canvas_height___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_canvas_height(PyObject* self) +ContextFunctions_get_canvas_height(PyObject *self) { return PyLong_FromLong(ContextFunctions::GetCanvasHeightCF()); } @@ -231,15 +231,25 @@ static char module_docstring[] = "The Blender Freestyle.ContextFunctions submodu /*-----------------------ContextFunctions module functions definitions-------------------*/ static PyMethodDef module_functions[] = { - {"get_time_stamp", (PyCFunction)ContextFunctions_get_time_stamp, METH_NOARGS, ContextFunctions_get_time_stamp___doc__}, - {"get_canvas_width", (PyCFunction)ContextFunctions_get_canvas_width, METH_NOARGS, ContextFunctions_get_canvas_width___doc__}, - {"get_canvas_height", (PyCFunction)ContextFunctions_get_canvas_height, METH_NOARGS, ContextFunctions_get_canvas_height___doc__}, - {"load_map", (PyCFunction)ContextFunctions_load_map, METH_VARARGS | METH_KEYWORDS, ContextFunctions_load_map___doc__}, - {"read_map_pixel", (PyCFunction)ContextFunctions_read_map_pixel, METH_VARARGS | METH_KEYWORDS, ContextFunctions_read_map_pixel___doc__}, - {"read_complete_view_map_pixel", (PyCFunction)ContextFunctions_read_complete_view_map_pixel, METH_VARARGS | METH_KEYWORDS, ContextFunctions_read_complete_view_map_pixel___doc__}, - {"read_directional_view_map_pixel", (PyCFunction)ContextFunctions_read_directional_view_map_pixel, METH_VARARGS | METH_KEYWORDS, ContextFunctions_read_directional_view_map_pixel___doc__}, - {"get_selected_fedge", (PyCFunction)ContextFunctions_get_selected_fedge, METH_NOARGS, ContextFunctions_get_selected_fedge___doc__}, - {NULL, NULL, 0, NULL} + {"get_time_stamp", (PyCFunction)ContextFunctions_get_time_stamp, METH_NOARGS, + ContextFunctions_get_time_stamp___doc__}, + {"get_canvas_width", (PyCFunction)ContextFunctions_get_canvas_width, METH_NOARGS, + ContextFunctions_get_canvas_width___doc__}, + {"get_canvas_height", (PyCFunction)ContextFunctions_get_canvas_height, METH_NOARGS, + ContextFunctions_get_canvas_height___doc__}, + {"load_map", (PyCFunction)ContextFunctions_load_map, METH_VARARGS | METH_KEYWORDS, + ContextFunctions_load_map___doc__}, + {"read_map_pixel", (PyCFunction)ContextFunctions_read_map_pixel, METH_VARARGS | METH_KEYWORDS, + ContextFunctions_read_map_pixel___doc__}, + {"read_complete_view_map_pixel", (PyCFunction)ContextFunctions_read_complete_view_map_pixel, + METH_VARARGS | METH_KEYWORDS, + ContextFunctions_read_complete_view_map_pixel___doc__}, + {"read_directional_view_map_pixel", (PyCFunction)ContextFunctions_read_directional_view_map_pixel, + METH_VARARGS | METH_KEYWORDS, + ContextFunctions_read_directional_view_map_pixel___doc__}, + {"get_selected_fedge", (PyCFunction)ContextFunctions_get_selected_fedge, METH_NOARGS, + ContextFunctions_get_selected_fedge___doc__}, + {NULL, NULL, 0, NULL} }; /*-----------------------ContextFunctions module definition--------------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 4c8e6557d02..daf643c20c0 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -378,7 +378,7 @@ PyObject *BPy_ViewShape_from_ViewShape(ViewShape& vs) PyObject *BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial& m) { PyObject *py_m = FrsMaterial_Type.tp_new(&FrsMaterial_Type, 0, 0); - ((BPy_FrsMaterial*) py_m)->m = new FrsMaterial(m); + ((BPy_FrsMaterial *) py_m)->m = new FrsMaterial(m); return py_m; } @@ -394,9 +394,9 @@ PyObject *BPy_IntegrationType_from_IntegrationType(IntegrationType i) PyObject *BPy_CurvePoint_from_CurvePoint(CurvePoint& cp) { PyObject *py_cp = CurvePoint_Type.tp_new(&CurvePoint_Type, 0, 0); - ((BPy_CurvePoint*) py_cp)->cp = &cp; - ((BPy_CurvePoint*) py_cp)->py_if0D.if0D = ((BPy_CurvePoint*) py_cp)->cp; - ((BPy_CurvePoint*) py_cp)->py_if0D.borrowed = 1; + ((BPy_CurvePoint *) py_cp)->cp = &cp; + ((BPy_CurvePoint *) py_cp)->py_if0D.if0D = ((BPy_CurvePoint *)py_cp)->cp; + ((BPy_CurvePoint *) py_cp)->py_if0D.borrowed = 1; return py_cp; } @@ -504,22 +504,22 @@ bool bool_from_PyBool(PyObject *b) return PyObject_IsTrue(b) != 0; } -IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject* obj) +IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj) { return static_cast(PyLong_AsLong(obj)); } -Stroke::MediumType MediumType_from_BPy_MediumType(PyObject* obj) +Stroke::MediumType MediumType_from_BPy_MediumType(PyObject *obj) { return static_cast(PyLong_AsLong(obj)); } -Nature::EdgeNature EdgeNature_from_BPy_Nature(PyObject* obj) +Nature::EdgeNature EdgeNature_from_BPy_Nature(PyObject *obj) { return static_cast(PyLong_AsLong(obj)); } -Vec2f * Vec2f_ptr_from_PyObject(PyObject* obj) +Vec2f *Vec2f_ptr_from_PyObject(PyObject *obj) { Vec2f *v; if ((v = Vec2f_ptr_from_Vector(obj))) @@ -531,7 +531,7 @@ Vec2f * Vec2f_ptr_from_PyObject(PyObject* obj) return NULL; } -Vec3f * Vec3f_ptr_from_PyObject(PyObject* obj) +Vec3f *Vec3f_ptr_from_PyObject(PyObject *obj) { Vec3f *v; if ((v = Vec3f_ptr_from_Vector(obj))) @@ -545,7 +545,7 @@ Vec3f * Vec3f_ptr_from_PyObject(PyObject* obj) return NULL; } -Vec3r * Vec3r_ptr_from_PyObject(PyObject* obj) +Vec3r *Vec3r_ptr_from_PyObject(PyObject *obj) { Vec3r *v; if ((v = Vec3r_ptr_from_Vector(obj))) @@ -559,7 +559,7 @@ Vec3r * Vec3r_ptr_from_PyObject(PyObject* obj) return NULL; } -Vec2f * Vec2f_ptr_from_Vector(PyObject* obj) +Vec2f *Vec2f_ptr_from_Vector(PyObject *obj) { if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 2) return NULL; @@ -568,44 +568,44 @@ Vec2f * Vec2f_ptr_from_Vector(PyObject* obj) return new Vec2f(x, y); } -Vec3f * Vec3f_ptr_from_Vector(PyObject* obj) +Vec3f *Vec3f_ptr_from_Vector(PyObject *obj) { if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3) return NULL; float x = ((VectorObject *)obj)->vec[0]; float y = ((VectorObject *)obj)->vec[1]; float z = ((VectorObject *)obj)->vec[2]; - return new Vec3f(x,y,z); + return new Vec3f(x, y, z); } -Vec3r * Vec3r_ptr_from_Vector(PyObject* obj) +Vec3r *Vec3r_ptr_from_Vector(PyObject *obj) { if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3) return NULL; real x = ((VectorObject *)obj)->vec[0]; real y = ((VectorObject *)obj)->vec[1]; real z = ((VectorObject *)obj)->vec[2]; - return new Vec3r(x,y,z); + return new Vec3r(x, y, z); } -Vec3f * Vec3f_ptr_from_Color(PyObject* obj) +Vec3f *Vec3f_ptr_from_Color(PyObject *obj) { if (!ColorObject_Check(obj)) return NULL; float r = ((ColorObject *)obj)->col[0]; float g = ((ColorObject *)obj)->col[1]; float b = ((ColorObject *)obj)->col[2]; - return new Vec3f(r,g,b); + return new Vec3f(r, g, b); } -Vec3r * Vec3r_ptr_from_Color(PyObject* obj) +Vec3r *Vec3r_ptr_from_Color(PyObject *obj) { if (!ColorObject_Check(obj)) return NULL; real r = ((ColorObject *)obj)->col[0]; real g = ((ColorObject *)obj)->col[1]; real b = ((ColorObject *)obj)->col[2]; - return new Vec3r(r,g,b); + return new Vec3r(r, g, b); } static int float_array_from_PyList(PyObject *obj, float *v, int n) @@ -620,7 +620,7 @@ static int float_array_from_PyList(PyObject *obj, float *v, int n) return 1; } -Vec2f * Vec2f_ptr_from_PyList(PyObject* obj) +Vec2f *Vec2f_ptr_from_PyList(PyObject *obj) { float v[2]; @@ -631,7 +631,7 @@ Vec2f * Vec2f_ptr_from_PyList(PyObject* obj) return new Vec2f(v[0], v[1]); } -Vec3f * Vec3f_ptr_from_PyList(PyObject* obj) +Vec3f *Vec3f_ptr_from_PyList(PyObject *obj) { float v[3]; @@ -642,7 +642,7 @@ Vec3f * Vec3f_ptr_from_PyList(PyObject* obj) return new Vec3f(v[0], v[1], v[2]); } -Vec3r * Vec3r_ptr_from_PyList(PyObject* obj) +Vec3r *Vec3r_ptr_from_PyList(PyObject *obj) { float v[3]; @@ -665,7 +665,7 @@ static int float_array_from_PyTuple(PyObject *obj, float *v, int n) return 1; } -Vec2f * Vec2f_ptr_from_PyTuple(PyObject* obj) +Vec2f *Vec2f_ptr_from_PyTuple(PyObject *obj) { float v[2]; @@ -676,7 +676,7 @@ Vec2f * Vec2f_ptr_from_PyTuple(PyObject* obj) return new Vec2f(v[0], v[1]); } -Vec3f * Vec3f_ptr_from_PyTuple(PyObject* obj) +Vec3f *Vec3f_ptr_from_PyTuple(PyObject *obj) { float v[3]; @@ -687,7 +687,7 @@ Vec3f * Vec3f_ptr_from_PyTuple(PyObject* obj) return new Vec3f(v[0], v[1], v[2]); } -Vec3r * Vec3r_ptr_from_PyTuple(PyObject* obj) +Vec3r *Vec3r_ptr_from_PyTuple(PyObject *obj) { float v[3]; diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 187af216685..20ab9d0d15d 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -137,9 +137,11 @@ PyObject * BPy_ViewShape_from_ViewShape(ViewShape& vs); PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator(AdjacencyIterator& a_it); PyObject * BPy_Interface0DIterator_from_Interface0DIterator(Interface0DIterator& if0D_it, int reversed); PyObject * BPy_CurvePointIterator_from_CurvePointIterator(CurveInternal::CurvePointIterator& cp_it); -PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator(StrokeInternal::StrokeVertexIterator& sv_it, int reversed); +PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator(StrokeInternal::StrokeVertexIterator& sv_it, + int reversed); PyObject * BPy_SVertexIterator_from_SVertexIterator(ViewEdgeInternal::SVertexIterator& sv_it); -PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator& ove_it, int reversed); +PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator& ove_it, + int reversed); PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator(ViewEdgeInternal::ViewEdgeIterator& ve_it); PyObject * BPy_ChainingIterator_from_ChainingIterator(ChainingIterator& c_it); PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator(ChainPredicateIterator& cp_it); @@ -150,23 +152,23 @@ PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator(ChainSilhoue //============================== bool bool_from_PyBool(PyObject *b); -IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject* obj); -Stroke::MediumType MediumType_from_BPy_MediumType(PyObject* obj); -Nature::EdgeNature EdgeNature_from_BPy_Nature(PyObject* obj); -Vec2f * Vec2f_ptr_from_PyObject(PyObject* obj); -Vec3f * Vec3f_ptr_from_PyObject(PyObject* obj); -Vec3r * Vec3r_ptr_from_PyObject(PyObject* obj); -Vec2f * Vec2f_ptr_from_Vector(PyObject* obj); -Vec3f * Vec3f_ptr_from_Vector(PyObject* obj); -Vec3r * Vec3r_ptr_from_Vector(PyObject* obj); -Vec3f * Vec3f_ptr_from_Color(PyObject* obj); -Vec3r * Vec3r_ptr_from_Color(PyObject* obj); -Vec2f * Vec2f_ptr_from_PyList(PyObject* obj); -Vec3f * Vec3f_ptr_from_PyList(PyObject* obj); -Vec3r * Vec3r_ptr_from_PyList(PyObject* obj); -Vec2f * Vec2f_ptr_from_PyTuple(PyObject* obj); -Vec3f * Vec3f_ptr_from_PyTuple(PyObject* obj); -Vec3r * Vec3r_ptr_from_PyTuple(PyObject* obj); +IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj); +Stroke::MediumType MediumType_from_BPy_MediumType(PyObject *obj); +Nature::EdgeNature EdgeNature_from_BPy_Nature(PyObject *obj); +Vec2f * Vec2f_ptr_from_PyObject(PyObject *obj); +Vec3f * Vec3f_ptr_from_PyObject(PyObject *obj); +Vec3r * Vec3r_ptr_from_PyObject(PyObject *obj); +Vec2f * Vec2f_ptr_from_Vector(PyObject *obj); +Vec3f * Vec3f_ptr_from_Vector(PyObject *obj); +Vec3r * Vec3r_ptr_from_Vector(PyObject *obj); +Vec3f * Vec3f_ptr_from_Color(PyObject *obj); +Vec3r * Vec3r_ptr_from_Color(PyObject *obj); +Vec2f * Vec2f_ptr_from_PyList(PyObject *obj); +Vec3f * Vec3f_ptr_from_PyList(PyObject *obj); +Vec3r * Vec3r_ptr_from_PyList(PyObject *obj); +Vec2f * Vec2f_ptr_from_PyTuple(PyObject *obj); +Vec3f * Vec3f_ptr_from_PyTuple(PyObject *obj); +Vec3r * Vec3r_ptr_from_PyTuple(PyObject *obj); int float_array_from_PyObject(PyObject *obj, float *v, int n); diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 12635ad6b9d..21347dc2dae 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -148,12 +148,14 @@ static PyObject *Freestyle_blendRamp(PyObject *self, PyObject *args) } v1 = Vec3f_ptr_from_PyObject(obj1); if (!v1) { - PyErr_SetString(PyExc_TypeError, "argument 2 must be a 3D vector (either a tuple/list of 3 elements or Vector)"); + PyErr_SetString(PyExc_TypeError, + "argument 2 must be a 3D vector (either a tuple/list of 3 elements or Vector)"); goto error; } v2 = Vec3f_ptr_from_PyObject(obj2); if (!v2) { - PyErr_SetString(PyExc_TypeError, "argument 4 must be a 3D vector (either a tuple/list of 3 elements or Vector)"); + PyErr_SetString(PyExc_TypeError, + "argument 4 must be a 3D vector (either a tuple/list of 3 elements or Vector)"); goto error; } a[0] = v1->x(); b[0] = v2->x(); @@ -478,7 +480,8 @@ static PyMethodDef module_functions[] = { {"getCurrentScene", (PyCFunction) Freestyle_getCurrentScene, METH_NOARGS, Freestyle_getCurrentScene___doc__}, {"blendRamp", (PyCFunction) Freestyle_blendRamp, METH_VARARGS, Freestyle_blendRamp___doc__}, {"evaluateColorRamp", (PyCFunction) Freestyle_evaluateColorRamp, METH_VARARGS, Freestyle_evaluateColorRamp___doc__}, - {"evaluateCurveMappingF", (PyCFunction) Freestyle_evaluateCurveMappingF, METH_VARARGS, Freestyle_evaluateCurveMappingF___doc__}, + {"evaluateCurveMappingF", (PyCFunction) Freestyle_evaluateCurveMappingF, METH_VARARGS, + Freestyle_evaluateCurveMappingF___doc__}, {NULL, NULL, 0, NULL} }; diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index 527bd920ea5..1833708f08c 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -102,7 +102,8 @@ static int FrsMaterial_init(BPy_FrsMaterial *self, PyObject *args, PyObject *kwd if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &FrsMaterial_Type, &brother)) { if (!brother) { self->m = new FrsMaterial(); - } else { + } + else { FrsMaterial *m = ((BPy_FrsMaterial *)brother)->m; if (!m) { PyErr_SetString(PyExc_RuntimeError, "invalid Material object"); @@ -128,13 +129,13 @@ static int FrsMaterial_init(BPy_FrsMaterial *self, PyObject *args, PyObject *kwd return 0; } -static void FrsMaterial_dealloc(BPy_FrsMaterial* self) +static void FrsMaterial_dealloc(BPy_FrsMaterial *self) { delete self->m; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * FrsMaterial_repr(BPy_FrsMaterial* self) +static PyObject *FrsMaterial_repr(BPy_FrsMaterial *self) { return PyUnicode_FromFormat("Material - address: %p", self->m); } @@ -398,11 +399,16 @@ static int FrsMaterial_shininess_set(BPy_FrsMaterial *self, PyObject *value, voi } static PyGetSetDef BPy_FrsMaterial_getseters[] = { - {(char *)"diffuse", (getter)FrsMaterial_diffuse_get, (setter)FrsMaterial_diffuse_set, (char *)FrsMaterial_diffuse_doc, NULL}, - {(char *)"specular", (getter)FrsMaterial_specular_get, (setter)FrsMaterial_specular_set, (char *)FrsMaterial_specular_doc, NULL}, - {(char *)"ambient", (getter)FrsMaterial_ambient_get, (setter)FrsMaterial_ambient_set, (char *)FrsMaterial_ambient_doc, NULL}, - {(char *)"emission", (getter)FrsMaterial_emission_get, (setter)FrsMaterial_emission_set, (char *)FrsMaterial_emission_doc, NULL}, - {(char *)"shininess", (getter)FrsMaterial_shininess_get, (setter)FrsMaterial_shininess_set, (char *)FrsMaterial_shininess_doc, NULL}, + {(char *)"diffuse", (getter)FrsMaterial_diffuse_get, (setter)FrsMaterial_diffuse_set, + (char *)FrsMaterial_diffuse_doc, NULL}, + {(char *)"specular", (getter)FrsMaterial_specular_get, (setter)FrsMaterial_specular_set, + (char *)FrsMaterial_specular_doc, NULL}, + {(char *)"ambient", (getter)FrsMaterial_ambient_get, (setter)FrsMaterial_ambient_set, + (char *)FrsMaterial_ambient_doc, NULL}, + {(char *)"emission", (getter)FrsMaterial_emission_get, (setter)FrsMaterial_emission_set, + (char *)FrsMaterial_emission_doc, NULL}, + {(char *)"shininess", (getter)FrsMaterial_shininess_get, (setter)FrsMaterial_shininess_set, + (char *)FrsMaterial_shininess_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp index b6e90a4b440..3e6712eff16 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp @@ -79,13 +79,13 @@ static int FrsNoise_init(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) return 0; } -static void FrsNoise_dealloc(BPy_FrsNoise* self) +static void FrsNoise_dealloc(BPy_FrsNoise *self) { delete self->n; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * FrsNoise_repr(BPy_FrsNoise* self) +static PyObject *FrsNoise_repr(BPy_FrsNoise *self) { return PyUnicode_FromFormat("Noise - address: %p", self->n); } @@ -106,7 +106,7 @@ PyDoc_STRVAR(FrsNoise_turbulence1_doc, " :return: A noise value.\n" " :rtype: float"); -static PyObject * FrsNoise_turbulence1(BPy_FrsNoise *self , PyObject *args, PyObject *kwds) +static PyObject *FrsNoise_turbulence1(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"v", "freq", "amp", "oct", NULL}; float f1, f2, f3; @@ -133,7 +133,7 @@ PyDoc_STRVAR(FrsNoise_turbulence2_doc, " :return: A noise value.\n" " :rtype: float"); -static PyObject * FrsNoise_turbulence2(BPy_FrsNoise *self , PyObject *args, PyObject *kwds) +static PyObject *FrsNoise_turbulence2(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"v", "freq", "amp", "oct", NULL}; PyObject *obj1; @@ -168,7 +168,7 @@ PyDoc_STRVAR(FrsNoise_turbulence3_doc, " :return: A noise value.\n" " :rtype: float"); -static PyObject * FrsNoise_turbulence3(BPy_FrsNoise *self , PyObject *args, PyObject *kwds) +static PyObject *FrsNoise_turbulence3(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"v", "freq", "amp", "oct", NULL}; PyObject *obj1; @@ -197,7 +197,7 @@ PyDoc_STRVAR(FrsNoise_smoothNoise1_doc, " :return: A smooth noise value.\n" " :rtype: float"); -static PyObject * FrsNoise_smoothNoise1(BPy_FrsNoise *self , PyObject *args, PyObject *kwds) +static PyObject *FrsNoise_smoothNoise1(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"v", NULL}; float f; @@ -217,7 +217,7 @@ PyDoc_STRVAR(FrsNoise_smoothNoise2_doc, " :return: A smooth noise value.\n" " :rtype: float"); -static PyObject * FrsNoise_smoothNoise2(BPy_FrsNoise *self , PyObject *args, PyObject *kwds) +static PyObject *FrsNoise_smoothNoise2(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"v", NULL}; PyObject *obj; @@ -244,7 +244,7 @@ PyDoc_STRVAR(FrsNoise_smoothNoise3_doc, " :return: A smooth noise value.\n" " :rtype: float"); -static PyObject * FrsNoise_smoothNoise3(BPy_FrsNoise *self , PyObject *args, PyObject *kwds) +static PyObject *FrsNoise_smoothNoise3(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"v", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp index f4ae7c18eca..d9f1d12dc71 100644 --- a/source/blender/freestyle/intern/python/BPy_Id.cpp +++ b/source/blender/freestyle/intern/python/BPy_Id.cpp @@ -85,7 +85,7 @@ static int Id_init(BPy_Id *self, PyObject *args, PyObject *kwds) self->id = new Id(*(((BPy_Id *)brother)->id)); } else if (PyErr_Clear(), - PyArg_ParseTupleAndKeywords(args, kwds, "|ii", (char**)kwlist_2, &first, &second)) + PyArg_ParseTupleAndKeywords(args, kwds, "|ii", (char **)kwlist_2, &first, &second)) { self->id = new Id(first, second); } @@ -96,20 +96,20 @@ static int Id_init(BPy_Id *self, PyObject *args, PyObject *kwds) return 0; } -static void Id_dealloc(BPy_Id* self) +static void Id_dealloc(BPy_Id *self) { delete self->id; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * Id_repr(BPy_Id* self) +static PyObject *Id_repr(BPy_Id *self) { return PyUnicode_FromFormat("[ first: %i, second: %i ](BPy_Id)", self->id->getFirst(), self->id->getSecond()); } -static PyObject * Id_RichCompare(BPy_Id *o1, BPy_Id *o2, int opid) +static PyObject *Id_RichCompare(BPy_Id *o1, BPy_Id *o2, int opid) { - switch(opid){ + switch (opid) { case Py_LT: return PyBool_from_bool(o1->id->operator<(*(o2->id))); break; diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index bbfe99ebbf0..0202230ac4c 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -114,14 +114,14 @@ static int Interface0D_init(BPy_Interface0D *self, PyObject *args, PyObject *kwd return 0; } -static void Interface0D_dealloc(BPy_Interface0D* self) +static void Interface0D_dealloc(BPy_Interface0D *self) { if (self->if0D && !self->borrowed) delete self->if0D; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * Interface0D_repr(BPy_Interface0D* self) +static PyObject *Interface0D_repr(BPy_Interface0D *self) { return PyUnicode_FromFormat("type: %s - address: %p", self->if0D->getExactTypeName().c_str(), self->if0D); } @@ -263,9 +263,12 @@ static PyObject *Interface0D_nature_get(BPy_Interface0D *self, void *UNUSED(clos static PyGetSetDef BPy_Interface0D_getseters[] = { {(char *)"name", (getter)Interface0D_name_get, (setter)NULL, (char *)Interface0D_name_doc, NULL}, {(char *)"point_3d", (getter)Interface0D_point_3d_get, (setter)NULL, (char *)Interface0D_point_3d_doc, NULL}, - {(char *)"projected_x", (getter)Interface0D_projected_x_get, (setter)NULL, (char *)Interface0D_projected_x_doc, NULL}, - {(char *)"projected_y", (getter)Interface0D_projected_y_get, (setter)NULL, (char *)Interface0D_projected_y_doc, NULL}, - {(char *)"projected_z", (getter)Interface0D_projected_z_get, (setter)NULL, (char *)Interface0D_projected_z_doc, NULL}, + {(char *)"projected_x", (getter)Interface0D_projected_x_get, (setter)NULL, + (char *)Interface0D_projected_x_doc, NULL}, + {(char *)"projected_y", (getter)Interface0D_projected_y_get, (setter)NULL, + (char *)Interface0D_projected_y_doc, NULL}, + {(char *)"projected_z", (getter)Interface0D_projected_z_get, (setter)NULL, + (char *)Interface0D_projected_z_doc, NULL}, {(char *)"point_2d", (getter)Interface0D_point_2d_get, (setter)NULL, (char *)Interface0D_point_2d_doc, NULL}, {(char *)"id", (getter)Interface0D_id_get, (setter)NULL, (char *)Interface0D_id_doc, NULL}, {(char *)"nature", (getter)Interface0D_nature_get, (setter)NULL, (char *)Interface0D_nature_doc, NULL}, diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index e990f10f946..a156e76fab6 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -124,14 +124,14 @@ static int Interface1D_init(BPy_Interface1D *self, PyObject *args, PyObject *kwd return 0; } -static void Interface1D_dealloc(BPy_Interface1D* self) +static void Interface1D_dealloc(BPy_Interface1D *self) { if (self->if1D && !self->borrowed) delete self->if1D; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * Interface1D_repr(BPy_Interface1D* self) +static PyObject *Interface1D_repr(BPy_Interface1D *self) { return PyUnicode_FromFormat("type: %s - address: %p", self->if1D->getExactTypeName().c_str(), self->if1D); } @@ -302,7 +302,8 @@ static PyGetSetDef BPy_Interface1D_getseters[] = { {(char *)"id", (getter)Interface1D_id_get, (setter)NULL, (char *)Interface1D_id_doc, NULL}, {(char *)"nature", (getter)Interface1D_nature_get, (setter)NULL, (char *)Interface1D_nature_doc, NULL}, {(char *)"length_2d", (getter)Interface1D_length_2d_get, (setter)NULL, (char *)Interface1D_length_2d_doc, NULL}, - {(char *)"time_stamp", (getter)Interface1D_time_stamp_get, (setter)Interface1D_time_stamp_set, (char *)Interface1D_time_stamp_doc, NULL}, + {(char *)"time_stamp", (getter)Interface1D_time_stamp_get, (setter)Interface1D_time_stamp_set, + (char *)Interface1D_time_stamp_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index 785a24a47bb..302f3455f52 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -132,14 +132,14 @@ static int Iterator_init(BPy_Iterator *self, PyObject *args, PyObject *kwds) return 0; } -static void Iterator_dealloc(BPy_Iterator* self) +static void Iterator_dealloc(BPy_Iterator *self) { if (self->it) delete self->it; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * Iterator_repr(BPy_Iterator* self) +static PyObject *Iterator_repr(BPy_Iterator *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->it); } @@ -149,10 +149,10 @@ PyDoc_STRVAR(Iterator_increment_doc, "\n" " Makes the iterator point the next element."); -static PyObject * Iterator_increment(BPy_Iterator* self) +static PyObject *Iterator_increment(BPy_Iterator *self) { if (self->it->isEnd()) { - PyErr_SetString(PyExc_RuntimeError , "cannot increment any more"); + PyErr_SetString(PyExc_RuntimeError, "cannot increment any more"); return NULL; } self->it->increment(); @@ -164,10 +164,10 @@ PyDoc_STRVAR(Iterator_decrement_doc, "\n" " Makes the iterator point the previous element."); -static PyObject * Iterator_decrement(BPy_Iterator* self) +static PyObject *Iterator_decrement(BPy_Iterator *self) { if (self->it->isBegin()) { - PyErr_SetString(PyExc_RuntimeError , "cannot decrement any more"); + PyErr_SetString(PyExc_RuntimeError, "cannot decrement any more"); return NULL; } self->it->decrement(); diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 29498b1f480..a3f12f4d274 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -69,9 +69,9 @@ PyDoc_STRVAR(Operators_doc, "creation. All these operators are user controlled through functors,\n" "predicates and shaders that are taken as arguments."); -static void Operators_dealloc(BPy_Operators* self) +static void Operators_dealloc(BPy_Operators *self) { - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } PyDoc_STRVAR(Operators_select_doc, @@ -83,7 +83,7 @@ PyDoc_STRVAR(Operators_select_doc, " :arg pred: The predicate expressing this condition.\n" " :type pred: UnaryPredicate1D"); -static PyObject *Operators_select(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_select(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", NULL}; PyObject *obj = 0; @@ -142,7 +142,7 @@ PyDoc_STRVAR(Operators_chain_doc, " stopping condition.\n" " :type pred: :class:`UnaryPredicate1D`"); -static PyObject *Operators_chain(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_chain(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", "pred", "modifier", NULL}; PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; @@ -231,7 +231,7 @@ PyDoc_STRVAR(Operators_bidirectional_chain_doc, " contains the chaining rule.\n" " :type it: :class:`ChainingIterator`"); -static PyObject *Operators_bidirectional_chain(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_bidirectional_chain(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", "pred", NULL}; PyObject *obj1 = 0, *obj2 = 0; @@ -242,7 +242,8 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators* self, PyObject *ar return NULL; } if (!((BPy_ChainingIterator *)obj1)->c_it) { - PyErr_SetString(PyExc_TypeError, "Operators.bidirectional_chain(): 1st argument: invalid ChainingIterator object"); + PyErr_SetString(PyExc_TypeError, + "Operators.bidirectional_chain(): 1st argument: invalid ChainingIterator object"); return NULL; } if (!obj2) { @@ -254,7 +255,8 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators* self, PyObject *ar } else { if (!((BPy_UnaryPredicate1D *)obj2)->up1D) { - PyErr_SetString(PyExc_TypeError, "Operators.bidirectional_chain(): 2nd argument: invalid UnaryPredicate1D object"); + PyErr_SetString(PyExc_TypeError, + "Operators.bidirectional_chain(): 2nd argument: invalid UnaryPredicate1D object"); return NULL; } if (Operators::bidirectionalChain(*(((BPy_ChainingIterator *)obj1)->c_it), @@ -309,7 +311,7 @@ PyDoc_STRVAR(Operators_sequential_split_doc, " resolution.)\n" " :type sampling: float"); -static PyObject *Operators_sequential_split(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_sequential_split(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"starting_pred", "stopping_pred", "sampling", NULL}; static const char *kwlist_2[] = {"pred", "sampling", NULL}; @@ -320,11 +322,13 @@ static PyObject *Operators_sequential_split(BPy_Operators* self, PyObject *args, &UnaryPredicate0D_Type, &obj1, &UnaryPredicate0D_Type, &obj2, &f)) { if (!((BPy_UnaryPredicate0D *)obj1)->up0D) { - PyErr_SetString(PyExc_TypeError, "Operators.sequential_split(): 1st argument: invalid UnaryPredicate0D object"); + PyErr_SetString(PyExc_TypeError, + "Operators.sequential_split(): 1st argument: invalid UnaryPredicate0D object"); return NULL; } if (!((BPy_UnaryPredicate0D *)obj2)->up0D) { - PyErr_SetString(PyExc_TypeError, "Operators.sequential_split(): 2nd argument: invalid UnaryPredicate0D object"); + PyErr_SetString(PyExc_TypeError, + "Operators.sequential_split(): 2nd argument: invalid UnaryPredicate0D object"); return NULL; } if (Operators::sequentialSplit(*(((BPy_UnaryPredicate0D *)obj1)->up0D), @@ -341,7 +345,8 @@ static PyObject *Operators_sequential_split(BPy_Operators* self, PyObject *args, &UnaryPredicate0D_Type, &obj1, &f)) { if (!((BPy_UnaryPredicate0D *)obj1)->up0D) { - PyErr_SetString(PyExc_TypeError, "Operators.sequential_split(): 1st argument: invalid UnaryPredicate0D object"); + PyErr_SetString(PyExc_TypeError, + "Operators.sequential_split(): 1st argument: invalid UnaryPredicate0D object"); return NULL; } if (Operators::sequentialSplit(*(((BPy_UnaryPredicate0D *)obj1)->up0D), f) < 0) { @@ -413,7 +418,7 @@ PyDoc_STRVAR(Operators_recursive_split_doc, " resolution.)\n" " :type sampling: float"); -static PyObject *Operators_recursive_split(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_recursive_split(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"func", "pred_1d", "sampling", NULL}; static const char *kwlist_2[] = {"func", "pred_0d", "pred_1d", "sampling", NULL}; @@ -424,11 +429,13 @@ static PyObject *Operators_recursive_split(BPy_Operators* self, PyObject *args, &UnaryFunction0DDouble_Type, &obj1, &UnaryPredicate1D_Type, &obj2, &f)) { if (!((BPy_UnaryFunction0DDouble *)obj1)->uf0D_double) { - PyErr_SetString(PyExc_TypeError, "Operators.recursive_split(): 1st argument: invalid UnaryFunction0DDouble object"); + PyErr_SetString(PyExc_TypeError, + "Operators.recursive_split(): 1st argument: invalid UnaryFunction0DDouble object"); return NULL; } if (!((BPy_UnaryPredicate1D *)obj2)->up1D) { - PyErr_SetString(PyExc_TypeError, "Operators.recursive_split(): 2nd argument: invalid UnaryPredicate1D object"); + PyErr_SetString(PyExc_TypeError, + "Operators.recursive_split(): 2nd argument: invalid UnaryPredicate1D object"); return NULL; } if (Operators::recursiveSplit(*(((BPy_UnaryFunction0DDouble *)obj1)->uf0D_double), @@ -446,15 +453,18 @@ static PyObject *Operators_recursive_split(BPy_Operators* self, PyObject *args, &UnaryPredicate1D_Type, &obj3, &f)) { if (!((BPy_UnaryFunction0DDouble *)obj1)->uf0D_double) { - PyErr_SetString(PyExc_TypeError, "Operators.recursive_split(): 1st argument: invalid UnaryFunction0DDouble object"); + PyErr_SetString(PyExc_TypeError, + "Operators.recursive_split(): 1st argument: invalid UnaryFunction0DDouble object"); return NULL; } if (!((BPy_UnaryPredicate0D *)obj2)->up0D) { - PyErr_SetString(PyExc_TypeError, "Operators.recursive_split(): 2nd argument: invalid UnaryPredicate0D object"); + PyErr_SetString(PyExc_TypeError, + "Operators.recursive_split(): 2nd argument: invalid UnaryPredicate0D object"); return NULL; } if (!((BPy_UnaryPredicate1D *)obj3)->up1D) { - PyErr_SetString(PyExc_TypeError, "Operators.recursive_split(): 3rd argument: invalid UnaryPredicate1D object"); + PyErr_SetString(PyExc_TypeError, + "Operators.recursive_split(): 3rd argument: invalid UnaryPredicate1D object"); return NULL; } if (Operators::recursiveSplit(*(((BPy_UnaryFunction0DDouble *)obj1)->uf0D_double), @@ -483,7 +493,7 @@ PyDoc_STRVAR(Operators_sort_doc, " :arg pred: The binary predicate used for the comparison.\n" " :type pred: BinaryPredicate1D"); -static PyObject *Operators_sort(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_sort(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", NULL}; PyObject *obj = 0; @@ -514,7 +524,7 @@ PyDoc_STRVAR(Operators_create_doc, " :arg shaders: The list of shaders used to shade the strokes.\n" " :type shaders: List of StrokeShader objects"); -static PyObject *Operators_create(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_create(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", "shaders", NULL}; PyObject *obj1 = 0, *obj2 = 0; @@ -555,7 +565,7 @@ PyDoc_STRVAR(Operators_get_viewedge_from_index_doc, " :return: The ViewEdge object.\n" " :rtype: :class:`ViewEdge`"); -static PyObject *Operators_get_viewedge_from_index(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_viewedge_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -579,7 +589,7 @@ PyDoc_STRVAR(Operators_get_chain_from_index_doc, " :return: The Chain object.\n" " :rtype: :class:`Chain`"); -static PyObject *Operators_get_chain_from_index(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_chain_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -603,7 +613,7 @@ PyDoc_STRVAR(Operators_get_stroke_from_index_doc, " :return: The Stroke object.\n" " :rtype: :class:`Stroke`"); -static PyObject *Operators_get_stroke_from_index(BPy_Operators* self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_stroke_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -625,7 +635,7 @@ PyDoc_STRVAR(Operators_get_view_edges_size_doc, " :return: The number of ViewEdges.\n" " :rtype: int"); -static PyObject *Operators_get_view_edges_size(BPy_Operators* self) +static PyObject *Operators_get_view_edges_size(BPy_Operators *self) { return PyLong_FromLong(Operators::getViewEdgesSize()); } @@ -638,7 +648,7 @@ PyDoc_STRVAR(Operators_get_chains_size_doc, " :return: The number of Chains.\n" " :rtype: int"); -static PyObject *Operators_get_chains_size(BPy_Operators* self) +static PyObject *Operators_get_chains_size(BPy_Operators *self) { return PyLong_FromLong(Operators::getChainsSize()); } @@ -651,7 +661,7 @@ PyDoc_STRVAR(Operators_get_strokes_size_doc, " :return: The number of Strokes.\n" " :rtype: int"); -static PyObject *Operators_get_strokes_size(BPy_Operators* self) +static PyObject *Operators_get_strokes_size(BPy_Operators *self) { return PyLong_FromLong(Operators::getStrokesSize()); } @@ -660,17 +670,26 @@ static PyObject *Operators_get_strokes_size(BPy_Operators* self) static PyMethodDef BPy_Operators_methods[] = { {"select", (PyCFunction) Operators_select, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_select_doc}, {"chain", (PyCFunction) Operators_chain, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_chain_doc}, - {"bidirectional_chain", (PyCFunction) Operators_bidirectional_chain, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_bidirectional_chain_doc}, - {"sequential_split", (PyCFunction) Operators_sequential_split, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_sequential_split_doc}, - {"recursive_split", (PyCFunction) Operators_recursive_split, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_recursive_split_doc}, + {"bidirectional_chain", (PyCFunction) Operators_bidirectional_chain, METH_VARARGS | METH_KEYWORDS | METH_STATIC, + Operators_bidirectional_chain_doc}, + {"sequential_split", (PyCFunction) Operators_sequential_split, METH_VARARGS | METH_KEYWORDS | METH_STATIC, + Operators_sequential_split_doc}, + {"recursive_split", (PyCFunction) Operators_recursive_split, METH_VARARGS | METH_KEYWORDS | METH_STATIC, + Operators_recursive_split_doc}, {"sort", (PyCFunction) Operators_sort, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_sort_doc}, {"create", (PyCFunction) Operators_create, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_create_doc}, - {"get_viewedge_from_index", (PyCFunction) Operators_get_viewedge_from_index, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_get_viewedge_from_index_doc}, - {"get_chain_from_index", (PyCFunction) Operators_get_chain_from_index, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_get_chain_from_index_doc}, - {"get_stroke_from_index", (PyCFunction) Operators_get_stroke_from_index, METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_get_stroke_from_index_doc}, - {"get_view_edges_size", (PyCFunction) Operators_get_view_edges_size, METH_NOARGS | METH_STATIC, Operators_get_view_edges_size_doc}, - {"get_chains_size", (PyCFunction) Operators_get_chains_size, METH_NOARGS | METH_STATIC, Operators_get_chains_size_doc}, - {"get_strokes_size", (PyCFunction) Operators_get_strokes_size, METH_NOARGS | METH_STATIC, Operators_get_strokes_size_doc}, + {"get_viewedge_from_index", (PyCFunction) Operators_get_viewedge_from_index, + METH_VARARGS | METH_KEYWORDS | METH_STATIC, Operators_get_viewedge_from_index_doc}, + {"get_chain_from_index", (PyCFunction) Operators_get_chain_from_index, METH_VARARGS | METH_KEYWORDS | METH_STATIC, + Operators_get_chain_from_index_doc}, + {"get_stroke_from_index", (PyCFunction) Operators_get_stroke_from_index, METH_VARARGS | METH_KEYWORDS | METH_STATIC, + Operators_get_stroke_from_index_doc}, + {"get_view_edges_size", (PyCFunction) Operators_get_view_edges_size, METH_NOARGS | METH_STATIC, + Operators_get_view_edges_size_doc}, + {"get_chains_size", (PyCFunction) Operators_get_chains_size, METH_NOARGS | METH_STATIC, + Operators_get_chains_size_doc}, + {"get_strokes_size", (PyCFunction) Operators_get_strokes_size, METH_NOARGS | METH_STATIC, + Operators_get_strokes_size_doc}, {NULL, NULL, 0, NULL} }; diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index 7d03ea06bc0..4928d91b79d 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -93,10 +93,10 @@ static void SShape_dealloc(BPy_SShape *self) { if (self->ss && !self->borrowed) delete self->ss; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * SShape_repr(BPy_SShape *self) +static PyObject *SShape_repr(BPy_SShape *self) { return PyUnicode_FromFormat("SShape - address: %p", self->ss); } @@ -109,7 +109,7 @@ static char SShape_add_edge_doc[] = " :arg edge: An FEdge object.\n" " :type edge: :class:`FEdge`\n"; -static PyObject * SShape_add_edge(BPy_SShape *self , PyObject *args, PyObject *kwds) +static PyObject *SShape_add_edge(BPy_SShape *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"edge", NULL}; PyObject *py_fe = 0; @@ -129,7 +129,7 @@ PyDoc_STRVAR(SShape_add_vertex_doc, " :arg vertex: An SVertex object.\n" " :type vertex: :class:`SVertex`"); -static PyObject * SShape_add_vertex(BPy_SShape *self , PyObject *args, PyObject *kwds) +static PyObject * SShape_add_vertex(BPy_SShape *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"edge", NULL}; PyObject *py_sv = 0; @@ -145,7 +145,7 @@ PyDoc_STRVAR(SShape_compute_bbox_doc, "\n" " Compute the bbox of the SShape."); -static PyObject * SShape_compute_bbox(BPy_SShape *self) +static PyObject *SShape_compute_bbox(BPy_SShape *self) { self->ss->ComputeBBox(); Py_RETURN_NONE; @@ -223,7 +223,7 @@ static int SShape_bbox_set(BPy_SShape *self, PyObject *value, void *UNUSED(closu PyErr_SetString(PyExc_TypeError, "value must be a BBox"); return -1; } - self->ss->setBBox(*(((BPy_BBox*)value)->bb)); + self->ss->setBBox(*(((BPy_BBox *)value)->bb)); return 0; } diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index 3a5abd21d07..1547de42a91 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -135,22 +135,19 @@ static int StrokeAttribute_init(BPy_StrokeAttribute *self, PyObject *args, PyObj return 0; } -static void StrokeAttribute_dealloc(BPy_StrokeAttribute* self) +static void StrokeAttribute_dealloc(BPy_StrokeAttribute *self) { if (self->sa && !self->borrowed) delete self->sa; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * StrokeAttribute_repr(BPy_StrokeAttribute* self) +static PyObject * StrokeAttribute_repr(BPy_StrokeAttribute *self) { stringstream repr("StrokeAttribute:"); - repr << " r: " << self->sa->getColorR() - << " g: " << self->sa->getColorG() - << " b: " << self->sa->getColorB() - << " a: " << self->sa->getAlpha() - << " - R: " << self->sa->getThicknessR() - << " L: " << self->sa->getThicknessL(); + repr << " r: " << self->sa->getColorR() << " g: " << self->sa->getColorG() << " b: " << self->sa->getColorB() << + " a: " << self->sa->getAlpha() << + " - R: " << self->sa->getThicknessR() << " L: " << self->sa->getThicknessL(); return PyUnicode_FromString(repr.str().c_str()); } @@ -365,15 +362,24 @@ static PyObject * StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self, } static PyMethodDef BPy_StrokeAttribute_methods[] = { - {"get_attribute_real", (PyCFunction) StrokeAttribute_get_attribute_real, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_get_attribute_real_doc}, - {"get_attribute_vec2", (PyCFunction) StrokeAttribute_get_attribute_vec2, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_get_attribute_vec2_doc}, - {"get_attribute_vec3", (PyCFunction) StrokeAttribute_get_attribute_vec3, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_get_attribute_vec3_doc}, - {"has_attribute_real", (PyCFunction) StrokeAttribute_has_attribute_real, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_has_attribute_real_doc}, - {"has_attribute_vec2", (PyCFunction) StrokeAttribute_has_attribute_vec2, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_has_attribute_vec2_doc}, - {"has_attribute_vec3", (PyCFunction) StrokeAttribute_has_attribute_vec3, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_has_attribute_vec3_doc}, - {"set_attribute_real", (PyCFunction) StrokeAttribute_set_attribute_real, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_set_attribute_real_doc}, - {"set_attribute_vec2", (PyCFunction) StrokeAttribute_set_attribute_vec2, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_set_attribute_vec2_doc}, - {"set_attribute_vec3", (PyCFunction) StrokeAttribute_set_attribute_vec3, METH_VARARGS | METH_KEYWORDS, StrokeAttribute_set_attribute_vec3_doc}, + {"get_attribute_real", (PyCFunction) StrokeAttribute_get_attribute_real, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_get_attribute_real_doc}, + {"get_attribute_vec2", (PyCFunction) StrokeAttribute_get_attribute_vec2, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_get_attribute_vec2_doc}, + {"get_attribute_vec3", (PyCFunction) StrokeAttribute_get_attribute_vec3, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_get_attribute_vec3_doc}, + {"has_attribute_real", (PyCFunction) StrokeAttribute_has_attribute_real, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_has_attribute_real_doc}, + {"has_attribute_vec2", (PyCFunction) StrokeAttribute_has_attribute_vec2, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_has_attribute_vec2_doc}, + {"has_attribute_vec3", (PyCFunction) StrokeAttribute_has_attribute_vec3, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_has_attribute_vec3_doc}, + {"set_attribute_real", (PyCFunction) StrokeAttribute_set_attribute_real, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_set_attribute_real_doc}, + {"set_attribute_vec2", (PyCFunction) StrokeAttribute_set_attribute_vec2, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_set_attribute_vec2_doc}, + {"set_attribute_vec3", (PyCFunction) StrokeAttribute_set_attribute_vec3, METH_VARARGS | METH_KEYWORDS, + StrokeAttribute_set_attribute_vec3_doc}, {NULL, NULL, 0, NULL} }; @@ -545,7 +551,8 @@ PyDoc_STRVAR(StrokeAttribute_thickness_doc, static PyObject *StrokeAttribute_thickness_get(BPy_StrokeAttribute *self, void *UNUSED(closure)) { - return Vector_CreatePyObject_cb((PyObject *)self, 2, StrokeAttribute_mathutils_cb_index, MATHUTILS_SUBTYPE_THICKNESS); + return Vector_CreatePyObject_cb((PyObject *)self, 2, StrokeAttribute_mathutils_cb_index, + MATHUTILS_SUBTYPE_THICKNESS); } static int StrokeAttribute_thickness_set(BPy_StrokeAttribute *self, PyObject *value, void *UNUSED(closure)) @@ -580,10 +587,14 @@ static int StrokeAttribute_visible_set(BPy_StrokeAttribute *self, PyObject *valu } static PyGetSetDef BPy_StrokeAttribute_getseters[] = { - {(char *)"alpha", (getter)StrokeAttribute_alpha_get, (setter)StrokeAttribute_alpha_set, (char *)StrokeAttribute_alpha_doc, NULL}, - {(char *)"color", (getter)StrokeAttribute_color_get, (setter)StrokeAttribute_color_set, (char *)StrokeAttribute_color_doc, NULL}, - {(char *)"thickness", (getter)StrokeAttribute_thickness_get, (setter)StrokeAttribute_thickness_set, (char *)StrokeAttribute_thickness_doc, NULL}, - {(char *)"visible", (getter)StrokeAttribute_visible_get, (setter)StrokeAttribute_visible_set, (char *)StrokeAttribute_visible_doc, NULL}, + {(char *)"alpha", (getter)StrokeAttribute_alpha_get, (setter)StrokeAttribute_alpha_set, + (char *)StrokeAttribute_alpha_doc, NULL}, + {(char *)"color", (getter)StrokeAttribute_color_get, (setter)StrokeAttribute_color_set, + (char *)StrokeAttribute_color_doc, NULL}, + {(char *)"thickness", (getter)StrokeAttribute_thickness_get, (setter)StrokeAttribute_thickness_set, + (char *)StrokeAttribute_thickness_doc, NULL}, + {(char *)"visible", (getter)StrokeAttribute_visible_get, (setter)StrokeAttribute_visible_set, + (char *)StrokeAttribute_visible_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index e2fd56734c5..bc77e8668dd 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -112,7 +112,8 @@ int StrokeShader_Init(PyObject *module) if (PyType_Ready(&ConstrainedIncreasingThicknessShader_Type) < 0) return -1; Py_INCREF(&ConstrainedIncreasingThicknessShader_Type); - PyModule_AddObject(module, "ConstrainedIncreasingThicknessShader", (PyObject *)&ConstrainedIncreasingThicknessShader_Type); + PyModule_AddObject(module, "ConstrainedIncreasingThicknessShader", + (PyObject *)&ConstrainedIncreasingThicknessShader_Type); if (PyType_Ready(&fstreamShader_Type) < 0) return -1; @@ -219,14 +220,14 @@ static int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObjec return 0; } -static void StrokeShader___dealloc__(BPy_StrokeShader* self) +static void StrokeShader___dealloc__(BPy_StrokeShader *self) { if (self->ss) delete self->ss; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * StrokeShader___repr__(BPy_StrokeShader* self) +static PyObject *StrokeShader___repr__(BPy_StrokeShader *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->ss); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index 89439995c71..d6d6f3189f9 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -95,12 +95,12 @@ static char UnaryFunction0D___doc__[] = "* :class:`UnaryFunction0DVectorViewShape`\n" "* :class:`UnaryFunction0DViewShape`\n"; -static void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D* self) +static void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D *self) { - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * UnaryFunction0D___repr__(BPy_UnaryFunction0D* self) +static PyObject *UnaryFunction0D___repr__(BPy_UnaryFunction0D *self) { return PyUnicode_FromString("UnaryFunction0D"); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index 92b17f53742..231769dede0 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -89,12 +89,12 @@ static char UnaryFunction1D___doc__[] = "* :class:`UnaryFunction1DVectorViewShape`\n" "* :class:`UnaryFunction1DVoid`\n"; -static void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D* self) +static void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D *self) { - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * UnaryFunction1D___repr__(BPy_UnaryFunction1D* self) +static PyObject *UnaryFunction1D___repr__(BPy_UnaryFunction1D *self) { return PyUnicode_FromString("UnaryFunction1D"); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index f5ee4071523..18383a1d17b 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -101,19 +101,19 @@ static int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, return 0; } -static void UnaryPredicate0D___dealloc__(BPy_UnaryPredicate0D* self) +static void UnaryPredicate0D___dealloc__(BPy_UnaryPredicate0D *self) { if (self->up0D) delete self->up0D; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * UnaryPredicate0D___repr__(BPy_UnaryPredicate0D* self) +static PyObject *UnaryPredicate0D___repr__(BPy_UnaryPredicate0D *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->up0D); } -static PyObject * UnaryPredicate0D___call__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryPredicate0D___call__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *py_if0D_it; diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index 3f0464db93a..fe61d0cd3c3 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -149,19 +149,19 @@ static int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, return 0; } -static void UnaryPredicate1D___dealloc__(BPy_UnaryPredicate1D* self) +static void UnaryPredicate1D___dealloc__(BPy_UnaryPredicate1D *self) { if (self->up1D) delete self->up1D; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * UnaryPredicate1D___repr__(BPy_UnaryPredicate1D* self) +static PyObject *UnaryPredicate1D___repr__(BPy_UnaryPredicate1D *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->up1D); } -static PyObject * UnaryPredicate1D___call__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryPredicate1D___call__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *py_if1D; diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp index 46aad0d788c..a5f837b0c03 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp @@ -79,10 +79,10 @@ static void ViewMap_dealloc(BPy_ViewMap *self) { if (self->vm) delete self->vm; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * ViewMap_repr(BPy_ViewMap *self) +static PyObject *ViewMap_repr(BPy_ViewMap *self) { return PyUnicode_FromFormat("ViewMap - address: %p", self->vm); } @@ -99,14 +99,14 @@ PyDoc_STRVAR(ViewMap_get_closest_viewedge_doc, " :return: The ViewEdge nearest to the specified 2D point.\n" " :rtype: :class:`ViewEdge`"); -static PyObject * ViewMap_get_closest_viewedge(BPy_ViewMap *self , PyObject *args, PyObject *kwds) +static PyObject *ViewMap_get_closest_viewedge(BPy_ViewMap *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"x", "y", NULL}; double x, y; if (!PyArg_ParseTupleAndKeywords(args, kwds, "dd", (char **)kwlist, &x, &y)) return NULL; - ViewEdge *ve = const_cast(self->vm->getClosestViewEdge(x,y)); + ViewEdge *ve = const_cast(self->vm->getClosestViewEdge(x, y)); if (ve) return BPy_ViewEdge_from_ViewEdge(*ve); Py_RETURN_NONE; @@ -124,14 +124,14 @@ PyDoc_STRVAR(ViewMap_get_closest_fedge_doc, " :return: The FEdge nearest to the specified 2D point.\n" " :rtype: :class:`FEdge`"); -static PyObject * ViewMap_get_closest_fedge(BPy_ViewMap *self , PyObject *args, PyObject *kwds) +static PyObject *ViewMap_get_closest_fedge(BPy_ViewMap *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"x", "y", NULL}; double x, y; if (!PyArg_ParseTupleAndKeywords(args, kwds, "dd", (char **)kwlist, &x, &y)) return NULL; - FEdge *fe = const_cast(self->vm->getClosestFEdge(x,y)); + FEdge *fe = const_cast(self->vm->getClosestFEdge(x, y)); if (fe) return Any_BPy_FEdge_from_FEdge(*fe); Py_RETURN_NONE; @@ -140,8 +140,10 @@ static PyObject * ViewMap_get_closest_fedge(BPy_ViewMap *self , PyObject *args, // static ViewMap *getInstance (); static PyMethodDef BPy_ViewMap_methods[] = { - {"get_closest_viewedge", (PyCFunction)ViewMap_get_closest_viewedge, METH_VARARGS | METH_KEYWORDS, ViewMap_get_closest_viewedge_doc}, - {"get_closest_fedge", (PyCFunction)ViewMap_get_closest_fedge, METH_VARARGS | METH_KEYWORDS, ViewMap_get_closest_fedge_doc}, + {"get_closest_viewedge", (PyCFunction)ViewMap_get_closest_viewedge, METH_VARARGS | METH_KEYWORDS, + ViewMap_get_closest_viewedge_doc}, + {"get_closest_fedge", (PyCFunction)ViewMap_get_closest_fedge, METH_VARARGS | METH_KEYWORDS, + ViewMap_get_closest_fedge_doc}, {NULL, NULL, 0, NULL} }; @@ -168,7 +170,8 @@ static int ViewMap_scene_bbox_set(BPy_ViewMap *self, PyObject *value, void *UNUS } static PyGetSetDef BPy_ViewMap_getseters[] = { - {(char *)"scene_bbox", (getter)ViewMap_scene_bbox_get, (setter)ViewMap_scene_bbox_set, (char *)ViewMap_scene_bbox_doc, NULL}, + {(char *)"scene_bbox", (getter)ViewMap_scene_bbox_get, (setter)ViewMap_scene_bbox_set, + (char *)ViewMap_scene_bbox_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp index fdb2a695456..a921bf5aed6 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -91,7 +91,8 @@ static int ViewShape_init(BPy_ViewShape *self, PyObject *args, PyObject *kwds) if (!obj) { self->vs = new ViewShape(); self->py_ss = NULL; - } else { + } + else { self->vs = new ViewShape(*(((BPy_ViewShape *)obj)->vs)); self->py_ss = ((BPy_ViewShape *)obj)->py_ss; } @@ -115,15 +116,15 @@ static int ViewShape_init(BPy_ViewShape *self, PyObject *args, PyObject *kwds) static void ViewShape_dealloc(BPy_ViewShape *self) { if (self->py_ss) { - self->vs->setSShape((SShape *)0); + self->vs->setSShape((SShape *)NULL); Py_DECREF(self->py_ss); } if (self->vs && !self->borrowed) delete self->vs; - Py_TYPE(self)->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject * ViewShape_repr(BPy_ViewShape *self) +static PyObject *ViewShape_repr(BPy_ViewShape *self) { return PyUnicode_FromFormat("ViewShape - address: %p", self->vs); } @@ -136,7 +137,7 @@ PyDoc_STRVAR(ViewShape_add_edge_doc, " :arg edge: A ViewEdge object.\n" " :type edge: :class:`ViewEdge`\n"); -static PyObject * ViewShape_add_edge(BPy_ViewShape *self, PyObject *args, PyObject *kwds) +static PyObject *ViewShape_add_edge(BPy_ViewShape *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"edge", NULL}; PyObject *py_ve = 0; @@ -155,7 +156,7 @@ PyDoc_STRVAR(ViewShape_add_vertex_doc, " :arg vertex: A ViewVertex object.\n" " :type vertex: :class:`ViewVertex`"); -static PyObject * ViewShape_add_vertex(BPy_ViewShape *self, PyObject *args, PyObject *kwds) +static PyObject *ViewShape_add_vertex(BPy_ViewShape *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"vertex", NULL}; PyObject *py_vv = 0; @@ -215,8 +216,8 @@ static PyObject *ViewShape_vertices_get(BPy_ViewShape *self, void *UNUSED(closur { PyObject *py_vertices = PyList_New(0); - vector< ViewVertex * > vertices = self->vs->vertices(); - vector< ViewVertex * >::iterator it; + vector vertices = self->vs->vertices(); + vector::iterator it; for (it = vertices.begin(); it != vertices.end(); it++) { PyList_Append( py_vertices, Any_BPy_ViewVertex_from_ViewVertex(*(*it))); } @@ -237,7 +238,8 @@ static int ViewShape_vertices_set(BPy_ViewShape *self, PyObject *value, void *UN item = PyList_GetItem(list, i); if (BPy_ViewVertex_Check(item)) { v.push_back(((BPy_ViewVertex *)item)->vv); - } else { + } + else { PyErr_SetString(PyExc_TypeError, "value must be a list of ViewVertex objects"); return -1; } @@ -255,8 +257,8 @@ static PyObject *ViewShape_edges_get(BPy_ViewShape *self, void *UNUSED(closure)) { PyObject *py_edges = PyList_New(0); - vector< ViewEdge * > edges = self->vs->edges(); - vector< ViewEdge * >::iterator it; + vector edges = self->vs->edges(); + vector::iterator it; for (it = edges.begin(); it != edges.end(); it++) { PyList_Append(py_edges, BPy_ViewEdge_from_ViewEdge(*(*it))); @@ -278,7 +280,8 @@ static int ViewShape_edges_set(BPy_ViewShape *self, PyObject *value, void *UNUSE item = PyList_GetItem(list, i); if (BPy_ViewEdge_Check(item)) { v.push_back(((BPy_ViewEdge *)item)->ve); - } else { + } + else { PyErr_SetString(PyExc_TypeError, "argument must be list of ViewEdge objects"); return -1; } @@ -310,7 +313,8 @@ static PyObject *ViewShape_id_get(BPy_ViewShape *self, void *UNUSED(closure)) static PyGetSetDef BPy_ViewShape_getseters[] = { {(char *)"sshape", (getter)ViewShape_sshape_get, (setter)ViewShape_sshape_set, (char *)ViewShape_sshape_doc, NULL}, - {(char *)"vertices", (getter)ViewShape_vertices_get, (setter)ViewShape_vertices_set, (char *)ViewShape_vertices_doc, NULL}, + {(char *)"vertices", (getter)ViewShape_vertices_get, (setter)ViewShape_vertices_set, + (char *)ViewShape_vertices_doc, NULL}, {(char *)"edges", (getter)ViewShape_edges_get, (setter)ViewShape_edges_set, (char *)ViewShape_edges_doc, NULL}, {(char *)"name", (getter)ViewShape_name_get, (setter)NULL, (char *)ViewShape_name_doc, NULL}, {(char *)"id", (getter)ViewShape_id_get, (setter)NULL, (char *)ViewShape_id_doc, NULL}, diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp index e034b48f06a..9fcc8d4a691 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp @@ -53,7 +53,7 @@ static char FalseBP1D___doc__[] = " :return: False.\n" " :rtype: bool\n"; -static int FalseBP1D___init__(BPy_FalseBP1D* self, PyObject *args, PyObject *kwds) +static int FalseBP1D___init__(BPy_FalseBP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp index 73d878cf90e..6dd8919f402 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp @@ -54,7 +54,7 @@ static char Length2DBP1D___doc__[] = " :return: True or false.\n" " :rtype: bool\n"; -static int Length2DBP1D___init__(BPy_Length2DBP1D* self, PyObject *args, PyObject *kwds) +static int Length2DBP1D___init__(BPy_Length2DBP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp index a2e9b2ac112..5d991d50ae1 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp @@ -53,7 +53,7 @@ static char SameShapeIdBP1D___doc__[] = " :return: True or false.\n" " :rtype: bool\n"; -static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D* self, PyObject *args, PyObject *kwds) +static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp index c56b8556d1d..9063e407056 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp @@ -53,7 +53,7 @@ static char TrueBP1D___doc__[] = " :return: True.\n" " :rtype: bool\n"; -static int TrueBP1D___init__(BPy_TrueBP1D* self, PyObject *args, PyObject *kwds) +static int TrueBP1D___init__(BPy_TrueBP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index 9901a60b94e..a3ebf88b58a 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -75,7 +75,7 @@ static char ViewMapGradientNormBP1D___doc__[] = " :return: True or false.\n" " :rtype: bool\n"; -static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D* self, PyObject *args, PyObject *kwds) +static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", "integration_type", "sampling", NULL}; PyObject *obj = 0; diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h index 70eba3e2bc0..cb5e59f146d 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject ViewMapGradientNormBP1D_Type; -#define BPy_ViewMapGradientNormBP1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ViewMapGradientNormBP1D_Type)) +#define BPy_ViewMapGradientNormBP1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ViewMapGradientNormBP1D_Type)) /*---------------------------Python BPy_ViewMapGradientNormBP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp index 0746f0a8cf9..04442ae0e37 100644 --- a/source/blender/freestyle/intern/python/Director.cpp +++ b/source/blender/freestyle/intern/python/Director.cpp @@ -212,9 +212,11 @@ int Director_BPy_ChainingIterator_traverse(ChainingIterator *c_it, AdjacencyIter return -1; if (BPy_ViewEdge_Check(result)) { c_it->result = ((BPy_ViewEdge *)result)->ve; - } else if (result == Py_None) { + } + else if (result == Py_None) { c_it->result = NULL; - } else { + } + else { PyErr_SetString(PyExc_RuntimeError, "traverse method returned a wrong value"); Py_DECREF(result); return -1; @@ -267,7 +269,7 @@ int Director_BPy_UnaryFunction0D___call__(void *uf0D, PyObject *obj, Interface0D } else if (BPy_UnaryFunction0DVectorViewShape_Check(obj)) { vector vec; - for(int i = 0; i < PyList_Size(result); i++) { + for (int i = 0; i < PyList_Size(result); i++) { ViewShape *b = ((BPy_ViewShape *)PyList_GetItem(result, i))->vs; vec.push_back(b); } @@ -317,7 +319,7 @@ int Director_BPy_UnaryFunction1D___call__(void *uf1D, PyObject *obj, Interface1D } else if (BPy_UnaryFunction1DVectorViewShape_Check(obj)) { vector vec; - for(int i = 1; i < PyList_Size(result); i++) { + for (int i = 1; i < PyList_Size(result); i++) { ViewShape *b = ((BPy_ViewShape *)PyList_GetItem(result, i))->vs; vec.push_back(b); } diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index 4f49a8d0b70..4365aa123e9 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -219,10 +219,13 @@ static PyObject *CurvePoint_curvature_fredo_get(BPy_CurvePoint *self, void *UNUS // todo - CurvePoint.directionFredo() static PyGetSetDef BPy_CurvePoint_getseters[] = { - {(char *)"first_svertex", (getter)CurvePoint_first_svertex_get, (setter)CurvePoint_first_svertex_set, (char *)CurvePoint_first_svertex_doc, NULL}, - {(char *)"second_svertex", (getter)CurvePoint_second_svertex_get, (setter)CurvePoint_second_svertex_set, (char *)CurvePoint_second_svertex_doc, NULL}, + {(char *)"first_svertex", (getter)CurvePoint_first_svertex_get, (setter)CurvePoint_first_svertex_set, + (char *)CurvePoint_first_svertex_doc, NULL}, + {(char *)"second_svertex", (getter)CurvePoint_second_svertex_get, (setter)CurvePoint_second_svertex_set, + (char *)CurvePoint_second_svertex_doc, NULL}, {(char *)"t2d", (getter)CurvePoint_t2d_get, (setter)CurvePoint_t2d_set, (char *)CurvePoint_t2d_doc, NULL}, - {(char *)"curvature_fredo", (getter)CurvePoint_curvature_fredo_get, (setter)NULL, (char *)CurvePoint_curvature_fredo_doc, NULL}, + {(char *)"curvature_fredo", (getter)CurvePoint_curvature_fredo_get, (setter)NULL, + (char *)CurvePoint_curvature_fredo_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index 072a602cf29..ae0e1d36143 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -110,7 +110,7 @@ PyDoc_STRVAR(SVertex_add_normal_doc, " :arg normal: A three-dimensional vector.\n" " :type normal: :class:`mathutils.Vector`, list or tuple of 3 real numbers"); -static PyObject *SVertex_add_normal(BPy_SVertex *self , PyObject *args, PyObject *kwds) +static PyObject *SVertex_add_normal(BPy_SVertex *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"normal", NULL}; PyObject *py_normal; @@ -136,7 +136,7 @@ PyDoc_STRVAR(SVertex_add_fedge_doc, " :arg fedge: An FEdge.\n" " :type fedge: :class:`FEdge`"); -static PyObject *SVertex_add_fedge(BPy_SVertex *self , PyObject *args, PyObject *kwds) +static PyObject *SVertex_add_fedge(BPy_SVertex *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"fedge", NULL}; PyObject *py_fe; @@ -421,8 +421,10 @@ static PyObject *SVertex_curvatures_get(BPy_SVertex *self, void *UNUSED(closure) } static PyGetSetDef BPy_SVertex_getseters[] = { - {(char *)"point_3d", (getter)SVertex_point_3d_get, (setter)SVertex_point_3d_set, (char *)SVertex_point_3d_doc, NULL}, - {(char *)"point_2d", (getter)SVertex_point_2d_get, (setter)SVertex_point_2d_set, (char *)SVertex_point_2d_doc, NULL}, + {(char *)"point_3d", (getter)SVertex_point_3d_get, (setter)SVertex_point_3d_set, + (char *)SVertex_point_3d_doc, NULL}, + {(char *)"point_2d", (getter)SVertex_point_2d_get, (setter)SVertex_point_2d_set, + (char *)SVertex_point_2d_doc, NULL}, {(char *)"id", (getter)SVertex_id_get, (setter)SVertex_id_set, (char *)SVertex_id_doc, NULL}, {(char *)"normals", (getter)SVertex_normals_get, (setter)NULL, (char *)SVertex_normals_doc, NULL}, {(char *)"normals_size", (getter)SVertex_normals_size_get, (setter)NULL, (char *)SVertex_normals_size_doc, NULL}, diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index 1e5f70144c1..d425105aa9d 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -74,7 +74,7 @@ PyDoc_STRVAR(ViewVertex_edges_begin_doc, " :return: An orientedViewEdgeIterator pointing to the first ViewEdge.\n" " :rtype: :class:`orientedViewEdgeIterator`"); -static PyObject * ViewVertex_edges_begin(BPy_ViewVertex *self) +static PyObject *ViewVertex_edges_begin(BPy_ViewVertex *self) { ViewVertexInternal::orientedViewEdgeIterator ove_it(self->vv->edgesBegin()); return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ove_it, 0); @@ -89,7 +89,7 @@ PyDoc_STRVAR(ViewVertex_edges_end_doc, " :return: An orientedViewEdgeIterator pointing after the last ViewEdge.\n" " :rtype: :class:`orientedViewEdgeIterator`"); -static PyObject * ViewVertex_edges_end(BPy_ViewVertex *self) +static PyObject *ViewVertex_edges_end(BPy_ViewVertex *self) { #if 0 ViewVertexInternal::orientedViewEdgeIterator ove_it(self->vv->edgesEnd()); @@ -111,7 +111,7 @@ PyDoc_STRVAR(ViewVertex_edges_iterator_doc, " :return: An orientedViewEdgeIterator pointing to the given ViewEdge.\n" " :rtype: :class:`orientedViewEdgeIterator`"); -static PyObject * ViewVertex_edges_iterator(BPy_ViewVertex *self, PyObject *args, PyObject *kwds) +static PyObject *ViewVertex_edges_iterator(BPy_ViewVertex *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"edge", NULL}; PyObject *py_ve; @@ -126,7 +126,8 @@ static PyObject * ViewVertex_edges_iterator(BPy_ViewVertex *self, PyObject *args static PyMethodDef BPy_ViewVertex_methods[] = { {"edges_begin", (PyCFunction)ViewVertex_edges_begin, METH_NOARGS, ViewVertex_edges_begin_doc}, {"edges_end", (PyCFunction)ViewVertex_edges_end, METH_NOARGS, ViewVertex_edges_end_doc}, - {"edges_iterator", (PyCFunction)ViewVertex_edges_iterator, METH_VARARGS | METH_KEYWORDS, ViewVertex_edges_iterator_doc}, + {"edges_iterator", (PyCFunction)ViewVertex_edges_iterator, METH_VARARGS | METH_KEYWORDS, + ViewVertex_edges_iterator_doc}, {NULL, NULL, 0, NULL} }; @@ -156,7 +157,8 @@ static int ViewVertex_nature_set(BPy_ViewVertex *self, PyObject *value, void *UN } static PyGetSetDef BPy_ViewVertex_getseters[] = { - {(char *)"nature", (getter)ViewVertex_nature_get, (setter)ViewVertex_nature_set, (char *)ViewVertex_nature_doc, NULL}, + {(char *)"nature", (getter)ViewVertex_nature_get, (setter)ViewVertex_nature_set, + (char *)ViewVertex_nature_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; 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 6475a09cb13..590716e1a76 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -326,10 +326,15 @@ static PyObject *StrokeVertex_u_get(BPy_StrokeVertex *self, void *UNUSED(closure } static PyGetSetDef BPy_StrokeVertex_getseters[] = { - {(char *)"attribute", (getter)StrokeVertex_attribute_get, (setter)StrokeVertex_attribute_set, (char *)StrokeVertex_attribute_doc, NULL}, - {(char *)"curvilinear_abscissa", (getter)StrokeVertex_curvilinear_abscissa_get, (setter)StrokeVertex_curvilinear_abscissa_set, (char *)StrokeVertex_curvilinear_abscissa_doc, NULL}, - {(char *)"point", (getter)StrokeVertex_point_get, (setter)StrokeVertex_point_set, (char *)StrokeVertex_point_doc, NULL}, - {(char *)"stroke_length", (getter)StrokeVertex_stroke_length_get, (setter)StrokeVertex_stroke_length_set, (char *)StrokeVertex_stroke_length_doc, NULL}, + {(char *)"attribute", (getter)StrokeVertex_attribute_get, (setter)StrokeVertex_attribute_set, + (char *)StrokeVertex_attribute_doc, NULL}, + {(char *)"curvilinear_abscissa", (getter)StrokeVertex_curvilinear_abscissa_get, + (setter)StrokeVertex_curvilinear_abscissa_set, + (char *)StrokeVertex_curvilinear_abscissa_doc, NULL}, + {(char *)"point", (getter)StrokeVertex_point_get, (setter)StrokeVertex_point_set, + (char *)StrokeVertex_point_doc, NULL}, + {(char *)"stroke_length", (getter)StrokeVertex_stroke_length_get, (setter)StrokeVertex_stroke_length_set, + (char *)StrokeVertex_stroke_length_doc, NULL}, {(char *)"u", (getter)StrokeVertex_u_get, (setter)NULL, (char *)StrokeVertex_u_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; 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 a4bfcab78e8..8fd4425b291 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp @@ -104,7 +104,8 @@ static int NonTVertex_svertex_set(BPy_NonTVertex *self, PyObject *value, void *U } static PyGetSetDef BPy_NonTVertex_getseters[] = { - {(char *)"svertex", (getter)NonTVertex_svertex_get, (setter)NonTVertex_svertex_set, (char *)NonTVertex_svertex_doc, NULL}, + {(char *)"svertex", (getter)NonTVertex_svertex_get, (setter)NonTVertex_svertex_set, + (char *)NonTVertex_svertex_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; 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 e6285371c77..e9295f323fb 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp @@ -83,7 +83,7 @@ PyDoc_STRVAR(TVertex_get_svertex_doc, " :return: The SVertex belonging to the given FEdge.\n" " :rtype: :class:`SVertex`"); -static PyObject * TVertex_get_svertex( BPy_TVertex *self, PyObject *args, PyObject *kwds) +static PyObject *TVertex_get_svertex( BPy_TVertex *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"fedge", NULL}; PyObject *py_fe; @@ -108,7 +108,7 @@ PyDoc_STRVAR(TVertex_get_mate_doc, " :return: The mate edge of the given ViewEdge.\n" " :rtype: :class:`ViewEdge`"); -static PyObject * TVertex_get_mate( BPy_TVertex *self, PyObject *args, PyObject *kwds) +static PyObject *TVertex_get_mate( BPy_TVertex *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"viewedge", NULL}; PyObject *py_ve; @@ -197,8 +197,10 @@ static int TVertex_id_set(BPy_TVertex *self, PyObject *value, void *UNUSED(closu } static PyGetSetDef BPy_TVertex_getseters[] = { - {(char *)"front_svertex", (getter)TVertex_front_svertex_get, (setter)TVertex_front_svertex_set, (char *)TVertex_front_svertex_doc, NULL}, - {(char *)"back_svertex", (getter)TVertex_back_svertex_get, (setter)TVertex_back_svertex_set, (char *)TVertex_back_svertex_doc, NULL}, + {(char *)"front_svertex", (getter)TVertex_front_svertex_get, (setter)TVertex_front_svertex_set, + (char *)TVertex_front_svertex_doc, NULL}, + {(char *)"back_svertex", (getter)TVertex_back_svertex_get, (setter)TVertex_back_svertex_set, + (char *)TVertex_back_svertex_doc, NULL}, {(char *)"id", (getter)TVertex_id_get, (setter)TVertex_id_set, (char *)TVertex_id_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index d2b965ad0e6..0260199ccee 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -320,10 +320,14 @@ static int FEdge_nature_set(BPy_FEdge *self, PyObject *value, void *UNUSED(closu } static PyGetSetDef BPy_FEdge_getseters[] = { - {(char *)"first_svertex", (getter)FEdge_first_svertex_get, (setter)FEdge_first_svertex_set, (char *)FEdge_first_svertex_doc, NULL}, - {(char *)"second_svertex", (getter)FEdge_second_svertex_get, (setter)FEdge_second_svertex_set, (char *)FEdge_second_svertex_doc, NULL}, - {(char *)"next_fedge", (getter)FEdge_next_fedge_get, (setter)FEdge_next_fedge_set, (char *)FEdge_next_fedge_doc, NULL}, - {(char *)"previous_fedge", (getter)FEdge_previous_fedge_get, (setter)FEdge_previous_fedge_set, (char *)FEdge_previous_fedge_doc, NULL}, + {(char *)"first_svertex", (getter)FEdge_first_svertex_get, (setter)FEdge_first_svertex_set, + (char *)FEdge_first_svertex_doc, NULL}, + {(char *)"second_svertex", (getter)FEdge_second_svertex_get, (setter)FEdge_second_svertex_set, + (char *)FEdge_second_svertex_doc, NULL}, + {(char *)"next_fedge", (getter)FEdge_next_fedge_get, (setter)FEdge_next_fedge_set, + (char *)FEdge_next_fedge_doc, NULL}, + {(char *)"previous_fedge", (getter)FEdge_previous_fedge_get, (setter)FEdge_previous_fedge_set, + (char *)FEdge_previous_fedge_doc, NULL}, {(char *)"viewedge", (getter)FEdge_viewedge_get, (setter)FEdge_viewedge_set, (char *)FEdge_viewedge_doc, NULL}, {(char *)"is_smooth", (getter)FEdge_is_smooth_get, (setter)FEdge_is_smooth_set, (char *)FEdge_is_smooth_doc, NULL}, {(char *)"id", (getter)FEdge_id_get, (setter)FEdge_id_set, (char *)FEdge_id_doc, NULL}, diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp index 368b6f80de3..7026d93774a 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp @@ -103,7 +103,7 @@ PyDoc_STRVAR(FrsCurve_push_vertex_back_doc, " :arg vertex: A vertex object.\n" " :type vertex: :class:`SVertex` or :class:`CurvePoint`"); -static PyObject * FrsCurve_push_vertex_back(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) +static PyObject *FrsCurve_push_vertex_back(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"vertex", NULL}; PyObject *obj = 0; @@ -132,7 +132,7 @@ PyDoc_STRVAR(FrsCurve_push_vertex_front_doc, " :arg vertex: A vertex object.\n" " :type vertex: :class:`SVertex` or :class:`CurvePoint`"); -static PyObject * FrsCurve_push_vertex_front(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) +static PyObject *FrsCurve_push_vertex_front(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"vertex", NULL}; PyObject *obj = 0; @@ -153,9 +153,11 @@ static PyObject * FrsCurve_push_vertex_front(BPy_FrsCurve *self, PyObject *args, Py_RETURN_NONE; } -static PyMethodDef BPy_FrsCurve_methods[] = { - {"push_vertex_back", (PyCFunction)FrsCurve_push_vertex_back, METH_VARARGS | METH_KEYWORDS, FrsCurve_push_vertex_back_doc}, - {"push_vertex_front", (PyCFunction)FrsCurve_push_vertex_front, METH_VARARGS | METH_KEYWORDS, FrsCurve_push_vertex_front_doc}, +static PyMethodDef BPy_FrsCurve_methods[] = { + {"push_vertex_back", (PyCFunction)FrsCurve_push_vertex_back, METH_VARARGS | METH_KEYWORDS, + FrsCurve_push_vertex_back_doc}, + {"push_vertex_front", (PyCFunction)FrsCurve_push_vertex_front, METH_VARARGS | METH_KEYWORDS, + FrsCurve_push_vertex_front_doc}, {NULL, NULL, 0, NULL} }; @@ -183,7 +185,8 @@ static PyObject *FrsCurve_segments_size_get(BPy_FrsCurve *self, void *UNUSED(clo static PyGetSetDef BPy_FrsCurve_getseters[] = { {(char *)"is_empty", (getter)FrsCurve_is_empty_get, (setter)NULL, (char *)FrsCurve_is_empty_doc, NULL}, - {(char *)"segments_size", (getter)FrsCurve_segments_size_get, (setter)NULL, (char *)FrsCurve_segments_size_doc, NULL}, + {(char *)"segments_size", (getter)FrsCurve_segments_size_get, (setter)NULL, + (char *)FrsCurve_segments_size_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 0cc12373eac..53ec86f3c01 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -84,7 +84,7 @@ static int Stroke_init(BPy_Stroke *self, PyObject *args, PyObject *kwds) return 0; } -static PyObject * Stroke_iter(PyObject *self) +static PyObject *Stroke_iter(PyObject *self) { StrokeInternal::StrokeVertexIterator sv_it( ((BPy_Stroke *)self)->s->strokeVerticesBegin() ); return BPy_StrokeVertexIterator_from_StrokeVertexIterator( sv_it, 0 ); @@ -121,7 +121,7 @@ PyDoc_STRVAR(Stroke_compute_sampling_doc, " method.\n" " :rtype: float"); -static PyObject * Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObject *kwds) +static PyObject *Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"n", NULL}; int i; @@ -150,20 +150,17 @@ PyDoc_STRVAR(Stroke_resample_doc, " :arg sampling: The new sampling value.\n" " :type sampling: float"); -static PyObject * Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwds) +static PyObject *Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"n", NULL}; static const char *kwlist_2[] = {"sampling", NULL}; int i; float f; - if (PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist_1, &i)) - { + if (PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist_1, &i)) { self->s->Resample(i); } - else if (PyErr_Clear(), - PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) - { + else if (PyErr_Clear(), PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) { self->s->Resample(f); } else { @@ -186,7 +183,7 @@ PyDoc_STRVAR(Stroke_insert_vertex_doc, " before which vertex must be inserted.\n" " :type next: :class:`StrokeVertexIterator`"); -static PyObject * Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds) +static PyObject *Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"vertex", "next", NULL}; PyObject *py_sv = 0, *py_sv_it = 0; @@ -211,7 +208,7 @@ PyDoc_STRVAR(Stroke_remove_vertex_doc, " :arg vertex: the StrokeVertex to remove from the Stroke.\n" " :type vertex: :class:`StrokeVertex`"); -static PyObject * Stroke_remove_vertex( BPy_Stroke *self, PyObject *args, PyObject *kwds) +static PyObject *Stroke_remove_vertex( BPy_Stroke *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"vertex", NULL}; PyObject *py_sv = 0; @@ -220,7 +217,8 @@ static PyObject * Stroke_remove_vertex( BPy_Stroke *self, PyObject *args, PyObje return NULL; if (((BPy_StrokeVertex *)py_sv)->sv) { self->s->RemoveVertex(((BPy_StrokeVertex *)py_sv)->sv); - } else { + } + else { PyErr_SetString(PyExc_TypeError, "invalid argument"); return NULL; } @@ -232,7 +230,7 @@ PyDoc_STRVAR(Stroke_update_length_doc, "\n" " Updates the 2D length of the Stroke."); -static PyObject * Stroke_update_length(BPy_Stroke *self) +static PyObject *Stroke_update_length(BPy_Stroke *self) { self->s->UpdateLength(); Py_RETURN_NONE; @@ -251,7 +249,7 @@ PyDoc_STRVAR(Stroke_stroke_vertices_begin_doc, " :return: A StrokeVertexIterator pointing on the first StrokeVertex.\n" " :rtype: :class:`StrokeVertexIterator`"); -static PyObject * Stroke_stroke_vertices_begin( BPy_Stroke *self , PyObject *args, PyObject *kwds) +static PyObject *Stroke_stroke_vertices_begin(BPy_Stroke *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"t", NULL}; float f = 0.0f; @@ -271,7 +269,7 @@ PyDoc_STRVAR(Stroke_stroke_vertices_end_doc, " :return: A StrokeVertexIterator pointing after the last StrokeVertex.\n" " :rtype: :class:`StrokeVertexIterator`"); -static PyObject * Stroke_stroke_vertices_end(BPy_Stroke *self) +static PyObject *Stroke_stroke_vertices_end(BPy_Stroke *self) { StrokeInternal::StrokeVertexIterator sv_it(self->s->strokeVerticesEnd()); return BPy_StrokeVertexIterator_from_StrokeVertexIterator(sv_it, 1); @@ -285,18 +283,20 @@ PyDoc_STRVAR(Stroke_stroke_vertices_size_doc, " :return: The number of stroke vertices.\n" " :rtype: int"); -static PyObject * Stroke_stroke_vertices_size(BPy_Stroke *self) +static PyObject *Stroke_stroke_vertices_size(BPy_Stroke *self) { return PyLong_FromLong(self->s->strokeVerticesSize()); } static PyMethodDef BPy_Stroke_methods[] = { - {"compute_sampling", (PyCFunction)Stroke_compute_sampling, METH_VARARGS | METH_KEYWORDS, Stroke_compute_sampling_doc}, + {"compute_sampling", (PyCFunction)Stroke_compute_sampling, METH_VARARGS | METH_KEYWORDS, + Stroke_compute_sampling_doc}, {"resample", (PyCFunction)Stroke_resample, METH_VARARGS | METH_KEYWORDS, Stroke_resample_doc}, {"remove_vertex", (PyCFunction)Stroke_remove_vertex, METH_VARARGS | METH_KEYWORDS, Stroke_remove_vertex_doc}, {"insert_vertex", (PyCFunction)Stroke_insert_vertex, METH_VARARGS | METH_KEYWORDS, Stroke_insert_vertex_doc}, {"update_length", (PyCFunction)Stroke_update_length, METH_NOARGS, Stroke_update_length_doc}, - {"stroke_vertices_begin", (PyCFunction)Stroke_stroke_vertices_begin, METH_VARARGS | METH_KEYWORDS, Stroke_stroke_vertices_begin_doc}, + {"stroke_vertices_begin", (PyCFunction)Stroke_stroke_vertices_begin, METH_VARARGS | METH_KEYWORDS, + Stroke_stroke_vertices_begin_doc}, {"stroke_vertices_end", (PyCFunction)Stroke_stroke_vertices_end, METH_NOARGS, Stroke_stroke_vertices_end_doc}, {"stroke_vertices_size", (PyCFunction)Stroke_stroke_vertices_size, METH_NOARGS, Stroke_stroke_vertices_size_doc}, {NULL, NULL, 0, NULL} @@ -337,7 +337,7 @@ 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,10 +404,13 @@ static int Stroke_id_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure } static PyGetSetDef BPy_Stroke_getseters[] = { - {(char *)"medium_type", (getter)Stroke_medium_type_get, (setter)Stroke_medium_type_set, (char *)Stroke_medium_type_doc, NULL}, - {(char *)"texture_id", (getter)Stroke_texture_id_get, (setter)Stroke_texture_id_set, (char *)Stroke_texture_id_doc, NULL}, + {(char *)"medium_type", (getter)Stroke_medium_type_get, (setter)Stroke_medium_type_set, + (char *)Stroke_medium_type_doc, NULL}, + {(char *)"texture_id", (getter)Stroke_texture_id_get, (setter)Stroke_texture_id_set, + (char *)Stroke_texture_id_doc, NULL}, {(char *)"tips", (getter)Stroke_tips_get, (setter)Stroke_tips_set, (char *)Stroke_tips_doc, NULL}, - {(char *)"length_2d", (getter)Stroke_length_2d_get, (setter)Stroke_length_2d_set, (char *)Stroke_length_2d_doc, NULL}, + {(char *)"length_2d", (getter)Stroke_length_2d_get, (setter)Stroke_length_2d_set, + (char *)Stroke_length_2d_doc, NULL}, {(char *)"id", (getter)Stroke_id_get, (setter)Stroke_id_set, (char *)Stroke_id_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp index a30cfc0a824..e264b3b6217 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -86,7 +86,7 @@ PyDoc_STRVAR(ViewEdge_update_fedges_doc, "\n" " Sets Viewedge to this for all embedded fedges.\n"); -static PyObject * ViewEdge_update_fedges(BPy_ViewEdge *self) +static PyObject *ViewEdge_update_fedges(BPy_ViewEdge *self) { self->ve->UpdateFEdges(); Py_RETURN_NONE; @@ -114,7 +114,7 @@ static PyObject *ViewEdge_first_viewvertex_get(BPy_ViewEdge *self, void *UNUSED( 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; @@ -135,7 +135,7 @@ static PyObject *ViewEdge_last_viewvertex_get(BPy_ViewEdge *self, void *UNUSED(c 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; @@ -156,7 +156,7 @@ static PyObject *ViewEdge_first_fedge_get(BPy_ViewEdge *self, void *UNUSED(closu 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; @@ -177,7 +177,7 @@ static PyObject *ViewEdge_last_fedge_get(BPy_ViewEdge *self, void *UNUSED(closur 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; @@ -220,7 +220,7 @@ static PyObject *ViewEdge_occludee_get(BPy_ViewEdge *self, void *UNUSED(closure) 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; @@ -291,7 +291,7 @@ 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; @@ -318,17 +318,24 @@ static int ViewEdge_chaining_time_stamp_set(BPy_ViewEdge *self, PyObject *value, } static PyGetSetDef BPy_ViewEdge_getseters[] = { - {(char *)"first_viewvertex", (getter)ViewEdge_first_viewvertex_get, (setter)ViewEdge_first_viewvertex_set, (char *)ViewEdge_first_viewvertex_doc, NULL}, - {(char *)"last_viewvertex", (getter)ViewEdge_last_viewvertex_get, (setter)ViewEdge_last_viewvertex_set, (char *)ViewEdge_last_viewvertex_doc, NULL}, - {(char *)"first_fedge", (getter)ViewEdge_first_fedge_get, (setter)ViewEdge_first_fedge_set, (char *)ViewEdge_first_fedge_doc, NULL}, - {(char *)"last_fedge", (getter)ViewEdge_last_fedge_get, (setter)ViewEdge_last_fedge_set, (char *)ViewEdge_last_fedge_doc, NULL}, - {(char *)"viewshape", (getter)ViewEdge_viewshape_get, (setter)ViewEdge_viewshape_set, (char *)ViewEdge_viewshape_doc, NULL}, - {(char *)"occludee", (getter)ViewEdge_occludee_get, (setter)ViewEdge_occludee_set, (char *)ViewEdge_occludee_doc, NULL}, + {(char *)"first_viewvertex", (getter)ViewEdge_first_viewvertex_get, (setter)ViewEdge_first_viewvertex_set, + (char *)ViewEdge_first_viewvertex_doc, NULL}, + {(char *)"last_viewvertex", (getter)ViewEdge_last_viewvertex_get, (setter)ViewEdge_last_viewvertex_set, + (char *)ViewEdge_last_viewvertex_doc, NULL}, + {(char *)"first_fedge", (getter)ViewEdge_first_fedge_get, (setter)ViewEdge_first_fedge_set, + (char *)ViewEdge_first_fedge_doc, NULL}, + {(char *)"last_fedge", (getter)ViewEdge_last_fedge_get, (setter)ViewEdge_last_fedge_set, + (char *)ViewEdge_last_fedge_doc, NULL}, + {(char *)"viewshape", (getter)ViewEdge_viewshape_get, (setter)ViewEdge_viewshape_set, + (char *)ViewEdge_viewshape_doc, NULL}, + {(char *)"occludee", (getter)ViewEdge_occludee_get, (setter)ViewEdge_occludee_set, + (char *)ViewEdge_occludee_doc, NULL}, {(char *)"is_closed", (getter)ViewEdge_is_closed_get, (setter)NULL, (char *)ViewEdge_is_closed_doc, NULL}, {(char *)"id", (getter)ViewEdge_id_get, (setter)ViewEdge_id_set, (char *)ViewEdge_id_doc, NULL}, {(char *)"nature", (getter)ViewEdge_nature_get, (setter)ViewEdge_nature_set, (char *)ViewEdge_nature_doc, NULL}, {(char *)"qi", (getter)ViewEdge_qi_get, (setter)ViewEdge_qi_set, (char *)ViewEdge_qi_doc, NULL}, - {(char *)"chaining_time_stamp", (getter)ViewEdge_chaining_time_stamp_get, (setter)ViewEdge_chaining_time_stamp_set, (char *)ViewEdge_chaining_time_stamp_doc, NULL}, + {(char *)"chaining_time_stamp", (getter)ViewEdge_chaining_time_stamp_get, (setter)ViewEdge_chaining_time_stamp_set, + (char *)ViewEdge_chaining_time_stamp_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; 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 64e65417579..4a4e0c06fa8 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp @@ -106,7 +106,7 @@ PyDoc_STRVAR(Chain_push_viewedge_back_doc, " processed.\n" " :type orientation: bool"); -static PyObject * Chain_push_viewedge_back(BPy_Chain *self, PyObject *args, PyObject *kwds) +static PyObject *Chain_push_viewedge_back(BPy_Chain *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"viewedge", "orientation", NULL}; PyObject *obj1 = 0, *obj2 = 0; @@ -133,7 +133,7 @@ PyDoc_STRVAR(Chain_push_viewedge_front_doc, " processed.\n" " :type orientation: bool"); -static PyObject * Chain_push_viewedge_front(BPy_Chain *self, PyObject *args, PyObject *kwds) +static PyObject *Chain_push_viewedge_front(BPy_Chain *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"viewedge", "orientation", NULL}; PyObject *obj1 = 0, *obj2 = 0; @@ -149,9 +149,11 @@ static PyObject * Chain_push_viewedge_front(BPy_Chain *self, PyObject *args, PyO Py_RETURN_NONE; } -static PyMethodDef BPy_Chain_methods[] = { - {"push_viewedge_back", (PyCFunction)Chain_push_viewedge_back, METH_VARARGS | METH_KEYWORDS, Chain_push_viewedge_back_doc}, - {"push_viewedge_front", (PyCFunction)Chain_push_viewedge_front, METH_VARARGS | METH_KEYWORDS, Chain_push_viewedge_front_doc}, +static PyMethodDef BPy_Chain_methods[] = { + {"push_viewedge_back", (PyCFunction)Chain_push_viewedge_back, METH_VARARGS | METH_KEYWORDS, + Chain_push_viewedge_back_doc}, + {"push_viewedge_front", (PyCFunction)Chain_push_viewedge_front, METH_VARARGS | METH_KEYWORDS, + Chain_push_viewedge_front_doc}, {NULL, NULL, 0, NULL} }; 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 f50abdbe44d..183e86a237e 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -284,7 +284,7 @@ static PyObject *FEdgeSharp_material_index_right_get(BPy_FEdgeSharp *self, void static int FEdgeSharp_material_index_right_set(BPy_FEdgeSharp *self, PyObject *value, void *UNUSED(closure)) { unsigned int i = PyLong_AsUnsignedLong(value); - if(PyErr_Occurred()) + if (PyErr_Occurred()) return -1; self->fes->setaFrsMaterialIndex(i); return 0; @@ -303,7 +303,7 @@ static PyObject *FEdgeSharp_material_index_left_get(BPy_FEdgeSharp *self, void * static int FEdgeSharp_material_index_left_set(BPy_FEdgeSharp *self, PyObject *value, void *UNUSED(closure)) { unsigned int i = PyLong_AsUnsignedLong(value); - if(PyErr_Occurred()) + if (PyErr_Occurred()) return -1; self->fes->setbFrsMaterialIndex(i); return 0; @@ -344,7 +344,7 @@ static PyObject *FEdgeSharp_face_mark_right_get(BPy_FEdgeSharp *self, void *UNUS 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; @@ -362,21 +362,31 @@ static PyObject *FEdgeSharp_face_mark_left_get(BPy_FEdgeSharp *self, void *UNUSE 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; } static PyGetSetDef BPy_FEdgeSharp_getseters[] = { - {(char *)"normal_right", (getter)FEdgeSharp_normal_right_get, (setter)FEdgeSharp_normal_right_set, (char *)FEdgeSharp_normal_right_doc, NULL}, - {(char *)"normal_left", (getter)FEdgeSharp_normal_left_get, (setter)FEdgeSharp_normal_left_set, (char *)FEdgeSharp_normal_left_doc, NULL}, - {(char *)"material_index_right", (getter)FEdgeSharp_material_index_right_get, (setter)FEdgeSharp_material_index_right_set, (char *)FEdgeSharp_material_index_right_doc, NULL}, - {(char *)"material_index_left", (getter)FEdgeSharp_material_index_left_get, (setter)FEdgeSharp_material_index_left_set, (char *)FEdgeSharp_material_index_left_doc, NULL}, - {(char *)"material_right", (getter)FEdgeSharp_material_right_get, (setter)NULL, (char *)FEdgeSharp_material_right_doc, NULL}, - {(char *)"material_left", (getter)FEdgeSharp_material_left_get, (setter)NULL, (char *)FEdgeSharp_material_left_doc, NULL}, - {(char *)"face_mark_right", (getter)FEdgeSharp_face_mark_right_get, (setter)FEdgeSharp_face_mark_right_set, (char *)FEdgeSharp_face_mark_right_doc, NULL}, - {(char *)"face_mark_left", (getter)FEdgeSharp_face_mark_left_get, (setter)FEdgeSharp_face_mark_left_set, (char *)FEdgeSharp_face_mark_left_doc, NULL}, + {(char *)"normal_right", (getter)FEdgeSharp_normal_right_get, (setter)FEdgeSharp_normal_right_set, + (char *)FEdgeSharp_normal_right_doc, NULL}, + {(char *)"normal_left", (getter)FEdgeSharp_normal_left_get, (setter)FEdgeSharp_normal_left_set, + (char *)FEdgeSharp_normal_left_doc, NULL}, + {(char *)"material_index_right", (getter)FEdgeSharp_material_index_right_get, + (setter)FEdgeSharp_material_index_right_set, + (char *)FEdgeSharp_material_index_right_doc, NULL}, + {(char *)"material_index_left", (getter)FEdgeSharp_material_index_left_get, + (setter)FEdgeSharp_material_index_left_set, + (char *)FEdgeSharp_material_index_left_doc, NULL}, + {(char *)"material_right", (getter)FEdgeSharp_material_right_get, (setter)NULL, + (char *)FEdgeSharp_material_right_doc, NULL}, + {(char *)"material_left", (getter)FEdgeSharp_material_left_get, (setter)NULL, + (char *)FEdgeSharp_material_left_doc, NULL}, + {(char *)"face_mark_right", (getter)FEdgeSharp_face_mark_right_get, (setter)FEdgeSharp_face_mark_right_set, + (char *)FEdgeSharp_face_mark_right_doc, NULL}, + {(char *)"face_mark_left", (getter)FEdgeSharp_face_mark_left_get, (setter)FEdgeSharp_face_mark_left_set, + (char *)FEdgeSharp_face_mark_left_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; 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 a03c4a2d0bd..14b9b66b35c 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -193,7 +193,7 @@ static PyObject *FEdgeSmooth_material_index_get(BPy_FEdgeSmooth *self, void *UNU static int FEdgeSmooth_material_index_set(BPy_FEdgeSmooth *self, PyObject *value, void *UNUSED(closure)) { unsigned int i = PyLong_AsUnsignedLong(value); - if(PyErr_Occurred()) + if (PyErr_Occurred()) return -1; self->fes->setFrsMaterialIndex(i); return 0; @@ -221,17 +221,20 @@ 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; } static PyGetSetDef BPy_FEdgeSmooth_getseters[] = { - {(char *)"normal", (getter)FEdgeSmooth_normal_get, (setter)FEdgeSmooth_normal_set, (char *)FEdgeSmooth_normal_doc, NULL}, - {(char *)"material_index", (getter)FEdgeSmooth_material_index_get, (setter)FEdgeSmooth_material_index_set, (char *)FEdgeSmooth_material_index_doc, NULL}, + {(char *)"normal", (getter)FEdgeSmooth_normal_get, (setter)FEdgeSmooth_normal_set, + (char *)FEdgeSmooth_normal_doc, NULL}, + {(char *)"material_index", (getter)FEdgeSmooth_material_index_get, (setter)FEdgeSmooth_material_index_set, + (char *)FEdgeSmooth_material_index_doc, NULL}, {(char *)"material", (getter)FEdgeSmooth_material_get, (setter)NULL, (char *)FEdgeSmooth_material_doc, NULL}, - {(char *)"face_mark", (getter)FEdgeSmooth_face_mark_get, (setter)FEdgeSmooth_face_mark_set, (char *)FEdgeSmooth_face_mark_doc, NULL}, + {(char *)"face_mark", (getter)FEdgeSmooth_face_mark_get, (setter)FEdgeSmooth_face_mark_set, + (char *)FEdgeSmooth_face_mark_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index 134dfe3d696..3f245692ac7 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -102,7 +102,7 @@ static int AdjacencyIterator_init(BPy_AdjacencyIterator *self, PyObject *args, P return 0; } -static PyObject * AdjacencyIterator_iternext(BPy_AdjacencyIterator *self) +static PyObject *AdjacencyIterator_iternext(BPy_AdjacencyIterator *self) { if (self->a_it->isEnd()) { PyErr_SetNone(PyExc_StopIteration); @@ -140,7 +140,8 @@ static PyObject *AdjacencyIterator_is_incoming_get(BPy_AdjacencyIterator *self, } static PyGetSetDef BPy_AdjacencyIterator_getseters[] = { - {(char *)"is_incoming", (getter)AdjacencyIterator_is_incoming_get, (setter)NULL, (char *)AdjacencyIterator_is_incoming_doc, NULL}, + {(char *)"is_incoming", (getter)AdjacencyIterator_is_incoming_get, (setter)NULL, + (char *)AdjacencyIterator_is_incoming_doc, NULL}, {(char *)"object", (getter)AdjacencyIterator_object_get, (setter)NULL, (char *)AdjacencyIterator_object_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index 9b103035559..987075024f0 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -45,7 +45,8 @@ extern "C" { //------------------------INSTANCE METHODS ---------------------------------- PyDoc_STRVAR(ChainPredicateIterator_doc, -"Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator` > :class:`ChainingIterator` > :class:`ChainPredicateIterator`\n" +"Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator` > :class:`ChainingIterator` > " +":class:`ChainPredicateIterator`\n" "\n" "A \"generic\" user-controlled ViewEdge iterator. This iterator is in\n" "particular built from a unary predicate and a binary predicate.\n" @@ -76,7 +77,8 @@ PyDoc_STRVAR(ChainPredicateIterator_doc, " ViewVertex of begin. \n" " :type orientation: bool\n" "\n" -".. method:: __init__(upred, bpred, restrict_to_selection=True, restrict_to_unvisited=True, begin=None, orientation=True)\n" +".. method:: __init__(upred, bpred, restrict_to_selection=True, restrict_to_unvisited=True, begin=None, " +"orientation=True)\n" "\n" " Builds a ChainPredicateIterator from a unary predicate, a binary\n" " predicate, a starting ViewEdge and its orientation.\n" @@ -118,7 +120,8 @@ static int check_begin(PyObject *obj, void *v) static int ChainPredicateIterator_init(BPy_ChainPredicateIterator *self, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"brother", NULL}; - static const char *kwlist_2[] = {"upred", "bpred", "restrict_to_selection", "restrict_to_unvisited", "begin", "orientation", NULL}; + static const char *kwlist_2[] = {"upred", "bpred", "restrict_to_selection", "restrict_to_unvisited", "begin", + "orientation", NULL}; static const char *kwlist_3[] = {"restrict_to_selection", "restrict_to_unvisited", "begin", "orientation", NULL}; PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0, *obj5 = 0, *obj6 = 0; @@ -137,7 +140,8 @@ static int ChainPredicateIterator_init(BPy_ChainPredicateIterator *self, PyObjec bool restrict_to_unvisited = (!obj4) ? true : bool_from_PyBool(obj4); ViewEdge *begin = (!obj5 || obj5 == Py_None) ? NULL : ((BPy_ViewEdge *)obj5)->ve; bool orientation = (!obj6) ? true : bool_from_PyBool(obj6); - self->cp_it = new ChainPredicateIterator(*up1D, *bp1D, restrict_to_selection, restrict_to_unvisited, begin, orientation); + self->cp_it = new ChainPredicateIterator(*up1D, *bp1D, restrict_to_selection, restrict_to_unvisited, begin, + orientation); self->upred = obj1; self->bpred = obj2; Py_INCREF(self->upred); @@ -155,7 +159,8 @@ static int ChainPredicateIterator_init(BPy_ChainPredicateIterator *self, PyObjec self->cp_it = new ChainPredicateIterator(restrict_to_selection, restrict_to_unvisited, begin, orientation); self->upred = NULL; self->bpred = NULL; - } else { + } + else { PyErr_SetString(PyExc_TypeError, "invalid argument(s)"); return -1; } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h index 90bc9123694..c69d1ad1a7b 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h @@ -47,7 +47,8 @@ extern "C" { extern PyTypeObject ChainPredicateIterator_Type; -#define BPy_ChainPredicateIterator_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ChainPredicateIterator_Type)) +#define BPy_ChainPredicateIterator_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ChainPredicateIterator_Type)) /*---------------------------Python BPy_ChainPredicateIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index 8d7e19b9ba5..80b417d5e74 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -46,7 +46,8 @@ extern "C" { // ChainSilhouetteIterator (const ChainSilhouetteIterator &brother) PyDoc_STRVAR(ChainSilhouetteIterator_doc, -"Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator` > :class:`ChainingIterator` > :class:`ChainSilhouetteIterator`\n" +"Class hierarchy: :class:`Iterator` > :class:`ViewEdgeIterator` > :class:`ChainingIterator` > " +":class:`ChainSilhouetteIterator`\n" "\n" "A ViewEdge Iterator used to follow ViewEdges the most naturally. For\n" "example, it will follow visible ViewEdges of same nature. As soon, as\n" diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h index 8c6f2983d3e..acc410b64a6 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h @@ -47,7 +47,8 @@ extern "C" { extern PyTypeObject ChainSilhouetteIterator_Type; -#define BPy_ChainSilhouetteIterator_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ChainSilhouetteIterator_Type)) +#define BPy_ChainSilhouetteIterator_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ChainSilhouetteIterator_Type)) /*---------------------------Python BPy_ChainSilhouetteIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index 701f6871cc1..d193c0aa70b 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -215,8 +215,10 @@ static PyObject *ChainingIterator_is_incrementing_get(BPy_ChainingIterator *self static PyGetSetDef BPy_ChainingIterator_getseters[] = { {(char *)"object", (getter)ChainingIterator_object_get, (setter)NULL, (char *)ChainingIterator_object_doc, NULL}, - {(char *)"next_vertex", (getter)ChainingIterator_next_vertex_get, (setter)NULL, (char *)ChainingIterator_next_vertex_doc, NULL}, - {(char *)"is_incrementing", (getter)ChainingIterator_is_incrementing_get, (setter)NULL, (char *)ChainingIterator_is_incrementing_doc, NULL}, + {(char *)"next_vertex", (getter)ChainingIterator_next_vertex_get, (setter)NULL, + (char *)ChainingIterator_next_vertex_doc, NULL}, + {(char *)"is_incrementing", (getter)ChainingIterator_is_incrementing_get, (setter)NULL, + (char *)ChainingIterator_is_incrementing_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index 60a2bb6bc79..07d74bf2264 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -128,7 +128,8 @@ static PyObject *CurvePointIterator_u_get(BPy_CurvePointIterator *self, void *UN } static PyGetSetDef BPy_CurvePointIterator_getseters[] = { - {(char *)"object", (getter)CurvePointIterator_object_get, (setter)NULL, (char *)CurvePointIterator_object_doc, NULL}, + {(char *)"object", (getter)CurvePointIterator_object_get, (setter)NULL, + (char *)CurvePointIterator_object_doc, NULL}, {(char *)"t", (getter)CurvePointIterator_t_get, (setter)NULL, (char *)CurvePointIterator_t_doc, NULL}, {(char *)"u", (getter)CurvePointIterator_u_get, (setter)NULL, (char *)CurvePointIterator_u_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index 1e5598ddd1c..f589802b0a5 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -98,7 +98,7 @@ static int Interface0DIterator_init(BPy_Interface0DIterator *self, PyObject *arg return 0; } -static PyObject * Interface0DIterator_iternext(BPy_Interface0DIterator *self) +static PyObject *Interface0DIterator_iternext(BPy_Interface0DIterator *self) { Interface0D *if0D; @@ -154,7 +154,8 @@ static PyObject *Interface0DIterator_u_get(BPy_Interface0DIterator *self, void * } static PyGetSetDef BPy_Interface0DIterator_getseters[] = { - {(char *)"object", (getter)Interface0DIterator_object_get, (setter)NULL, (char *)Interface0DIterator_object_doc, NULL}, + {(char *)"object", (getter)Interface0DIterator_object_get, (setter)NULL, + (char *)Interface0DIterator_object_doc, NULL}, {(char *)"t", (getter)Interface0DIterator_t_get, (setter)NULL, (char *)Interface0DIterator_t_doc, NULL}, {(char *)"u", (getter)Interface0DIterator_u_get, (setter)NULL, (char *)Interface0DIterator_u_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 6a03bd47904..889e29b6f42 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -84,7 +84,7 @@ static int StrokeVertexIterator_init(BPy_StrokeVertexIterator *self, PyObject *a return 0; } -static PyObject * StrokeVertexIterator_iternext(BPy_StrokeVertexIterator *self) +static PyObject *StrokeVertexIterator_iternext(BPy_StrokeVertexIterator *self) { StrokeVertex *sv; @@ -145,7 +145,8 @@ static PyObject *StrokeVertexIterator_u_get(BPy_StrokeVertexIterator *self, void } static PyGetSetDef BPy_StrokeVertexIterator_getseters[] = { - {(char *)"object", (getter)StrokeVertexIterator_object_get, (setter)NULL, (char *)StrokeVertexIterator_object_doc, NULL}, + {(char *)"object", (getter)StrokeVertexIterator_object_get, (setter)NULL, + (char *)StrokeVertexIterator_object_doc, NULL}, {(char *)"t", (getter)StrokeVertexIterator_t_get, (setter)NULL, (char *)StrokeVertexIterator_t_doc, NULL}, {(char *)"u", (getter)StrokeVertexIterator_u_get, (setter)NULL, (char *)StrokeVertexIterator_u_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index 9e709b12a74..0a0f5d249a4 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -115,7 +115,8 @@ static PyObject *ViewEdgeIterator_change_orientation(BPy_ViewEdgeIterator *self) } static PyMethodDef BPy_ViewEdgeIterator_methods[] = { - {"change_orientation", (PyCFunction) ViewEdgeIterator_change_orientation, METH_NOARGS, ViewEdgeIterator_change_orientation_doc}, + {"change_orientation", (PyCFunction) ViewEdgeIterator_change_orientation, METH_NOARGS, + ViewEdgeIterator_change_orientation_doc}, {NULL, NULL, 0, NULL} }; @@ -195,7 +196,7 @@ static PyObject *ViewEdgeIterator_begin_get(BPy_ViewEdgeIterator *self, void *UN static int ViewEdgeIterator_begin_set(BPy_ViewEdgeIterator *self, PyObject *value, void *UNUSED(closure)) { - if(!BPy_ViewEdge_Check(value)) { + if (!BPy_ViewEdge_Check(value)) { PyErr_SetString(PyExc_TypeError, "value must be a ViewEdge"); return -1; } @@ -205,9 +206,12 @@ static int ViewEdgeIterator_begin_set(BPy_ViewEdgeIterator *self, PyObject *valu static PyGetSetDef BPy_ViewEdgeIterator_getseters[] = { {(char *)"object", (getter)ViewEdgeIterator_object_get, (setter)NULL, (char *)ViewEdgeIterator_object_doc, NULL}, - {(char *)"current_edge", (getter)ViewEdgeIterator_current_edge_get, (setter)ViewEdgeIterator_current_edge_set, (char *)ViewEdgeIterator_current_edge_doc, NULL}, - {(char *)"orientation", (getter)ViewEdgeIterator_orientation_get, (setter)ViewEdgeIterator_orientation_set, (char *)ViewEdgeIterator_orientation_doc, NULL}, - {(char *)"begin", (getter)ViewEdgeIterator_begin_get, (setter)ViewEdgeIterator_begin_set, (char *)ViewEdgeIterator_begin_doc, NULL}, + {(char *)"current_edge", (getter)ViewEdgeIterator_current_edge_get, (setter)ViewEdgeIterator_current_edge_set, + (char *)ViewEdgeIterator_current_edge_doc, NULL}, + {(char *)"orientation", (getter)ViewEdgeIterator_orientation_get, (setter)ViewEdgeIterator_orientation_set, + (char *)ViewEdgeIterator_orientation_doc, NULL}, + {(char *)"begin", (getter)ViewEdgeIterator_begin_get, (setter)ViewEdgeIterator_begin_set, + (char *)ViewEdgeIterator_begin_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index 84467466526..d92f3dd2d49 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -76,7 +76,7 @@ static int orientedViewEdgeIterator_init(BPy_orientedViewEdgeIterator *self, PyO return 0; } -static PyObject * orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator *self) +static PyObject *orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator *self) { ViewVertex::directedViewEdge *dve; @@ -114,7 +114,8 @@ static PyObject *orientedViewEdgeIterator_object_get(BPy_orientedViewEdgeIterato } static PyGetSetDef BPy_orientedViewEdgeIterator_getseters[] = { - {(char *)"object", (getter)orientedViewEdgeIterator_object_get, (setter)NULL, (char *)orientedViewEdgeIterator_object_doc, NULL}, + {(char *)"object", (getter)orientedViewEdgeIterator_object_get, (setter)NULL, + (char *)orientedViewEdgeIterator_object_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h index 84451a29347..0d2846ce158 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h @@ -47,7 +47,8 @@ extern "C" { extern PyTypeObject orientedViewEdgeIterator_Type; -#define BPy_orientedViewEdgeIterator_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&orientedViewEdgeIterator_Type)) +#define BPy_orientedViewEdgeIterator_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&orientedViewEdgeIterator_Type)) /*---------------------------Python BPy_orientedViewEdgeIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp index de88d79366c..7ff97e6cc34 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp @@ -61,7 +61,7 @@ static char BackboneStretcherShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int BackboneStretcherShader___init__(BPy_BackboneStretcherShader* self, PyObject *args, PyObject *kwds) +static int BackboneStretcherShader___init__(BPy_BackboneStretcherShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"amount", NULL}; float f = 2.0; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h index f906f0cb61a..053af43f166 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject BackboneStretcherShader_Type; -#define BPy_BackboneStretcherShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&BackboneStretcherShader_Type)) +#define BPy_BackboneStretcherShader_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&BackboneStretcherShader_Type)) /*---------------------------Python BPy_BackboneStretcherShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp index 266c2d53efb..9e398dba42e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp @@ -63,7 +63,7 @@ static char BezierCurveShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int BezierCurveShader___init__(BPy_BezierCurveShader* self, PyObject *args, PyObject *kwds) +static int BezierCurveShader___init__(BPy_BezierCurveShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"error", NULL}; float f = 4.0; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp index e60e73ec82d..51efd94e324 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp @@ -79,7 +79,7 @@ static int convert_v2(PyObject *obj, void *v) return float_array_from_PyObject(obj, (float *)v, 2); } -static int CalligraphicShader___init__(BPy_CalligraphicShader* self, PyObject *args, PyObject *kwds) +static int CalligraphicShader___init__(BPy_CalligraphicShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"thickness_min", "thickness_max", "orientation", "clamp", NULL}; double d1, d2; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp index 27ac939a391..6119756f1cd 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp @@ -62,7 +62,7 @@ static char ColorNoiseShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int ColorNoiseShader___init__(BPy_ColorNoiseShader* self, PyObject *args, PyObject *kwds) +static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"amplitude", "period", NULL}; float f1, f2; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp index b9010984a83..8e92bbc908c 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp @@ -66,7 +66,7 @@ static char ColorVariationPatternShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int ColorVariationPatternShader___init__(BPy_ColorVariationPatternShader* self, PyObject *args, PyObject *kwds) +static int ColorVariationPatternShader___init__(BPy_ColorVariationPatternShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pattern_name", "stretch", NULL}; const char *s; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h index be70938aae6..f72b4b54abf 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject ColorVariationPatternShader_Type; -#define BPy_ColorVariationPatternShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ColorVariationPatternShader_Type)) +#define BPy_ColorVariationPatternShader_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ColorVariationPatternShader_Type)) /*---------------------------Python BPy_ColorVariationPatternShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp index 90e9938368a..627f2a5423c 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp @@ -66,7 +66,7 @@ static char ConstantColorShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int ConstantColorShader___init__(BPy_ConstantColorShader* self, PyObject *args, PyObject *kwds) +static int ConstantColorShader___init__(BPy_ConstantColorShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"red", "green", "blue", "alpha", NULL}; float f1, f2, f3, f4 = 1.0; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp index dddb79960a0..0b2af7c3856 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp @@ -60,7 +60,7 @@ static char ConstantThicknessShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int ConstantThicknessShader___init__(BPy_ConstantThicknessShader* self, PyObject *args, PyObject *kwds) +static int ConstantThicknessShader___init__(BPy_ConstantThicknessShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"thickness", NULL}; float f; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h index 686d52f0d03..c8c22516cf1 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject ConstantThicknessShader_Type; -#define BPy_ConstantThicknessShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ConstantThicknessShader_Type)) +#define BPy_ConstantThicknessShader_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ConstantThicknessShader_Type)) /*---------------------------Python BPy_ConstantThicknessShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp index f636074def2..c00897100eb 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp @@ -66,7 +66,8 @@ static char ConstrainedIncreasingThicknessShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int ConstrainedIncreasingThicknessShader___init__(BPy_ConstrainedIncreasingThicknessShader* self, PyObject *args, PyObject *kwds) +static int ConstrainedIncreasingThicknessShader___init__(BPy_ConstrainedIncreasingThicknessShader *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"thickness_min", "thickness_max", "ratio", NULL}; float f1, f2, f3; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h index f36489459be..104b57542b9 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject ConstrainedIncreasingThicknessShader_Type; -#define BPy_ConstrainedIncreasingThicknessShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ConstrainedIncreasingThicknessShader_Type)) +#define BPy_ConstrainedIncreasingThicknessShader_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ConstrainedIncreasingThicknessShader_Type)) /*---------------------------Python BPy_ConstrainedIncreasingThicknessShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp index 8d8838f88cb..37b53a496ec 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp @@ -68,7 +68,7 @@ static char GuidingLinesShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int GuidingLinesShader___init__(BPy_GuidingLinesShader* self, PyObject *args, PyObject *kwds) +static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"offset", NULL}; float f; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp index 99c71c1693b..9db4290e511 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp @@ -76,7 +76,7 @@ static char IncreasingColorShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int IncreasingColorShader___init__(BPy_IncreasingColorShader* self, PyObject *args, PyObject *kwds) +static int IncreasingColorShader___init__(BPy_IncreasingColorShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"red_min", "green_min", "blue_min", "alpha_min", "red_max", "green_max", "blue_max", "alpha_max", NULL}; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp index f0974dd49f7..220fccc83d4 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp @@ -66,7 +66,7 @@ static char IncreasingThicknessShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader* self, PyObject *args, PyObject *kwds) +static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"thickness_A", "thickness_B", NULL}; float f1, f2; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h index ee4d370aa39..e162460a567 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject IncreasingThicknessShader_Type; -#define BPy_IncreasingThicknessShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&IncreasingThicknessShader_Type)) +#define BPy_IncreasingThicknessShader_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&IncreasingThicknessShader_Type)) /*---------------------------Python BPy_IncreasingThicknessShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp index ccb703d3525..908040cd0df 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp @@ -67,7 +67,7 @@ static char PolygonalizationShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int PolygonalizationShader___init__(BPy_PolygonalizationShader* self, PyObject *args, PyObject *kwds) +static int PolygonalizationShader___init__(BPy_PolygonalizationShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"error", NULL}; float f; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h index a79eab09743..ed8678143d3 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject PolygonalizationShader_Type; -#define BPy_PolygonalizationShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&PolygonalizationShader_Type)) +#define BPy_PolygonalizationShader_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&PolygonalizationShader_Type)) /*---------------------------Python BPy_PolygonalizationShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp index b2f9011064f..744ae057147 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp @@ -60,7 +60,7 @@ static char SamplingShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int SamplingShader___init__(BPy_SamplingShader* self, PyObject *args, PyObject *kwds) +static int SamplingShader___init__(BPy_SamplingShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"sampling", NULL}; float f; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp index 7c10a09ffec..d6b0139d315 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp @@ -80,7 +80,7 @@ static char SmoothingShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int SmoothingShader___init__(BPy_SmoothingShader* self, PyObject *args, PyObject *kwds) +static int SmoothingShader___init__(BPy_SmoothingShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"num_iterations", "factor_point", "factor_curvature", "factor_curvature_difference", "aniso_point", "aniso_normal", diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp index 2193f8d2de3..3fdb5196818 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp @@ -70,7 +70,7 @@ static char SpatialNoiseShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int SpatialNoiseShader___init__(BPy_SpatialNoiseShader* self, PyObject *args, PyObject *kwds) +static int SpatialNoiseShader___init__(BPy_SpatialNoiseShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"amount", "scale", "num_octaves", "smooth", "pure_random", NULL}; float f1, f2; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp index 933af8992e5..f83aa819c12 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp @@ -83,7 +83,7 @@ static char StrokeTextureShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int StrokeTextureShader___init__(BPy_StrokeTextureShader* self, PyObject *args, PyObject *kwds) +static int StrokeTextureShader___init__(BPy_StrokeTextureShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"texture_file", "medium_type", "tips", NULL}; const char *s1; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp index 09c92547f24..3b4027e900d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp @@ -76,7 +76,7 @@ static char TextureAssignerShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int TextureAssignerShader___init__(BPy_TextureAssignerShader* self, PyObject *args, PyObject *kwds) +static int TextureAssignerShader___init__(BPy_TextureAssignerShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"preset", NULL}; int i; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp index db2b6e7fba6..3d6b584cf2d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp @@ -62,7 +62,7 @@ static char ThicknessNoiseShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int ThicknessNoiseShader___init__(BPy_ThicknessNoiseShader* self, PyObject *args, PyObject *kwds) +static int ThicknessNoiseShader___init__(BPy_ThicknessNoiseShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"amplitude", "period", NULL}; float f1, f2; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp index 57626e641fd..5f38277b5b4 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp @@ -70,7 +70,8 @@ static char ThicknessVariationPatternShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int ThicknessVariationPatternShader___init__(BPy_ThicknessVariationPatternShader* self, PyObject *args, PyObject *kwds) +static int ThicknessVariationPatternShader___init__(BPy_ThicknessVariationPatternShader *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pattern_name", "thickness_min", "thickness_max", "stretch", NULL}; const char *s1; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h index 469a78d8f1f..3556df1a4ae 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject ThicknessVariationPatternShader_Type; -#define BPy_ThicknessVariationPatternShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ThicknessVariationPatternShader_Type)) +#define BPy_ThicknessVariationPatternShader_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ThicknessVariationPatternShader_Type)) /*---------------------------Python BPy_ThicknessVariationPatternShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp index 8178b0b71ed..c5e8b0518fc 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp @@ -61,7 +61,7 @@ static char TipRemoverShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int TipRemoverShader___init__(BPy_TipRemoverShader* self, PyObject *args, PyObject *kwds) +static int TipRemoverShader___init__(BPy_TipRemoverShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"tip_length", NULL}; double d; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp index 94845c13910..b45b52902bf 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp @@ -60,7 +60,7 @@ static char fstreamShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int fstreamShader___init__(BPy_fstreamShader* self, PyObject *args, PyObject *kwds) +static int fstreamShader___init__(BPy_fstreamShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"filename", NULL}; const char *s; diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp index 634852b0cd7..aa26f6e30a5 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp @@ -57,7 +57,7 @@ static char streamShader___doc__[] = " :arg stroke: A Stroke object.\n" " :type stroke: :class:`Stroke`\n"; -static int streamShader___init__(BPy_streamShader* self, PyObject *args, PyObject *kwds) +static int streamShader___init__(BPy_streamShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index 586f0cdd15a..e8507f729cb 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -130,7 +130,7 @@ static char UnaryFunction0DDouble___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -141,19 +141,19 @@ static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self, PyObj return 0; } -static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble* self) +static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble *self) { if (self->uf0D_double) delete self->uf0D_double; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DDouble___repr__(BPy_UnaryFunction0DDouble* self) +static PyObject *UnaryFunction0DDouble___repr__(BPy_UnaryFunction0DDouble *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_double); } -static PyObject * UnaryFunction0DDouble___call__(BPy_UnaryFunction0DDouble *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DDouble___call__(BPy_UnaryFunction0DDouble *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index ccd785a1aa7..de1a5ebe9f3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -74,7 +74,7 @@ static char UnaryFunction0DEdgeNature___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -85,19 +85,20 @@ static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* sel return 0; } -static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature* self) +static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature *self) { if (self->uf0D_edgenature) delete self->uf0D_edgenature; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature* self) +static PyObject *UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_edgenature); } -static PyObject * UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNature *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNature *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h index 521df1af98c..8c4c71e634a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h @@ -46,7 +46,8 @@ extern "C" { extern PyTypeObject UnaryFunction0DEdgeNature_Type; -#define BPy_UnaryFunction0DEdgeNature_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DEdgeNature_Type)) +#define BPy_UnaryFunction0DEdgeNature_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DEdgeNature_Type)) /*---------------------------Python BPy_UnaryFunction0DEdgeNature structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index fd80304e8ef..c191c691686 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -104,7 +104,7 @@ static char UnaryFunction0DFloat___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -115,19 +115,19 @@ static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self, PyObjec return 0; } -static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat* self) +static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat *self) { if (self->uf0D_float) delete self->uf0D_float; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DFloat___repr__(BPy_UnaryFunction0DFloat* self) +static PyObject *UnaryFunction0DFloat___repr__(BPy_UnaryFunction0DFloat *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_float); } -static PyObject * UnaryFunction0DFloat___call__(BPy_UnaryFunction0DFloat *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DFloat___call__(BPy_UnaryFunction0DFloat *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index 193f6d82acd..d6374208649 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -74,7 +74,7 @@ static char UnaryFunction0DId___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -85,19 +85,19 @@ static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self, PyObject *arg return 0; } -static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId* self) +static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId *self) { if (self->uf0D_id) delete self->uf0D_id; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DId___repr__(BPy_UnaryFunction0DId* self) +static PyObject *UnaryFunction0DId___repr__(BPy_UnaryFunction0DId *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_id); } -static PyObject * UnaryFunction0DId___call__(BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DId___call__(BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index dfef5385030..67ff21d41e5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -74,7 +74,7 @@ static char UnaryFunction0DMaterial___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -85,19 +85,19 @@ static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self, P return 0; } -static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial* self) +static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial *self) { if (self->uf0D_material) delete self->uf0D_material; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DMaterial___repr__(BPy_UnaryFunction0DMaterial* self) +static PyObject *UnaryFunction0DMaterial___repr__(BPy_UnaryFunction0DMaterial *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_material); } -static PyObject * UnaryFunction0DMaterial___call__(BPy_UnaryFunction0DMaterial *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DMaterial___call__(BPy_UnaryFunction0DMaterial *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h index 448be5ed2e3..c805ca090d1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h @@ -46,7 +46,8 @@ extern "C" { extern PyTypeObject UnaryFunction0DMaterial_Type; -#define BPy_UnaryFunction0DMaterial_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DMaterial_Type)) +#define BPy_UnaryFunction0DMaterial_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DMaterial_Type)) /*---------------------------Python BPy_UnaryFunction0DMaterial structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index b409df84188..b6f0ba44660 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -74,7 +74,7 @@ static char UnaryFunction0DUnsigned___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -85,19 +85,19 @@ static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self, P return 0; } -static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned* self) +static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned *self) { if (self->uf0D_unsigned) delete self->uf0D_unsigned; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned* self) +static PyObject *UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_unsigned); } -static PyObject * UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h index e51b97fcfbb..21b5d2d835c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject UnaryFunction0DUnsigned_Type; -#define BPy_UnaryFunction0DUnsigned_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DUnsigned_Type)) +#define BPy_UnaryFunction0DUnsigned_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DUnsigned_Type)) /*---------------------------Python BPy_UnaryFunction0DUnsigned structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index d3d1e78b331..f672919b194 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -80,7 +80,7 @@ static char UnaryFunction0DVec2f___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -91,19 +91,19 @@ static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self, PyObjec return 0; } -static void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f* self) +static void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f *self) { if (self->uf0D_vec2f) delete self->uf0D_vec2f; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DVec2f___repr__(BPy_UnaryFunction0DVec2f* self) +static PyObject *UnaryFunction0DVec2f___repr__(BPy_UnaryFunction0DVec2f *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_vec2f); } -static PyObject * UnaryFunction0DVec2f___call__(BPy_UnaryFunction0DVec2f *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DVec2f___call__(BPy_UnaryFunction0DVec2f *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index 4923e607d31..fc6c56457f7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -74,7 +74,7 @@ static char UnaryFunction0DVec3f___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -85,19 +85,19 @@ static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self, PyObjec return 0; } -static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f* self) +static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f *self) { if (self->uf0D_vec3f) delete self->uf0D_vec3f; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DVec3f___repr__(BPy_UnaryFunction0DVec3f* self) +static PyObject *UnaryFunction0DVec3f___repr__(BPy_UnaryFunction0DVec3f *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_vec3f); } -static PyObject * UnaryFunction0DVec3f___call__(BPy_UnaryFunction0DVec3f *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DVec3f___call__(BPy_UnaryFunction0DVec3f *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 253ae744250..cf35b6168bc 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -75,7 +75,8 @@ static char UnaryFunction0DVectorViewShape___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -86,19 +87,20 @@ static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorView return 0; } -static void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVectorViewShape* self) +static void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVectorViewShape *self) { if (self->uf0D_vectorviewshape) delete self->uf0D_vectorviewshape; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DVectorViewShape___repr__(BPy_UnaryFunction0DVectorViewShape* self) +static PyObject *UnaryFunction0DVectorViewShape___repr__(BPy_UnaryFunction0DVectorViewShape *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_vectorviewshape); } -static PyObject * UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVectorViewShape *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVectorViewShape *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; @@ -119,11 +121,12 @@ static PyObject * UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVec } PyObject *list = PyList_New(0); PyObject *item; - for(unsigned int i = 0; i < self->uf0D_vectorviewshape->result.size(); i++) { + for (unsigned int i = 0; i < self->uf0D_vectorviewshape->result.size(); i++) { ViewShape *v = self->uf0D_vectorviewshape->result[i]; if (v) { item = BPy_ViewShape_from_ViewShape(*v); - } else { + } + else { item = Py_None; Py_INCREF(item); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h index ceb4f465d35..38b38e393d3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h @@ -47,7 +47,8 @@ extern "C" { extern PyTypeObject UnaryFunction0DVectorViewShape_Type; -#define BPy_UnaryFunction0DVectorViewShape_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DVectorViewShape_Type)) +#define BPy_UnaryFunction0DVectorViewShape_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DVectorViewShape_Type)) /*---------------------------Python BPy_UnaryFunction0DVectorViewShape structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index ec57e3f7c09..5d8d8c70fff 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -80,7 +80,7 @@ static char UnaryFunction0DViewShape___doc__[] = "\n" " Default constructor.\n"; -static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self, PyObject *args, PyObject *kwds) +static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; @@ -91,19 +91,19 @@ static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self, return 0; } -static void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape* self) +static void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape *self) { if (self->uf0D_viewshape) delete self->uf0D_viewshape; - UnaryFunction0D_Type.tp_dealloc((PyObject*)self); + UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction0DViewShape___repr__(BPy_UnaryFunction0DViewShape* self) +static PyObject *UnaryFunction0DViewShape___repr__(BPy_UnaryFunction0DViewShape *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf0D_viewshape); } -static PyObject * UnaryFunction0DViewShape___call__(BPy_UnaryFunction0DViewShape *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction0DViewShape___call__(BPy_UnaryFunction0DViewShape *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", NULL}; PyObject *obj; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h index 9a74346f70a..7a7e4923a2b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h @@ -46,7 +46,8 @@ extern "C" { extern PyTypeObject UnaryFunction0DViewShape_Type; -#define BPy_UnaryFunction0DViewShape_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DViewShape_Type)) +#define BPy_UnaryFunction0DViewShape_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction0DViewShape_Type)) /*---------------------------Python BPy_UnaryFunction0DViewShape structure definition----------*/ typedef struct { 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 b4a56783237..5259512953a 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 @@ -64,7 +64,7 @@ static char ShapeIdF0D___doc__[] = " :return: The Id of the Shape the pointed Interface0D belongs to.\n" " :rtype: :class:`Id`\n"; -static int ShapeIdF0D___init__(BPy_ShapeIdF0D* self, PyObject *args, PyObject *kwds) +static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 69c7dc0182d..1d3defd3583 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 @@ -68,7 +68,7 @@ static char MaterialF0D___doc__[] = " Interface0D.\n" " :rtype: :class:`Material`\n"; -static int MaterialF0D___init__(BPy_MaterialF0D* self, PyObject *args, PyObject *kwds) +static int MaterialF0D___init__(BPy_MaterialF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 25a50184162..5f46bb17324 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 @@ -59,7 +59,7 @@ static char CurveNatureF0D___doc__[] = " belongs.\n" " :rtype: :class:`Nature`\n"; -static int CurveNatureF0D___init__(BPy_CurveNatureF0D* self, PyObject *args, PyObject *kwds) +static int CurveNatureF0D___init__(BPy_CurveNatureF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 c50f887b946..21e33597568 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 @@ -61,7 +61,7 @@ static char Normal2DF0D___doc__[] = " Interface0D.\n" " :rtype: :class:`mathutils.Vector`\n"; -static int Normal2DF0D___init__(BPy_Normal2DF0D* self, PyObject *args, PyObject *kwds) +static int Normal2DF0D___init__(BPy_Normal2DF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 eb6c68abe01..db5ca4a8aa6 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 @@ -61,7 +61,7 @@ static char VertexOrientation2DF0D___doc__[] = " pointed Interface0D.\n" " :rtype: :class:`mathutils.Vector`\n"; -static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D* self, PyObject *args, PyObject *kwds) +static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h index 4d606acc2b4..364947dfee0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject VertexOrientation2DF0D_Type; -#define BPy_VertexOrientation2DF0D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&VertexOrientation2DF0D_Type)) +#define BPy_VertexOrientation2DF0D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&VertexOrientation2DF0D_Type)) /*---------------------------Python BPy_VertexOrientation2DF0D structure definition----------*/ typedef struct { 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 cbf7c33c6ac..c6ede5cb7a5 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 @@ -61,7 +61,7 @@ static char VertexOrientation3DF0D___doc__[] = " pointed Interface0D.\n" " :rtype: :class:`mathutils.Vector`\n"; -static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D* self, PyObject *args, PyObject *kwds) +static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h index 418340708fa..fd8cd7b7173 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject VertexOrientation3DF0D_Type; -#define BPy_VertexOrientation3DF0D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&VertexOrientation3DF0D_Type)) +#define BPy_VertexOrientation3DF0D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&VertexOrientation3DF0D_Type)) /*---------------------------Python BPy_VertexOrientation3DF0D structure definition----------*/ typedef struct { 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 98a27d7a6cc..e36de70e99a 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 @@ -58,7 +58,7 @@ static char GetOccludeeF0D___doc__[] = " :return: The ViewShape occluded by the pointed Interface0D.\n" " :rtype: :class:`ViewShape`\n"; -static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D* self, PyObject *args, PyObject *kwds) +static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 0e590da2c62..c0d34ea0274 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 @@ -58,7 +58,7 @@ static char GetShapeF0D___doc__[] = " :return: The ViewShape containing the pointed Interface0D.\n" " :rtype: :class:`ViewShape`\n"; -static int GetShapeF0D___init__(BPy_GetShapeF0D* self, PyObject *args, PyObject *kwds) +static int GetShapeF0D___init__(BPy_GetShapeF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 053c54a7565..754fadc9753 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 @@ -61,7 +61,7 @@ static char Curvature2DAngleF0D___doc__[] = " pointed Interface0D.\n" " :rtype: float\n"; -static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D* self, PyObject *args, PyObject *kwds) +static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 51031033558..8f2c18486da 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 @@ -66,7 +66,7 @@ static char DensityF0D___doc__[] = " Interface0D.\n" " :rtype: float\n"; -static int DensityF0D___init__(BPy_DensityF0D* self, PyObject *args, PyObject *kwds) +static int DensityF0D___init__(BPy_DensityF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"sigma", NULL}; double d = 2; 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 1c517a5adc2..a87a7d536a5 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 @@ -58,7 +58,7 @@ static char GetProjectedXF0D___doc__[] = " :return: The X 3D projected coordinate of the pointed Interface0D.\n" " :rtype: float\n"; -static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D* self, PyObject *args, PyObject *kwds) +static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 b401671b67f..18cfc014e90 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 @@ -58,7 +58,7 @@ static char GetProjectedYF0D___doc__[] = " :return: The Y 3D projected coordinate of the pointed Interface0D.\n" " :rtype: float\n"; -static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D* self, PyObject *args, PyObject *kwds) +static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 f5b71c2030d..c587b978c16 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 @@ -58,7 +58,7 @@ static char GetProjectedZF0D___doc__[] = " :return: The Z 3D projected coordinate of the pointed Interface0D.\n" " :rtype: float\n"; -static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D* self, PyObject *args, PyObject *kwds) +static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 35d3c4f1195..e24947038ed 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 @@ -58,7 +58,7 @@ static char GetXF0D___doc__[] = " :return: The X 3D coordinate of the pointed Interface0D.\n" " :rtype: float\n"; -static int GetXF0D___init__(BPy_GetXF0D* self, PyObject *args, PyObject *kwds) +static int GetXF0D___init__(BPy_GetXF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 868ee0ccf8f..e831b0ba7c9 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 @@ -58,7 +58,7 @@ static char GetYF0D___doc__[] = " :return: The Y 3D coordinate of the pointed Interface0D.\n" " :rtype: float\n"; -static int GetYF0D___init__(BPy_GetYF0D* self, PyObject *args, PyObject *kwds) +static int GetYF0D___init__(BPy_GetYF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 fc4d85d0722..75fddccd251 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 @@ -58,7 +58,7 @@ static char GetZF0D___doc__[] = " :return: The Z 3D coordinate of the pointed Interface0D.\n" " :rtype: float\n"; -static int GetZF0D___init__(BPy_GetZF0D* self, PyObject *args, PyObject *kwds) +static int GetZF0D___init__(BPy_GetZF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 0ea17a43139..d2849baedb2 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 @@ -62,7 +62,7 @@ static char LocalAverageDepthF0D___doc__[] = " :return: The average depth around the pointed Interface0D.\n" " :rtype: float\n"; -static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D* self, PyObject *args, PyObject *kwds) +static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"mask_size", NULL}; double d = 5.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 976d2ad535e..07c1fd2dfee 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 @@ -63,7 +63,7 @@ static char ZDiscontinuityF0D___doc__[] = " and the occludee.\n" " :rtype: float\n"; -static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D* self, PyObject *args, PyObject *kwds) +static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 dbce7f133de..8c3e8fb34cd 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 @@ -59,7 +59,7 @@ static char GetCurvilinearAbscissaF0D___doc__[] = " :return: The curvilinear abscissa of the pointed Interface0D.\n" " :rtype: float\n"; -static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D* self, PyObject *args, PyObject *kwds) +static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h index 4b8fc291a68..00f9897959b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject GetCurvilinearAbscissaF0D_Type; -#define BPy_GetCurvilinearAbscissaF0D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetCurvilinearAbscissaF0D_Type)) +#define BPy_GetCurvilinearAbscissaF0D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetCurvilinearAbscissaF0D_Type)) /*---------------------------Python BPy_GetCurvilinearAbscissaF0D structure definition----------*/ typedef struct { 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 e8e303fa781..6c12eb2730c 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 @@ -58,7 +58,7 @@ static char GetParameterF0D___doc__[] = " :return: The parameter of an Interface0D.\n" " :rtype: float\n"; -static int GetParameterF0D___init__(BPy_GetParameterF0D* self, PyObject *args, PyObject *kwds) +static int GetParameterF0D___init__(BPy_GetParameterF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 70d791494e7..ba7db4034f0 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 @@ -63,7 +63,7 @@ static char GetViewMapGradientNormF0D___doc__[] = " image.\n" " :rtype: float\n"; -static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D* self, PyObject *args, PyObject *kwds) +static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", NULL}; int i; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h index 96a31bd3f0c..f4c5389008a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject GetViewMapGradientNormF0D_Type; -#define BPy_GetViewMapGradientNormF0D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetViewMapGradientNormF0D_Type)) +#define BPy_GetViewMapGradientNormF0D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetViewMapGradientNormF0D_Type)) /*---------------------------Python BPy_GetViewMapGradientNormF0D structure definition----------*/ typedef struct { 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 41d5e85c5b6..f396e27b1e6 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 @@ -61,7 +61,7 @@ static char ReadCompleteViewMapPixelF0D___doc__[] = " :return: A pixel in one of the level of the complete viewmap.\n" " :rtype: float\n"; -static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D* self, PyObject *args, PyObject *kwds) +static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", NULL}; int i; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h index 3150397006f..8a3610ba2a9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject ReadCompleteViewMapPixelF0D_Type; -#define BPy_ReadCompleteViewMapPixelF0D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ReadCompleteViewMapPixelF0D_Type)) +#define BPy_ReadCompleteViewMapPixelF0D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ReadCompleteViewMapPixelF0D_Type)) /*---------------------------Python BPy_ReadCompleteViewMapPixelF0D structure definition----------*/ typedef struct { 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 a919b9d84ab..c9961a359ae 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 @@ -63,7 +63,7 @@ static char ReadMapPixelF0D___doc__[] = " :return: A pixel in a map.\n" " :rtype: float\n"; -static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D* self, PyObject *args, PyObject *kwds) +static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"map_name", "level", NULL}; const char *s; @@ -71,7 +71,7 @@ static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D* self, PyObject *args, P 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 = 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 f5b78413ee9..de3a76476df 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 @@ -64,7 +64,7 @@ static char ReadSteerableViewMapPixelF0D___doc__[] = " :return: A pixel in one of the level of one of the steerable viewmaps.\n" " :rtype: float\n"; -static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0D* self, PyObject *args, PyObject *kwds) +static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"orientation", "level", NULL}; unsigned int u; @@ -72,7 +72,7 @@ static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0 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 = 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_float/BPy_ReadSteerableViewMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h index e7a995ae256..8cb7c3ad609 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject ReadSteerableViewMapPixelF0D_Type; -#define BPy_ReadSteerableViewMapPixelF0D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ReadSteerableViewMapPixelF0D_Type)) +#define BPy_ReadSteerableViewMapPixelF0D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&ReadSteerableViewMapPixelF0D_Type)) /*---------------------------Python BPy_ReadSteerableViewMapPixelF0D structure definition----------*/ typedef struct { 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 4a345bf084c..11737124245 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 @@ -64,7 +64,7 @@ static char QuantitativeInvisibilityF0D___doc__[] = " :return: The quantitative invisibility of the pointed Interface0D.\n" " :rtype: int\n"; -static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D* self, PyObject *args, PyObject *kwds) +static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h index e986aa9f540..a7838331995 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject QuantitativeInvisibilityF0D_Type; -#define BPy_QuantitativeInvisibilityF0D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&QuantitativeInvisibilityF0D_Type)) +#define BPy_QuantitativeInvisibilityF0D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&QuantitativeInvisibilityF0D_Type)) /*---------------------------Python BPy_QuantitativeInvisibilityF0D structure definition----------*/ typedef struct { 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 41308a3794f..bead5fd7b83 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 @@ -59,7 +59,7 @@ static char GetOccludersF0D___doc__[] = " Interface0D.\n" " :rtype: list of :class:`ViewShape` objects\n"; -static int GetOccludersF0D___init__(BPy_GetOccludersF0D* self, PyObject *args, PyObject *kwds) +static int GetOccludersF0D___init__(BPy_GetOccludersF0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index c2b945224f1..47f7ff6388f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -161,7 +161,7 @@ static char UnaryFunction1DDouble___doc__[] = " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n"; -static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble* self, PyObject *args, PyObject *kwds) +static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; @@ -180,19 +180,19 @@ static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble* self, PyObj return 0; } -static void UnaryFunction1DDouble___dealloc__(BPy_UnaryFunction1DDouble* self) +static void UnaryFunction1DDouble___dealloc__(BPy_UnaryFunction1DDouble *self) { if (self->uf1D_double) delete self->uf1D_double; - UnaryFunction1D_Type.tp_dealloc((PyObject*)self); + UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction1DDouble___repr__(BPy_UnaryFunction1DDouble* self) +static PyObject *UnaryFunction1DDouble___repr__(BPy_UnaryFunction1DDouble *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_double); } -static PyObject * UnaryFunction1DDouble___call__(BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction1DDouble___call__(BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; @@ -237,7 +237,8 @@ static int integration_type_set(BPy_UnaryFunction1DDouble *self, PyObject *value } static PyGetSetDef BPy_UnaryFunction1DDouble_getseters[] = { - {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, (char *)integration_type_doc, NULL}, + {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, + (char *)integration_type_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index ac3f6482069..bda06a1d148 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -83,7 +83,7 @@ static char UnaryFunction1DEdgeNature___doc__[] = " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n"; -static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature* self, PyObject *args, PyObject *kwds) +static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; @@ -102,19 +102,20 @@ static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature* sel return 0; } -static void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature* self) +static void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature *self) { if (self->uf1D_edgenature) delete self->uf1D_edgenature; - UnaryFunction1D_Type.tp_dealloc((PyObject*)self); + UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction1DEdgeNature___repr__(BPy_UnaryFunction1DEdgeNature* self) +static PyObject *UnaryFunction1DEdgeNature___repr__(BPy_UnaryFunction1DEdgeNature *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_edgenature); } -static PyObject * UnaryFunction1DEdgeNature___call__(BPy_UnaryFunction1DEdgeNature *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction1DEdgeNature___call__(BPy_UnaryFunction1DEdgeNature *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; @@ -159,7 +160,8 @@ static int integration_type_set(BPy_UnaryFunction1DEdgeNature *self, PyObject *v } static PyGetSetDef BPy_UnaryFunction1DEdgeNature_getseters[] = { - {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, (char *)integration_type_doc, NULL}, + {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, + (char *)integration_type_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h index 5b0eff75870..7be7de7c0fe 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h @@ -46,7 +46,8 @@ extern "C" { extern PyTypeObject UnaryFunction1DEdgeNature_Type; -#define BPy_UnaryFunction1DEdgeNature_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DEdgeNature_Type)) +#define BPy_UnaryFunction1DEdgeNature_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DEdgeNature_Type)) /*---------------------------Python BPy_UnaryFunction1DEdgeNature structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index a7132eccdb3..bccdcd18f90 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -76,7 +76,7 @@ static char UnaryFunction1DFloat___doc__[] = " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n"; -static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat* self, PyObject *args, PyObject *kwds) +static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; @@ -95,19 +95,19 @@ static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat* self, PyObjec return 0; } -static void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat* self) +static void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat *self) { if (self->uf1D_float) delete self->uf1D_float; - UnaryFunction1D_Type.tp_dealloc((PyObject*)self); + UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction1DFloat___repr__(BPy_UnaryFunction1DFloat* self) +static PyObject *UnaryFunction1DFloat___repr__(BPy_UnaryFunction1DFloat *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_float); } -static PyObject * UnaryFunction1DFloat___call__(BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction1DFloat___call__(BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; @@ -152,7 +152,8 @@ static int integration_type_set(BPy_UnaryFunction1DFloat *self, PyObject *value, } static PyGetSetDef BPy_UnaryFunction1DFloat_getseters[] = { - {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, (char *)integration_type_doc, NULL}, + {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, + (char *)integration_type_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index 034ce943ee3..2fbc8658a06 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -83,7 +83,7 @@ static char UnaryFunction1DUnsigned___doc__[] = " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n"; -static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned* self, PyObject *args, PyObject *kwds) +static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; @@ -102,19 +102,19 @@ static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned* self, P return 0; } -static void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned* self) +static void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned *self) { if (self->uf1D_unsigned) delete self->uf1D_unsigned; - UnaryFunction1D_Type.tp_dealloc((PyObject*)self); + UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction1DUnsigned___repr__(BPy_UnaryFunction1DUnsigned* self) +static PyObject *UnaryFunction1DUnsigned___repr__(BPy_UnaryFunction1DUnsigned *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_unsigned); } -static PyObject * UnaryFunction1DUnsigned___call__(BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction1DUnsigned___call__(BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; @@ -159,7 +159,8 @@ static int integration_type_set(BPy_UnaryFunction1DUnsigned *self, PyObject *val } static PyGetSetDef BPy_UnaryFunction1DUnsigned_getseters[] = { - {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, (char *)integration_type_doc, NULL}, + {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, + (char *)integration_type_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h index 7f94723f6b5..fc02d1335f2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject UnaryFunction1DUnsigned_Type; -#define BPy_UnaryFunction1DUnsigned_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DUnsigned_Type)) +#define BPy_UnaryFunction1DUnsigned_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DUnsigned_Type)) /*---------------------------Python BPy_UnaryFunction1DUnsigned structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index e2f5e5b69f5..41fb70dcfd5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -89,7 +89,7 @@ static char UnaryFunction1DVec2f___doc__[] = " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n"; -static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f* self, PyObject *args, PyObject *kwds) +static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; @@ -108,19 +108,19 @@ static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f* self, PyObjec return 0; } -static void UnaryFunction1DVec2f___dealloc__(BPy_UnaryFunction1DVec2f* self) +static void UnaryFunction1DVec2f___dealloc__(BPy_UnaryFunction1DVec2f *self) { if (self->uf1D_vec2f) delete self->uf1D_vec2f; - UnaryFunction1D_Type.tp_dealloc((PyObject*)self); + UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction1DVec2f___repr__(BPy_UnaryFunction1DVec2f* self) +static PyObject *UnaryFunction1DVec2f___repr__(BPy_UnaryFunction1DVec2f *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vec2f); } -static PyObject * UnaryFunction1DVec2f___call__(BPy_UnaryFunction1DVec2f *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction1DVec2f___call__(BPy_UnaryFunction1DVec2f *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; @@ -165,7 +165,8 @@ static int integration_type_set(BPy_UnaryFunction1DVec2f *self, PyObject *value, } static PyGetSetDef BPy_UnaryFunction1DVec2f_getseters[] = { - {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, (char *)integration_type_doc, NULL}, + {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, + (char *)integration_type_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index 63494c9411d..7198949c2a8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -83,7 +83,7 @@ static char UnaryFunction1DVec3f___doc__[] = " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n"; -static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args, PyObject *kwds) +static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; @@ -102,19 +102,19 @@ static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObjec return 0; } -static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self) +static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f *self) { if (self->uf1D_vec3f) delete self->uf1D_vec3f; - UnaryFunction1D_Type.tp_dealloc((PyObject*)self); + UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self) +static PyObject *UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vec3f); } -static PyObject * UnaryFunction1DVec3f___call__(BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction1DVec3f___call__(BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; @@ -159,7 +159,8 @@ static int integration_type_set(BPy_UnaryFunction1DVec3f *self, PyObject *value, } static PyGetSetDef BPy_UnaryFunction1DVec3f_getseters[] = { - {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, (char *)integration_type_doc, NULL}, + {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, + (char *)integration_type_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index d5261b41d1f..22adf4ab5cb 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -96,7 +96,8 @@ static char UnaryFunction1DVectorViewShape___doc__[] = " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n"; -static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape* self, PyObject *args, PyObject *kwds) +static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; @@ -104,8 +105,9 @@ static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorView if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) return -1; - if (!obj) + if (!obj) { self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector >(); + } else { self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector >(IntegrationType_from_BPy_IntegrationType(obj)); } @@ -115,19 +117,20 @@ static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorView return 0; } -static void UnaryFunction1DVectorViewShape___dealloc__(BPy_UnaryFunction1DVectorViewShape* self) +static void UnaryFunction1DVectorViewShape___dealloc__(BPy_UnaryFunction1DVectorViewShape *self) { if (self->uf1D_vectorviewshape) delete self->uf1D_vectorviewshape; - UnaryFunction1D_Type.tp_dealloc((PyObject*)self); + UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction1DVectorViewShape___repr__(BPy_UnaryFunction1DVectorViewShape* self) +static PyObject *UnaryFunction1DVectorViewShape___repr__(BPy_UnaryFunction1DVectorViewShape *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vectorviewshape); } -static PyObject * UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVectorViewShape *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVectorViewShape *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; @@ -148,11 +151,12 @@ static PyObject * UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVec } PyObject *list = PyList_New(0); PyObject *item; - for(unsigned int i = 0; i < self->uf1D_vectorviewshape->result.size(); i++) { + for (unsigned int i = 0; i < self->uf1D_vectorviewshape->result.size(); i++) { ViewShape *v = self->uf1D_vectorviewshape->result[i]; if (v) { item = BPy_ViewShape_from_ViewShape(*v); - } else { + } + else { item = Py_None; Py_INCREF(item); } @@ -185,7 +189,8 @@ static int integration_type_set(BPy_UnaryFunction1DVectorViewShape *self, PyObje } static PyGetSetDef BPy_UnaryFunction1DVectorViewShape_getseters[] = { - {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, (char *)integration_type_doc, NULL}, + {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, + (char *)integration_type_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h index e3412535118..02233da1e25 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h @@ -47,7 +47,8 @@ extern "C" { extern PyTypeObject UnaryFunction1DVectorViewShape_Type; -#define BPy_UnaryFunction1DVectorViewShape_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVectorViewShape_Type)) +#define BPy_UnaryFunction1DVectorViewShape_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVectorViewShape_Type)) /*---------------------------Python BPy_UnaryFunction1DVectorViewShape structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index 10c2977f411..7b1e5ba9c61 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -96,7 +96,7 @@ static char UnaryFunction1DVoid___doc__[] = " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n"; -static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid* self, PyObject *args, PyObject *kwds) +static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration", NULL}; PyObject *obj = 0; @@ -115,19 +115,19 @@ static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid* self, PyObject return 0; } -static void UnaryFunction1DVoid___dealloc__(BPy_UnaryFunction1DVoid* self) +static void UnaryFunction1DVoid___dealloc__(BPy_UnaryFunction1DVoid *self) { if (self->uf1D_void) delete self->uf1D_void; - UnaryFunction1D_Type.tp_dealloc((PyObject*)self); + UnaryFunction1D_Type.tp_dealloc((PyObject *)self); } -static PyObject * UnaryFunction1DVoid___repr__(BPy_UnaryFunction1DVoid* self) +static PyObject *UnaryFunction1DVoid___repr__(BPy_UnaryFunction1DVoid *self) { return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_void); } -static PyObject * UnaryFunction1DVoid___call__(BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds) +static PyObject *UnaryFunction1DVoid___call__(BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *obj = 0; @@ -172,7 +172,8 @@ static int integration_type_set(BPy_UnaryFunction1DVoid *self, PyObject *value, } static PyGetSetDef BPy_UnaryFunction1DVoid_getseters[] = { - {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, (char *)integration_type_doc, NULL}, + {(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set, + (char *)integration_type_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; 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 1afe4441cd3..f431fef1306 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 @@ -68,7 +68,7 @@ static char CurveNatureF1D___doc__[] = " :return: The nature of the Interface1D.\n" " :rtype: :class:`Nature`\n"; -static int CurveNatureF1D___init__(BPy_CurveNatureF1D* self, PyObject *args, PyObject *kwds) +static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 84fe6a24a7c..c9c08c1c5dd 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 @@ -63,7 +63,7 @@ static char Normal2DF1D___doc__[] = " :return: The 2D normal for the Interface1D.\n" " :rtype: :class:`mathutils.Vector`\n"; -static int Normal2DF1D___init__(BPy_Normal2DF1D* self, PyObject *args, PyObject *kwds) +static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 916e2a62afe..9cdcb8c4969 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 @@ -63,7 +63,7 @@ static char Orientation2DF1D___doc__[] = " :return: The 2D orientation of the Interface1D.\n" " :rtype: :class:`mathutils.Vector`\n"; -static int Orientation2DF1D___init__(BPy_Orientation2DF1D* self, PyObject *args, PyObject *kwds) +static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 6433e3e0eff..5d2750546bb 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 @@ -63,7 +63,7 @@ static char Orientation3DF1D___doc__[] = " :return: The 3D orientation of the Interface1D.\n" " :rtype: :class:`mathutils.Vector`\n"; -static int Orientation3DF1D___init__(BPy_Orientation3DF1D* self, PyObject *args, PyObject *kwds) +static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 a75019ab4eb..891cc6b0443 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 @@ -63,7 +63,7 @@ static char Curvature2DAngleF1D___doc__[] = " :return: The 2D curvature as an angle.\n" " :rtype: float\n"; -static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D* self, PyObject *args, PyObject *kwds) +static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 9b36fcdea1e..7e81f45c295 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 @@ -75,7 +75,7 @@ static char DensityF1D___doc__[] = " :return: The density evaluated for an Interface1D.\n" " :rtype: float\n"; -static int DensityF1D___init__(BPy_DensityF1D* self, PyObject *args, PyObject *kwds) +static int DensityF1D___init__(BPy_DensityF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"sigma", "integration_type", "sampling", NULL}; PyObject *obj = 0; @@ -85,7 +85,7 @@ static int DensityF1D___init__(BPy_DensityF1D* self, PyObject *args, PyObject *k if (!PyArg_ParseTupleAndKeywords(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); + 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 0ca9cc34a48..eb478beab8e 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 @@ -76,7 +76,7 @@ static char GetCompleteViewMapDensityF1D___doc__[] = " viewmap image.\n" " :rtype: float\n"; -static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1D* self, PyObject *args, PyObject *kwds) +static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", "integration_type", "sampling", NULL}; PyObject *obj = 0; @@ -86,7 +86,7 @@ static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1 if (!PyArg_ParseTupleAndKeywords(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); + 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_GetCompleteViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h index a40e15a8239..a9af0580e4b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject GetCompleteViewMapDensityF1D_Type; -#define BPy_GetCompleteViewMapDensityF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetCompleteViewMapDensityF1D_Type)) +#define BPy_GetCompleteViewMapDensityF1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetCompleteViewMapDensityF1D_Type)) /*---------------------------Python BPy_GetCompleteViewMapDensityF1D structure definition----------*/ typedef struct { 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 91eacca3d48..2e5c55b9cc3 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 @@ -44,7 +44,8 @@ extern "C" { //------------------------INSTANCE METHODS ---------------------------------- static char GetDirectionalViewMapDensityF1D___doc__[] = -"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DDouble` > :class:`GetDirectionalViewMapDensityF1D`\n" +"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DDouble` " +"> :class:`GetDirectionalViewMapDensityF1D`\n" "\n" ".. method:: __init__(orientation, level, integration_type=IntegrationType.MEAN, sampling=2.0)\n" "\n" @@ -80,7 +81,8 @@ static char GetDirectionalViewMapDensityF1D___doc__[] = " steerable viewmaps image.\n" " :rtype: float\n"; -static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDensityF1D* self, PyObject *args, PyObject *kwds) +static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDensityF1D *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"orientation", "level", "integration_type", "sampling", NULL}; PyObject *obj = 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h index e18012fdcb4..d07ffde97f8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject GetDirectionalViewMapDensityF1D_Type; -#define BPy_GetDirectionalViewMapDensityF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetDirectionalViewMapDensityF1D_Type)) +#define BPy_GetDirectionalViewMapDensityF1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetDirectionalViewMapDensityF1D_Type)) /*---------------------------Python BPy_GetDirectionalViewMapDensityF1D structure definition----------*/ typedef struct { 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 d40209fcb95..882015f092b 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 @@ -63,7 +63,7 @@ static char GetProjectedXF1D___doc__[] = " :return: The projected X 3D coordinate of an Interface1D.\n" " :rtype: float\n"; -static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D* self, PyObject *args, PyObject *kwds) +static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 518db365b1d..7c2c91ba6b9 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 @@ -63,7 +63,7 @@ static char GetProjectedYF1D___doc__[] = " :return: The projected Y 3D coordinate of an Interface1D.\n" " :rtype: float\n"; -static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D* self, PyObject *args, PyObject *kwds) +static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 37d2a730bb8..28c198f841f 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 @@ -63,7 +63,7 @@ static char GetProjectedZF1D___doc__[] = " :return: The projected Z 3D coordinate of an Interface1D.\n" " :rtype: float\n"; -static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D* self, PyObject *args, PyObject *kwds) +static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 c1d90fe7b4d..73fb0d5d8fc 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 @@ -73,7 +73,8 @@ static char GetSteerableViewMapDensityF1D___doc__[] = " :return: The density of the ViewMap for a given Interface1D.\n" " :rtype: float\n"; -static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensityF1D* self, PyObject *args, PyObject *kwds) +static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensityF1D *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", "integration_type", "sampling", NULL}; PyObject *obj = 0; @@ -83,7 +84,7 @@ static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensity if (!PyArg_ParseTupleAndKeywords(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); + 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_GetSteerableViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h index 30668a08e8f..30872cc4b85 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject GetSteerableViewMapDensityF1D_Type; -#define BPy_GetSteerableViewMapDensityF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetSteerableViewMapDensityF1D_Type)) +#define BPy_GetSteerableViewMapDensityF1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetSteerableViewMapDensityF1D_Type)) /*---------------------------Python BPy_GetSteerableViewMapDensityF1D structure definition----------*/ typedef struct { BPy_UnaryFunction1DDouble py_uf1D_double; 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 bda565a172c..b0c7c1b7c4e 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 @@ -73,7 +73,7 @@ static char GetViewMapGradientNormF1D___doc__[] = " :return: The density of the ViewMap for a given Interface1D.\n" " :rtype: float\n"; -static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D* self, PyObject *args, PyObject *kwds) +static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", "integration_type", "sampling", NULL}; PyObject *obj = 0; @@ -83,7 +83,7 @@ static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D* sel if (!PyArg_ParseTupleAndKeywords(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); + 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_GetViewMapGradientNormF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h index ffcc8faf952..b8c9fbef4ab 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h @@ -44,7 +44,9 @@ extern "C" { extern PyTypeObject GetViewMapGradientNormF1D_Type; -#define BPy_GetViewMapGradientNormF1D_Check(v) (((PyObject *)v)->ob_type == PyObject_IsInstance((PyObject *)v, (PyObject *)&GetViewMapGradientNormF1D_Type)) +#define BPy_GetViewMapGradientNormF1D_Check(v) \ + (((PyObject *)v)->ob_type == PyObject_IsInstance((PyObject *)v, \ + (PyObject *)&GetViewMapGradientNormF1D_Type)) /*---------------------------Python BPy_GetViewMapGradientNormF1D structure definition----------*/ typedef struct { 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 20884fbe6cd..f541b5ef32d 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 @@ -63,7 +63,7 @@ static char GetXF1D___doc__[] = " :return: The X 3D coordinate of the Interface1D.\n" " :rtype: float\n"; -static int GetXF1D___init__(BPy_GetXF1D* self, PyObject *args, PyObject *kwds) +static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 2e3bf0fc6d5..5d7b3a4e612 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 @@ -63,7 +63,7 @@ static char GetYF1D___doc__[] = " :return: The Y 3D coordinate of the Interface1D.\n" " :rtype: float\n"; -static int GetYF1D___init__(BPy_GetYF1D* self, PyObject *args, PyObject *kwds) +static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 dc6161148ab..8b3322dd386 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 @@ -63,7 +63,7 @@ static char GetZF1D___doc__[] = " :return: The Z 3D coordinate of the Interface1D.\n" " :rtype: float\n"; -static int GetZF1D___init__(BPy_GetZF1D* self, PyObject *args, PyObject *kwds) +static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 1230e2ce224..67108e82eb8 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 @@ -70,7 +70,7 @@ static char LocalAverageDepthF1D___doc__[] = " :return: The average depth evaluated for the Interface1D.\n" " :rtype: float\n"; -static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D* self, PyObject *args, PyObject *kwds) +static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"sigma", "integration_type", NULL}; PyObject *obj = 0; @@ -79,7 +79,7 @@ static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D* self, PyObjec if (!PyArg_ParseTupleAndKeywords(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); + 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 278c4da60da..b7a389e0148 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 @@ -67,7 +67,7 @@ static char ZDiscontinuityF1D___doc__[] = " :return: The normalized distance between the Interface1D and the occludee.\n" " :rtype: float\n"; -static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D* self, PyObject *args, PyObject *kwds) +static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 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 65ca76318b9..8e7c0a354b9 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 @@ -67,7 +67,7 @@ static char QuantitativeInvisibilityF1D___doc__[] = " :return: The Quantitative Invisibility of the Interface1D.\n" " :rtype: int\n"; -static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D* self, PyObject *args, PyObject *kwds) +static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"integration_type", NULL}; PyObject *obj = 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h index 21c56c40a3a..411d92f8c62 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject QuantitativeInvisibilityF1D_Type; -#define BPy_QuantitativeInvisibilityF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&QuantitativeInvisibilityF1D_Type)) +#define BPy_QuantitativeInvisibilityF1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&QuantitativeInvisibilityF1D_Type)) /*---------------------------Python BPy_QuantitativeInvisibilityF1D structure definition----------*/ typedef struct { 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 c7d903a2af7..ec0104598e2 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 @@ -59,7 +59,7 @@ static char GetOccludeeF1D___doc__[] = " :return: A list of occluded shapes covered by the Interface1D.\n" " :rtype: list of :class:`ViewShape` objects\n"; -static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D* self, PyObject *args, PyObject *kwds) +static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 d804495ecd2..a189cc18ae1 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 @@ -59,7 +59,7 @@ static char GetOccludersF1D___doc__[] = " :return: A list of occluding shapes that cover the Interface1D.\n" " :rtype: list of :class:`ViewShape` objects\n"; -static int GetOccludersF1D___init__(BPy_GetOccludersF1D* self, PyObject *args, PyObject *kwds) +static int GetOccludersF1D___init__(BPy_GetOccludersF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 3ff70d047cc..47e0bf225df 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 @@ -59,7 +59,7 @@ static char GetShapeF1D___doc__[] = " :return: A list of shapes covered by the Interface1D.\n" " :rtype: list of :class:`ViewShape` objects\n"; -static int GetShapeF1D___init__(BPy_GetShapeF1D* self, PyObject *args, PyObject *kwds) +static int GetShapeF1D___init__(BPy_GetShapeF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 b160234a169..f31452cd22a 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 @@ -57,7 +57,7 @@ static char ChainingTimeStampF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`Interface1D`\n"; -static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D* self, PyObject *args, PyObject *kwds) +static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; 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 af2daa3813f..14c8dc400b3 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 @@ -57,7 +57,8 @@ static char IncrementChainingTimeStampF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`Interface1D`\n"; -static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStampF1D* self, PyObject *args, PyObject *kwds) +static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStampF1D *self, + PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h index bf7d0791a7c..ed4c402f771 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject IncrementChainingTimeStampF1D_Type; -#define BPy_IncrementChainingTimeStampF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&IncrementChainingTimeStampF1D_Type)) +#define BPy_IncrementChainingTimeStampF1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&IncrementChainingTimeStampF1D_Type)) /*---------------------------Python BPy_IncrementChainingTimeStampF1D structure definition----------*/ typedef struct { 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 7e1ae7ce2e8..b7650a2c173 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 @@ -57,7 +57,7 @@ static char TimeStampF1D___doc__[] = " :arg inter: An Interface1D object.\n" " :type inter: :class:`Interface1D`\n"; -static int TimeStampF1D___init__(BPy_TimeStampF1D* self, PyObject *args, PyObject *kwds) +static int TimeStampF1D___init__(BPy_TimeStampF1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp index 314fa4359fe..4621dc83dc4 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp @@ -51,7 +51,7 @@ static char FalseUP0D___doc__[] = " :return: False.\n" " :rtype: bool\n"; -static int FalseUP0D___init__(BPy_FalseUP0D* self, PyObject *args, PyObject *kwds) +static int FalseUP0D___init__(BPy_FalseUP0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp index a4b93aa8b9d..37ee914cb17 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp @@ -51,7 +51,7 @@ static char TrueUP0D___doc__[] = " :return: True.\n" " :rtype: bool\n"; -static int TrueUP0D___init__(BPy_TrueUP0D* self, PyObject *args, PyObject *kwds) +static int TrueUP0D___init__(BPy_TrueUP0D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp index 783a70c09bd..37fd851bc31 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp @@ -52,7 +52,7 @@ static char ContourUP1D___doc__[] = " :return: True if the Interface1D is a contour, false otherwise.\n" " :rtype: bool\n"; -static int ContourUP1D___init__(BPy_ContourUP1D* self, PyObject *args, PyObject *kwds) +static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp index ee3a6a9c2a7..def464e1241 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp @@ -65,7 +65,7 @@ static char DensityLowerThanUP1D___doc__[] = " :return: True if the density is lower than a threshold.\n" " :rtype: bool\n"; -static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D* self, PyObject *args, PyObject *kwds) +static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"threshold", "sigma", NULL}; double d1, d2 = 2.0; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp index ee2cf42fc37..50f736c1cc0 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp @@ -59,7 +59,7 @@ static char EqualToChainingTimeStampUP1D___doc__[] = " :return: True if the time stamp is equal to a user-defined value.\n" " :rtype: bool\n"; -static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1D* self, PyObject *args, PyObject *kwds) +static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"ts", NULL}; unsigned u; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h index ae55215c1dd..a2c9427953a 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject EqualToChainingTimeStampUP1D_Type; -#define BPy_EqualToChainingTimeStampUP1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&EqualToChainingTimeStampUP1D_Type)) +#define BPy_EqualToChainingTimeStampUP1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&EqualToChainingTimeStampUP1D_Type)) /*---------------------------Python BPy_EqualToChainingTimeStampUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp index d356d1f5c98..7e2d3adcb36 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp @@ -59,7 +59,7 @@ static char EqualToTimeStampUP1D___doc__[] = " :return: True if the time stamp is equal to a user-defined value.\n" " :rtype: bool\n"; -static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D* self, PyObject *args, PyObject *kwds) +static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"ts", NULL}; unsigned u; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp index 70d9285c5b2..98939f4cf34 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp @@ -54,7 +54,7 @@ static char ExternalContourUP1D___doc__[] = " otherwise.\n" " :rtype: bool\n"; -static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D* self, PyObject *args, PyObject *kwds) +static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp index 642ee34b51b..356a7a94f0f 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp @@ -51,7 +51,7 @@ static char FalseUP1D___doc__[] = " :return: False.\n" " :rtype: bool\n"; -static int FalseUP1D___init__(BPy_FalseUP1D* self, PyObject *args, PyObject *kwds) +static int FalseUP1D___init__(BPy_FalseUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp index ff524a356fc..b5acc3f1cd3 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp @@ -62,7 +62,7 @@ static char QuantitativeInvisibilityUP1D___doc__[] = " value.\n" " :rtype: bool\n"; -static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1D* self, PyObject *args, PyObject *kwds) +static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"qi", NULL}; int i = 0; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h index fa2ebf9d369..00c59b93578 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject QuantitativeInvisibilityUP1D_Type; -#define BPy_QuantitativeInvisibilityUP1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&QuantitativeInvisibilityUP1D_Type)) +#define BPy_QuantitativeInvisibilityUP1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&QuantitativeInvisibilityUP1D_Type)) /*---------------------------Python BPy_QuantitativeInvisibilityUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp index c5fa88db725..1fb69a208ab 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp @@ -62,7 +62,7 @@ static char ShapeUP1D___doc__[] = " user-specified Id.\n" " :rtype: bool\n"; -static int ShapeUP1D___init__(BPy_ShapeUP1D* self, PyObject *args, PyObject *kwds) +static int ShapeUP1D___init__(BPy_ShapeUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"first", "second", NULL}; unsigned u1, u2 = 0; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp index 1f8f96dffae..ad94ab7cb12 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp @@ -51,7 +51,7 @@ static char TrueUP1D___doc__[] = " :return: True.\n" " :rtype: bool\n"; -static int TrueUP1D___init__(BPy_TrueUP1D* self, PyObject *args, PyObject *kwds) +static int TrueUP1D___init__(BPy_TrueUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {NULL}; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp index 820b6bf0a8c..dd8dbb55ffb 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp @@ -59,7 +59,7 @@ static char WithinImageBoundaryUP1D___doc__[] = "\n" " Returns true if the Interface1D intersects with image boundary.\n"; -static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D* self, PyObject *args, PyObject *kwds) +static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"xmin", "ymin", "xmax", "ymax", NULL}; double xmin, ymin, xmax, ymax; diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.h index cfab9981cbd..dea85f87ea5 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.h @@ -44,7 +44,8 @@ extern "C" { extern PyTypeObject WithinImageBoundaryUP1D_Type; -#define BPy_WithinImageBoundaryUP1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&WithinImageBoundaryUP1D_Type)) +#define BPy_WithinImageBoundaryUP1D_Check(v) \ + (PyObject_IsInstance((PyObject *)v, (PyObject *)&WithinImageBoundaryUP1D_Type)) /*---------------------------Python BPy_WithinImageBoundaryUP1D structure definition----------*/ typedef struct { -- cgit v1.2.3