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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/freestyle/intern')
-rw-r--r--source/blender/freestyle/intern/application/AppCanvas.cpp8
-rw-r--r--source/blender/freestyle/intern/application/AppConfig.cpp14
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp65
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp32
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp54
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp40
-rw-r--r--source/blender/freestyle/intern/geometry/Bezier.cpp4
-rw-r--r--source/blender/freestyle/intern/geometry/FastGrid.cpp2
-rw-r--r--source/blender/freestyle/intern/geometry/FitCurve.cpp2
-rw-r--r--source/blender/freestyle/intern/geometry/GeomCleaner.cpp7
-rw-r--r--source/blender/freestyle/intern/geometry/GeomUtils.cpp38
-rw-r--r--source/blender/freestyle/intern/geometry/Grid.cpp6
-rw-r--r--source/blender/freestyle/intern/geometry/matrix_util.cpp14
-rw-r--r--source/blender/freestyle/intern/geometry/matrix_util.h14
-rw-r--r--source/blender/freestyle/intern/geometry/normal_cycle.cpp8
-rw-r--r--source/blender/freestyle/intern/image/GaussianFilter.cpp2
-rw-r--r--source/blender/freestyle/intern/image/ImagePyramid.cpp2
-rw-r--r--source/blender/freestyle/intern/image/ImagePyramid.h2
-rw-r--r--source/blender/freestyle/intern/python/BPy_BBox.cpp62
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp98
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp98
-rw-r--r--source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp22
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.cpp105
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp32
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp125
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsNoise.cpp112
-rw-r--r--source/blender/freestyle/intern/python/BPy_Id.cpp105
-rw-r--r--source/blender/freestyle/intern/python/BPy_IntegrationType.cpp92
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface0D.cpp136
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.cpp112
-rw-r--r--source/blender/freestyle/intern/python/BPy_Iterator.cpp96
-rw-r--r--source/blender/freestyle/intern/python/BPy_MediumType.cpp80
-rw-r--r--source/blender/freestyle/intern/python/BPy_Nature.cpp150
-rw-r--r--source/blender/freestyle/intern/python/BPy_Operators.cpp393
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.cpp118
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp170
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeShader.cpp98
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp88
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp88
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp100
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp100
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewMap.cpp78
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewShape.cpp140
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/Director.cpp4
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp132
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp121
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp92
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp143
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp116
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp82
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp123
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp108
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp154
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp144
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp98
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp120
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp112
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp118
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp186
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp98
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp128
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp110
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp116
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp158
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp128
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp114
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp104
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp83
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp83
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp90
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp68
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp68
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp68
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp81
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp107
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp107
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp107
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp107
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp107
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp107
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp107
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp107
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp82
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp80
-rw-r--r--source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp89
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeGroup.cpp2
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeLight.cpp2
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp8
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp11
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp3
-rw-r--r--source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp22
-rw-r--r--source/blender/freestyle/intern/stroke/BasicStrokeShaders.h34
-rw-r--r--source/blender/freestyle/intern/stroke/Canvas.cpp18
-rw-r--r--source/blender/freestyle/intern/stroke/Chain.cpp4
-rw-r--r--source/blender/freestyle/intern/stroke/ChainingIterators.cpp22
-rw-r--r--source/blender/freestyle/intern/stroke/ContextFunctions.cpp8
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.cpp78
-rw-r--r--source/blender/freestyle/intern/stroke/Operators.cpp22
-rw-r--r--source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp2
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.cpp56
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRenderer.cpp6
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRep.cpp14
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeTesselator.cpp4
-rw-r--r--source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp2
-rw-r--r--source/blender/freestyle/intern/system/StringUtils.cpp10
-rw-r--r--source/blender/freestyle/intern/view_map/AutoPtrHelper.h4
-rw-r--r--source/blender/freestyle/intern/view_map/BoxGrid.cpp6
-rw-r--r--source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp12
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp6
-rw-r--r--source/blender/freestyle/intern/view_map/Functions0D.cpp34
-rw-r--r--source/blender/freestyle/intern/view_map/Functions1D.cpp12
-rw-r--r--source/blender/freestyle/intern/view_map/Interface0D.cpp10
-rw-r--r--source/blender/freestyle/intern/view_map/OccluderSource.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.cpp12
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/SphericalGrid.cpp6
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.cpp8
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp93
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.cpp48
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp128
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.cpp24
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp4
-rw-r--r--source/blender/freestyle/intern/winged_edge/WEdge.cpp44
-rw-r--r--source/blender/freestyle/intern/winged_edge/WFillGrid.cpp2
-rw-r--r--source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp2
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdge.cpp16
-rw-r--r--source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp93
214 files changed, 7952 insertions, 7565 deletions
diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp
index d34be79cd66..9187e0ebb05 100644
--- a/source/blender/freestyle/intern/application/AppCanvas.cpp
+++ b/source/blender/freestyle/intern/application/AppCanvas.cpp
@@ -31,13 +31,13 @@
#include "../system/StringUtils.h"
namespace Freestyle {
-AppCanvas::AppCanvas() : Canvas()
+AppCanvas::AppCanvas()
{
- _pViewer = 0;
+ _pViewer = nullptr;
_MapsPath = Config::Path::getInstance()->getMapsDir().c_str();
}
-AppCanvas::AppCanvas(AppView *iViewer) : Canvas()
+AppCanvas::AppCanvas(AppView *iViewer)
{
_pViewer = iViewer;
}
@@ -49,7 +49,7 @@ AppCanvas::AppCanvas(const AppCanvas &iBrother) : Canvas(iBrother)
AppCanvas::~AppCanvas()
{
- _pViewer = 0;
+ _pViewer = nullptr;
}
void AppCanvas::setViewer(AppView *iViewer)
diff --git a/source/blender/freestyle/intern/application/AppConfig.cpp b/source/blender/freestyle/intern/application/AppConfig.cpp
index 3aae4254b4b..90ded5045dc 100644
--- a/source/blender/freestyle/intern/application/AppConfig.cpp
+++ b/source/blender/freestyle/intern/application/AppConfig.cpp
@@ -28,16 +28,14 @@ using namespace std;
#include "BKE_appdir.h"
-namespace Freestyle {
+namespace Freestyle::Config {
-namespace Config {
-
-Path *Path::_pInstance = 0;
+Path *Path::_pInstance = nullptr;
Path::Path()
{
// get the root directory
// soc
- setRootDir(BKE_appdir_folder_id(BLENDER_SYSTEM_SCRIPTS, NULL));
+ setRootDir(BKE_appdir_folder_id(BLENDER_SYSTEM_SCRIPTS, nullptr));
_pInstance = this;
}
@@ -62,7 +60,7 @@ void Path::setHomeDir(const string &iHomeDir)
Path::~Path()
{
- _pInstance = 0;
+ _pInstance = nullptr;
}
Path *Path::getInstance()
@@ -85,6 +83,4 @@ string Path::getEnvVar(const string &iEnvVarName)
return value;
}
-} // namespace Config
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Config
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index 4628c76ca7f..63612694e65 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -93,10 +93,10 @@ Controller::Controller()
_DebugNode->addRef();
#endif
- _winged_edge = NULL;
+ _winged_edge = nullptr;
- _pView = NULL;
- _pRenderMonitor = NULL;
+ _pView = nullptr;
+ _pRenderMonitor = nullptr;
_edgeTesselationNature = (Nature::SILHOUETTE | Nature::BORDER | Nature::CREASE);
@@ -108,9 +108,9 @@ Controller::Controller()
_EPSILON = 1.0e-6;
_bboxDiag = 0;
- _ViewMap = 0;
+ _ViewMap = nullptr;
- _Canvas = 0;
+ _Canvas = nullptr;
_VisibilityAlgo = ViewMapBuilder::ray_casting_adaptive_traditional;
//_VisibilityAlgo = ViewMapBuilder::ray_casting;
@@ -134,7 +134,7 @@ Controller::Controller()
Controller::~Controller()
{
- if (NULL != _RootNode) {
+ if (nullptr != _RootNode) {
int ref = _RootNode->destroy();
if (0 == ref) {
delete _RootNode;
@@ -159,27 +159,27 @@ Controller::~Controller()
if (_winged_edge) {
delete _winged_edge;
- _winged_edge = NULL;
+ _winged_edge = nullptr;
}
- if (0 != _ViewMap) {
+ if (nullptr != _ViewMap) {
delete _ViewMap;
- _ViewMap = 0;
+ _ViewMap = nullptr;
}
- if (0 != _Canvas) {
+ if (nullptr != _Canvas) {
delete _Canvas;
- _Canvas = 0;
+ _Canvas = nullptr;
}
if (_inter) {
delete _inter;
- _inter = NULL;
+ _inter = nullptr;
}
if (_ProgressBar) {
delete _ProgressBar;
- _ProgressBar = NULL;
+ _ProgressBar = nullptr;
}
// delete _current_dirs;
@@ -187,7 +187,7 @@ Controller::~Controller()
void Controller::setView(AppView *iView)
{
- if (NULL == iView) {
+ if (nullptr == iView) {
return;
}
@@ -203,14 +203,14 @@ void Controller::setRenderMonitor(RenderMonitor *iRenderMonitor)
void Controller::setPassDiffuse(float *buf, int width, int height)
{
AppCanvas *app_canvas = dynamic_cast<AppCanvas *>(_Canvas);
- BLI_assert(app_canvas != 0);
+ BLI_assert(app_canvas != nullptr);
app_canvas->setPassDiffuse(buf, width, height);
}
void Controller::setPassZ(float *buf, int width, int height)
{
AppCanvas *app_canvas = dynamic_cast<AppCanvas *>(_Canvas);
- BLI_assert(app_canvas != 0);
+ BLI_assert(app_canvas != nullptr);
app_canvas->setPassZ(buf, width, height);
}
@@ -226,7 +226,7 @@ bool Controller::hitViewMapCache()
return false;
}
if (sceneHashFunc.match()) {
- return (NULL != _ViewMap);
+ return (nullptr != _ViewMap);
}
sceneHashFunc.store();
return false;
@@ -242,7 +242,7 @@ int Controller::LoadMesh(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph
NodeGroup *blenderScene = loader.Load();
- if (blenderScene == NULL) {
+ if (blenderScene == nullptr) {
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "Cannot load scene" << endl;
}
@@ -318,7 +318,7 @@ int Controller::LoadMesh(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph
}
delete _ViewMap;
- _ViewMap = NULL;
+ _ViewMap = nullptr;
}
_Chrono.start();
@@ -350,7 +350,7 @@ int Controller::LoadMesh(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph
string basename = string(cleaned);
#endif
- _ListOfModels.push_back("Blender_models");
+ _ListOfModels.emplace_back("Blender_models");
_Scene3dBBox = _RootNode->bbox();
@@ -386,14 +386,14 @@ void Controller::CloseFile()
_Canvas->Clear();
// soc: reset passes
- setPassDiffuse(NULL, 0, 0);
- setPassZ(NULL, 0, 0);
+ setPassDiffuse(nullptr, 0, 0);
+ setPassZ(nullptr, 0, 0);
}
void Controller::ClearRootNode()
{
_pView->DetachModel();
- if (NULL != _RootNode) {
+ if (nullptr != _RootNode) {
int ref = _RootNode->destroy();
if (0 == ref) {
_RootNode->addRef();
@@ -406,7 +406,7 @@ void Controller::DeleteWingedEdge()
{
if (_winged_edge) {
delete _winged_edge;
- _winged_edge = NULL;
+ _winged_edge = nullptr;
}
// clears the grid
@@ -454,10 +454,10 @@ void Controller::DeleteViewMap(bool freeCache)
}
#endif
- if (NULL != _ViewMap) {
+ if (nullptr != _ViewMap) {
if (freeCache || !_EnableViewMapCache) {
delete _ViewMap;
- _ViewMap = NULL;
+ _ViewMap = nullptr;
prevSceneHash = -1.0;
}
else {
@@ -877,7 +877,7 @@ bool Controller::getComputeSteerableViewMapFlag() const
int Controller::DrawStrokes()
{
- if (_ViewMap == 0) {
+ if (_ViewMap == nullptr) {
return 0;
}
@@ -927,12 +927,7 @@ Render *Controller::RenderStrokes(Render *re, bool render)
float megs_used_memory = (mem_in_use) / (1024.0 * 1024.0);
float megs_peak_memory = (peak_memory) / (1024.0 * 1024.0);
- printf("%d objs, %d verts, %d faces, mem %.2fM (peak %.2fM)\n",
- totmesh,
- freestyle_render->i.totvert,
- freestyle_render->i.totface,
- megs_used_memory,
- megs_peak_memory);
+ printf("%d objs, mem %.2fM (peak %.2fM)\n", totmesh, megs_used_memory, megs_peak_memory);
}
delete blenderRenderer;
@@ -1134,8 +1129,8 @@ void Controller::init_options()
_Canvas->init();
// soc: initialize passes
- setPassDiffuse(NULL, 0, 0);
- setPassZ(NULL, 0, 0);
+ setPassDiffuse(nullptr, 0, 0);
+ setPassZ(nullptr, 0, 0);
}
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
index a06218620ac..930da3ef471 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
@@ -33,18 +33,18 @@ BlenderFileLoader::BlenderFileLoader(Render *re, ViewLayer *view_layer, Depsgrap
{
_re = re;
_depsgraph = depsgraph;
- _Scene = NULL;
+ _Scene = nullptr;
_numFacesRead = 0;
#if 0
_minEdgeSize = DBL_MAX;
#endif
_smooth = (view_layer->freestyle_config.flags & FREESTYLE_FACE_SMOOTHNESS_FLAG) != 0;
- _pRenderMonitor = NULL;
+ _pRenderMonitor = nullptr;
}
BlenderFileLoader::~BlenderFileLoader()
{
- _Scene = NULL;
+ _Scene = nullptr;
}
NodeGroup *BlenderFileLoader::Load()
@@ -61,11 +61,11 @@ NodeGroup *BlenderFileLoader::Load()
_viewplane_bottom = _re->viewplane.ymin;
_viewplane_top = _re->viewplane.ymax;
- if (_re->clip_start < 0.f) {
+ if (_re->clip_start < 0.0f) {
// Adjust clipping start/end and set up a Z offset when the viewport preview
// is used with the orthographic view. In this case, _re->clip_start is negative,
// while Freestyle assumes that imported mesh data are in the camera coordinate
- // system with the view point located at origin [bug #36009].
+ // system with the view point located at origin [bug T36009].
_z_near = -0.001f;
_z_offset = _re->clip_start + _z_near;
_z_far = -_re->clip_end + _z_offset;
@@ -73,7 +73,7 @@ NodeGroup *BlenderFileLoader::Load()
else {
_z_near = -_re->clip_start;
_z_far = -_re->clip_end;
- _z_offset = 0.f;
+ _z_offset = 0.0f;
}
#if 0
@@ -104,7 +104,7 @@ NodeGroup *BlenderFileLoader::Load()
continue;
}
- Mesh *mesh = BKE_object_to_mesh(NULL, ob, false);
+ Mesh *mesh = BKE_object_to_mesh(nullptr, ob, false);
if (mesh) {
insertShapeNode(ob, mesh, ++id);
@@ -169,7 +169,7 @@ int BlenderFileLoader::countClippedFaces(float v1[3], float v2[3], float v3[3],
}
break;
case 3:
- if (sum == 3 || sum == -3) {
+ if (ELEM(sum, 3, -3)) {
numTris = 0;
}
else {
@@ -422,7 +422,7 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id)
// Compute loop normals
BKE_mesh_calc_normals_split(me);
- float(*lnors)[3] = NULL;
+ float(*lnors)[3] = nullptr;
if (CustomData_has_layer(&me->ldata, CD_NORMAL)) {
lnors = (float(*)[3])CustomData_get_layer(&me->ldata, CD_NORMAL);
@@ -577,7 +577,7 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id)
tmpMat.setLine(mat->line_col[0], mat->line_col[1], mat->line_col[2], mat->line_col[3]);
tmpMat.setDiffuse(mat->r, mat->g, mat->b, 1.0f);
tmpMat.setSpecular(mat->specr, mat->specg, mat->specb, 1.0f);
- tmpMat.setShininess(128.f);
+ tmpMat.setShininess(128.0f);
tmpMat.setPriority(mat->line_priority);
}
@@ -633,16 +633,16 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id)
// We might have several times the same vertex. We want a clean
// shape with no real-vertex. Here, we are making a cleaning pass.
- float *cleanVertices = NULL;
+ float *cleanVertices = nullptr;
unsigned int cvSize;
- unsigned int *cleanVIndices = NULL;
+ unsigned int *cleanVIndices = nullptr;
GeomCleaner::CleanIndexedVertexArray(
vertices, vSize, VIndices, viSize, &cleanVertices, &cvSize, &cleanVIndices);
- float *cleanNormals = NULL;
+ float *cleanNormals = nullptr;
unsigned int cnSize;
- unsigned int *cleanNIndices = NULL;
+ unsigned int *cleanNIndices = nullptr;
GeomCleaner::CleanIndexedVertexArray(
normals, nSize, NIndices, niSize, &cleanNormals, &cnSize, &cleanNIndices);
@@ -777,7 +777,7 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id)
cnSize,
marray,
meshFrsMaterials.size(),
- 0,
+ nullptr,
0,
numFaces,
numVertexPerFaces,
@@ -789,7 +789,7 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id)
niSize,
MIndices,
viSize,
- 0,
+ nullptr,
0,
0);
// sets the id of the rep
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index f31d7c95997..8aaffd4dde8 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -70,7 +70,7 @@ namespace Freestyle {
const char *BlenderStrokeRenderer::uvNames[] = {"along_stroke", "along_stroke_tips"};
-BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : StrokeRenderer()
+BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count)
{
freestyle_bmain = BKE_main_new();
@@ -141,7 +141,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str
view_layer->layflag = SCE_LAY_SOLID | SCE_LAY_ZTRA;
// Camera
- Object *object_camera = BKE_object_add(freestyle_bmain, view_layer, OB_CAMERA, NULL);
+ Object *object_camera = BKE_object_add(freestyle_bmain, view_layer, OB_CAMERA, nullptr);
Camera *camera = (Camera *)object_camera->data;
camera->type = CAM_ORTHO;
@@ -174,7 +174,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str
BlenderStrokeRenderer::~BlenderStrokeRenderer()
{
- BLI_ghash_free(_nodetree_hash, NULL, NULL);
+ BLI_ghash_free(_nodetree_hash, nullptr, nullptr);
DEG_graph_free(freestyle_depsgraph);
@@ -188,7 +188,7 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer()
BKE_main_free(freestyle_bmain);
}
-float BlenderStrokeRenderer::get_stroke_vertex_z(void) const
+float BlenderStrokeRenderer::get_stroke_vertex_z() const
{
float z = _z;
BlenderStrokeRenderer *self = const_cast<BlenderStrokeRenderer *>(this);
@@ -199,7 +199,7 @@ float BlenderStrokeRenderer::get_stroke_vertex_z(void) const
return -z;
}
-unsigned int BlenderStrokeRenderer::get_stroke_mesh_id(void) const
+unsigned int BlenderStrokeRenderer::get_stroke_mesh_id() const
{
unsigned mesh_id = _mesh_id;
BlenderStrokeRenderer *self = const_cast<BlenderStrokeRenderer *>(this);
@@ -213,7 +213,7 @@ Material *BlenderStrokeRenderer::GetStrokeShader(Main *bmain,
{
Material *ma = BKE_material_add(bmain, "stroke_shader");
bNodeTree *ntree;
- bNode *output_linestyle = NULL;
+ bNode *output_linestyle = nullptr;
bNodeSocket *fromsock, *tosock;
PointerRNA fromptr, toptr;
NodeShaderAttribute *storage;
@@ -233,19 +233,19 @@ Material *BlenderStrokeRenderer::GetStrokeShader(Main *bmain,
}
}
else {
- ntree = ntreeAddTree(NULL, "stroke_shader", "ShaderNodeTree");
+ ntree = ntreeAddTree(nullptr, "stroke_shader", "ShaderNodeTree");
}
ma->nodetree = ntree;
ma->use_nodes = 1;
ma->blend_method = MA_BM_HASHED;
- bNode *input_attr_color = nodeAddStaticNode(NULL, ntree, SH_NODE_ATTRIBUTE);
+ bNode *input_attr_color = nodeAddStaticNode(nullptr, ntree, SH_NODE_ATTRIBUTE);
input_attr_color->locx = 0.0f;
input_attr_color->locy = -200.0f;
storage = (NodeShaderAttribute *)input_attr_color->storage;
BLI_strncpy(storage->name, "Color", sizeof(storage->name));
- bNode *mix_rgb_color = nodeAddStaticNode(NULL, ntree, SH_NODE_MIX_RGB);
+ bNode *mix_rgb_color = nodeAddStaticNode(nullptr, ntree, SH_NODE_MIX_RGB);
mix_rgb_color->custom1 = MA_RAMP_BLEND; // Mix
mix_rgb_color->locx = 200.0f;
mix_rgb_color->locy = -200.0f;
@@ -253,13 +253,13 @@ Material *BlenderStrokeRenderer::GetStrokeShader(Main *bmain,
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, tosock, &toptr);
RNA_float_set(&toptr, "default_value", 0.0f);
- bNode *input_attr_alpha = nodeAddStaticNode(NULL, ntree, SH_NODE_ATTRIBUTE);
+ bNode *input_attr_alpha = nodeAddStaticNode(nullptr, ntree, SH_NODE_ATTRIBUTE);
input_attr_alpha->locx = 400.0f;
input_attr_alpha->locy = 300.0f;
storage = (NodeShaderAttribute *)input_attr_alpha->storage;
BLI_strncpy(storage->name, "Alpha", sizeof(storage->name));
- bNode *mix_rgb_alpha = nodeAddStaticNode(NULL, ntree, SH_NODE_MIX_RGB);
+ bNode *mix_rgb_alpha = nodeAddStaticNode(nullptr, ntree, SH_NODE_MIX_RGB);
mix_rgb_alpha->custom1 = MA_RAMP_BLEND; // Mix
mix_rgb_alpha->locx = 600.0f;
mix_rgb_alpha->locy = 300.0f;
@@ -267,27 +267,27 @@ Material *BlenderStrokeRenderer::GetStrokeShader(Main *bmain,
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, tosock, &toptr);
RNA_float_set(&toptr, "default_value", 0.0f);
- bNode *shader_emission = nodeAddStaticNode(NULL, ntree, SH_NODE_EMISSION);
+ bNode *shader_emission = nodeAddStaticNode(nullptr, ntree, SH_NODE_EMISSION);
shader_emission->locx = 400.0f;
shader_emission->locy = -200.0f;
- bNode *input_light_path = nodeAddStaticNode(NULL, ntree, SH_NODE_LIGHT_PATH);
+ bNode *input_light_path = nodeAddStaticNode(nullptr, ntree, SH_NODE_LIGHT_PATH);
input_light_path->locx = 400.0f;
input_light_path->locy = 100.0f;
- bNode *mix_shader_color = nodeAddStaticNode(NULL, ntree, SH_NODE_MIX_SHADER);
+ bNode *mix_shader_color = nodeAddStaticNode(nullptr, ntree, SH_NODE_MIX_SHADER);
mix_shader_color->locx = 600.0f;
mix_shader_color->locy = -100.0f;
- bNode *shader_transparent = nodeAddStaticNode(NULL, ntree, SH_NODE_BSDF_TRANSPARENT);
+ bNode *shader_transparent = nodeAddStaticNode(nullptr, ntree, SH_NODE_BSDF_TRANSPARENT);
shader_transparent->locx = 600.0f;
shader_transparent->locy = 100.0f;
- bNode *mix_shader_alpha = nodeAddStaticNode(NULL, ntree, SH_NODE_MIX_SHADER);
+ bNode *mix_shader_alpha = nodeAddStaticNode(nullptr, ntree, SH_NODE_MIX_SHADER);
mix_shader_alpha->locx = 800.0f;
mix_shader_alpha->locy = 100.0f;
- bNode *output_material = nodeAddStaticNode(NULL, ntree, SH_NODE_OUTPUT_MATERIAL);
+ bNode *output_material = nodeAddStaticNode(nullptr, ntree, SH_NODE_OUTPUT_MATERIAL);
output_material->locx = 1000.0f;
output_material->locy = 100.0f;
@@ -393,7 +393,7 @@ Material *BlenderStrokeRenderer::GetStrokeShader(Main *bmain,
bNodeSocket *sock = (bNodeSocket *)BLI_findlink(&node->outputs, 0);
// add new UV Map node
- bNode *input_uvmap = nodeAddStaticNode(NULL, ntree, SH_NODE_UVMAP);
+ bNode *input_uvmap = nodeAddStaticNode(nullptr, ntree, SH_NODE_UVMAP);
input_uvmap->locx = node->locx - 200.0f;
input_uvmap->locy = node->locy;
NodeShaderUVMap *storage = (NodeShaderUVMap *)input_uvmap->storage;
@@ -590,31 +590,31 @@ void BlenderStrokeRenderer::GenerateStrokeMesh(StrokeGroup *group, bool hasTex)
mesh->totcol = group->materials.size();
mesh->mvert = (MVert *)CustomData_add_layer(
- &mesh->vdata, CD_MVERT, CD_CALLOC, NULL, mesh->totvert);
+ &mesh->vdata, CD_MVERT, CD_CALLOC, nullptr, mesh->totvert);
mesh->medge = (MEdge *)CustomData_add_layer(
- &mesh->edata, CD_MEDGE, CD_CALLOC, NULL, mesh->totedge);
+ &mesh->edata, CD_MEDGE, CD_CALLOC, nullptr, mesh->totedge);
mesh->mpoly = (MPoly *)CustomData_add_layer(
- &mesh->pdata, CD_MPOLY, CD_CALLOC, NULL, mesh->totpoly);
+ &mesh->pdata, CD_MPOLY, CD_CALLOC, nullptr, mesh->totpoly);
mesh->mloop = (MLoop *)CustomData_add_layer(
- &mesh->ldata, CD_MLOOP, CD_CALLOC, NULL, mesh->totloop);
+ &mesh->ldata, CD_MLOOP, CD_CALLOC, nullptr, mesh->totloop);
MVert *vertices = mesh->mvert;
MEdge *edges = mesh->medge;
MPoly *polys = mesh->mpoly;
MLoop *loops = mesh->mloop;
- MLoopUV *loopsuv[2] = {NULL};
+ MLoopUV *loopsuv[2] = {nullptr};
if (hasTex) {
// First UV layer
CustomData_add_layer_named(
- &mesh->ldata, CD_MLOOPUV, CD_CALLOC, NULL, mesh->totloop, uvNames[0]);
+ &mesh->ldata, CD_MLOOPUV, CD_CALLOC, nullptr, mesh->totloop, uvNames[0]);
CustomData_set_layer_active(&mesh->ldata, CD_MLOOPUV, 0);
BKE_mesh_update_customdata_pointers(mesh, true);
loopsuv[0] = mesh->mloopuv;
// Second UV layer
CustomData_add_layer_named(
- &mesh->ldata, CD_MLOOPUV, CD_CALLOC, NULL, mesh->totloop, uvNames[1]);
+ &mesh->ldata, CD_MLOOPUV, CD_CALLOC, nullptr, mesh->totloop, uvNames[1]);
CustomData_set_layer_active(&mesh->ldata, CD_MLOOPUV, 1);
BKE_mesh_update_customdata_pointers(mesh, true);
loopsuv[1] = mesh->mloopuv;
@@ -622,9 +622,9 @@ void BlenderStrokeRenderer::GenerateStrokeMesh(StrokeGroup *group, bool hasTex)
// colors and transparency (the latter represented by grayscale colors)
MLoopCol *colors = (MLoopCol *)CustomData_add_layer_named(
- &mesh->ldata, CD_MLOOPCOL, CD_CALLOC, NULL, mesh->totloop, "Color");
+ &mesh->ldata, CD_MLOOPCOL, CD_CALLOC, nullptr, mesh->totloop, "Color");
MLoopCol *transp = (MLoopCol *)CustomData_add_layer_named(
- &mesh->ldata, CD_MLOOPCOL, CD_CALLOC, NULL, mesh->totloop, "Alpha");
+ &mesh->ldata, CD_MLOOPCOL, CD_CALLOC, nullptr, mesh->totloop, "Alpha");
mesh->mloopcol = colors;
mesh->mat = (Material **)MEM_mallocN(sizeof(Material *) * mesh->totcol, "MaterialList");
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 2446bfc13dc..65fa193f92f 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -59,7 +59,7 @@ using namespace Freestyle;
#include "DEG_depsgraph_query.h"
-#include "renderpipeline.h"
+#include "pipeline.h"
#include "FRS_freestyle.h"
@@ -72,9 +72,9 @@ struct FreestyleGlobals g_freestyle;
// Freestyle configuration
static bool freestyle_is_initialized = false;
-static Config::Path *pathconfig = NULL;
-static Controller *controller = NULL;
-static AppView *view = NULL;
+static Config::Path *pathconfig = nullptr;
+static Controller *controller = nullptr;
+static AppView *view = nullptr;
// line set buffer for copy & paste
static FreestyleLineSet lineset_buffer;
@@ -89,10 +89,10 @@ static void load_post_callback(struct Main * /*main*/,
}
static bCallbackFuncStore load_post_callback_funcstore = {
- NULL,
- NULL, /* next, prev */
+ nullptr,
+ nullptr, /* next, prev */
load_post_callback, /* func */
- NULL, /* arg */
+ nullptr, /* arg */
0 /* alloc */
};
@@ -111,12 +111,12 @@ void FRS_init()
view = new AppView;
controller->setView(view);
controller->Clear();
- g_freestyle.scene = NULL;
+ g_freestyle.scene = nullptr;
lineset_copied = false;
BKE_callback_add(&load_post_callback_funcstore, BKE_CB_EVT_LOAD_POST);
- freestyle_is_initialized = 1;
+ freestyle_is_initialized = true;
}
void FRS_set_context(bContext *C)
@@ -150,10 +150,10 @@ static void init_view(Render *re)
float thickness = 1.0f;
switch (re->r.line_thickness_mode) {
case R_LINE_THICKNESS_ABSOLUTE:
- thickness = re->r.unit_line_thickness * (re->r.size / 100.f);
+ thickness = re->r.unit_line_thickness * (re->r.size / 100.0f);
break;
case R_LINE_THICKNESS_RELATIVE:
- thickness = height / 480.f;
+ thickness = height / 480.0f;
break;
}
@@ -312,7 +312,7 @@ static void prepare(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph)
// load mesh
re->i.infostr = TIP_("Freestyle: Mesh loading");
re->stats_draw(re->sdh, &re->i);
- re->i.infostr = NULL;
+ re->i.infostr = nullptr;
if (controller->LoadMesh(
re, view_layer, depsgraph)) { // returns if scene cannot be loaded or if empty
return;
@@ -507,7 +507,7 @@ static void prepare(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph)
// compute view map
re->i.infostr = TIP_("Freestyle: View map creation");
re->stats_draw(re->sdh, &re->i);
- re->i.infostr = NULL;
+ re->i.infostr = nullptr;
controller->ComputeViewMap();
}
@@ -517,7 +517,7 @@ void FRS_composite_result(Render *re, ViewLayer *view_layer, Render *freestyle_r
float *src, *dest, *pixSrc, *pixDest;
int x, y, rectx, recty;
- if (freestyle_render == NULL || freestyle_render->result == NULL) {
+ if (freestyle_render == nullptr || freestyle_render->result == nullptr) {
return;
}
@@ -676,15 +676,15 @@ void FRS_do_stroke_rendering(Render *re, ViewLayer *view_layer)
// render strokes
re->i.infostr = TIP_("Freestyle: Stroke rendering");
re->stats_draw(re->sdh, &re->i);
- re->i.infostr = NULL;
+ re->i.infostr = nullptr;
g_freestyle.scene = DEG_get_evaluated_scene(depsgraph);
int strokeCount = controller->DrawStrokes();
- Render *freestyle_render = NULL;
+ Render *freestyle_render = nullptr;
if (strokeCount > 0) {
freestyle_render = controller->RenderStrokes(re, true);
}
controller->CloseFile();
- g_freestyle.scene = NULL;
+ g_freestyle.scene = nullptr;
// composite result
if (freestyle_render) {
@@ -762,7 +762,7 @@ void FRS_paste_active_lineset(FreestyleConfig *config)
lineset->exclude_edge_types = lineset_buffer.exclude_edge_types;
if (lineset->group) {
id_us_min(&lineset->group->id);
- lineset->group = NULL;
+ lineset->group = nullptr;
}
if (lineset_buffer.group) {
lineset->group = lineset_buffer.group;
@@ -790,14 +790,14 @@ void FRS_delete_active_lineset(FreestyleConfig *config)
bool FRS_move_active_lineset(FreestyleConfig *config, int direction)
{
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config);
- return (lineset != NULL) && BLI_listbase_link_move(&config->linesets, lineset, direction);
+ return (lineset != nullptr) && BLI_listbase_link_move(&config->linesets, lineset, direction);
}
// Testing
Material *FRS_create_stroke_material(Main *bmain, struct FreestyleLineStyle *linestyle)
{
- bNodeTree *nt = (linestyle->use_nodes) ? linestyle->nodetree : NULL;
+ bNodeTree *nt = (linestyle->use_nodes) ? linestyle->nodetree : nullptr;
Material *ma = BlenderStrokeRenderer::GetStrokeShader(bmain, nt, true);
ma->id.us = 0;
return ma;
diff --git a/source/blender/freestyle/intern/geometry/Bezier.cpp b/source/blender/freestyle/intern/geometry/Bezier.cpp
index 4ae30ff893c..4eec3d72db9 100644
--- a/source/blender/freestyle/intern/geometry/Bezier.cpp
+++ b/source/blender/freestyle/intern/geometry/Bezier.cpp
@@ -73,8 +73,8 @@ void BezierCurveSegment::Build()
float increment = 1.0 / (float)nvertices;
float t = 0.0f;
for (int i = 0; i <= nvertices; ++i) {
- _Vertices.push_back(Vec2d((x[3] + t * (x[2] + t * (x[1] + t * x[0]))),
- (y[3] + t * (y[2] + t * (y[1] + t * y[0])))));
+ _Vertices.emplace_back((x[3] + t * (x[2] + t * (x[1] + t * x[0]))),
+ (y[3] + t * (y[2] + t * (y[1] + t * y[0]))));
t += increment;
}
}
diff --git a/source/blender/freestyle/intern/geometry/FastGrid.cpp b/source/blender/freestyle/intern/geometry/FastGrid.cpp
index 1e5707690a0..1e0ae06da19 100644
--- a/source/blender/freestyle/intern/geometry/FastGrid.cpp
+++ b/source/blender/freestyle/intern/geometry/FastGrid.cpp
@@ -40,7 +40,7 @@ void FastGrid::clear()
}
}
delete[] _cells;
- _cells = NULL;
+ _cells = nullptr;
_cells_size = 0;
Grid::clear();
diff --git a/source/blender/freestyle/intern/geometry/FitCurve.cpp b/source/blender/freestyle/intern/geometry/FitCurve.cpp
index aeb4902e5b0..5682ccc9298 100644
--- a/source/blender/freestyle/intern/geometry/FitCurve.cpp
+++ b/source/blender/freestyle/intern/geometry/FitCurve.cpp
@@ -493,7 +493,7 @@ void FitCurveWrapper::FitCurve(vector<Vec2d> &data, vector<Vec2d> &oCurve, doubl
// copy results
for (vector<Vector2>::iterator v = _vertices.begin(), vend = _vertices.end(); v != vend; ++v) {
- oCurve.push_back(Vec2d(v->x(), v->y()));
+ oCurve.emplace_back(v->x(), v->y());
}
}
diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp
index 76e63764e4d..b1d0a6c7e2a 100644
--- a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp
+++ b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp
@@ -54,8 +54,7 @@ void GeomCleaner::SortIndexedVertexArray(const float *iVertices,
list<IndexedVertex> indexedVertices;
unsigned i;
for (i = 0; i < iVSize; i += 3) {
- indexedVertices.push_back(
- IndexedVertex(Vec3f(iVertices[i], iVertices[i + 1], iVertices[i + 2]), i / 3));
+ indexedVertices.emplace_back(Vec3f(iVertices[i], iVertices[i + 1], iVertices[i + 2]), i / 3);
}
// q-sort
@@ -99,7 +98,7 @@ void GeomCleaner::CompressIndexedVertexArray(const float *iVertices,
vector<Vec3f> vertices;
unsigned i;
for (i = 0; i < iVSize; i += 3) {
- vertices.push_back(Vec3f(iVertices[i], iVertices[i + 1], iVertices[i + 2]));
+ vertices.emplace_back(iVertices[i], iVertices[i + 1], iVertices[i + 2]);
}
unsigned *mapVertex = new unsigned[iVSize];
@@ -207,7 +206,7 @@ void GeomCleaner::CleanIndexedVertexArray(const float *iVertices,
vector<Vec3f> vertices;
unsigned i;
for (i = 0; i < iVSize; i += 3) {
- vertices.push_back(Vec3f(iVertices[i], iVertices[i + 1], iVertices[i + 2]));
+ vertices.emplace_back(iVertices[i], iVertices[i + 1], iVertices[i + 2]);
}
cleanHashTable ht;
diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.cpp b/source/blender/freestyle/intern/geometry/GeomUtils.cpp
index 89a89d095ea..51727fd2288 100644
--- a/source/blender/freestyle/intern/geometry/GeomUtils.cpp
+++ b/source/blender/freestyle/intern/geometry/GeomUtils.cpp
@@ -21,9 +21,7 @@
#include "GeomUtils.h"
-namespace Freestyle {
-
-namespace GeomUtils {
+namespace Freestyle::GeomUtils {
// This internal procedure is defined below.
bool intersect2dSegPoly(Vec2r *seg, Vec2r *poly, unsigned n);
@@ -219,14 +217,18 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
#define FINDMINMAX(x0, x1, x2, min, max) \
{ \
min = max = x0; \
- if (x1 < min) \
+ if (x1 < min) { \
min = x1; \
- if (x1 > max) \
+ } \
+ if (x1 > max) { \
max = x1; \
- if (x2 < min) \
+ } \
+ if (x2 < min) { \
min = x2; \
- if (x2 > max) \
+ } \
+ if (x2 > max) { \
max = x2; \
+ } \
} \
(void)0
@@ -244,8 +246,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -262,8 +265,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -281,8 +285,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Z]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -299,8 +304,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Z]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -318,8 +324,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p2; \
} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Y]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -336,8 +343,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Y]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -836,6 +844,4 @@ inline void fromCoordAToCoordB(const Vec3r &p, Vec3r &q, const real transform[4]
}
}
-} // end of namespace GeomUtils
-
-} /* namespace Freestyle */
+} // namespace Freestyle::GeomUtils
diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp
index 46e91197764..fad5a63ea4f 100644
--- a/source/blender/freestyle/intern/geometry/Grid.cpp
+++ b/source/blender/freestyle/intern/geometry/Grid.cpp
@@ -75,7 +75,7 @@ void firstIntersectionGridVisitor::examineOccluder(Polygon3r *occ)
}
}
else {
- occ->userdata2 = 0;
+ occ->userdata2 = nullptr;
}
}
}
@@ -321,11 +321,11 @@ void Grid::castInfiniteRay(const Vec3r &orig,
Polygon3r *Grid::castRayToFindFirstIntersection(
const Vec3r &orig, const Vec3r &dir, double &t, double &u, double &v, unsigned timestamp)
{
- Polygon3r *occluder = 0;
+ Polygon3r *occluder = nullptr;
Vec3r end = Vec3r(orig + FLT_MAX * dir / dir.norm());
bool inter = initInfiniteRay(orig, dir, timestamp);
if (!inter) {
- return 0;
+ return nullptr;
}
firstIntersectionGridVisitor visitor(orig, dir, _cell_size);
castRayInternal(visitor);
diff --git a/source/blender/freestyle/intern/geometry/matrix_util.cpp b/source/blender/freestyle/intern/geometry/matrix_util.cpp
index 9d25a240a63..5b5d9582e8f 100644
--- a/source/blender/freestyle/intern/geometry/matrix_util.cpp
+++ b/source/blender/freestyle/intern/geometry/matrix_util.cpp
@@ -33,11 +33,7 @@
#include "BLI_math.h"
-namespace Freestyle {
-
-namespace OGF {
-
-namespace MatrixUtil {
+namespace Freestyle::OGF::MatrixUtil {
static const double EPS = 0.00001;
static int MAX_ITER = 100;
@@ -149,7 +145,7 @@ void semi_definite_symmetric_eigen(const double *mat, int n, double *eigen_vec,
imv = n * (m - 1);
for (i = 1; i <= n; i++) {
- if ((i != l) && (i != m)) {
+ if (!ELEM(i, l, m)) {
iq = (i * i - i) / 2;
if (i < m) {
@@ -252,8 +248,4 @@ void semi_definite_symmetric_eigen(const double *mat, int n, double *eigen_vec,
//_________________________________________________________
-} // namespace MatrixUtil
-
-} // namespace OGF
-
-} /* namespace Freestyle */
+} // namespace Freestyle::OGF::MatrixUtil
diff --git a/source/blender/freestyle/intern/geometry/matrix_util.h b/source/blender/freestyle/intern/geometry/matrix_util.h
index 996ebc928a1..8a20cb31300 100644
--- a/source/blender/freestyle/intern/geometry/matrix_util.h
+++ b/source/blender/freestyle/intern/geometry/matrix_util.h
@@ -42,16 +42,18 @@ namespace MatrixUtil {
/**
* computes the eigen values and eigen vectors of a semi definite symmetric matrix
*
- * \param mat: The matrix stored in column symmetric storage, i.e.
- * matrix = { m11, m12, m22, m13, m23, m33, m14, m24, m34, m44 ... }
- * size = n(n+1)/2
+ * \param mat: The matrix stored in column symmetric storage, i.e.
+ * <pre>
+ * matrix = { m11, m12, m22, m13, m23, m33, m14, m24, m34, m44 ... }
+ * size = n(n+1)/2
+ * </pre>
*
* \param eigen_vec: (return) = { v1, v2, v3, ..., vn }
- * where vk = vk0, vk1, ..., vkn
- * size = n^2, must be allocated by caller
+ * where `vk = vk0, vk1, ..., vkn`
+ * `size = n^2`, must be allocated by caller.
*
* \param eigen_val: (return) are in decreasing order
- * size = n, must be allocated by caller
+ * `size = n`, must be allocated by caller.
*/
void semi_definite_symmetric_eigen(const double *mat, int n, double *eigen_vec, double *eigen_val);
diff --git a/source/blender/freestyle/intern/geometry/normal_cycle.cpp b/source/blender/freestyle/intern/geometry/normal_cycle.cpp
index d02b5cc2d5b..01d52646eb0 100644
--- a/source/blender/freestyle/intern/geometry/normal_cycle.cpp
+++ b/source/blender/freestyle/intern/geometry/normal_cycle.cpp
@@ -32,9 +32,7 @@
#include "normal_cycle.h"
#include "matrix_util.h"
-namespace Freestyle {
-
-namespace OGF {
+namespace Freestyle::OGF {
//_________________________________________________________
@@ -88,6 +86,4 @@ void NormalCycle::end()
//_________________________________________________________
-} // namespace OGF
-
-} /* namespace Freestyle */
+} // namespace Freestyle::OGF
diff --git a/source/blender/freestyle/intern/image/GaussianFilter.cpp b/source/blender/freestyle/intern/image/GaussianFilter.cpp
index ca476bee0d3..3bbe86ee986 100644
--- a/source/blender/freestyle/intern/image/GaussianFilter.cpp
+++ b/source/blender/freestyle/intern/image/GaussianFilter.cpp
@@ -28,7 +28,7 @@ namespace Freestyle {
GaussianFilter::GaussianFilter(float iSigma)
{
_sigma = iSigma;
- _mask = 0;
+ _mask = nullptr;
computeMask();
}
diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp
index 2f12081eb76..b6779669a15 100644
--- a/source/blender/freestyle/intern/image/ImagePyramid.cpp
+++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp
@@ -124,14 +124,12 @@ int ImagePyramid::height(int level)
}
GaussianPyramid::GaussianPyramid(const GrayImage &level0, unsigned nbLevels, float iSigma)
- : ImagePyramid()
{
_sigma = iSigma;
BuildPyramid(level0, nbLevels);
}
GaussianPyramid::GaussianPyramid(GrayImage *level0, unsigned nbLevels, float iSigma)
- : ImagePyramid()
{
_sigma = iSigma;
BuildPyramid(level0, nbLevels);
diff --git a/source/blender/freestyle/intern/image/ImagePyramid.h b/source/blender/freestyle/intern/image/ImagePyramid.h
index ee8bf69aa10..3b4e5eda52a 100644
--- a/source/blender/freestyle/intern/image/ImagePyramid.h
+++ b/source/blender/freestyle/intern/image/ImagePyramid.h
@@ -87,7 +87,7 @@ class GaussianPyramid : public ImagePyramid {
float _sigma;
public:
- GaussianPyramid(float iSigma = 1.f) : ImagePyramid()
+ GaussianPyramid(float iSigma = 1.0f) : ImagePyramid()
{
_sigma = iSigma;
}
diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp
index 17a0e53876e..d66a74bc83f 100644
--- a/source/blender/freestyle/intern/python/BPy_BBox.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp
@@ -29,7 +29,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int BBox_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -53,7 +53,7 @@ PyDoc_STRVAR(BBox_doc,
static int BBox_init(BPy_BBox *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -76,42 +76,46 @@ static PyObject *BBox_repr(BPy_BBox *self)
/*-----------------------BPy_BBox type definition ------------------------------*/
PyTypeObject BBox_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BBox", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 0) "BBox", /* tp_name */
sizeof(BPy_BBox), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)BBox_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)BBox_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
BBox_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)BBox_init, /* tp_init */
- 0, /* tp_alloc */
+ nullptr, /* tp_alloc */
PyType_GenericNew, /* tp_new */
};
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
index 42b13bf4920..2359d79f7d0 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
@@ -32,7 +32,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int BinaryPredicate0D_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -72,7 +72,7 @@ static char BinaryPredicate0D___doc__[] =
static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -98,7 +98,7 @@ static PyObject *BinaryPredicate0D___call__(BPy_BinaryPredicate0D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter1", "inter2", NULL};
+ static const char *kwlist[] = {"inter1", "inter2", nullptr};
BPy_Interface0D *obj1, *obj2;
if (!PyArg_ParseTupleAndKeywords(args,
@@ -109,18 +109,18 @@ static PyObject *BinaryPredicate0D___call__(BPy_BinaryPredicate0D *self,
&obj1,
&Interface0D_Type,
&obj2)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->bp0D)) == typeid(BinaryPredicate0D)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
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());
}
- return NULL;
+ return nullptr;
}
return PyBool_from_bool(self->bp0D->result);
}
@@ -138,50 +138,58 @@ static PyObject *BinaryPredicate0D_name_get(BPy_BinaryPredicate0D *self, void *U
}
static PyGetSetDef BPy_BinaryPredicate0D_getseters[] = {
- {"name", (getter)BinaryPredicate0D_name_get, (setter)NULL, BinaryPredicate0D_name_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"name",
+ (getter)BinaryPredicate0D_name_get,
+ (setter) nullptr,
+ BinaryPredicate0D_name_doc,
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_BinaryPredicate0D type definition ------------------------------*/
PyTypeObject BinaryPredicate0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BinaryPredicate0D", /* tp_name */
- sizeof(BPy_BinaryPredicate0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)BinaryPredicate0D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)BinaryPredicate0D___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BinaryPredicate0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_BinaryPredicate0D_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BinaryPredicate0D___init__, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "BinaryPredicate0D", /* tp_name */
+ sizeof(BPy_BinaryPredicate0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)BinaryPredicate0D___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)BinaryPredicate0D___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ BinaryPredicate0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_BinaryPredicate0D_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)BinaryPredicate0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
index ed991695739..7d554e0abe1 100644
--- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
@@ -38,7 +38,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int BinaryPredicate1D_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -108,7 +108,7 @@ static char BinaryPredicate1D___doc__[] =
static int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -133,7 +133,7 @@ static PyObject *BinaryPredicate1D___call__(BPy_BinaryPredicate1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter1", "inter2", NULL};
+ static const char *kwlist[] = {"inter1", "inter2", nullptr};
BPy_Interface1D *obj1, *obj2;
if (!PyArg_ParseTupleAndKeywords(args,
@@ -144,18 +144,18 @@ static PyObject *BinaryPredicate1D___call__(BPy_BinaryPredicate1D *self,
&obj1,
&Interface1D_Type,
&obj2)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->bp1D)) == typeid(BinaryPredicate1D)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
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());
}
- return NULL;
+ return nullptr;
}
return PyBool_from_bool(self->bp1D->result);
}
@@ -173,49 +173,57 @@ static PyObject *BinaryPredicate1D_name_get(BPy_BinaryPredicate1D *self, void *U
}
static PyGetSetDef BPy_BinaryPredicate1D_getseters[] = {
- {"name", (getter)BinaryPredicate1D_name_get, (setter)NULL, BinaryPredicate1D_name_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"name",
+ (getter)BinaryPredicate1D_name_get,
+ (setter) nullptr,
+ BinaryPredicate1D_name_doc,
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_BinaryPredicate1D type definition ------------------------------*/
PyTypeObject BinaryPredicate1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BinaryPredicate1D", /* tp_name */
- sizeof(BPy_BinaryPredicate1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)BinaryPredicate1D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)BinaryPredicate1D___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BinaryPredicate1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_BinaryPredicate1D_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BinaryPredicate1D___init__, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "BinaryPredicate1D", /* tp_name */
+ sizeof(BPy_BinaryPredicate1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)BinaryPredicate1D___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)BinaryPredicate1D___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ BinaryPredicate1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_BinaryPredicate1D_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)BinaryPredicate1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
index e838bade64a..e01d09bfe21 100644
--- a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
@@ -110,14 +110,14 @@ static char ContextFunctions_load_map___doc__[] =
static PyObject *ContextFunctions_load_map(PyObject * /*self*/, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"file_name", "map_name", "num_levels", "sigma", NULL};
+ static const char *kwlist[] = {"file_name", "map_name", "num_levels", "sigma", nullptr};
char *fileName, *mapName;
unsigned nbLevels = 4;
float sigma = 1.0;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "ss|If", (char **)kwlist, &fileName, &mapName, &nbLevels, &sigma)) {
- return NULL;
+ return nullptr;
}
ContextFunctions::LoadMapCF(fileName, mapName, nbLevels, sigma);
Py_RETURN_NONE;
@@ -146,14 +146,14 @@ static PyObject *ContextFunctions_read_map_pixel(PyObject * /*self*/,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"map_name", "level", "x", "y", NULL};
+ static const char *kwlist[] = {"map_name", "level", "x", "y", nullptr};
char *mapName;
int level;
unsigned x, y;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "siII", (char **)kwlist, &mapName, &level, &x, &y)) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(ContextFunctions::ReadMapPixelCF(mapName, level, x, y));
}
@@ -179,12 +179,12 @@ static PyObject *ContextFunctions_read_complete_view_map_pixel(PyObject * /*self
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"level", "x", "y", NULL};
+ static const char *kwlist[] = {"level", "x", "y", nullptr};
int level;
unsigned x, y;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "iII", (char **)kwlist, &level, &x, &y)) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(ContextFunctions::ReadCompleteViewMapPixelCF(level, x, y));
}
@@ -213,13 +213,13 @@ static PyObject *ContextFunctions_read_directional_view_map_pixel(PyObject * /*s
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"orientation", "level", "x", "y", NULL};
+ static const char *kwlist[] = {"orientation", "level", "x", "y", nullptr};
int orientation, level;
unsigned x, y;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "iiII", (char **)kwlist, &orientation, &level, &x, &y)) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(
ContextFunctions::ReadDirectionalViewMapPixelCF(orientation, level, x, y));
@@ -285,7 +285,7 @@ static PyMethodDef module_functions[] = {
(PyCFunction)ContextFunctions_get_selected_fedge,
METH_NOARGS,
ContextFunctions_get_selected_fedge___doc__},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*-----------------------ContextFunctions module definition--------------------------------*/
@@ -304,12 +304,12 @@ int ContextFunctions_Init(PyObject *module)
{
PyObject *m;
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
m = PyModule_Create(&module_definition);
- if (m == NULL) {
+ if (m == nullptr) {
return -1;
}
Py_INCREF(m);
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp
index 03f9760344b..f1d7a242a93 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp
@@ -77,7 +77,7 @@ PyObject *Vector_from_Vec2f(Vec2f &vec)
float vec_data[2]; // because vec->_coord is protected
vec_data[0] = vec.x();
vec_data[1] = vec.y();
- return Vector_CreatePyObject(vec_data, 2, NULL);
+ return Vector_CreatePyObject(vec_data, 2, nullptr);
}
PyObject *Vector_from_Vec3f(Vec3f &vec)
@@ -86,7 +86,7 @@ PyObject *Vector_from_Vec3f(Vec3f &vec)
vec_data[0] = vec.x();
vec_data[1] = vec.y();
vec_data[2] = vec.z();
- return Vector_CreatePyObject(vec_data, 3, NULL);
+ return Vector_CreatePyObject(vec_data, 3, nullptr);
}
PyObject *Vector_from_Vec3r(Vec3r &vec)
@@ -95,12 +95,12 @@ PyObject *Vector_from_Vec3r(Vec3r &vec)
vec_data[0] = vec.x();
vec_data[1] = vec.y();
vec_data[2] = vec.z();
- return Vector_CreatePyObject(vec_data, 3, NULL);
+ return Vector_CreatePyObject(vec_data, 3, nullptr);
}
PyObject *BPy_Id_from_Id(Id &id)
{
- PyObject *py_id = Id_Type.tp_new(&Id_Type, 0, 0);
+ PyObject *py_id = Id_Type.tp_new(&Id_Type, nullptr, nullptr);
((BPy_Id *)py_id)->id = new Id(id.getFirst(), id.getSecond());
return py_id;
}
@@ -130,7 +130,7 @@ PyObject *Any_BPy_Interface0D_from_Interface0D(Interface0D &if0D)
}
string msg("unexpected type: " + if0D.getExactTypeName());
PyErr_SetString(PyExc_TypeError, msg.c_str());
- return NULL;
+ return nullptr;
}
PyObject *Any_BPy_Interface1D_from_Interface1D(Interface1D &if1D)
@@ -158,7 +158,7 @@ PyObject *Any_BPy_Interface1D_from_Interface1D(Interface1D &if1D)
}
string msg("unexpected type: " + if1D.getExactTypeName());
PyErr_SetString(PyExc_TypeError, msg.c_str());
- return NULL;
+ return nullptr;
}
PyObject *Any_BPy_FEdge_from_FEdge(FEdge &fe)
@@ -174,7 +174,7 @@ PyObject *Any_BPy_FEdge_from_FEdge(FEdge &fe)
}
string msg("unexpected type: " + fe.getExactTypeName());
PyErr_SetString(PyExc_TypeError, msg.c_str());
- return NULL;
+ return nullptr;
}
PyObject *Any_BPy_ViewVertex_from_ViewVertex(ViewVertex &vv)
@@ -190,12 +190,12 @@ PyObject *Any_BPy_ViewVertex_from_ViewVertex(ViewVertex &vv)
}
string msg("unexpected type: " + vv.getExactTypeName());
PyErr_SetString(PyExc_TypeError, msg.c_str());
- return NULL;
+ return nullptr;
}
PyObject *BPy_Interface0D_from_Interface0D(Interface0D &if0D)
{
- PyObject *py_if0D = Interface0D_Type.tp_new(&Interface0D_Type, 0, 0);
+ PyObject *py_if0D = Interface0D_Type.tp_new(&Interface0D_Type, nullptr, nullptr);
((BPy_Interface0D *)py_if0D)->if0D = &if0D;
((BPy_Interface0D *)py_if0D)->borrowed = true;
return py_if0D;
@@ -203,7 +203,7 @@ PyObject *BPy_Interface0D_from_Interface0D(Interface0D &if0D)
PyObject *BPy_Interface1D_from_Interface1D(Interface1D &if1D)
{
- PyObject *py_if1D = Interface1D_Type.tp_new(&Interface1D_Type, 0, 0);
+ PyObject *py_if1D = Interface1D_Type.tp_new(&Interface1D_Type, nullptr, nullptr);
((BPy_Interface1D *)py_if1D)->if1D = &if1D;
((BPy_Interface1D *)py_if1D)->borrowed = true;
return py_if1D;
@@ -211,7 +211,7 @@ PyObject *BPy_Interface1D_from_Interface1D(Interface1D &if1D)
PyObject *BPy_SVertex_from_SVertex(SVertex &sv)
{
- PyObject *py_sv = SVertex_Type.tp_new(&SVertex_Type, 0, 0);
+ PyObject *py_sv = SVertex_Type.tp_new(&SVertex_Type, nullptr, nullptr);
((BPy_SVertex *)py_sv)->sv = &sv;
((BPy_SVertex *)py_sv)->py_if0D.if0D = ((BPy_SVertex *)py_sv)->sv;
((BPy_SVertex *)py_sv)->py_if0D.borrowed = true;
@@ -220,7 +220,7 @@ PyObject *BPy_SVertex_from_SVertex(SVertex &sv)
PyObject *BPy_FEdgeSharp_from_FEdgeSharp(FEdgeSharp &fes)
{
- PyObject *py_fe = FEdgeSharp_Type.tp_new(&FEdgeSharp_Type, 0, 0);
+ PyObject *py_fe = FEdgeSharp_Type.tp_new(&FEdgeSharp_Type, nullptr, nullptr);
((BPy_FEdgeSharp *)py_fe)->fes = &fes;
((BPy_FEdgeSharp *)py_fe)->py_fe.fe = ((BPy_FEdgeSharp *)py_fe)->fes;
((BPy_FEdgeSharp *)py_fe)->py_fe.py_if1D.if1D = ((BPy_FEdgeSharp *)py_fe)->fes;
@@ -230,7 +230,7 @@ PyObject *BPy_FEdgeSharp_from_FEdgeSharp(FEdgeSharp &fes)
PyObject *BPy_FEdgeSmooth_from_FEdgeSmooth(FEdgeSmooth &fes)
{
- PyObject *py_fe = FEdgeSmooth_Type.tp_new(&FEdgeSmooth_Type, 0, 0);
+ PyObject *py_fe = FEdgeSmooth_Type.tp_new(&FEdgeSmooth_Type, nullptr, nullptr);
((BPy_FEdgeSmooth *)py_fe)->fes = &fes;
((BPy_FEdgeSmooth *)py_fe)->py_fe.fe = ((BPy_FEdgeSmooth *)py_fe)->fes;
((BPy_FEdgeSmooth *)py_fe)->py_fe.py_if1D.if1D = ((BPy_FEdgeSmooth *)py_fe)->fes;
@@ -240,7 +240,7 @@ PyObject *BPy_FEdgeSmooth_from_FEdgeSmooth(FEdgeSmooth &fes)
PyObject *BPy_FEdge_from_FEdge(FEdge &fe)
{
- PyObject *py_fe = FEdge_Type.tp_new(&FEdge_Type, 0, 0);
+ PyObject *py_fe = FEdge_Type.tp_new(&FEdge_Type, nullptr, nullptr);
((BPy_FEdge *)py_fe)->fe = &fe;
((BPy_FEdge *)py_fe)->py_if1D.if1D = ((BPy_FEdge *)py_fe)->fe;
((BPy_FEdge *)py_fe)->py_if1D.borrowed = true;
@@ -251,14 +251,14 @@ PyObject *BPy_Nature_from_Nature(unsigned short n)
{
PyObject *args = PyTuple_New(1);
PyTuple_SET_ITEM(args, 0, PyLong_FromLong(n));
- PyObject *py_n = Nature_Type.tp_new(&Nature_Type, args, NULL);
+ PyObject *py_n = Nature_Type.tp_new(&Nature_Type, args, nullptr);
Py_DECREF(args);
return py_n;
}
PyObject *BPy_Stroke_from_Stroke(Stroke &s)
{
- PyObject *py_s = Stroke_Type.tp_new(&Stroke_Type, 0, 0);
+ PyObject *py_s = Stroke_Type.tp_new(&Stroke_Type, nullptr, nullptr);
((BPy_Stroke *)py_s)->s = &s;
((BPy_Stroke *)py_s)->py_if1D.if1D = ((BPy_Stroke *)py_s)->s;
((BPy_Stroke *)py_s)->py_if1D.borrowed = true;
@@ -267,7 +267,7 @@ PyObject *BPy_Stroke_from_Stroke(Stroke &s)
PyObject *BPy_StrokeAttribute_from_StrokeAttribute(StrokeAttribute &sa)
{
- PyObject *py_sa = StrokeAttribute_Type.tp_new(&StrokeAttribute_Type, 0, 0);
+ PyObject *py_sa = StrokeAttribute_Type.tp_new(&StrokeAttribute_Type, nullptr, nullptr);
((BPy_StrokeAttribute *)py_sa)->sa = &sa;
((BPy_StrokeAttribute *)py_sa)->borrowed = true;
return py_sa;
@@ -277,14 +277,14 @@ PyObject *BPy_MediumType_from_MediumType(Stroke::MediumType n)
{
PyObject *args = PyTuple_New(1);
PyTuple_SET_ITEM(args, 0, PyLong_FromLong(n));
- PyObject *py_mt = MediumType_Type.tp_new(&MediumType_Type, args, NULL);
+ PyObject *py_mt = MediumType_Type.tp_new(&MediumType_Type, args, nullptr);
Py_DECREF(args);
return py_mt;
}
PyObject *BPy_StrokeVertex_from_StrokeVertex(StrokeVertex &sv)
{
- PyObject *py_sv = StrokeVertex_Type.tp_new(&StrokeVertex_Type, 0, 0);
+ PyObject *py_sv = StrokeVertex_Type.tp_new(&StrokeVertex_Type, nullptr, nullptr);
((BPy_StrokeVertex *)py_sv)->sv = &sv;
((BPy_StrokeVertex *)py_sv)->py_cp.cp = ((BPy_StrokeVertex *)py_sv)->sv;
((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.if0D = ((BPy_StrokeVertex *)py_sv)->sv;
@@ -294,7 +294,7 @@ PyObject *BPy_StrokeVertex_from_StrokeVertex(StrokeVertex &sv)
PyObject *BPy_ViewVertex_from_ViewVertex(ViewVertex &vv)
{
- PyObject *py_vv = ViewVertex_Type.tp_new(&ViewVertex_Type, 0, 0);
+ PyObject *py_vv = ViewVertex_Type.tp_new(&ViewVertex_Type, nullptr, nullptr);
((BPy_ViewVertex *)py_vv)->vv = &vv;
((BPy_ViewVertex *)py_vv)->py_if0D.if0D = ((BPy_ViewVertex *)py_vv)->vv;
((BPy_ViewVertex *)py_vv)->py_if0D.borrowed = true;
@@ -303,7 +303,7 @@ PyObject *BPy_ViewVertex_from_ViewVertex(ViewVertex &vv)
PyObject *BPy_NonTVertex_from_NonTVertex(NonTVertex &ntv)
{
- PyObject *py_ntv = NonTVertex_Type.tp_new(&NonTVertex_Type, 0, 0);
+ PyObject *py_ntv = NonTVertex_Type.tp_new(&NonTVertex_Type, nullptr, nullptr);
((BPy_NonTVertex *)py_ntv)->ntv = &ntv;
((BPy_NonTVertex *)py_ntv)->py_vv.vv = ((BPy_NonTVertex *)py_ntv)->ntv;
((BPy_NonTVertex *)py_ntv)->py_vv.py_if0D.if0D = ((BPy_NonTVertex *)py_ntv)->ntv;
@@ -313,7 +313,7 @@ PyObject *BPy_NonTVertex_from_NonTVertex(NonTVertex &ntv)
PyObject *BPy_TVertex_from_TVertex(TVertex &tv)
{
- PyObject *py_tv = TVertex_Type.tp_new(&TVertex_Type, 0, 0);
+ PyObject *py_tv = TVertex_Type.tp_new(&TVertex_Type, nullptr, nullptr);
((BPy_TVertex *)py_tv)->tv = &tv;
((BPy_TVertex *)py_tv)->py_vv.vv = ((BPy_TVertex *)py_tv)->tv;
((BPy_TVertex *)py_tv)->py_vv.py_if0D.if0D = ((BPy_TVertex *)py_tv)->tv;
@@ -323,14 +323,14 @@ PyObject *BPy_TVertex_from_TVertex(TVertex &tv)
PyObject *BPy_BBox_from_BBox(const BBox<Vec3r> &bb)
{
- PyObject *py_bb = BBox_Type.tp_new(&BBox_Type, 0, 0);
+ PyObject *py_bb = BBox_Type.tp_new(&BBox_Type, nullptr, nullptr);
((BPy_BBox *)py_bb)->bb = new BBox<Vec3r>(bb);
return py_bb;
}
PyObject *BPy_ViewEdge_from_ViewEdge(ViewEdge &ve)
{
- PyObject *py_ve = ViewEdge_Type.tp_new(&ViewEdge_Type, 0, 0);
+ PyObject *py_ve = ViewEdge_Type.tp_new(&ViewEdge_Type, nullptr, nullptr);
((BPy_ViewEdge *)py_ve)->ve = &ve;
((BPy_ViewEdge *)py_ve)->py_if1D.if1D = ((BPy_ViewEdge *)py_ve)->ve;
((BPy_ViewEdge *)py_ve)->py_if1D.borrowed = true;
@@ -339,7 +339,7 @@ PyObject *BPy_ViewEdge_from_ViewEdge(ViewEdge &ve)
PyObject *BPy_Chain_from_Chain(Chain &c)
{
- PyObject *py_c = Chain_Type.tp_new(&Chain_Type, 0, 0);
+ PyObject *py_c = Chain_Type.tp_new(&Chain_Type, nullptr, nullptr);
((BPy_Chain *)py_c)->c = &c;
((BPy_Chain *)py_c)->py_c.c = ((BPy_Chain *)py_c)->c;
((BPy_Chain *)py_c)->py_c.py_if1D.if1D = ((BPy_Chain *)py_c)->c;
@@ -349,7 +349,7 @@ PyObject *BPy_Chain_from_Chain(Chain &c)
PyObject *BPy_SShape_from_SShape(SShape &ss)
{
- PyObject *py_ss = SShape_Type.tp_new(&SShape_Type, 0, 0);
+ PyObject *py_ss = SShape_Type.tp_new(&SShape_Type, nullptr, nullptr);
((BPy_SShape *)py_ss)->ss = &ss;
((BPy_SShape *)py_ss)->borrowed = true;
return py_ss;
@@ -357,16 +357,16 @@ PyObject *BPy_SShape_from_SShape(SShape &ss)
PyObject *BPy_ViewShape_from_ViewShape(ViewShape &vs)
{
- PyObject *py_vs = ViewShape_Type.tp_new(&ViewShape_Type, 0, 0);
+ PyObject *py_vs = ViewShape_Type.tp_new(&ViewShape_Type, nullptr, nullptr);
((BPy_ViewShape *)py_vs)->vs = &vs;
((BPy_ViewShape *)py_vs)->borrowed = true;
- ((BPy_ViewShape *)py_vs)->py_ss = NULL;
+ ((BPy_ViewShape *)py_vs)->py_ss = nullptr;
return py_vs;
}
PyObject *BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial &m)
{
- PyObject *py_m = FrsMaterial_Type.tp_new(&FrsMaterial_Type, 0, 0);
+ PyObject *py_m = FrsMaterial_Type.tp_new(&FrsMaterial_Type, nullptr, nullptr);
((BPy_FrsMaterial *)py_m)->m = new FrsMaterial(m);
return py_m;
}
@@ -375,14 +375,14 @@ PyObject *BPy_IntegrationType_from_IntegrationType(IntegrationType i)
{
PyObject *args = PyTuple_New(1);
PyTuple_SET_ITEM(args, 0, PyLong_FromLong(i));
- PyObject *py_it = IntegrationType_Type.tp_new(&IntegrationType_Type, args, NULL);
+ PyObject *py_it = IntegrationType_Type.tp_new(&IntegrationType_Type, args, nullptr);
Py_DECREF(args);
return py_it;
}
PyObject *BPy_CurvePoint_from_CurvePoint(CurvePoint &cp)
{
- PyObject *py_cp = CurvePoint_Type.tp_new(&CurvePoint_Type, 0, 0);
+ PyObject *py_cp = CurvePoint_Type.tp_new(&CurvePoint_Type, nullptr, nullptr);
// CurvePointIterator::operator*() returns a reference of a class data
// member whose value is mutable upon iteration over different CurvePoints.
// It is likely that such a mutable reference is passed to this function,
@@ -408,7 +408,7 @@ PyObject *BPy_directedViewEdge_from_directedViewEdge(ViewVertex::directedViewEdg
PyObject *BPy_AdjacencyIterator_from_AdjacencyIterator(AdjacencyIterator &a_it)
{
- PyObject *py_a_it = AdjacencyIterator_Type.tp_new(&AdjacencyIterator_Type, 0, 0);
+ PyObject *py_a_it = AdjacencyIterator_Type.tp_new(&AdjacencyIterator_Type, nullptr, nullptr);
((BPy_AdjacencyIterator *)py_a_it)->a_it = new AdjacencyIterator(a_it);
((BPy_AdjacencyIterator *)py_a_it)->py_it.it = ((BPy_AdjacencyIterator *)py_a_it)->a_it;
((BPy_AdjacencyIterator *)py_a_it)->at_start = true;
@@ -418,7 +418,8 @@ PyObject *BPy_AdjacencyIterator_from_AdjacencyIterator(AdjacencyIterator &a_it)
PyObject *BPy_Interface0DIterator_from_Interface0DIterator(Interface0DIterator &if0D_it,
bool reversed)
{
- PyObject *py_if0D_it = Interface0DIterator_Type.tp_new(&Interface0DIterator_Type, 0, 0);
+ PyObject *py_if0D_it = Interface0DIterator_Type.tp_new(
+ &Interface0DIterator_Type, nullptr, nullptr);
((BPy_Interface0DIterator *)py_if0D_it)->if0D_it = new Interface0DIterator(if0D_it);
((BPy_Interface0DIterator *)py_if0D_it)->py_it.it =
((BPy_Interface0DIterator *)py_if0D_it)->if0D_it;
@@ -429,7 +430,7 @@ PyObject *BPy_Interface0DIterator_from_Interface0DIterator(Interface0DIterator &
PyObject *BPy_CurvePointIterator_from_CurvePointIterator(CurveInternal::CurvePointIterator &cp_it)
{
- PyObject *py_cp_it = CurvePointIterator_Type.tp_new(&CurvePointIterator_Type, 0, 0);
+ PyObject *py_cp_it = CurvePointIterator_Type.tp_new(&CurvePointIterator_Type, nullptr, nullptr);
((BPy_CurvePointIterator *)py_cp_it)->cp_it = new CurveInternal::CurvePointIterator(cp_it);
((BPy_CurvePointIterator *)py_cp_it)->py_it.it = ((BPy_CurvePointIterator *)py_cp_it)->cp_it;
return py_cp_it;
@@ -438,7 +439,8 @@ PyObject *BPy_CurvePointIterator_from_CurvePointIterator(CurveInternal::CurvePoi
PyObject *BPy_StrokeVertexIterator_from_StrokeVertexIterator(
StrokeInternal::StrokeVertexIterator &sv_it, bool reversed)
{
- PyObject *py_sv_it = StrokeVertexIterator_Type.tp_new(&StrokeVertexIterator_Type, 0, 0);
+ PyObject *py_sv_it = StrokeVertexIterator_Type.tp_new(
+ &StrokeVertexIterator_Type, nullptr, nullptr);
((BPy_StrokeVertexIterator *)py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator(sv_it);
((BPy_StrokeVertexIterator *)py_sv_it)->py_it.it = ((BPy_StrokeVertexIterator *)py_sv_it)->sv_it;
((BPy_StrokeVertexIterator *)py_sv_it)->at_start = true;
@@ -448,7 +450,7 @@ PyObject *BPy_StrokeVertexIterator_from_StrokeVertexIterator(
PyObject *BPy_SVertexIterator_from_SVertexIterator(ViewEdgeInternal::SVertexIterator &sv_it)
{
- PyObject *py_sv_it = SVertexIterator_Type.tp_new(&SVertexIterator_Type, 0, 0);
+ PyObject *py_sv_it = SVertexIterator_Type.tp_new(&SVertexIterator_Type, nullptr, nullptr);
((BPy_SVertexIterator *)py_sv_it)->sv_it = new ViewEdgeInternal::SVertexIterator(sv_it);
((BPy_SVertexIterator *)py_sv_it)->py_it.it = ((BPy_SVertexIterator *)py_sv_it)->sv_it;
return py_sv_it;
@@ -457,7 +459,8 @@ PyObject *BPy_SVertexIterator_from_SVertexIterator(ViewEdgeInternal::SVertexIter
PyObject *BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(
ViewVertexInternal::orientedViewEdgeIterator &ove_it, bool reversed)
{
- PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new(&orientedViewEdgeIterator_Type, 0, 0);
+ PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new(
+ &orientedViewEdgeIterator_Type, nullptr, nullptr);
((BPy_orientedViewEdgeIterator *)py_ove_it)->ove_it =
new ViewVertexInternal::orientedViewEdgeIterator(ove_it);
((BPy_orientedViewEdgeIterator *)py_ove_it)->py_it.it =
@@ -469,7 +472,7 @@ PyObject *BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(
PyObject *BPy_ViewEdgeIterator_from_ViewEdgeIterator(ViewEdgeInternal::ViewEdgeIterator &ve_it)
{
- PyObject *py_ve_it = ViewEdgeIterator_Type.tp_new(&ViewEdgeIterator_Type, 0, 0);
+ PyObject *py_ve_it = ViewEdgeIterator_Type.tp_new(&ViewEdgeIterator_Type, nullptr, nullptr);
((BPy_ViewEdgeIterator *)py_ve_it)->ve_it = new ViewEdgeInternal::ViewEdgeIterator(ve_it);
((BPy_ViewEdgeIterator *)py_ve_it)->py_it.it = ((BPy_ViewEdgeIterator *)py_ve_it)->ve_it;
return py_ve_it;
@@ -477,7 +480,7 @@ PyObject *BPy_ViewEdgeIterator_from_ViewEdgeIterator(ViewEdgeInternal::ViewEdgeI
PyObject *BPy_ChainingIterator_from_ChainingIterator(ChainingIterator &c_it)
{
- PyObject *py_c_it = ChainingIterator_Type.tp_new(&ChainingIterator_Type, 0, 0);
+ PyObject *py_c_it = ChainingIterator_Type.tp_new(&ChainingIterator_Type, nullptr, nullptr);
((BPy_ChainingIterator *)py_c_it)->c_it = new ChainingIterator(c_it);
((BPy_ChainingIterator *)py_c_it)->py_ve_it.py_it.it = ((BPy_ChainingIterator *)py_c_it)->c_it;
return py_c_it;
@@ -485,7 +488,8 @@ PyObject *BPy_ChainingIterator_from_ChainingIterator(ChainingIterator &c_it)
PyObject *BPy_ChainPredicateIterator_from_ChainPredicateIterator(ChainPredicateIterator &cp_it)
{
- PyObject *py_cp_it = ChainPredicateIterator_Type.tp_new(&ChainPredicateIterator_Type, 0, 0);
+ PyObject *py_cp_it = ChainPredicateIterator_Type.tp_new(
+ &ChainPredicateIterator_Type, nullptr, nullptr);
((BPy_ChainPredicateIterator *)py_cp_it)->cp_it = new ChainPredicateIterator(cp_it);
((BPy_ChainPredicateIterator *)py_cp_it)->py_c_it.py_ve_it.py_it.it =
((BPy_ChainPredicateIterator *)py_cp_it)->cp_it;
@@ -494,7 +498,8 @@ PyObject *BPy_ChainPredicateIterator_from_ChainPredicateIterator(ChainPredicateI
PyObject *BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator(ChainSilhouetteIterator &cs_it)
{
- PyObject *py_cs_it = ChainSilhouetteIterator_Type.tp_new(&ChainSilhouetteIterator_Type, 0, 0);
+ PyObject *py_cs_it = ChainSilhouetteIterator_Type.tp_new(
+ &ChainSilhouetteIterator_Type, nullptr, nullptr);
((BPy_ChainSilhouetteIterator *)py_cs_it)->cs_it = new ChainSilhouetteIterator(cs_it);
((BPy_ChainSilhouetteIterator *)py_cs_it)->py_c_it.py_ve_it.py_it.it =
((BPy_ChainSilhouetteIterator *)py_cs_it)->cs_it;
@@ -648,10 +653,10 @@ static bool float_array_from_PyList(PyObject *obj, float *v, int n)
v[i] = PyFloat_AsDouble(PyList_GET_ITEM(obj, i));
if (v[i] == -1.0f && PyErr_Occurred()) {
PyErr_SetString(PyExc_TypeError, "list elements must be a number");
- return 0;
+ return false;
}
}
- return 1;
+ return true;
}
bool Vec2f_ptr_from_PyList(PyObject *obj, Vec2f &vec)
@@ -707,10 +712,10 @@ static bool float_array_from_PyTuple(PyObject *obj, float *v, int n)
v[i] = PyFloat_AsDouble(PyTuple_GET_ITEM(obj, i));
if (v[i] == -1.0f && PyErr_Occurred()) {
PyErr_SetString(PyExc_TypeError, "tuple elements must be a number");
- return 0;
+ return false;
}
}
- return 1;
+ return true;
}
bool Vec2f_ptr_from_PyTuple(PyObject *obj, Vec2f &vec)
@@ -766,21 +771,21 @@ bool float_array_from_PyObject(PyObject *obj, float *v, int n)
{
if (VectorObject_Check(obj) && ((VectorObject *)obj)->size == n) {
if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
- return 0;
+ return false;
}
for (int i = 0; i < n; i++) {
v[i] = ((VectorObject *)obj)->vec[i];
}
- return 1;
+ return true;
}
if (ColorObject_Check(obj) && n == 3) {
if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) {
- return 0;
+ return false;
}
for (int i = 0; i < n; i++) {
v[i] = ((ColorObject *)obj)->col[i];
}
- return 1;
+ return true;
}
if (PyList_Check(obj) && PyList_GET_SIZE(obj) == n) {
return float_array_from_PyList(obj, v, n);
@@ -788,7 +793,7 @@ bool float_array_from_PyObject(PyObject *obj, float *v, int n)
if (PyTuple_Check(obj) && PyTuple_GET_SIZE(obj) == n) {
return float_array_from_PyTuple(obj, v, n);
}
- return 0;
+ return false;
}
int convert_v4(PyObject *obj, void *v)
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index 9796dcda964..db85292c6c0 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -72,7 +72,7 @@ static PyObject *Freestyle_getCurrentScene(PyObject * /*self*/)
Scene *scene = g_freestyle.scene;
if (!scene) {
PyErr_SetString(PyExc_TypeError, "current scene not available");
- return NULL;
+ return nullptr;
}
PointerRNA ptr_scene;
RNA_pointer_create(&scene->id, &RNA_Scene, scene, &ptr_scene);
@@ -166,12 +166,12 @@ static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args)
float a[3], fac, b[3];
if (!PyArg_ParseTuple(args, "sOfO", &s, &obj1, &fac, &obj2)) {
- return NULL;
+ return nullptr;
}
type = ramp_blend_type(s);
if (type < 0) {
PyErr_SetString(PyExc_TypeError, "argument 1 is an unknown ramp blend type");
- return NULL;
+ return nullptr;
}
if (mathutils_array_parse(a,
3,
@@ -179,7 +179,7 @@ static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args)
obj1,
"argument 2 must be a 3D vector "
"(either a tuple/list of 3 elements or Vector)") == -1) {
- return NULL;
+ return nullptr;
}
if (mathutils_array_parse(b,
3,
@@ -187,10 +187,10 @@ static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args)
obj2,
"argument 4 must be a 3D vector "
"(either a tuple/list of 3 elements or Vector)") == -1) {
- return NULL;
+ return nullptr;
}
ramp_blend(type, a, fac, b);
- return Vector_CreatePyObject(a, 3, NULL);
+ return Vector_CreatePyObject(a, 3, nullptr);
}
#include "BKE_colorband.h" /* BKE_colorband_evaluate() */
@@ -214,18 +214,18 @@ static PyObject *Freestyle_evaluateColorRamp(PyObject * /*self*/, PyObject *args
float in, out[4];
if (!(PyArg_ParseTuple(args, "O!f", &pyrna_struct_Type, &py_srna, &in))) {
- return NULL;
+ return nullptr;
}
if (!RNA_struct_is_a(py_srna->ptr.type, &RNA_ColorRamp)) {
PyErr_SetString(PyExc_TypeError, "1st argument is not a ColorRamp object");
- return NULL;
+ return nullptr;
}
coba = (ColorBand *)py_srna->ptr.data;
if (!BKE_colorband_evaluate(coba, in, out)) {
PyErr_SetString(PyExc_ValueError, "failed to evaluate the color ramp");
- return NULL;
+ return nullptr;
}
- return Vector_CreatePyObject(out, 4, NULL);
+ return Vector_CreatePyObject(out, 4, nullptr);
}
#include "BKE_colortools.h" /* BKE_curvemapping_evaluateF() */
@@ -253,22 +253,22 @@ static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *
float value;
if (!(PyArg_ParseTuple(args, "O!if", &pyrna_struct_Type, &py_srna, &cur, &value))) {
- return NULL;
+ return nullptr;
}
if (!RNA_struct_is_a(py_srna->ptr.type, &RNA_CurveMapping)) {
PyErr_SetString(PyExc_TypeError, "1st argument is not a CurveMapping object");
- return NULL;
+ return nullptr;
}
if (cur < 0 || cur > 3) {
PyErr_SetString(PyExc_ValueError, "2nd argument is out of range");
- return NULL;
+ return nullptr;
}
cumap = (CurveMapping *)py_srna->ptr.data;
BKE_curvemapping_init(cumap);
/* disable extrapolation if enabled */
if ((cumap->flag & CUMA_EXTEND_EXTRAPOLATE)) {
cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
- BKE_curvemapping_changed(cumap, 0);
+ BKE_curvemapping_changed(cumap, false);
}
return PyFloat_FromDouble(BKE_curvemapping_evaluateF(cumap, cur, value));
}
@@ -515,7 +515,7 @@ static PyMethodDef module_functions[] = {
(PyCFunction)Freestyle_evaluateCurveMappingF,
METH_VARARGS,
Freestyle_evaluateCurveMappingF___doc__},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*-----------------------Freestyle module definition---------------------------*/
@@ -536,7 +536,7 @@ PyObject *Freestyle_Init(void)
// initialize modules
module = PyModule_Create(&module_definition);
if (!module) {
- return NULL;
+ return nullptr;
}
PyDict_SetItemString(PySys_GetObject("modules"), module_definition.m_name, module);
diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
index dbf1c12fb01..2aa08ec3ab5 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
@@ -33,7 +33,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int FrsMaterial_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -55,21 +55,14 @@ PyDoc_STRVAR(
"Class defining a material.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(line, diffuse, ambient, specular, emission, shininess, priority)\n"
"\n"
- " Default constructor.\n"
+ " Creates a :class:`FrsMaterial` using either default constructor,\n"
+ " copy constructor, or an overloaded constructor\n"
"\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
- " :arg brother: A Material object.\n"
+ " :arg brother: A Material object to be used as a copy constructor.\n"
" :type brother: :class:`Material`\n"
- "\n"
- ".. method:: __init__(line, diffuse, ambient, specular, emission, shininess, priority)\n"
- "\n"
- " Builds a Material from its line, diffuse, ambient, specular, emissive\n"
- " colors, a shininess coefficient and line color priority.\n"
- "\n"
" :arg line: The line color.\n"
" :type line: :class:`mathutils.Vector`, list or tuple of 4 float values\n"
" :arg diffuse: The diffuse color.\n"
@@ -87,10 +80,10 @@ PyDoc_STRVAR(
static int FrsMaterial_init(BPy_FrsMaterial *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
+ static const char *kwlist_1[] = {"brother", nullptr};
static const char *kwlist_2[] = {
- "line", "diffuse", "ambient", "specular", "emission", "shininess", "priority", NULL};
- PyObject *brother = 0;
+ "line", "diffuse", "ambient", "specular", "emission", "shininess", "priority", nullptr};
+ PyObject *brother = nullptr;
float line[4], diffuse[4], ambient[4], specular[4], emission[4], shininess;
int priority;
@@ -463,46 +456,46 @@ static PyGetSetDef BPy_FrsMaterial_getseters[] = {
(getter)FrsMaterial_line_get,
(setter)FrsMaterial_line_set,
FrsMaterial_line_doc,
- NULL},
+ nullptr},
{"diffuse",
(getter)FrsMaterial_diffuse_get,
(setter)FrsMaterial_diffuse_set,
FrsMaterial_diffuse_doc,
- NULL},
+ nullptr},
{"specular",
(getter)FrsMaterial_specular_get,
(setter)FrsMaterial_specular_set,
FrsMaterial_specular_doc,
- NULL},
+ nullptr},
{"ambient",
(getter)FrsMaterial_ambient_get,
(setter)FrsMaterial_ambient_set,
FrsMaterial_ambient_doc,
- NULL},
+ nullptr},
{"emission",
(getter)FrsMaterial_emission_get,
(setter)FrsMaterial_emission_set,
FrsMaterial_emission_doc,
- NULL},
+ nullptr},
{"shininess",
(getter)FrsMaterial_shininess_get,
(setter)FrsMaterial_shininess_set,
FrsMaterial_shininess_doc,
- NULL},
+ nullptr},
{"priority",
(getter)FrsMaterial_priority_get,
(setter)FrsMaterial_priority_set,
FrsMaterial_priority_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
static PyObject *BPy_FrsMaterial_richcmpr(PyObject *objectA,
PyObject *objectB,
int comparison_type)
{
- const BPy_FrsMaterial *matA = NULL, *matB = NULL;
- bool result = 0;
+ const BPy_FrsMaterial *matA = nullptr, *matB = nullptr;
+ bool result = false;
if (!BPy_FrsMaterial_Check(objectA) || !BPy_FrsMaterial_Check(objectB)) {
if (comparison_type == Py_NE) {
@@ -524,7 +517,7 @@ static PyObject *BPy_FrsMaterial_richcmpr(PyObject *objectA,
break;
default:
PyErr_SetString(PyExc_TypeError, "Material does not support this comparison type");
- return NULL;
+ return nullptr;
}
if (result == true) {
@@ -541,43 +534,47 @@ static Py_hash_t FrsMaterial_hash(PyObject *self)
/*-----------------------BPy_FrsMaterial type definition ------------------------------*/
PyTypeObject FrsMaterial_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Material", /* tp_name */
- sizeof(BPy_FrsMaterial), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)FrsMaterial_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)FrsMaterial_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- (hashfunc)FrsMaterial_hash, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FrsMaterial_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- (richcmpfunc)BPy_FrsMaterial_richcmpr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_FrsMaterial_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FrsMaterial_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Material", /* tp_name */
+ sizeof(BPy_FrsMaterial), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)FrsMaterial_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)FrsMaterial_repr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ (hashfunc)FrsMaterial_hash, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ FrsMaterial_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ (richcmpfunc)BPy_FrsMaterial_richcmpr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_FrsMaterial_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)FrsMaterial_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
index 6bd4ae6b5fe..943a9ca0e64 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
@@ -34,7 +34,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int FrsNoise_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -63,7 +63,7 @@ PyDoc_STRVAR(FrsNoise_doc,
static int FrsNoise_init(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"seed", NULL};
+ static const char *kwlist[] = {"seed", nullptr};
long seed = -1;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|l", (char **)kwlist, &seed)) {
@@ -104,11 +104,11 @@ PyDoc_STRVAR(FrsNoise_turbulence1_doc,
static PyObject *FrsNoise_drand(BPy_FrsNoise * /*self*/, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"seed", NULL};
+ static const char *kwlist[] = {"seed", nullptr};
long seed = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|I", (char **)kwlist, &seed)) {
PyErr_SetString(PyExc_TypeError, "optional argument 1 must be of type int");
- return NULL;
+ return nullptr;
}
if (seed) {
RandGen::srand48(seed);
@@ -118,25 +118,25 @@ static PyObject *FrsNoise_drand(BPy_FrsNoise * /*self*/, PyObject *args, PyObjec
static PyObject *FrsNoise_turbulence_smooth(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"v", "oct", NULL};
+ static const char *kwlist[] = {"v", "oct", nullptr};
double x; // note: this has to be a double (not float)
unsigned nbOctaves = 8;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|I", (char **)kwlist, &x, &nbOctaves)) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(self->pn->turbulenceSmooth(x, nbOctaves));
}
static PyObject *FrsNoise_turbulence1(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"v", "freq", "amp", "oct", NULL};
+ static const char *kwlist[] = {"v", "freq", "amp", "oct", nullptr};
float f1, f2, f3;
unsigned int i = 4;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff|I", (char **)kwlist, &f1, &f2, &f3, &i)) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(self->n->turbulence1(f1, f2, f3, i));
}
@@ -159,19 +159,19 @@ PyDoc_STRVAR(FrsNoise_turbulence2_doc,
static PyObject *FrsNoise_turbulence2(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"v", "freq", "amp", "oct", NULL};
+ static const char *kwlist[] = {"v", "freq", "amp", "oct", nullptr};
PyObject *obj1;
float f2, f3;
unsigned int i = 4;
Vec2f vec;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "Off|I", (char **)kwlist, &obj1, &f2, &f3, &i)) {
- return NULL;
+ return nullptr;
}
if (!Vec2f_ptr_from_PyObject(obj1, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 2D vector (either a list of 2 elements or Vector)");
- return NULL;
+ return nullptr;
}
float t = self->n->turbulence2(vec, f2, f3, i);
return PyFloat_FromDouble(t);
@@ -195,19 +195,19 @@ PyDoc_STRVAR(FrsNoise_turbulence3_doc,
static PyObject *FrsNoise_turbulence3(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"v", "freq", "amp", "oct", NULL};
+ static const char *kwlist[] = {"v", "freq", "amp", "oct", nullptr};
PyObject *obj1;
float f2, f3;
unsigned int i = 4;
Vec3f vec;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "Off|I", (char **)kwlist, &obj1, &f2, &f3, &i)) {
- return NULL;
+ return nullptr;
}
if (!Vec3f_ptr_from_PyObject(obj1, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 3D vector (either a list of 3 elements or Vector)");
- return NULL;
+ return nullptr;
}
float t = self->n->turbulence3(vec, f2, f3, i);
return PyFloat_FromDouble(t);
@@ -225,11 +225,11 @@ PyDoc_STRVAR(FrsNoise_smoothNoise1_doc,
static PyObject *FrsNoise_smoothNoise1(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"v", NULL};
+ static const char *kwlist[] = {"v", nullptr};
float f;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(self->n->smoothNoise1(f));
}
@@ -246,17 +246,17 @@ PyDoc_STRVAR(FrsNoise_smoothNoise2_doc,
static PyObject *FrsNoise_smoothNoise2(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"v", NULL};
+ static const char *kwlist[] = {"v", nullptr};
PyObject *obj;
Vec2f vec;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
- return NULL;
+ return nullptr;
}
if (!Vec2f_ptr_from_PyObject(obj, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 2D vector (either a list of 2 elements or Vector)");
- return NULL;
+ return nullptr;
}
float t = self->n->smoothNoise2(vec);
return PyFloat_FromDouble(t);
@@ -274,17 +274,17 @@ PyDoc_STRVAR(FrsNoise_smoothNoise3_doc,
static PyObject *FrsNoise_smoothNoise3(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"v", NULL};
+ static const char *kwlist[] = {"v", nullptr};
PyObject *obj;
Vec3f vec;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
- return NULL;
+ return nullptr;
}
if (!Vec3f_ptr_from_PyObject(obj, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 3D vector (either a list of 3 elements or Vector)");
- return NULL;
+ return nullptr;
}
float t = self->n->smoothNoise3(vec);
return PyFloat_FromDouble(t);
@@ -315,53 +315,57 @@ static PyMethodDef BPy_FrsNoise_methods[] = {
(PyCFunction)FrsNoise_smoothNoise3,
METH_VARARGS | METH_KEYWORDS,
FrsNoise_smoothNoise3_doc},
- {"rand", (PyCFunction)FrsNoise_drand, METH_VARARGS | METH_KEYWORDS, NULL},
+ {"rand", (PyCFunction)FrsNoise_drand, METH_VARARGS | METH_KEYWORDS, nullptr},
{"turbulence_smooth",
(PyCFunction)FrsNoise_turbulence_smooth,
METH_VARARGS | METH_KEYWORDS,
- NULL},
- {NULL, NULL, 0, NULL},
+ nullptr},
+ {nullptr, nullptr, 0, nullptr},
};
/*-----------------------BPy_FrsNoise type definition ------------------------------*/
PyTypeObject FrsNoise_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Noise", /* tp_name */
- sizeof(BPy_FrsNoise), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)FrsNoise_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Noise", /* tp_name */
+ sizeof(BPy_FrsNoise), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)FrsNoise_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)FrsNoise_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
FrsNoise_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
BPy_FrsNoise_methods, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)FrsNoise_init, /* tp_init */
- 0, /* tp_alloc */
+ nullptr, /* tp_alloc */
PyType_GenericNew, /* tp_new */
};
diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp
index eb0eb661e3d..323e76fe249 100644
--- a/source/blender/freestyle/intern/python/BPy_Id.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Id.cpp
@@ -31,7 +31,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Id_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -46,29 +46,26 @@ int Id_Init(PyObject *module)
//------------------------INSTANCE METHODS ----------------------------------
-PyDoc_STRVAR(Id_doc,
- "Class for representing an object Id.\n"
- "\n"
- ".. method:: __init__(first=0, second=0)\n"
- "\n"
- " Build the Id from two numbers.\n"
- "\n"
- " :arg first: The first number.\n"
- " :type first: int\n"
- " :arg second: The second number.\n"
- " :type second: int\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
- " :arg brother: An Id object.\n"
- " :type brother: :class:`Id`");
+PyDoc_STRVAR(
+ Id_doc,
+ "Class for representing an object Id.\n"
+ "\n"
+ ".. method:: __init__(brother)\n"
+ " __init__(first=0, second=0)\n"
+ "\n"
+ " Build the Id from two numbers or another :class:`Id` using the copy constructor.\n"
+ "\n"
+ " :arg brother: An Id object.\n"
+ " :type brother: :class:`Id`"
+ " :arg first: The first number.\n"
+ " :type first: int\n"
+ " :arg second: The second number.\n"
+ " :type second: int\n");
static int Id_init(BPy_Id *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"first", "second", NULL};
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"first", "second", nullptr};
PyObject *brother;
int first = 0, second = 0;
@@ -162,50 +159,54 @@ static int Id_second_set(BPy_Id *self, PyObject *value, void *UNUSED(closure))
}
static PyGetSetDef BPy_Id_getseters[] = {
- {"first", (getter)Id_first_get, (setter)Id_first_set, Id_first_doc, NULL},
- {"second", (getter)Id_second_get, (setter)Id_second_set, Id_second_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"first", (getter)Id_first_get, (setter)Id_first_set, Id_first_doc, nullptr},
+ {"second", (getter)Id_second_get, (setter)Id_second_set, Id_second_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_Id type definition ------------------------------*/
PyTypeObject Id_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Id", /* tp_name */
- sizeof(BPy_Id), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Id_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Id", /* tp_name */
+ sizeof(BPy_Id), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)Id_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)Id_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
Id_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
(richcmpfunc)Id_RichCompare, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
BPy_Id_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)Id_init, /* tp_init */
- 0, /* tp_alloc */
+ nullptr, /* tp_alloc */
PyType_GenericNew, /* tp_new */
};
diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
index 9c155db913c..25f3c54ea7d 100644
--- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
@@ -61,8 +61,8 @@ PyDoc_STRVAR(Integrator_integrate_doc,
static PyObject *Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"func", "it", "it_end", "integration_type", NULL};
- PyObject *obj1, *obj4 = 0;
+ static const char *kwlist[] = {"func", "it", "it_end", "integration_type", nullptr};
+ PyObject *obj1, *obj4 = nullptr;
BPy_Interface0DIterator *obj2, *obj3;
if (!PyArg_ParseTupleAndKeywords(args,
@@ -77,7 +77,7 @@ static PyObject *Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObj
&obj3,
&IntegrationType_Type,
&obj4)) {
- return NULL;
+ return nullptr;
}
Interface0DIterator it(*(obj2->if0D_it)), it_end(*(obj3->if0D_it));
@@ -101,7 +101,7 @@ static PyObject *Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObj
string class_name(Py_TYPE(obj1)->tp_name);
PyErr_SetString(PyExc_TypeError, ("unsupported function type: " + class_name).c_str());
- return NULL;
+ return nullptr;
}
/*-----------------------Integrator module docstring---------------------------------------*/
@@ -115,7 +115,7 @@ static PyMethodDef module_functions[] = {
(PyCFunction)Integrator_integrate,
METH_VARARGS | METH_KEYWORDS,
Integrator_integrate_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*-----------------------Integrator module definition--------------------------------------*/
@@ -149,43 +149,47 @@ PyDoc_STRVAR(IntegrationType_doc,
" last of the values obtained for the 0D elements.");
PyTypeObject IntegrationType_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "IntegrationType", /* tp_name */
- sizeof(PyLongObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- IntegrationType_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &PyLong_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "IntegrationType", /* tp_name */
+ sizeof(PyLongObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ IntegrationType_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &PyLong_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
@@ -210,7 +214,7 @@ int IntegrationType_Init(PyObject *module)
{
PyObject *m, *d, *f;
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -227,7 +231,7 @@ int IntegrationType_Init(PyObject *module)
PyDict_SetItemString(IntegrationType_Type.tp_dict, "LAST", BPy_IntegrationType_LAST);
m = PyModule_Create(&module_definition);
- if (m == NULL) {
+ if (m == nullptr) {
return -1;
}
Py_INCREF(m);
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
index 18e11c55bc4..3d0c57d5509 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
@@ -39,7 +39,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Interface0D_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -102,7 +102,7 @@ PyDoc_STRVAR(Interface0D_doc,
static int Interface0D_init(BPy_Interface0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -139,16 +139,16 @@ PyDoc_STRVAR(Interface0D_get_fedge_doc,
static PyObject *Interface0D_get_fedge(BPy_Interface0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
+ static const char *kwlist[] = {"inter", nullptr};
PyObject *py_if0D;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0D_Type, &py_if0D)) {
- return NULL;
+ return nullptr;
}
FEdge *fe = self->if0D->getFEdge(*(((BPy_Interface0D *)py_if0D)->if0D));
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
if (fe) {
return Any_BPy_FEdge_from_FEdge(*fe);
@@ -161,7 +161,7 @@ static PyMethodDef BPy_Interface0D_methods[] = {
(PyCFunction)Interface0D_get_fedge,
METH_VARARGS | METH_KEYWORDS,
Interface0D_get_fedge_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------Interface1D get/setters ----------------------------*/
@@ -185,7 +185,7 @@ static PyObject *Interface0D_point_3d_get(BPy_Interface0D *self, void *UNUSED(cl
{
Vec3f p(self->if0D->getPoint3D());
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return Vector_from_Vec3f(p);
}
@@ -199,7 +199,7 @@ static PyObject *Interface0D_projected_x_get(BPy_Interface0D *self, void *UNUSED
{
real x = self->if0D->getProjectedX();
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(x);
}
@@ -213,7 +213,7 @@ static PyObject *Interface0D_projected_y_get(BPy_Interface0D *self, void *UNUSED
{
real y = self->if0D->getProjectedY();
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(y);
}
@@ -227,7 +227,7 @@ static PyObject *Interface0D_projected_z_get(BPy_Interface0D *self, void *UNUSED
{
real z = self->if0D->getProjectedZ();
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(z);
}
@@ -241,7 +241,7 @@ static PyObject *Interface0D_point_2d_get(BPy_Interface0D *self, void *UNUSED(cl
{
Vec2f p(self->if0D->getPoint2D());
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return Vector_from_Vec2f(p);
}
@@ -255,7 +255,7 @@ static PyObject *Interface0D_id_get(BPy_Interface0D *self, void *UNUSED(closure)
{
Id id(self->if0D->getId());
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return BPy_Id_from_Id(id); // return a copy
}
@@ -269,75 +269,87 @@ static PyObject *Interface0D_nature_get(BPy_Interface0D *self, void *UNUSED(clos
{
Nature::VertexNature nature = self->if0D->getNature();
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return BPy_Nature_from_Nature(nature);
}
static PyGetSetDef BPy_Interface0D_getseters[] = {
- {"name", (getter)Interface0D_name_get, (setter)NULL, Interface0D_name_doc, NULL},
- {"point_3d", (getter)Interface0D_point_3d_get, (setter)NULL, Interface0D_point_3d_doc, NULL},
+ {"name", (getter)Interface0D_name_get, (setter) nullptr, Interface0D_name_doc, nullptr},
+ {"point_3d",
+ (getter)Interface0D_point_3d_get,
+ (setter) nullptr,
+ Interface0D_point_3d_doc,
+ nullptr},
{"projected_x",
(getter)Interface0D_projected_x_get,
- (setter)NULL,
+ (setter) nullptr,
Interface0D_projected_x_doc,
- NULL},
+ nullptr},
{"projected_y",
(getter)Interface0D_projected_y_get,
- (setter)NULL,
+ (setter) nullptr,
Interface0D_projected_y_doc,
- NULL},
+ nullptr},
{"projected_z",
(getter)Interface0D_projected_z_get,
- (setter)NULL,
+ (setter) nullptr,
Interface0D_projected_z_doc,
- NULL},
- {"point_2d", (getter)Interface0D_point_2d_get, (setter)NULL, Interface0D_point_2d_doc, NULL},
- {"id", (getter)Interface0D_id_get, (setter)NULL, Interface0D_id_doc, NULL},
- {"nature", (getter)Interface0D_nature_get, (setter)NULL, Interface0D_nature_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"point_2d",
+ (getter)Interface0D_point_2d_get,
+ (setter) nullptr,
+ Interface0D_point_2d_doc,
+ nullptr},
+ {"id", (getter)Interface0D_id_get, (setter) nullptr, Interface0D_id_doc, nullptr},
+ {"nature", (getter)Interface0D_nature_get, (setter) nullptr, Interface0D_nature_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_Interface0D type definition ------------------------------*/
PyTypeObject Interface0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Interface0D", /* tp_name */
- sizeof(BPy_Interface0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Interface0D_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)Interface0D_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Interface0D_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_Interface0D_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_Interface0D_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Interface0D_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Interface0D", /* tp_name */
+ sizeof(BPy_Interface0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)Interface0D_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)Interface0D_repr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Interface0D_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_Interface0D_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_Interface0D_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Interface0D_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
index 423b97fe3cd..8a4a6eb61db 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
@@ -40,7 +40,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Interface1D_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -113,7 +113,7 @@ PyDoc_STRVAR(Interface1D_doc,
static int Interface1D_init(BPy_Interface1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -183,11 +183,11 @@ PyDoc_STRVAR(Interface1D_points_begin_doc,
static PyObject *Interface1D_points_begin(BPy_Interface1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"t", NULL};
+ static const char *kwlist[] = {"t", nullptr};
float f = 0.0f;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
- return NULL;
+ return nullptr;
}
Interface0DIterator if0D_it(self->if1D->pointsBegin(f));
return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false);
@@ -209,11 +209,11 @@ PyDoc_STRVAR(Interface1D_points_end_doc,
static PyObject *Interface1D_points_end(BPy_Interface1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"t", NULL};
+ static const char *kwlist[] = {"t", nullptr};
float f = 0.0f;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
- return NULL;
+ return nullptr;
}
Interface0DIterator if0D_it(self->if1D->pointsEnd(f));
return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, true);
@@ -236,7 +236,7 @@ static PyMethodDef BPy_Interface1D_methods[] = {
(PyCFunction)Interface1D_points_end,
METH_VARARGS | METH_KEYWORDS,
Interface1D_points_end_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------Interface1D get/setters ----------------------------*/
@@ -260,7 +260,7 @@ static PyObject *Interface1D_id_get(BPy_Interface1D *self, void *UNUSED(closure)
{
Id id(self->if1D->getId());
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return BPy_Id_from_Id(id); // return a copy
}
@@ -274,7 +274,7 @@ static PyObject *Interface1D_nature_get(BPy_Interface1D *self, void *UNUSED(clos
{
Nature::VertexNature nature = self->if1D->getNature();
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return BPy_Nature_from_Nature(nature);
}
@@ -288,7 +288,7 @@ static PyObject *Interface1D_length_2d_get(BPy_Interface1D *self, void *UNUSED(c
{
real length = self->if1D->getLength2D();
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble((double)length);
}
@@ -318,62 +318,66 @@ static int Interface1D_time_stamp_set(BPy_Interface1D *self,
}
static PyGetSetDef BPy_Interface1D_getseters[] = {
- {"name", (getter)Interface1D_name_get, (setter)NULL, Interface1D_name_doc, NULL},
- {"id", (getter)Interface1D_id_get, (setter)NULL, Interface1D_id_doc, NULL},
- {"nature", (getter)Interface1D_nature_get, (setter)NULL, Interface1D_nature_doc, NULL},
+ {"name", (getter)Interface1D_name_get, (setter) nullptr, Interface1D_name_doc, nullptr},
+ {"id", (getter)Interface1D_id_get, (setter) nullptr, Interface1D_id_doc, nullptr},
+ {"nature", (getter)Interface1D_nature_get, (setter) nullptr, Interface1D_nature_doc, nullptr},
{"length_2d",
(getter)Interface1D_length_2d_get,
- (setter)NULL,
+ (setter) nullptr,
Interface1D_length_2d_doc,
- NULL},
+ nullptr},
{"time_stamp",
(getter)Interface1D_time_stamp_get,
(setter)Interface1D_time_stamp_set,
Interface1D_time_stamp_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_Interface1D type definition ------------------------------*/
PyTypeObject Interface1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Interface1D", /* tp_name */
- sizeof(BPy_Interface1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Interface1D_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)Interface1D_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Interface1D_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_Interface1D_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_Interface1D_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Interface1D_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Interface1D", /* tp_name */
+ sizeof(BPy_Interface1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)Interface1D_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)Interface1D_repr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Interface1D_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_Interface1D_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_Interface1D_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Interface1D_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
index b8dedb6497a..bee30aa9e8c 100644
--- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
@@ -41,7 +41,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Iterator_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -126,7 +126,7 @@ PyDoc_STRVAR(Iterator_doc,
static int Iterator_init(BPy_Iterator *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -155,7 +155,7 @@ static PyObject *Iterator_increment(BPy_Iterator *self)
{
if (self->it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "cannot increment any more");
- return NULL;
+ return nullptr;
}
self->it->increment();
Py_RETURN_NONE;
@@ -170,7 +170,7 @@ static PyObject *Iterator_decrement(BPy_Iterator *self)
{
if (self->it->isBegin()) {
PyErr_SetString(PyExc_RuntimeError, "cannot decrement any more");
- return NULL;
+ return nullptr;
}
self->it->decrement();
Py_RETURN_NONE;
@@ -179,7 +179,7 @@ static PyObject *Iterator_decrement(BPy_Iterator *self)
static PyMethodDef BPy_Iterator_methods[] = {
{"increment", (PyCFunction)Iterator_increment, METH_NOARGS, Iterator_increment_doc},
{"decrement", (PyCFunction)Iterator_decrement, METH_NOARGS, Iterator_decrement_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------Iterator get/setters ----------------------------*/
@@ -215,52 +215,56 @@ static PyObject *Iterator_is_end_get(BPy_Iterator *self, void *UNUSED(closure))
}
static PyGetSetDef BPy_Iterator_getseters[] = {
- {"name", (getter)Iterator_name_get, (setter)NULL, Iterator_name_doc, NULL},
- {"is_begin", (getter)Iterator_is_begin_get, (setter)NULL, Iterator_is_begin_doc, NULL},
- {"is_end", (getter)Iterator_is_end_get, (setter)NULL, Iterator_is_end_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"name", (getter)Iterator_name_get, (setter) nullptr, Iterator_name_doc, nullptr},
+ {"is_begin", (getter)Iterator_is_begin_get, (setter) nullptr, Iterator_is_begin_doc, nullptr},
+ {"is_end", (getter)Iterator_is_end_get, (setter) nullptr, Iterator_is_end_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_Iterator type definition ------------------------------*/
PyTypeObject Iterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Iterator", /* tp_name */
- sizeof(BPy_Iterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Iterator_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)Iterator_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Iterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_Iterator_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_Iterator_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Iterator_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Iterator", /* tp_name */
+ sizeof(BPy_Iterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)Iterator_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)Iterator_repr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Iterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_Iterator_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_Iterator_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Iterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
index 915f0c41a56..547f46839b8 100644
--- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
@@ -41,43 +41,47 @@ PyDoc_STRVAR(MediumType_doc,
"* Stroke.OPAQUE_MEDIUM: To simulate an opaque medium (oil, spray...).");
PyTypeObject MediumType_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "MediumType", /* tp_name */
- sizeof(PyLongObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- MediumType_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &PyLong_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "MediumType", /* tp_name */
+ sizeof(PyLongObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ MediumType_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &PyLong_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
@@ -96,7 +100,7 @@ PyLongObject _BPy_MediumType_OPAQUE_MEDIUM = {
int MediumType_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp
index 79fb154233e..b0a620803d1 100644
--- a/source/blender/freestyle/intern/python/BPy_Nature.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp
@@ -35,40 +35,40 @@ static PyObject *BPy_Nature_or(PyObject *a, PyObject *b);
/*-----------------------BPy_Nature number method definitions --------------------*/
static PyNumberMethods nature_as_number = {
- 0, /* binaryfunc nb_add */
- 0, /* binaryfunc nb_subtract */
- 0, /* binaryfunc nb_multiply */
- 0, /* binaryfunc nb_remainder */
- 0, /* binaryfunc nb_divmod */
- 0, /* ternaryfunc nb_power */
- 0, /* unaryfunc nb_negative */
- 0, /* unaryfunc nb_positive */
- 0, /* unaryfunc nb_absolute */
- 0, /* inquiry nb_bool */
- 0, /* unaryfunc nb_invert */
- 0, /* binaryfunc nb_lshift */
- 0, /* binaryfunc nb_rshift */
+ nullptr, /* binaryfunc nb_add */
+ nullptr, /* binaryfunc nb_subtract */
+ nullptr, /* binaryfunc nb_multiply */
+ nullptr, /* binaryfunc nb_remainder */
+ nullptr, /* binaryfunc nb_divmod */
+ nullptr, /* ternaryfunc nb_power */
+ nullptr, /* unaryfunc nb_negative */
+ nullptr, /* unaryfunc nb_positive */
+ nullptr, /* unaryfunc nb_absolute */
+ nullptr, /* inquiry nb_bool */
+ nullptr, /* unaryfunc nb_invert */
+ nullptr, /* binaryfunc nb_lshift */
+ nullptr, /* binaryfunc nb_rshift */
(binaryfunc)BPy_Nature_and, /* binaryfunc nb_and */
(binaryfunc)BPy_Nature_xor, /* binaryfunc nb_xor */
(binaryfunc)BPy_Nature_or, /* binaryfunc nb_or */
- 0, /* unaryfunc nb_int */
- 0, /* void *nb_reserved */
- 0, /* unaryfunc nb_float */
- 0, /* binaryfunc nb_inplace_add */
- 0, /* binaryfunc nb_inplace_subtract */
- 0, /* binaryfunc nb_inplace_multiply */
- 0, /* binaryfunc nb_inplace_remainder */
- 0, /* ternaryfunc nb_inplace_power */
- 0, /* binaryfunc nb_inplace_lshift */
- 0, /* binaryfunc nb_inplace_rshift */
- 0, /* binaryfunc nb_inplace_and */
- 0, /* binaryfunc nb_inplace_xor */
- 0, /* binaryfunc nb_inplace_or */
- 0, /* binaryfunc nb_floor_divide */
- 0, /* binaryfunc nb_true_divide */
- 0, /* binaryfunc nb_inplace_floor_divide */
- 0, /* binaryfunc nb_inplace_true_divide */
- 0, /* unaryfunc nb_index */
+ nullptr, /* unaryfunc nb_int */
+ nullptr, /* void *nb_reserved */
+ nullptr, /* unaryfunc nb_float */
+ nullptr, /* binaryfunc nb_inplace_add */
+ nullptr, /* binaryfunc nb_inplace_subtract */
+ nullptr, /* binaryfunc nb_inplace_multiply */
+ nullptr, /* binaryfunc nb_inplace_remainder */
+ nullptr, /* ternaryfunc nb_inplace_power */
+ nullptr, /* binaryfunc nb_inplace_lshift */
+ nullptr, /* binaryfunc nb_inplace_rshift */
+ nullptr, /* binaryfunc nb_inplace_and */
+ nullptr, /* binaryfunc nb_inplace_xor */
+ nullptr, /* binaryfunc nb_inplace_or */
+ nullptr, /* binaryfunc nb_floor_divide */
+ nullptr, /* binaryfunc nb_true_divide */
+ nullptr, /* binaryfunc nb_inplace_floor_divide */
+ nullptr, /* binaryfunc nb_inplace_true_divide */
+ nullptr, /* unaryfunc nb_index */
};
/*-----------------------BPy_Nature docstring ------------------------------------*/
@@ -103,43 +103,47 @@ PyDoc_STRVAR(Nature_doc,
/*-----------------------BPy_Nature type definition ------------------------------*/
PyTypeObject Nature_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Nature", /* tp_name */
- sizeof(PyLongObject), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- &nature_as_number, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- Nature_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &PyLong_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Nature", /* tp_name */
+ sizeof(PyLongObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ &nature_as_number, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ Nature_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &PyLong_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
/*-----------------------BPy_Nature instance definitions ----------------------------------*/
@@ -186,7 +190,7 @@ static PyLongObject _Nature_EDGE_MARK = {
//-------------------MODULE INITIALIZATION--------------------------------
int Nature_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -225,16 +229,16 @@ static PyObject *BPy_Nature_bitwise(PyObject *a, int op, PyObject *b)
if (!BPy_Nature_Check(a) || !BPy_Nature_Check(b)) {
PyErr_SetString(PyExc_TypeError, "operands must be a Nature object");
- return NULL;
+ return nullptr;
}
if ((op1 = PyLong_AsLong(a)) == -1 && PyErr_Occurred()) {
PyErr_SetString(PyExc_ValueError, "operand 1: unexpected Nature value");
- return NULL;
+ return nullptr;
}
if ((op2 = PyLong_AsLong(b)) == -1 && PyErr_Occurred()) {
PyErr_SetString(PyExc_ValueError, "operand 2: unexpected Nature value");
- return NULL;
+ return nullptr;
}
switch (op) {
case '&':
@@ -248,7 +252,7 @@ static PyObject *BPy_Nature_bitwise(PyObject *a, int op, PyObject *b)
break;
default:
PyErr_BadArgument();
- return NULL;
+ return nullptr;
}
if (v == 0) {
result = PyObject_NewVar(BPy_Nature, &Nature_Type, 0);
diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp
index 56f95b8ecbb..5fd02e4a9dd 100644
--- a/source/blender/freestyle/intern/python/BPy_Operators.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp
@@ -41,7 +41,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int Operators_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -78,29 +78,30 @@ PyDoc_STRVAR(Operators_select_doc,
static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"pred", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"pred", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &UnaryPredicate1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (!((BPy_UnaryPredicate1D *)obj)->up1D) {
PyErr_SetString(PyExc_TypeError,
"Operators.select(): 1st argument: invalid UnaryPredicate1D object");
- return NULL;
+ return nullptr;
}
if (Operators::select(*(((BPy_UnaryPredicate1D *)obj)->up1D)) < 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.select() failed");
}
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
PyDoc_STRVAR(Operators_chain_doc,
".. staticmethod:: chain(it, pred, modifier)\n"
+ " chain(it, pred)\n"
"\n"
" Builds a set of chains from the current set of ViewEdges. Each\n"
" ViewEdge of the current list starts a new chain. The chaining\n"
@@ -116,33 +117,14 @@ PyDoc_STRVAR(Operators_chain_doc,
" :type pred: :class:`UnaryPredicate1D`\n"
" :arg modifier: A function that takes a ViewEdge as argument and\n"
" that is used to modify the processed ViewEdge state (the\n"
- " timestamp incrementation is a typical illustration of such a\n"
- " modifier).\n"
- " :type modifier: :class:`UnaryFunction1DVoid`\n"
- "\n"
- ".. staticmethod:: chain(it, pred)\n"
- "\n"
- " Builds a set of chains from the current set of ViewEdges. Each\n"
- " ViewEdge of the current list starts a new chain. The chaining\n"
- " operator then iterates over the ViewEdges of the ViewMap using the\n"
- " user specified iterator. This operator only iterates using the\n"
- " increment operator and is therefore unidirectional. This chaining\n"
- " operator is different from the previous one because it doesn't take\n"
- " any modifier as argument. Indeed, the time stamp (insuring that a\n"
- " ViewEdge is processed one time) is automatically managed in this\n"
- " case.\n"
- "\n"
- " :arg it: The iterator on the ViewEdges of the ViewMap. It contains\n"
- " the chaining rule. \n"
- " :type it: :class:`ViewEdgeIterator`\n"
- " :arg pred: The predicate on the ViewEdge that expresses the\n"
- " stopping condition.\n"
- " :type pred: :class:`UnaryPredicate1D`");
+ " timestamp incrementation is a typical illustration of such a modifier).\n"
+ " If this argument is not given, the time stamp is automatically managed.\n"
+ " :type modifier: :class:`UnaryFunction1DVoid`\n");
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;
+ static const char *kwlist[] = {"it", "pred", "modifier", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr, *obj3 = nullptr;
if (!PyArg_ParseTupleAndKeywords(args,
kwds,
@@ -154,17 +136,17 @@ static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObj
&obj2,
&UnaryFunction1DVoid_Type,
&obj3)) {
- return NULL;
+ return nullptr;
}
if (!((BPy_ChainingIterator *)obj1)->c_it) {
PyErr_SetString(PyExc_TypeError,
"Operators.chain(): 1st argument: invalid ChainingIterator object");
- return NULL;
+ return nullptr;
}
if (!((BPy_UnaryPredicate1D *)obj2)->up1D) {
PyErr_SetString(PyExc_TypeError,
"Operators.chain(): 2nd argument: invalid UnaryPredicate1D object");
- return NULL;
+ return nullptr;
}
if (!obj3) {
if (Operators::chain(*(((BPy_ChainingIterator *)obj1)->c_it),
@@ -172,14 +154,14 @@ static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObj
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.chain() failed");
}
- return NULL;
+ return nullptr;
}
}
else {
if (!((BPy_UnaryFunction1DVoid *)obj3)->uf1D_void) {
PyErr_SetString(PyExc_TypeError,
"Operators.chain(): 3rd argument: invalid UnaryFunction1DVoid object");
- return NULL;
+ return nullptr;
}
if (Operators::chain(*(((BPy_ChainingIterator *)obj1)->c_it),
*(((BPy_UnaryPredicate1D *)obj2)->up1D),
@@ -187,7 +169,7 @@ static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObj
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.chain() failed");
}
- return NULL;
+ return nullptr;
}
}
Py_RETURN_NONE;
@@ -195,6 +177,7 @@ static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObj
PyDoc_STRVAR(Operators_bidirectional_chain_doc,
".. staticmethod:: bidirectional_chain(it, pred)\n"
+ " bidirectional_chain(it)\n"
"\n"
" Builds a set of chains from the current set of ViewEdges. Each\n"
" ViewEdge of the current list potentially starts a new chain. The\n"
@@ -211,37 +194,17 @@ PyDoc_STRVAR(Operators_bidirectional_chain_doc,
" :arg it: The ChainingIterator on the ViewEdges of the ViewMap. It\n"
" contains the chaining rule.\n"
" :type it: :class:`ChainingIterator`\n"
- " :arg pred: The predicate on the ViewEdge that expresses the\n"
- " stopping condition.\n"
- " :type pred: :class:`UnaryPredicate1D`\n"
- "\n"
- ".. staticmethod:: bidirectional_chain(it)\n"
- "\n"
- " The only difference with the above bidirectional chaining algorithm\n"
- " is that we don't need to pass a stopping criterion. This might be\n"
- " desirable when the stopping criterion is already contained in the\n"
- " iterator definition. Builds a set of chains from the current set of\n"
- " ViewEdges. Each ViewEdge of the current list potentially starts a new\n"
- " chain. The chaining operator then iterates over the ViewEdges of the\n"
- " ViewMap using the user specified iterator. This operator iterates\n"
- " both using the increment and decrement operators and is therefore\n"
- " bidirectional. This operator works with a ChainingIterator which\n"
- " contains the chaining rules. It is this last one which can be told to\n"
- " chain only edges that belong to the selection or not to process twice\n"
- " a ViewEdge during the chaining. Each time a ViewEdge is added to a\n"
- " chain, its chaining time stamp is incremented. This allows you to\n"
- " keep track of the number of chains to which a ViewEdge belongs to.\n"
- "\n"
- " :arg it: The ChainingIterator on the ViewEdges of the ViewMap. It\n"
- " contains the chaining rule.\n"
- " :type it: :class:`ChainingIterator`");
+ " :arg pred: The predicate on the ViewEdge that expresses the stopping condition.\n"
+ " This parameter is optional, you make not want to pass a stopping criterion\n"
+ " when the stopping criterion is already contained in the iterator definition.\n"
+ " :type pred: :class:`UnaryPredicate1D`\n");
static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", "pred", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist[] = {"it", "pred", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
if (!PyArg_ParseTupleAndKeywords(args,
kwds,
@@ -251,20 +214,20 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/,
&obj1,
&UnaryPredicate1D_Type,
&obj2)) {
- return NULL;
+ return nullptr;
}
if (!((BPy_ChainingIterator *)obj1)->c_it) {
PyErr_SetString(
PyExc_TypeError,
"Operators.bidirectional_chain(): 1st argument: invalid ChainingIterator object");
- return NULL;
+ return nullptr;
}
if (!obj2) {
if (Operators::bidirectionalChain(*(((BPy_ChainingIterator *)obj1)->c_it)) < 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.bidirectional_chain() failed");
}
- return NULL;
+ return nullptr;
}
}
else {
@@ -272,14 +235,14 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/,
PyErr_SetString(
PyExc_TypeError,
"Operators.bidirectional_chain(): 2nd argument: invalid UnaryPredicate1D object");
- return NULL;
+ return nullptr;
}
if (Operators::bidirectionalChain(*(((BPy_ChainingIterator *)obj1)->c_it),
*(((BPy_UnaryPredicate1D *)obj2)->up1D)) < 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.bidirectional_chain() failed");
}
- return NULL;
+ return nullptr;
}
}
Py_RETURN_NONE;
@@ -287,52 +250,42 @@ static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/,
PyDoc_STRVAR(Operators_sequential_split_doc,
".. staticmethod:: sequential_split(starting_pred, stopping_pred, sampling=0.0)\n"
+ " sequential_split(pred, sampling=0.0)\n"
"\n"
" Splits each chain of the current set of chains in a sequential way.\n"
" The points of each chain are processed (with a specified sampling)\n"
- " sequentially. Each time a user specified starting condition is\n"
- " verified, a new chain begins and ends as soon as a user-defined\n"
- " stopping predicate is verified. This allows chains overlapping rather\n"
- " than chains partitioning. The first point of the initial chain is the\n"
+ " sequentially. The first point of the initial chain is the\n"
" first point of one of the resulting chains. The splitting ends when\n"
" no more chain can start.\n"
"\n"
+ " .. tip::\n"
+ "\n"
+ " By specifiying a starting and stopping predicate allows\n"
+ " the chains to overlapp rather than chains partitioning.\n"
+ "\n"
" :arg starting_pred: The predicate on a point that expresses the\n"
- " starting condition.\n"
+ " starting condition. Each time this condition is verified, a new chain begins\n"
" :type starting_pred: :class:`UnaryPredicate0D`\n"
" :arg stopping_pred: The predicate on a point that expresses the\n"
- " stopping condition.\n"
+ " stopping condition. The chain ends as soon as this predicate is verified.\n"
" :type stopping_pred: :class:`UnaryPredicate0D`\n"
+ " :arg pred: The predicate on a point that expresses the splitting condition.\n"
+ " Each time the condition is verified, the chain is split into two chains.\n"
+ " The resulting set of chains is a partition of the initial chain\n"
+ " :type pred: :class:`UnaryPredicate0D`\n"
" :arg sampling: The resolution used to sample the chain for the\n"
" predicates evaluation. (The chain is not actually resampled;\n"
" a virtual point only progresses along the curve using this\n"
" resolution.)\n"
- " :type sampling: float\n"
- "\n"
- ".. staticmethod:: sequential_split(pred, sampling=0.0)\n"
- "\n"
- " Splits each chain of the current set of chains in a sequential way.\n"
- " The points of each chain are processed (with a specified sampling)\n"
- " sequentially and each time a user specified condition is verified,\n"
- " the chain is split into two chains. The resulting set of chains is a\n"
- " partition of the initial chain\n"
- "\n"
- " :arg pred: The predicate on a point that expresses the splitting\n"
- " condition.\n"
- " :type pred: :class:`UnaryPredicate0D`\n"
- " :arg sampling: The resolution used to sample the chain for the\n"
- " predicate evaluation. (The chain is not actually resampled; a\n"
- " virtual point only progresses along the curve using this\n"
- " resolution.)\n"
- " :type sampling: float");
+ " :type sampling: float\n");
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};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist_1[] = {"starting_pred", "stopping_pred", "sampling", nullptr};
+ static const char *kwlist_2[] = {"pred", "sampling", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
float f = 0.0f;
if (PyArg_ParseTupleAndKeywords(args,
@@ -348,13 +301,13 @@ static PyObject *Operators_sequential_split(BPy_Operators * /*self*/,
PyErr_SetString(
PyExc_TypeError,
"Operators.sequential_split(): 1st argument: invalid UnaryPredicate0D object");
- return NULL;
+ return nullptr;
}
if (!((BPy_UnaryPredicate0D *)obj2)->up0D) {
PyErr_SetString(
PyExc_TypeError,
"Operators.sequential_split(): 2nd argument: invalid UnaryPredicate0D object");
- return NULL;
+ return nullptr;
}
if (Operators::sequentialSplit(*(((BPy_UnaryPredicate0D *)obj1)->up0D),
*(((BPy_UnaryPredicate0D *)obj2)->up0D),
@@ -362,7 +315,7 @@ static PyObject *Operators_sequential_split(BPy_Operators * /*self*/,
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.sequential_split() failed");
}
- return NULL;
+ return nullptr;
}
}
else if ((void)PyErr_Clear(),
@@ -373,85 +326,65 @@ static PyObject *Operators_sequential_split(BPy_Operators * /*self*/,
PyErr_SetString(
PyExc_TypeError,
"Operators.sequential_split(): 1st argument: invalid UnaryPredicate0D object");
- return NULL;
+ return nullptr;
}
if (Operators::sequentialSplit(*(((BPy_UnaryPredicate0D *)obj1)->up0D), f) < 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.sequential_split() failed");
}
- return NULL;
+ return nullptr;
}
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument(s)");
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
-PyDoc_STRVAR(Operators_recursive_split_doc,
- ".. staticmethod:: recursive_split(func, pred_1d, sampling=0.0)\n"
- "\n"
- " Splits the current set of chains in a recursive way. We process the\n"
- " points of each chain (with a specified sampling) to find the point\n"
- " minimizing a specified function. The chain is split in two at this\n"
- " point and the two new chains are processed in the same way. The\n"
- " recursivity level is controlled through a predicate 1D that expresses\n"
- " a stopping condition on the chain that is about to be processed.\n"
- "\n"
- " :arg func: The Unary Function evaluated at each point of the chain.\n"
- " The splitting point is the point minimizing this function.\n"
- " :type func: :class:`UnaryFunction0DDouble`\n"
- " :arg pred_1d: The Unary Predicate expressing the recursivity stopping\n"
- " condition. This predicate is evaluated for each curve before it\n"
- " actually gets split. If pred_1d(chain) is true, the curve won't be\n"
- " split anymore.\n"
- " :type pred_1d: :class:`UnaryPredicate1D`\n"
- " :arg sampling: The resolution used to sample the chain for the\n"
- " predicates evaluation. (The chain is not actually resampled, a\n"
- " virtual point only progresses along the curve using this\n"
- " resolution.)\n"
- " :type sampling: float\n"
- "\n"
- ".. staticmethod:: recursive_split(func, pred_0d, pred_1d, sampling=0.0)\n"
- "\n"
- " Splits the current set of chains in a recursive way. We process the\n"
- " points of each chain (with a specified sampling) to find the point\n"
- " minimizing a specified function. The chain is split in two at this\n"
- " point and the two new chains are processed in the same way. The user\n"
- " can specify a 0D predicate to make a first selection on the points\n"
- " that can potentially be split. A point that doesn't verify the 0D\n"
- " predicate won't be candidate in realizing the min. The recursivity\n"
- " level is controlled through a predicate 1D that expresses a stopping\n"
- " condition on the chain that is about to be processed.\n"
- "\n"
- " :arg func: The Unary Function evaluated at each point of the chain.\n"
- " The splitting point is the point minimizing this function.\n"
- " :type func: :class:`UnaryFunction0DDouble`\n"
- " :arg pred_0d: The Unary Predicate 0D used to select the candidate\n"
- " points where the split can occur. For example, it is very likely\n"
- " that would rather have your chain splitting around its middle\n"
- " point than around one of its extremities. A 0D predicate working\n"
- " on the curvilinear abscissa allows to add this kind of constraints.\n"
- " :type pred_0d: :class:`UnaryPredicate0D`\n"
- " :arg pred_1d: The Unary Predicate expressing the recursivity stopping\n"
- " condition. This predicate is evaluated for each curve before it\n"
- " actually gets split. If pred_1d(chain) is true, the curve won't be\n"
- " split anymore.\n"
- " :type pred_1d: :class:`UnaryPredicate1D`\n"
- " :arg sampling: The resolution used to sample the chain for the\n"
- " predicates evaluation. (The chain is not actually resampled; a\n"
- " virtual point only progresses along the curve using this\n"
- " resolution.)\n"
- " :type sampling: float");
+PyDoc_STRVAR(
+ Operators_recursive_split_doc,
+ ".. staticmethod:: recursive_split(func, pred_1d, sampling=0.0)\n"
+ " recursive_split(func, pred_0d, pred_1d, sampling=0.0)\n"
+ "\n"
+ " Splits the current set of chains in a recursive way. We process the\n"
+ " points of each chain (with a specified sampling) to find the point\n"
+ " minimizing a specified function. The chain is split in two at this\n"
+ " point and the two new chains are processed in the same way. The\n"
+ " recursivity level is controlled through a predicate 1D that expresses\n"
+ " a stopping condition on the chain that is about to be processed.\n"
+ "\n"
+ " The user can also specify a 0D predicate to make a first selection on the points\n"
+ " that can potentially be split. A point that doesn't verify the 0D\n"
+ " predicate won't be candidate in realizing the min.\n"
+ "\n"
+ " :arg func: The Unary Function evaluated at each point of the chain.\n"
+ " The splitting point is the point minimizing this function.\n"
+ " :type func: :class:`UnaryFunction0DDouble`\n"
+ " :arg pred_0d: The Unary Predicate 0D used to select the candidate\n"
+ " points where the split can occur. For example, it is very likely\n"
+ " that would rather have your chain splitting around its middle\n"
+ " point than around one of its extremities. A 0D predicate working\n"
+ " on the curvilinear abscissa allows to add this kind of constraints.\n"
+ " :type pred_0d: :class:`UnaryPredicate0D`\n"
+ " :arg pred_1d: The Unary Predicate expressing the recursivity stopping\n"
+ " condition. This predicate is evaluated for each curve before it\n"
+ " actually gets split. If pred_1d(chain) is true, the curve won't be\n"
+ " split anymore.\n"
+ " :type pred_1d: :class:`UnaryPredicate1D`\n"
+ " :arg sampling: The resolution used to sample the chain for the\n"
+ " predicates evaluation. (The chain is not actually resampled; a\n"
+ " virtual point only progresses along the curve using this\n"
+ " resolution.)\n"
+ " :type sampling: float\n");
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};
- PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0;
+ static const char *kwlist_1[] = {"func", "pred_1d", "sampling", nullptr};
+ static const char *kwlist_2[] = {"func", "pred_0d", "pred_1d", "sampling", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr, *obj3 = nullptr;
float f = 0.0f;
if (PyArg_ParseTupleAndKeywords(args,
@@ -467,13 +400,13 @@ static PyObject *Operators_recursive_split(BPy_Operators * /*self*/,
PyErr_SetString(
PyExc_TypeError,
"Operators.recursive_split(): 1st argument: invalid UnaryFunction0DDouble object");
- return NULL;
+ return nullptr;
}
if (!((BPy_UnaryPredicate1D *)obj2)->up1D) {
PyErr_SetString(
PyExc_TypeError,
"Operators.recursive_split(): 2nd argument: invalid UnaryPredicate1D object");
- return NULL;
+ return nullptr;
}
if (Operators::recursiveSplit(*(((BPy_UnaryFunction0DDouble *)obj1)->uf0D_double),
*(((BPy_UnaryPredicate1D *)obj2)->up1D),
@@ -481,7 +414,7 @@ static PyObject *Operators_recursive_split(BPy_Operators * /*self*/,
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.recursive_split() failed");
}
- return NULL;
+ return nullptr;
}
}
else if ((void)PyErr_Clear(),
@@ -501,19 +434,19 @@ static PyObject *Operators_recursive_split(BPy_Operators * /*self*/,
PyErr_SetString(
PyExc_TypeError,
"Operators.recursive_split(): 1st argument: invalid UnaryFunction0DDouble object");
- return NULL;
+ return nullptr;
}
if (!((BPy_UnaryPredicate0D *)obj2)->up0D) {
PyErr_SetString(
PyExc_TypeError,
"Operators.recursive_split(): 2nd argument: invalid UnaryPredicate0D object");
- return NULL;
+ return nullptr;
}
if (!((BPy_UnaryPredicate1D *)obj3)->up1D) {
PyErr_SetString(
PyExc_TypeError,
"Operators.recursive_split(): 3rd argument: invalid UnaryPredicate1D object");
- return NULL;
+ return nullptr;
}
if (Operators::recursiveSplit(*(((BPy_UnaryFunction0DDouble *)obj1)->uf0D_double),
*(((BPy_UnaryPredicate0D *)obj2)->up0D),
@@ -522,12 +455,12 @@ static PyObject *Operators_recursive_split(BPy_Operators * /*self*/,
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.recursive_split() failed");
}
- return NULL;
+ return nullptr;
}
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument(s)");
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -543,23 +476,23 @@ PyDoc_STRVAR(Operators_sort_doc,
static PyObject *Operators_sort(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"pred", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"pred", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &BinaryPredicate1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (!((BPy_BinaryPredicate1D *)obj)->bp1D) {
PyErr_SetString(PyExc_TypeError,
"Operators.sort(): 1st argument: invalid BinaryPredicate1D object");
- return NULL;
+ return nullptr;
}
if (Operators::sort(*(((BPy_BinaryPredicate1D *)obj)->bp1D)) < 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.sort() failed");
}
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -578,8 +511,8 @@ PyDoc_STRVAR(Operators_create_doc,
static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"pred", "shaders", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist[] = {"pred", "shaders", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
if (!PyArg_ParseTupleAndKeywords(args,
kwds,
@@ -589,12 +522,12 @@ static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyOb
&obj1,
&PyList_Type,
&obj2)) {
- return NULL;
+ return nullptr;
}
if (!((BPy_UnaryPredicate1D *)obj1)->up1D) {
PyErr_SetString(PyExc_TypeError,
"Operators.create(): 1st argument: invalid UnaryPredicate1D object");
- return NULL;
+ return nullptr;
}
vector<StrokeShader *> shaders;
shaders.reserve(PyList_Size(obj2));
@@ -603,7 +536,7 @@ static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyOb
if (!BPy_StrokeShader_Check(py_ss)) {
PyErr_SetString(PyExc_TypeError,
"Operators.create(): 2nd argument must be a list of StrokeShader objects");
- return NULL;
+ return nullptr;
}
StrokeShader *shader = ((BPy_StrokeShader *)py_ss)->ss;
if (!shader) {
@@ -612,7 +545,7 @@ static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyOb
<< " of the shaders list is invalid likely due to missing call of "
"StrokeShader.__init__()";
PyErr_SetString(PyExc_TypeError, ss.str().c_str());
- return NULL;
+ return nullptr;
}
shaders.push_back(shader);
}
@@ -620,7 +553,7 @@ static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyOb
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError, "Operators.create() failed");
}
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -636,15 +569,15 @@ PyDoc_STRVAR(Operators_reset_doc,
static PyObject *Operators_reset(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"delete_strokes", NULL};
- PyObject *obj1 = 0;
+ static const char *kwlist[] = {"delete_strokes", nullptr};
+ PyObject *obj1 = nullptr;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &PyBool_Type, &obj1)) {
// true is the default
Operators::reset(obj1 ? bool_from_PyBool(obj1) : true);
}
else {
PyErr_SetString(PyExc_RuntimeError, "Operators.reset() failed");
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -663,15 +596,15 @@ static PyObject *Operators_get_viewedge_from_index(BPy_Operators * /*self*/,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"i", NULL};
+ static const char *kwlist[] = {"i", nullptr};
unsigned int i;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i)) {
- return NULL;
+ return nullptr;
}
if (i >= Operators::getViewEdgesSize()) {
PyErr_SetString(PyExc_IndexError, "index out of range");
- return NULL;
+ return nullptr;
}
return BPy_ViewEdge_from_ViewEdge(*(Operators::getViewEdgeFromIndex(i)));
}
@@ -690,15 +623,15 @@ static PyObject *Operators_get_chain_from_index(BPy_Operators * /*self*/,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"i", NULL};
+ static const char *kwlist[] = {"i", nullptr};
unsigned int i;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i)) {
- return NULL;
+ return nullptr;
}
if (i >= Operators::getChainsSize()) {
PyErr_SetString(PyExc_IndexError, "index out of range");
- return NULL;
+ return nullptr;
}
return BPy_Chain_from_Chain(*(Operators::getChainFromIndex(i)));
}
@@ -717,15 +650,15 @@ static PyObject *Operators_get_stroke_from_index(BPy_Operators * /*self*/,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"i", NULL};
+ static const char *kwlist[] = {"i", nullptr};
unsigned int i;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &i)) {
- return NULL;
+ return nullptr;
}
if (i >= Operators::getStrokesSize()) {
PyErr_SetString(PyExc_IndexError, "index out of range");
- return NULL;
+ return nullptr;
}
return BPy_Stroke_from_Stroke(*(Operators::getStrokeFromIndex(i)));
}
@@ -827,49 +760,53 @@ static PyMethodDef BPy_Operators_methods[] = {
(PyCFunction)Operators_get_strokes_size,
METH_NOARGS | METH_STATIC,
Operators_get_strokes_size_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*-----------------------BPy_Operators type definition ------------------------------*/
PyTypeObject Operators_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Operators", /* tp_name */
- sizeof(BPy_Operators), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)Operators_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- Operators_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_Operators_methods, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Operators", /* tp_name */
+ sizeof(BPy_Operators), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)Operators_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ Operators_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_Operators_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp
index 9712dccfa5e..ed83e76559f 100644
--- a/source/blender/freestyle/intern/python/BPy_SShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp
@@ -35,7 +35,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int SShape_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -50,25 +50,23 @@ int SShape_Init(PyObject *module)
/*----------------------SShape methods ----------------------------*/
-PyDoc_STRVAR(SShape_doc,
- "Class to define a feature shape. It is the gathering of feature\n"
- "elements from an identified input shape.\n"
- "\n"
- ".. method:: __init__()\n"
- "\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
- " :arg brother: An SShape object.\n"
- " :type brother: :class:`SShape`");
+PyDoc_STRVAR(
+ SShape_doc,
+ "Class to define a feature shape. It is the gathering of feature\n"
+ "elements from an identified input shape.\n"
+ "\n"
+ ".. method:: __init__()\n"
+ " __init__(brother)\n"
+ "\n"
+ " Creates a :class:`SShape` class using either a default constructor or copy constructor.\n"
+ "\n"
+ " :arg brother: An SShape object.\n"
+ " :type brother: :class:`SShape`");
static int SShape_init(BPy_SShape *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"brother", NULL};
- PyObject *brother = 0;
+ static const char *kwlist[] = {"brother", nullptr};
+ PyObject *brother = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &SShape_Type, &brother)) {
return -1;
@@ -106,11 +104,11 @@ static char SShape_add_edge_doc[] =
static PyObject *SShape_add_edge(BPy_SShape *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"edge", NULL};
- PyObject *py_fe = 0;
+ static const char *kwlist[] = {"edge", nullptr};
+ PyObject *py_fe = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe)) {
- return NULL;
+ return nullptr;
}
self->ss->AddEdge(((BPy_FEdge *)py_fe)->fe);
Py_RETURN_NONE;
@@ -127,11 +125,11 @@ PyDoc_STRVAR(SShape_add_vertex_doc,
static PyObject *SShape_add_vertex(BPy_SShape *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"edge", NULL};
- PyObject *py_sv = 0;
+ static const char *kwlist[] = {"edge", nullptr};
+ PyObject *py_sv = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &SVertex_Type, &py_sv)) {
- return NULL;
+ return nullptr;
}
self->ss->AddNewVertex(((BPy_SVertex *)py_sv)->sv);
Py_RETURN_NONE;
@@ -159,7 +157,7 @@ static PyMethodDef BPy_SShape_methods[] = {
METH_VARARGS | METH_KEYWORDS,
SShape_add_vertex_doc},
{"compute_bbox", (PyCFunction)SShape_compute_bbox, METH_NOARGS, SShape_compute_bbox_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------SShape get/setters ----------------------------*/
@@ -268,53 +266,57 @@ static PyObject *SShape_edges_get(BPy_SShape *self, void *UNUSED(closure))
}
static PyGetSetDef BPy_SShape_getseters[] = {
- {"id", (getter)SShape_id_get, (setter)SShape_id_set, SShape_id_doc, NULL},
- {"name", (getter)SShape_name_get, (setter)SShape_name_set, SShape_name_doc, NULL},
- {"bbox", (getter)SShape_bbox_get, (setter)SShape_bbox_set, SShape_bbox_doc, NULL},
- {"edges", (getter)SShape_edges_get, (setter)NULL, SShape_edges_doc, NULL},
- {"vertices", (getter)SShape_vertices_get, (setter)NULL, SShape_vertices_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"id", (getter)SShape_id_get, (setter)SShape_id_set, SShape_id_doc, nullptr},
+ {"name", (getter)SShape_name_get, (setter)SShape_name_set, SShape_name_doc, nullptr},
+ {"bbox", (getter)SShape_bbox_get, (setter)SShape_bbox_set, SShape_bbox_doc, nullptr},
+ {"edges", (getter)SShape_edges_get, (setter) nullptr, SShape_edges_doc, nullptr},
+ {"vertices", (getter)SShape_vertices_get, (setter) nullptr, SShape_vertices_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_SShape type definition ------------------------------*/
PyTypeObject SShape_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "SShape", /* tp_name */
- sizeof(BPy_SShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)SShape_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
+ PyVarObject_HEAD_INIT(nullptr, 0) "SShape", /* tp_name */
+ sizeof(BPy_SShape), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)SShape_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)SShape_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
SShape_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
BPy_SShape_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_SShape_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)SShape_init, /* tp_init */
- 0, /* tp_alloc */
+ nullptr, /* tp_alloc */
PyType_GenericNew, /* tp_new */
};
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
index 214385f74ad..8f706f56f7d 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
@@ -31,7 +31,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int StrokeAttribute_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -53,20 +53,16 @@ PyDoc_STRVAR(StrokeAttribute_doc,
"Vertex.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(red, green, blue, alpha, thickness_right, thickness_left)\n"
+ " __init__(attribute1, attribute2, t)\n"
"\n"
- " Default constructor.\n"
+ " Creates a :class:`StrokeAttribute` object using either a default constructor,\n"
+ " copy constructor, overloaded constructor, or and interpolation constructor\n"
+ " to interpolate between two :class:`StrokeAttribute` objects.\n"
"\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
- " :arg brother: A StrokeAttribute object.\n"
+ " :arg brother: A StrokeAttribute object to be used as a copy constructor.\n"
" :type brother: :class:`StrokeAttribute`\n"
- "\n"
- ".. method:: __init__(red, green, blue, alpha, thickness_right, thickness_left)\n"
- "\n"
- " Build a stroke vertex attribute from a set of parameters.\n"
- "\n"
" :arg red: Red component of a stroke color.\n"
" :type red: float\n"
" :arg green: Green component of a stroke color.\n"
@@ -79,12 +75,6 @@ PyDoc_STRVAR(StrokeAttribute_doc,
" :type thickness_right: float\n"
" :arg thickness_left: Stroke thickness on the left.\n"
" :type thickness_left: float\n"
- "\n"
- ".. method:: __init__(attribute1, attribute2, t)\n"
- "\n"
- " Interpolation constructor. Build a StrokeAttribute from two\n"
- " StrokeAttribute objects and an interpolation parameter.\n"
- "\n"
" :arg attribute1: The first StrokeAttribute object.\n"
" :type attribute1: :class:`StrokeAttribute`\n"
" :arg attribute2: The second StrokeAttribute object.\n"
@@ -94,11 +84,11 @@ PyDoc_STRVAR(StrokeAttribute_doc,
static int StrokeAttribute_init(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"attribute1", "attribute2", "t", NULL};
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"attribute1", "attribute2", "t", nullptr};
static const char *kwlist_3[] = {
- "red", "green", "blue", "alpha", "thickness_right", "thickness_left", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ "red", "green", "blue", "alpha", "thickness_right", "thickness_left", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
float red, green, blue, alpha, thickness_right, thickness_left, t;
if (PyArg_ParseTupleAndKeywords(
@@ -176,11 +166,11 @@ static PyObject *StrokeAttribute_get_attribute_real(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", NULL};
+ static const char *kwlist[] = {"name", nullptr};
char *attr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
- return NULL;
+ return nullptr;
}
double a = self->sa->getAttributeReal(attr);
return PyFloat_FromDouble(a);
@@ -200,11 +190,11 @@ static PyObject *StrokeAttribute_get_attribute_vec2(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", NULL};
+ static const char *kwlist[] = {"name", nullptr};
char *attr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
- return NULL;
+ return nullptr;
}
Vec2f a = self->sa->getAttributeVec2f(attr);
return Vector_from_Vec2f(a);
@@ -224,11 +214,11 @@ static PyObject *StrokeAttribute_get_attribute_vec3(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", NULL};
+ static const char *kwlist[] = {"name", nullptr};
char *attr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
- return NULL;
+ return nullptr;
}
Vec3f a = self->sa->getAttributeVec3f(attr);
return Vector_from_Vec3f(a);
@@ -248,11 +238,11 @@ static PyObject *StrokeAttribute_has_attribute_real(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", NULL};
+ static const char *kwlist[] = {"name", nullptr};
char *attr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
- return NULL;
+ return nullptr;
}
return PyBool_from_bool(self->sa->isAttributeAvailableReal(attr));
}
@@ -272,11 +262,11 @@ static PyObject *StrokeAttribute_has_attribute_vec2(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", NULL};
+ static const char *kwlist[] = {"name", nullptr};
char *attr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
- return NULL;
+ return nullptr;
}
return PyBool_from_bool(self->sa->isAttributeAvailableVec2f(attr));
}
@@ -296,11 +286,11 @@ static PyObject *StrokeAttribute_has_attribute_vec3(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", NULL};
+ static const char *kwlist[] = {"name", nullptr};
char *attr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) {
- return NULL;
+ return nullptr;
}
return PyBool_from_bool(self->sa->isAttributeAvailableVec3f(attr));
}
@@ -321,12 +311,12 @@ static PyObject *StrokeAttribute_set_attribute_real(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", "value", NULL};
- char *s = 0;
+ static const char *kwlist[] = {"name", "value", nullptr};
+ char *s = nullptr;
double d = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "sd", (char **)kwlist, &s, &d)) {
- return NULL;
+ return nullptr;
}
self->sa->setAttributeReal(s, d);
Py_RETURN_NONE;
@@ -348,18 +338,18 @@ static PyObject *StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", "value", NULL};
+ static const char *kwlist[] = {"name", "value", nullptr};
char *s;
- PyObject *obj = 0;
+ PyObject *obj = nullptr;
Vec2f vec;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj)) {
- return NULL;
+ return nullptr;
}
if (!Vec2f_ptr_from_PyObject(obj, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 2 must be a 2D vector (either a list of 2 elements or Vector)");
- return NULL;
+ return nullptr;
}
self->sa->setAttributeVec2f(s, vec);
Py_RETURN_NONE;
@@ -381,18 +371,18 @@ static PyObject *StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"name", "value", NULL};
+ static const char *kwlist[] = {"name", "value", nullptr};
char *s;
- PyObject *obj = 0;
+ PyObject *obj = nullptr;
Vec3f vec;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj)) {
- return NULL;
+ return nullptr;
}
if (!Vec3f_ptr_from_PyObject(obj, vec)) {
PyErr_SetString(PyExc_TypeError,
"argument 2 must be a 3D vector (either a list of 3 elements or Vector)");
- return NULL;
+ return nullptr;
}
self->sa->setAttributeVec3f(s, vec);
Py_RETURN_NONE;
@@ -435,7 +425,7 @@ static PyMethodDef BPy_StrokeAttribute_methods[] = {
(PyCFunction)StrokeAttribute_set_attribute_vec3,
METH_VARARGS | METH_KEYWORDS,
StrokeAttribute_set_attribute_vec3_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------mathutils callbacks ----------------------------*/
@@ -661,65 +651,69 @@ static PyGetSetDef BPy_StrokeAttribute_getseters[] = {
(getter)StrokeAttribute_alpha_get,
(setter)StrokeAttribute_alpha_set,
StrokeAttribute_alpha_doc,
- NULL},
+ nullptr},
{"color",
(getter)StrokeAttribute_color_get,
(setter)StrokeAttribute_color_set,
StrokeAttribute_color_doc,
- NULL},
+ nullptr},
{"thickness",
(getter)StrokeAttribute_thickness_get,
(setter)StrokeAttribute_thickness_set,
StrokeAttribute_thickness_doc,
- NULL},
+ nullptr},
{"visible",
(getter)StrokeAttribute_visible_get,
(setter)StrokeAttribute_visible_set,
StrokeAttribute_visible_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_StrokeAttribute type definition ------------------------------*/
PyTypeObject StrokeAttribute_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "StrokeAttribute", /* tp_name */
- sizeof(BPy_StrokeAttribute), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)StrokeAttribute_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)StrokeAttribute_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeAttribute_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_StrokeAttribute_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_StrokeAttribute_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeAttribute_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "StrokeAttribute", /* tp_name */
+ sizeof(BPy_StrokeAttribute), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)StrokeAttribute_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)StrokeAttribute_repr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ StrokeAttribute_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_StrokeAttribute_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_StrokeAttribute_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)StrokeAttribute_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
index 5e5685153af..b55da256c22 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
@@ -51,7 +51,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int StrokeShader_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -198,7 +198,7 @@ static char StrokeShader___doc__[] =
static int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -229,23 +229,23 @@ static char StrokeShader_shade___doc__[] =
static PyObject *StrokeShader_shade(BPy_StrokeShader *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"stroke", NULL};
- PyObject *py_s = 0;
+ static const char *kwlist[] = {"stroke", nullptr};
+ PyObject *py_s = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Stroke_Type, &py_s)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->ss)) == typeid(StrokeShader)) {
PyErr_SetString(PyExc_TypeError, "shade method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->ss->shade(*(((BPy_Stroke *)py_s)->s)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " shade method failed").c_str());
}
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -255,7 +255,7 @@ static PyMethodDef BPy_StrokeShader_methods[] = {
(PyCFunction)StrokeShader_shade,
METH_VARARGS | METH_KEYWORDS,
StrokeShader_shade___doc__},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------StrokeShader get/setters ----------------------------*/
@@ -271,50 +271,54 @@ static PyObject *StrokeShader_name_get(BPy_StrokeShader *self, void *UNUSED(clos
}
static PyGetSetDef BPy_StrokeShader_getseters[] = {
- {"name", (getter)StrokeShader_name_get, (setter)NULL, StrokeShader_name_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"name", (getter)StrokeShader_name_get, (setter) nullptr, StrokeShader_name_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_StrokeShader type definition ------------------------------*/
PyTypeObject StrokeShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "StrokeShader", /* tp_name */
- sizeof(BPy_StrokeShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)StrokeShader___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)StrokeShader___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_StrokeShader_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_StrokeShader_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeShader___init__, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "StrokeShader", /* tp_name */
+ sizeof(BPy_StrokeShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)StrokeShader___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)StrokeShader___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ StrokeShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_StrokeShader_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_StrokeShader_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)StrokeShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
index 6214ea94f41..78c93ddce31 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
@@ -40,7 +40,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int UnaryFunction0D_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -109,50 +109,58 @@ static PyObject *UnaryFunction0D_name_get(BPy_UnaryFunction0D *self, void *UNUSE
}
static PyGetSetDef BPy_UnaryFunction0D_getseters[] = {
- {"name", (getter)UnaryFunction0D_name_get, (setter)NULL, UnaryFunction0D_name_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"name",
+ (getter)UnaryFunction0D_name_get,
+ (setter) nullptr,
+ UnaryFunction0D_name_doc,
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction0D type definition ------------------------------*/
PyTypeObject UnaryFunction0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0D", /* tp_name */
- sizeof(BPy_UnaryFunction0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction0D_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0D", /* tp_name */
+ sizeof(BPy_UnaryFunction0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0D___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction0D_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
index 18d6479a498..365850b748c 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
@@ -38,7 +38,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int UnaryFunction1D_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -103,50 +103,58 @@ static PyObject *UnaryFunction1D_name_get(BPy_UnaryFunction1D *self, void *UNUSE
}
static PyGetSetDef BPy_UnaryFunction1D_getseters[] = {
- {"name", (getter)UnaryFunction1D_name_get, (setter)NULL, UnaryFunction1D_name_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"name",
+ (getter)UnaryFunction1D_name_get,
+ (setter) nullptr,
+ UnaryFunction1D_name_doc,
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1D type definition ------------------------------*/
PyTypeObject UnaryFunction1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1D", /* tp_name */
- sizeof(BPy_UnaryFunction1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1D_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1D", /* tp_name */
+ sizeof(BPy_UnaryFunction1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1D___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1D_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
index ddbb55fdb4d..e3076d4615f 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
@@ -34,7 +34,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int UnaryPredicate0D_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -85,7 +85,7 @@ static char UnaryPredicate0D___doc__[] =
static int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -110,12 +110,12 @@ static PyObject *UnaryPredicate0D___call__(BPy_UnaryPredicate0D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *py_if0D_it;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &py_if0D_it)) {
- return NULL;
+ return nullptr;
}
Interface0DIterator *if0D_it = ((BPy_Interface0DIterator *)py_if0D_it)->if0D_it;
@@ -123,18 +123,18 @@ static PyObject *UnaryPredicate0D___call__(BPy_UnaryPredicate0D *self,
if (!if0D_it) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " has no Interface0DIterator").c_str());
- return NULL;
+ return nullptr;
}
if (typeid(*(self->up0D)) == typeid(UnaryPredicate0D)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->up0D->operator()(*if0D_it) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return PyBool_from_bool(self->up0D->result);
}
@@ -152,50 +152,58 @@ static PyObject *UnaryPredicate0D_name_get(BPy_UnaryPredicate0D *self, void *UNU
}
static PyGetSetDef BPy_UnaryPredicate0D_getseters[] = {
- {"name", (getter)UnaryPredicate0D_name_get, (setter)NULL, UnaryPredicate0D_name_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"name",
+ (getter)UnaryPredicate0D_name_get,
+ (setter) nullptr,
+ UnaryPredicate0D_name_doc,
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryPredicate0D type definition ------------------------------*/
PyTypeObject UnaryPredicate0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryPredicate0D", /* tp_name */
- sizeof(BPy_UnaryPredicate0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryPredicate0D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryPredicate0D___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryPredicate0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryPredicate0D_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryPredicate0D___init__, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryPredicate0D", /* tp_name */
+ sizeof(BPy_UnaryPredicate0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryPredicate0D___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryPredicate0D___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryPredicate0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryPredicate0D_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryPredicate0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
index 11e77fa365a..4b5269a1434 100644
--- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
@@ -43,7 +43,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int UnaryPredicate1D_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -143,7 +143,7 @@ static char UnaryPredicate1D___doc__[] =
static int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -168,12 +168,12 @@ static PyObject *UnaryPredicate1D___call__(BPy_UnaryPredicate1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
+ static const char *kwlist[] = {"inter", nullptr};
PyObject *py_if1D;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &py_if1D)) {
- return NULL;
+ return nullptr;
}
Interface1D *if1D = ((BPy_Interface1D *)py_if1D)->if1D;
@@ -181,18 +181,18 @@ static PyObject *UnaryPredicate1D___call__(BPy_UnaryPredicate1D *self,
if (!if1D) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " has no Interface1D").c_str());
- return NULL;
+ return nullptr;
}
if (typeid(*(self->up1D)) == typeid(UnaryPredicate1D)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->up1D->operator()(*if1D) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return PyBool_from_bool(self->up1D->result);
}
@@ -210,50 +210,58 @@ static PyObject *UnaryPredicate1D_name_get(BPy_UnaryPredicate1D *self, void *UNU
}
static PyGetSetDef BPy_UnaryPredicate1D_getseters[] = {
- {"name", (getter)UnaryPredicate1D_name_get, (setter)NULL, UnaryPredicate1D_name_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"name",
+ (getter)UnaryPredicate1D_name_get,
+ (setter) nullptr,
+ UnaryPredicate1D_name_doc,
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryPredicate1D type definition ------------------------------*/
PyTypeObject UnaryPredicate1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryPredicate1D", /* tp_name */
- sizeof(BPy_UnaryPredicate1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryPredicate1D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryPredicate1D___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryPredicate1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryPredicate1D_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryPredicate1D___init__, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryPredicate1D", /* tp_name */
+ sizeof(BPy_UnaryPredicate1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryPredicate1D___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryPredicate1D___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryPredicate1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryPredicate1D_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryPredicate1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
index 67a4249ade8..8565a95fc1a 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
@@ -34,7 +34,7 @@ extern "C" {
//-------------------MODULE INITIALIZATION--------------------------------
int ViewMap_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -58,7 +58,7 @@ PyDoc_STRVAR(ViewMap_doc,
static int ViewMap_init(BPy_ViewMap *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -92,11 +92,11 @@ PyDoc_STRVAR(ViewMap_get_closest_viewedge_doc,
static PyObject *ViewMap_get_closest_viewedge(BPy_ViewMap *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"x", "y", NULL};
+ static const char *kwlist[] = {"x", "y", nullptr};
double x, y;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "dd", (char **)kwlist, &x, &y)) {
- return NULL;
+ return nullptr;
}
ViewEdge *ve = const_cast<ViewEdge *>(self->vm->getClosestViewEdge(x, y));
if (ve) {
@@ -119,11 +119,11 @@ PyDoc_STRVAR(ViewMap_get_closest_fedge_doc,
static PyObject *ViewMap_get_closest_fedge(BPy_ViewMap *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"x", "y", NULL};
+ static const char *kwlist[] = {"x", "y", nullptr};
double x, y;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "dd", (char **)kwlist, &x, &y)) {
- return NULL;
+ return nullptr;
}
FEdge *fe = const_cast<FEdge *>(self->vm->getClosestFEdge(x, y));
if (fe) {
@@ -143,7 +143,7 @@ static PyMethodDef BPy_ViewMap_methods[] = {
(PyCFunction)ViewMap_get_closest_fedge,
METH_VARARGS | METH_KEYWORDS,
ViewMap_get_closest_fedge_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------ViewMap get/setters ----------------------------*/
@@ -173,49 +173,53 @@ static PyGetSetDef BPy_ViewMap_getseters[] = {
(getter)ViewMap_scene_bbox_get,
(setter)ViewMap_scene_bbox_set,
ViewMap_scene_bbox_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_ViewMap type definition ------------------------------*/
PyTypeObject ViewMap_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ViewMap", /* tp_name */
- sizeof(BPy_ViewMap), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)ViewMap_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ViewMap", /* tp_name */
+ sizeof(BPy_ViewMap), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)ViewMap_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)ViewMap_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
ViewMap_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
BPy_ViewMap_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_ViewMap_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)ViewMap_init, /* tp_init */
- 0, /* tp_alloc */
+ nullptr, /* tp_alloc */
PyType_GenericNew, /* tp_new */
};
diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
index 2adcae13e6d..6c8551867fd 100644
--- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
+++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
@@ -35,7 +35,7 @@ extern "C" {
int ViewShape_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -55,33 +55,27 @@ PyDoc_STRVAR(ViewShape_doc,
"and :class:`ViewEdge`) that are issued from the same input shape.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(sshape)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds a :class:`ViewShape` using the default constructor,\n"
+ " copy constructor, or from a :class:`SShape`.\n"
"\n"
" :arg brother: A ViewShape object.\n"
" :type brother: :class:`ViewShape`\n"
- "\n"
- ".. method:: __init__(sshape)\n"
- "\n"
- " Builds a ViewShape from an SShape.\n"
- "\n"
" :arg sshape: An SShape object.\n"
" :type sshape: :class:`SShape`");
static int ViewShape_init(BPy_ViewShape *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"sshape", NULL};
- PyObject *obj = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"sshape", nullptr};
+ PyObject *obj = nullptr;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &ViewShape_Type, &obj)) {
if (!obj) {
self->vs = new ViewShape();
- self->py_ss = NULL;
+ self->py_ss = nullptr;
}
else {
self->vs = new ViewShape(*(((BPy_ViewShape *)obj)->vs));
@@ -92,7 +86,7 @@ static int ViewShape_init(BPy_ViewShape *self, PyObject *args, PyObject *kwds)
PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist_2, &SShape_Type, &obj)) {
BPy_SShape *py_ss = (BPy_SShape *)obj;
self->vs = new ViewShape(py_ss->ss);
- self->py_ss = (!py_ss->borrowed) ? py_ss : NULL;
+ self->py_ss = (!py_ss->borrowed) ? py_ss : nullptr;
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument(s)");
@@ -106,7 +100,7 @@ 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 *)NULL);
+ self->vs->setSShape((SShape *)nullptr);
Py_DECREF(self->py_ss);
}
if (self->vs && !self->borrowed) {
@@ -130,11 +124,11 @@ PyDoc_STRVAR(ViewShape_add_edge_doc,
static PyObject *ViewShape_add_edge(BPy_ViewShape *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"edge", NULL};
- PyObject *py_ve = 0;
+ static const char *kwlist[] = {"edge", nullptr};
+ PyObject *py_ve = nullptr;
if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve)) {
- return NULL;
+ return nullptr;
}
self->vs->AddEdge(((BPy_ViewEdge *)py_ve)->ve);
Py_RETURN_NONE;
@@ -150,11 +144,11 @@ PyDoc_STRVAR(ViewShape_add_vertex_doc,
static PyObject *ViewShape_add_vertex(BPy_ViewShape *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"vertex", NULL};
- PyObject *py_vv = 0;
+ static const char *kwlist[] = {"vertex", nullptr};
+ PyObject *py_vv = nullptr;
if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewVertex_Type, &py_vv)) {
- return NULL;
+ return nullptr;
}
self->vs->AddVertex(((BPy_ViewVertex *)py_vv)->vv);
Py_RETURN_NONE;
@@ -171,7 +165,7 @@ static PyMethodDef BPy_ViewShape_methods[] = {
(PyCFunction)ViewShape_add_vertex,
METH_VARARGS | METH_KEYWORDS,
ViewShape_add_vertex_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------ViewShape get/setters ----------------------------*/
@@ -330,63 +324,71 @@ static PyGetSetDef BPy_ViewShape_getseters[] = {
(getter)ViewShape_sshape_get,
(setter)ViewShape_sshape_set,
ViewShape_sshape_doc,
- NULL},
+ nullptr},
{"vertices",
(getter)ViewShape_vertices_get,
(setter)ViewShape_vertices_set,
ViewShape_vertices_doc,
- NULL},
- {"edges", (getter)ViewShape_edges_get, (setter)ViewShape_edges_set, ViewShape_edges_doc, NULL},
- {"name", (getter)ViewShape_name_get, (setter)NULL, ViewShape_name_doc, NULL},
+ nullptr},
+ {"edges",
+ (getter)ViewShape_edges_get,
+ (setter)ViewShape_edges_set,
+ ViewShape_edges_doc,
+ nullptr},
+ {"name", (getter)ViewShape_name_get, (setter) nullptr, ViewShape_name_doc, nullptr},
{"library_path",
(getter)ViewShape_library_path_get,
- (setter)NULL,
+ (setter) nullptr,
ViewShape_library_path_doc,
- NULL},
- {"id", (getter)ViewShape_id_get, (setter)NULL, ViewShape_id_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"id", (getter)ViewShape_id_get, (setter) nullptr, ViewShape_id_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_ViewShape type definition ------------------------------*/
PyTypeObject ViewShape_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ViewShape", /* tp_name */
- sizeof(BPy_ViewShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)ViewShape_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)ViewShape_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewShape_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_ViewShape_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_ViewShape_getseters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewShape_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ViewShape", /* tp_name */
+ sizeof(BPy_ViewShape), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)ViewShape_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)ViewShape_repr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ViewShape_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_ViewShape_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_ViewShape_getseters, /* tp_getset */
+ nullptr, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ViewShape_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
index 65c7f063dcf..e284f28cd0b 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
@@ -44,7 +44,7 @@ static char FalseBP1D___doc__[] =
static int FalseBP1D___init__(BPy_FalseBP1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -55,43 +55,47 @@ static int FalseBP1D___init__(BPy_FalseBP1D *self, PyObject *args, PyObject *kwd
/*-----------------------BPy_FalseBP1D type definition ------------------------------*/
PyTypeObject FalseBP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "FalseBP1D", /* tp_name */
- sizeof(BPy_FalseBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FalseBP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FalseBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "FalseBP1D", /* tp_name */
+ sizeof(BPy_FalseBP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ FalseBP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &BinaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)FalseBP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
index 59c3283ed35..2c84f69dd6e 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
@@ -45,7 +45,7 @@ static char Length2DBP1D___doc__[] =
static int Length2DBP1D___init__(BPy_Length2DBP1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -57,43 +57,47 @@ static int Length2DBP1D___init__(BPy_Length2DBP1D *self, PyObject *args, PyObjec
/*-----------------------BPy_Length2DBP1D type definition ------------------------------*/
PyTypeObject Length2DBP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Length2DBP1D", /* tp_name */
- sizeof(BPy_Length2DBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Length2DBP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Length2DBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Length2DBP1D", /* tp_name */
+ sizeof(BPy_Length2DBP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Length2DBP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &BinaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Length2DBP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
index 62bfbbcfad0..ab79ae4e209 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
@@ -44,7 +44,7 @@ static char SameShapeIdBP1D___doc__[] =
static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -56,43 +56,47 @@ static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D *self, PyObject *args, P
/*-----------------------BPy_SameShapeIdBP1D type definition ------------------------------*/
PyTypeObject SameShapeIdBP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "SameShapeIdBP1D", /* tp_name */
- sizeof(BPy_SameShapeIdBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SameShapeIdBP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SameShapeIdBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "SameShapeIdBP1D", /* tp_name */
+ sizeof(BPy_SameShapeIdBP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ SameShapeIdBP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &BinaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)SameShapeIdBP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
index e169ffe7c75..47c3c6b53aa 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
@@ -44,7 +44,7 @@ static char TrueBP1D___doc__[] =
static int TrueBP1D___init__(BPy_TrueBP1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -56,43 +56,47 @@ static int TrueBP1D___init__(BPy_TrueBP1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_TrueBP1D type definition ------------------------------*/
PyTypeObject TrueBP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "TrueBP1D", /* tp_name */
- sizeof(BPy_TrueBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TrueBP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TrueBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "TrueBP1D", /* tp_name */
+ sizeof(BPy_TrueBP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ TrueBP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &BinaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)TrueBP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
index ec660b7a7fe..9d69b1c902c 100644
--- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
+++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
@@ -69,8 +69,8 @@ static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
+ PyObject *obj = nullptr;
int i;
float f = 2.0;
@@ -86,43 +86,47 @@ static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self,
/*-----------------------BPy_ViewMapGradientNormBP1D type definition ----------------------------*/
PyTypeObject ViewMapGradientNormBP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ViewMapGradientNormBP1D", /* tp_name */
- sizeof(BPy_ViewMapGradientNormBP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewMapGradientNormBP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &BinaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewMapGradientNormBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ViewMapGradientNormBP1D", /* tp_name */
+ sizeof(BPy_ViewMapGradientNormBP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ViewMapGradientNormBP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &BinaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ViewMapGradientNormBP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp
index 0769b30ebb7..ff1d63f5f58 100644
--- a/source/blender/freestyle/intern/python/Director.cpp
+++ b/source/blender/freestyle/intern/python/Director.cpp
@@ -195,7 +195,7 @@ int Director_BPy_ChainingIterator_init(ChainingIterator *c_it)
PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_c_it) not initialized");
return -1;
}
- PyObject *result = PyObject_CallMethod((PyObject *)c_it->py_c_it, "init", NULL);
+ PyObject *result = PyObject_CallMethod((PyObject *)c_it->py_c_it, "init", nullptr);
if (!result) {
return -1;
}
@@ -222,7 +222,7 @@ int Director_BPy_ChainingIterator_traverse(ChainingIterator *c_it, AdjacencyIter
c_it->result = ((BPy_ViewEdge *)result)->ve;
}
else if (result == Py_None) {
- c_it->result = NULL;
+ c_it->result = nullptr;
}
else {
PyErr_SetString(PyExc_RuntimeError, "traverse method returned a wrong value");
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
index 81dd79ff270..f70f70275df 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
@@ -44,47 +44,35 @@ PyDoc_STRVAR(CurvePoint_doc,
"given resolution.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(first_vertex, second_vertex, t2d)\n"
+ " __init__(first_point, second_point, t2d)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds a CurvePoint using the default constructor, copy constructor,\n"
+ " or one of the overloaded constructors. The over loaded constructors\n"
+ " can either take two :class:`SVertex` or two :class:`CurvePoint`\n"
+ " objects and an interpolation parameter\n"
"\n"
" :arg brother: A CurvePoint object.\n"
" :type brother: :class:`CurvePoint`\n"
- "\n"
- ".. method:: __init__(first_vertex, second_vertex, t2d)\n"
- "\n"
- " Builds a CurvePoint from two SVertex objects and an interpolation parameter.\n"
- "\n"
" :arg first_vertex: The first SVertex.\n"
" :type first_vertex: :class:`SVertex`\n"
" :arg second_vertex: The second SVertex.\n"
" :type second_vertex: :class:`SVertex`\n"
- " :arg t2d: A 2D interpolation parameter used to linearly interpolate\n"
- " first_vertex and second_vertex.\n"
- " :type t2d: float\n"
- "\n"
- ".. method:: __init__(first_point, second_point, t2d)\n"
- "\n"
- " Builds a CurvePoint from two CurvePoint objects and an interpolation\n"
- " parameter.\n"
- "\n"
" :arg first_point: The first CurvePoint.\n"
" :type first_point: :class:`CurvePoint`\n"
" :arg second_point: The second CurvePoint.\n"
" :type second_point: :class:`CurvePoint`\n"
- " :arg t2d: The 2D interpolation parameter used to linearly interpolate\n"
- " first_point and second_point.\n"
- " :type t2d: float");
+ " :arg t2d: A 2D interpolation parameter used to linearly interpolate\n"
+ " first_vertex and second_vertex or first_point and second_point.\n"
+ " :type t2d: float\n");
static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"first_vertex", "second_vertex", "t2d", NULL};
- static const char *kwlist_3[] = {"first_point", "second_point", "t2d", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"first_vertex", "second_vertex", "t2d", nullptr};
+ static const char *kwlist_3[] = {"first_point", "second_point", "t2d", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
float t2d;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &CurvePoint_Type, &obj1)) {
@@ -119,11 +107,11 @@ static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds)
&t2d)) {
CurvePoint *cp1 = ((BPy_CurvePoint *)obj1)->cp;
CurvePoint *cp2 = ((BPy_CurvePoint *)obj2)->cp;
- if (!cp1 || cp1->A() == 0 || cp1->B() == 0) {
+ if (!cp1 || cp1->A() == nullptr || cp1->B() == nullptr) {
PyErr_SetString(PyExc_TypeError, "argument 1 is an invalid CurvePoint object");
return -1;
}
- if (!cp2 || cp2->A() == 0 || cp2->B() == 0) {
+ if (!cp2 || cp2->A() == nullptr || cp2->B() == nullptr) {
PyErr_SetString(PyExc_TypeError, "argument 2 is an invalid CurvePoint object");
return -1;
}
@@ -237,56 +225,60 @@ static PyGetSetDef BPy_CurvePoint_getseters[] = {
(getter)CurvePoint_first_svertex_get,
(setter)CurvePoint_first_svertex_set,
CurvePoint_first_svertex_doc,
- NULL},
+ nullptr},
{"second_svertex",
(getter)CurvePoint_second_svertex_get,
(setter)CurvePoint_second_svertex_set,
CurvePoint_second_svertex_doc,
- NULL},
- {"fedge", (getter)CurvePoint_fedge_get, NULL, CurvePoint_fedge_doc, NULL},
- {"t2d", (getter)CurvePoint_t2d_get, (setter)CurvePoint_t2d_set, CurvePoint_t2d_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"fedge", (getter)CurvePoint_fedge_get, nullptr, CurvePoint_fedge_doc, nullptr},
+ {"t2d", (getter)CurvePoint_t2d_get, (setter)CurvePoint_t2d_set, CurvePoint_t2d_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_CurvePoint type definition ------------------------------*/
PyTypeObject CurvePoint_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "CurvePoint", /* tp_name */
- sizeof(BPy_CurvePoint), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurvePoint_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_CurvePoint_getseters, /* tp_getset */
- &Interface0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurvePoint_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "CurvePoint", /* tp_name */
+ sizeof(BPy_CurvePoint), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ CurvePoint_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_CurvePoint_getseters, /* tp_getset */
+ &Interface0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)CurvePoint_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
index c01f1f17000..b245ecd81f1 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
@@ -38,20 +38,15 @@ PyDoc_STRVAR(SVertex_doc,
"Class to define a vertex of the embedding.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(point_3d, id)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds a :class:`SVertex` using the default constructor,\n"
+ " copy constructor or the overloaded constructor which builds"
+ " a :class:`SVertex` from 3D coordinates and an Id.\n"
"\n"
" :arg brother: A SVertex object.\n"
" :type brother: :class:`SVertex`\n"
- "\n"
- ".. method:: __init__(point_3d, id)\n"
- "\n"
- " Builds a SVertex from 3D coordinates and an Id.\n"
- "\n"
" :arg point_3d: A three-dimensional vector.\n"
" :type point_3d: :class:`mathutils.Vector`\n"
" :arg id: An Id object.\n"
@@ -59,9 +54,9 @@ PyDoc_STRVAR(SVertex_doc,
static int SVertex_init(BPy_SVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"point_3d", "id", NULL};
- PyObject *obj = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"point_3d", "id", nullptr};
+ PyObject *obj = nullptr;
float v[3];
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &SVertex_Type, &obj)) {
@@ -98,17 +93,17 @@ PyDoc_STRVAR(SVertex_add_normal_doc,
static PyObject *SVertex_add_normal(BPy_SVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"normal", NULL};
+ static const char *kwlist[] = {"normal", nullptr};
PyObject *py_normal;
Vec3r n;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &py_normal)) {
- return NULL;
+ return nullptr;
}
if (!Vec3r_ptr_from_PyObject(py_normal, n)) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be a 3D vector (either a list of 3 elements or Vector)");
- return NULL;
+ return nullptr;
}
self->sv->AddNormal(n);
Py_RETURN_NONE;
@@ -124,11 +119,11 @@ PyDoc_STRVAR(SVertex_add_fedge_doc,
static PyObject *SVertex_add_fedge(BPy_SVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"fedge", NULL};
+ static const char *kwlist[] = {"fedge", nullptr};
PyObject *py_fe;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe)) {
- return NULL;
+ return nullptr;
}
self->sv->AddFEdge(((BPy_FEdge *)py_fe)->fe);
Py_RETURN_NONE;
@@ -145,7 +140,7 @@ static PyMethodDef BPy_SVertex_methods[] = {
(PyCFunction)SVertex_add_fedge,
METH_VARARGS | METH_KEYWORDS,
SVertex_add_fedge_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------mathutils callbacks ----------------------------*/
@@ -428,63 +423,75 @@ static PyGetSetDef BPy_SVertex_getseters[] = {
(getter)SVertex_point_3d_get,
(setter)SVertex_point_3d_set,
SVertex_point_3d_doc,
- NULL},
+ nullptr},
{"point_2d",
(getter)SVertex_point_2d_get,
(setter)SVertex_point_2d_set,
SVertex_point_2d_doc,
- NULL},
- {"id", (getter)SVertex_id_get, (setter)SVertex_id_set, SVertex_id_doc, NULL},
- {"normals", (getter)SVertex_normals_get, (setter)NULL, SVertex_normals_doc, NULL},
+ nullptr},
+ {"id", (getter)SVertex_id_get, (setter)SVertex_id_set, SVertex_id_doc, nullptr},
+ {"normals", (getter)SVertex_normals_get, (setter) nullptr, SVertex_normals_doc, nullptr},
{"normals_size",
(getter)SVertex_normals_size_get,
- (setter)NULL,
+ (setter) nullptr,
SVertex_normals_size_doc,
- NULL},
- {"viewvertex", (getter)SVertex_viewvertex_get, (setter)NULL, SVertex_viewvertex_doc, NULL},
- {"curvatures", (getter)SVertex_curvatures_get, (setter)NULL, SVertex_curvatures_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"viewvertex",
+ (getter)SVertex_viewvertex_get,
+ (setter) nullptr,
+ SVertex_viewvertex_doc,
+ nullptr},
+ {"curvatures",
+ (getter)SVertex_curvatures_get,
+ (setter) nullptr,
+ SVertex_curvatures_doc,
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_SVertex type definition ------------------------------*/
PyTypeObject SVertex_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "SVertex", /* tp_name */
- sizeof(BPy_SVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "SVertex", /* tp_name */
+ sizeof(BPy_SVertex), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
SVertex_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
BPy_SVertex_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_SVertex_getseters, /* tp_getset */
&Interface0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)SVertex_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
index c947f37397b..696b3022e85 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
@@ -85,7 +85,7 @@ static PyObject *ViewVertex_edges_end(BPy_ViewVertex * /*self*/)
return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ove_it, 1);
#else
PyErr_SetString(PyExc_NotImplementedError, "edges_end method currently disabled");
- return NULL;
+ return nullptr;
#endif
}
@@ -102,11 +102,11 @@ PyDoc_STRVAR(ViewVertex_edges_iterator_doc,
static PyObject *ViewVertex_edges_iterator(BPy_ViewVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"edge", NULL};
+ static const char *kwlist[] = {"edge", nullptr};
PyObject *py_ve;
if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve)) {
- return NULL;
+ return nullptr;
}
ViewEdge *ve = ((BPy_ViewEdge *)py_ve)->ve;
ViewVertexInternal::orientedViewEdgeIterator ove_it(self->vv->edgesIterator(ve));
@@ -120,7 +120,7 @@ static PyMethodDef BPy_ViewVertex_methods[] = {
(PyCFunction)ViewVertex_edges_iterator,
METH_VARARGS | METH_KEYWORDS,
ViewVertex_edges_iterator_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------ViewVertex get/setters ----------------------------*/
@@ -134,7 +134,7 @@ static PyObject *ViewVertex_nature_get(BPy_ViewVertex *self, void *UNUSED(closur
{
Nature::VertexNature nature = self->vv->getNature();
if (PyErr_Occurred()) {
- return NULL;
+ return nullptr;
}
return BPy_Nature_from_Nature(nature); // return a copy
}
@@ -154,49 +154,53 @@ static PyGetSetDef BPy_ViewVertex_getseters[] = {
(getter)ViewVertex_nature_get,
(setter)ViewVertex_nature_set,
ViewVertex_nature_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_ViewVertex type definition ------------------------------*/
PyTypeObject ViewVertex_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ViewVertex", /* tp_name */
- sizeof(BPy_ViewVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewVertex_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_ViewVertex_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_ViewVertex_getseters, /* tp_getset */
- &Interface0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewVertex_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ViewVertex", /* tp_name */
+ sizeof(BPy_ViewVertex), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ViewVertex_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_ViewVertex_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_ViewVertex_getseters, /* tp_getset */
+ &Interface0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ViewVertex_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 519bd72db3b..5e63e190356 100644
--- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
@@ -40,46 +40,29 @@ PyDoc_STRVAR(
"Class to define a stroke vertex.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(first_vertex, second_vertex, t3d)\n"
+ " __init__(point)\n"
+ " __init__(svertex)\n"
+ " __init__(svertex, attribute)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds a :class:`StrokeVertex` using the default constructor,\n"
+ " copy constructor, from 2 :class:`StrokeVertex` and an interpolation parameter,\n"
+ " from a CurvePoint, from a SVertex, or a :class:`SVertex`"
+ " and a :class:`StrokeAttribute` object.\n"
"\n"
" :arg brother: A StrokeVertex object.\n"
" :type brother: :class:`StrokeVertex`\n"
- "\n"
- ".. method:: __init__(first_vertex, second_vertex, t3d)\n"
- "\n"
- " Build a stroke vertex from 2 stroke vertices and an interpolation\n"
- " parameter.\n"
- "\n"
" :arg first_vertex: The first StrokeVertex.\n"
" :type first_vertex: :class:`StrokeVertex`\n"
" :arg second_vertex: The second StrokeVertex.\n"
" :type second_vertex: :class:`StrokeVertex`\n"
" :arg t3d: An interpolation parameter.\n"
" :type t3d: float\n"
- "\n"
- ".. method:: __init__(point)\n"
- "\n"
- " Build a stroke vertex from a CurvePoint\n"
- "\n"
" :arg point: A CurvePoint object.\n"
" :type point: :class:`CurvePoint`\n"
- "\n"
- ".. method:: __init__(svertex)\n"
- "\n"
- " Build a stroke vertex from a SVertex\n"
- "\n"
" :arg svertex: An SVertex object.\n"
" :type svertex: :class:`SVertex`\n"
- "\n"
- ".. method:: __init__(svertex, attribute)\n"
- "\n"
- " Build a stroke vertex from an SVertex and a StrokeAttribute object.\n"
- "\n"
" :arg svertex: An SVertex object.\n"
" :type svertex: :class:`SVertex`\n"
" :arg attribute: A StrokeAttribute object.\n"
@@ -87,11 +70,11 @@ PyDoc_STRVAR(
static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"first_vertex", "second_vertex", "t3d", NULL};
- static const char *kwlist_3[] = {"point", NULL};
- static const char *kwlist_4[] = {"svertex", "attribute", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"first_vertex", "second_vertex", "t3d", nullptr};
+ static const char *kwlist_3[] = {"point", nullptr};
+ static const char *kwlist_4[] = {"svertex", "attribute", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
float t3d;
if (PyArg_ParseTupleAndKeywords(
@@ -119,11 +102,11 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
&t3d)) {
StrokeVertex *sv1 = ((BPy_StrokeVertex *)obj1)->sv;
StrokeVertex *sv2 = ((BPy_StrokeVertex *)obj2)->sv;
- if (!sv1 || (sv1->A() == 0 && sv1->B() == 0)) {
+ if (!sv1 || (sv1->A() == nullptr && sv1->B() == nullptr)) {
PyErr_SetString(PyExc_TypeError, "argument 1 is an invalid StrokeVertex object");
return -1;
}
- if (!sv2 || (sv2->A() == 0 && sv2->B() == 0)) {
+ if (!sv2 || (sv2->A() == nullptr && sv2->B() == nullptr)) {
PyErr_SetString(PyExc_TypeError, "argument 2 is an invalid StrokeVertex object");
return -1;
}
@@ -133,14 +116,14 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist_3, &CurvePoint_Type, &obj1)) {
CurvePoint *cp = ((BPy_CurvePoint *)obj1)->cp;
- if (!cp || cp->A() == 0 || cp->B() == 0) {
+ if (!cp || cp->A() == nullptr || cp->B() == nullptr) {
PyErr_SetString(PyExc_TypeError, "argument 1 is an invalid CurvePoint object");
return -1;
}
self->sv = new StrokeVertex(cp);
}
else if ((void)PyErr_Clear(),
- (void)(obj2 = 0),
+ (void)(obj2 = nullptr),
PyArg_ParseTupleAndKeywords(args,
kwds,
"O!|O!",
@@ -352,65 +335,69 @@ static PyGetSetDef BPy_StrokeVertex_getseters[] = {
(getter)StrokeVertex_attribute_get,
(setter)StrokeVertex_attribute_set,
StrokeVertex_attribute_doc,
- NULL},
+ nullptr},
{"curvilinear_abscissa",
(getter)StrokeVertex_curvilinear_abscissa_get,
(setter)StrokeVertex_curvilinear_abscissa_set,
StrokeVertex_curvilinear_abscissa_doc,
- NULL},
+ nullptr},
{"point",
(getter)StrokeVertex_point_get,
(setter)StrokeVertex_point_set,
StrokeVertex_point_doc,
- NULL},
+ nullptr},
{"stroke_length",
(getter)StrokeVertex_stroke_length_get,
(setter)StrokeVertex_stroke_length_set,
StrokeVertex_stroke_length_doc,
- NULL},
- {"u", (getter)StrokeVertex_u_get, (setter)NULL, StrokeVertex_u_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"u", (getter)StrokeVertex_u_get, (setter) nullptr, StrokeVertex_u_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_StrokeVertex type definition ------------------------------*/
PyTypeObject StrokeVertex_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "StrokeVertex", /* tp_name */
- sizeof(BPy_StrokeVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeVertex_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_StrokeVertex_getseters, /* tp_getset */
- &CurvePoint_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeVertex_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "StrokeVertex", /* tp_name */
+ sizeof(BPy_StrokeVertex), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ StrokeVertex_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_StrokeVertex_getseters, /* tp_getset */
+ &CurvePoint_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)StrokeVertex_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 9295e4f424b..ed10f3e0af5 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
@@ -31,29 +31,27 @@ extern "C" {
/*----------------------NonTVertex methods ----------------------------*/
-PyDoc_STRVAR(NonTVertex_doc,
- "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`NonTVertex`\n"
- "\n"
- "View vertex for corners, cusps, etc. associated to a single SVertex.\n"
- "Can be associated to 2 or more view edges.\n"
- "\n"
- ".. method:: __init__()\n"
- "\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(svertex)\n"
- "\n"
- " Build a NonTVertex from a SVertex.\n"
- "\n"
- " :arg svertex: An SVertex object.\n"
- " :type svertex: :class:`SVertex`");
+PyDoc_STRVAR(
+ NonTVertex_doc,
+ "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex` > :class:`NonTVertex`\n"
+ "\n"
+ "View vertex for corners, cusps, etc. associated to a single SVertex.\n"
+ "Can be associated to 2 or more view edges.\n"
+ "\n"
+ ".. method:: __init__()\n"
+ " __init__(svertex)\n"
+ "\n"
+ " Builds a :class:`NonTVertex` using the default constructor or a :class:`SVertex`.\n"
+ "\n"
+ " :arg svertex: An SVertex object.\n"
+ " :type svertex: :class:`SVertex`");
/* Note: No copy constructor in Python because the C++ copy constructor is 'protected'. */
static int NonTVertex_init(BPy_NonTVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"svertex", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"svertex", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &SVertex_Type, &obj)) {
return -1;
@@ -101,49 +99,53 @@ static PyGetSetDef BPy_NonTVertex_getseters[] = {
(getter)NonTVertex_svertex_get,
(setter)NonTVertex_svertex_set,
NonTVertex_svertex_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_NonTVertex type definition ------------------------------*/
PyTypeObject NonTVertex_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "NonTVertex", /* tp_name */
- sizeof(BPy_NonTVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- NonTVertex_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_NonTVertex_getseters, /* tp_getset */
- &ViewVertex_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)NonTVertex_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "NonTVertex", /* tp_name */
+ sizeof(BPy_NonTVertex), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ NonTVertex_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_NonTVertex_getseters, /* tp_getset */
+ &ViewVertex_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)NonTVertex_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 61755b4bbd8..596eec7a4e5 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
@@ -51,7 +51,7 @@ PyDoc_STRVAR(TVertex_doc,
static int TVertex_init(BPy_TVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -75,11 +75,11 @@ PyDoc_STRVAR(TVertex_get_svertex_doc,
static PyObject *TVertex_get_svertex(BPy_TVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"fedge", NULL};
+ static const char *kwlist[] = {"fedge", nullptr};
PyObject *py_fe;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &FEdge_Type, &py_fe)) {
- return NULL;
+ return nullptr;
}
SVertex *sv = self->tv->getSVertex(((BPy_FEdge *)py_fe)->fe);
if (sv) {
@@ -102,11 +102,11 @@ PyDoc_STRVAR(TVertex_get_mate_doc,
static PyObject *TVertex_get_mate(BPy_TVertex *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"viewedge", NULL};
+ static const char *kwlist[] = {"viewedge", nullptr};
PyObject *py_ve;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &ViewEdge_Type, &py_ve)) {
- return NULL;
+ return nullptr;
}
ViewEdge *ve = self->tv->mate(((BPy_ViewEdge *)py_ve)->ve);
if (ve) {
@@ -124,7 +124,7 @@ static PyMethodDef BPy_TVertex_methods[] = {
(PyCFunction)TVertex_get_mate,
METH_VARARGS | METH_KEYWORDS,
TVertex_get_mate_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------TVertex get/setters ----------------------------*/
@@ -203,55 +203,59 @@ static PyGetSetDef BPy_TVertex_getseters[] = {
(getter)TVertex_front_svertex_get,
(setter)TVertex_front_svertex_set,
TVertex_front_svertex_doc,
- NULL},
+ nullptr},
{"back_svertex",
(getter)TVertex_back_svertex_get,
(setter)TVertex_back_svertex_set,
TVertex_back_svertex_doc,
- NULL},
- {"id", (getter)TVertex_id_get, (setter)TVertex_id_set, TVertex_id_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"id", (getter)TVertex_id_get, (setter)TVertex_id_set, TVertex_id_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_TVertex type definition ------------------------------*/
PyTypeObject TVertex_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "TVertex", /* tp_name */
- sizeof(BPy_TVertex), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "TVertex", /* tp_name */
+ sizeof(BPy_TVertex), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
TVertex_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
BPy_TVertex_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_TVertex_getseters, /* tp_getset */
&ViewVertex_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)TVertex_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
index 187ab94360a..0438abfd38c 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
@@ -48,20 +48,13 @@ PyDoc_STRVAR(FEdge_doc,
"from one to the other.\n"
"\n"
".. method:: FEdge()\n"
+ " FEdge(brother)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: FEdge(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds an :class:`FEdge` using the default constructor,\n"
+ " copy constructor, or between two :class:`SVertex` objects.\n"
"\n"
" :arg brother: An FEdge object.\n"
" :type brother: :class:`FEdge`\n"
- "\n"
- ".. method:: FEdge(first_vertex, second_vertex)\n"
- "\n"
- " Builds an FEdge going from the first vertex to the second.\n"
- "\n"
" :arg first_vertex: The first SVertex.\n"
" :type first_vertex: :class:`SVertex`\n"
" :arg second_vertex: The second SVertex.\n"
@@ -69,9 +62,9 @@ PyDoc_STRVAR(FEdge_doc,
static int FEdge_init(BPy_FEdge *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"first_vertex", "second_vertex", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"first_vertex", "second_vertex", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &FEdge_Type, &obj1)) {
if (!obj1) {
@@ -113,7 +106,7 @@ static PyObject *FEdge_sq_item(BPy_FEdge *self, int keynum)
if (keynum < 0) {
keynum += FEdge_sq_length(self);
}
- if (keynum == 0 || keynum == 1) {
+ if (ELEM(keynum, 0, 1)) {
SVertex *v = self->fe->operator[](keynum);
if (v) {
return BPy_SVertex_from_SVertex(*v);
@@ -121,20 +114,20 @@ static PyObject *FEdge_sq_item(BPy_FEdge *self, int keynum)
Py_RETURN_NONE;
}
PyErr_Format(PyExc_IndexError, "FEdge[index]: index %d out of range", keynum);
- return NULL;
+ return nullptr;
}
static PySequenceMethods BPy_FEdge_as_sequence = {
(lenfunc)FEdge_sq_length, /* sq_length */
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
+ nullptr, /* sq_concat */
+ nullptr, /* sq_repeat */
(ssizeargfunc)FEdge_sq_item, /* sq_item */
- NULL, /* sq_slice */
- NULL, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- NULL, /* sq_contains */
- NULL, /* sq_inplace_concat */
- NULL, /* sq_inplace_repeat */
+ nullptr, /* sq_slice */
+ nullptr, /* sq_ass_item */
+ nullptr, /* *was* sq_ass_slice */
+ nullptr, /* sq_contains */
+ nullptr, /* sq_inplace_concat */
+ nullptr, /* sq_inplace_repeat */
};
/*----------------------FEdge get/setters ----------------------------*/
@@ -327,73 +320,81 @@ static PyGetSetDef BPy_FEdge_getseters[] = {
(getter)FEdge_first_svertex_get,
(setter)FEdge_first_svertex_set,
FEdge_first_svertex_doc,
- NULL},
+ nullptr},
{"second_svertex",
(getter)FEdge_second_svertex_get,
(setter)FEdge_second_svertex_set,
FEdge_second_svertex_doc,
- NULL},
+ nullptr},
{"next_fedge",
(getter)FEdge_next_fedge_get,
(setter)FEdge_next_fedge_set,
FEdge_next_fedge_doc,
- NULL},
+ nullptr},
{"previous_fedge",
(getter)FEdge_previous_fedge_get,
(setter)FEdge_previous_fedge_set,
FEdge_previous_fedge_doc,
- NULL},
- {"viewedge", (getter)FEdge_viewedge_get, (setter)FEdge_viewedge_set, FEdge_viewedge_doc, NULL},
+ nullptr},
+ {"viewedge",
+ (getter)FEdge_viewedge_get,
+ (setter)FEdge_viewedge_set,
+ FEdge_viewedge_doc,
+ nullptr},
{"is_smooth",
(getter)FEdge_is_smooth_get,
(setter)FEdge_is_smooth_set,
FEdge_is_smooth_doc,
- NULL},
- {"id", (getter)FEdge_id_get, (setter)FEdge_id_set, FEdge_id_doc, NULL},
- {"nature", (getter)FEdge_nature_get, (setter)FEdge_nature_set, FEdge_nature_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"id", (getter)FEdge_id_get, (setter)FEdge_id_set, FEdge_id_doc, nullptr},
+ {"nature", (getter)FEdge_nature_get, (setter)FEdge_nature_set, FEdge_nature_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_FEdge type definition ------------------------------*/
PyTypeObject FEdge_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "FEdge", /* tp_name */
- sizeof(BPy_FEdge), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
+ PyVarObject_HEAD_INIT(nullptr, 0) "FEdge", /* tp_name */
+ sizeof(BPy_FEdge), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
&BPy_FEdge_as_sequence, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
FEdge_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
BPy_FEdge_getseters, /* tp_getset */
&Interface1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)FEdge_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
index 788dfa78992..d77a8007b1a 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
@@ -41,28 +41,22 @@ PyDoc_STRVAR(FrsCurve_doc,
"specialization of a Curve.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(id)\n"
"\n"
- " Default Constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy Constructor.\n"
+ " Builds a :class:`FrsCurve` using a default constructor,\n"
+ " copy constructor or from an :class:`Id`.\n"
"\n"
" :arg brother: A Curve object.\n"
" :type brother: :class:`Curve`\n"
- "\n"
- ".. method:: __init__(id)\n"
- "\n"
- " Builds a Curve from its Id.\n"
- "\n"
" :arg id: An Id object.\n"
" :type id: :class:`Id`");
static int FrsCurve_init(BPy_FrsCurve *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"id", NULL};
- PyObject *obj = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"id", nullptr};
+ PyObject *obj = nullptr;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &FrsCurve_Type, &obj)) {
if (!obj) {
@@ -95,11 +89,11 @@ PyDoc_STRVAR(FrsCurve_push_vertex_back_doc,
static PyObject *FrsCurve_push_vertex_back(BPy_FrsCurve *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"vertex", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"vertex", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
- return NULL;
+ return nullptr;
}
if (BPy_CurvePoint_Check(obj)) {
@@ -110,7 +104,7 @@ static PyObject *FrsCurve_push_vertex_back(BPy_FrsCurve *self, PyObject *args, P
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument");
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -125,11 +119,11 @@ PyDoc_STRVAR(FrsCurve_push_vertex_front_doc,
static PyObject *FrsCurve_push_vertex_front(BPy_FrsCurve *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"vertex", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"vertex", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) {
- return NULL;
+ return nullptr;
}
if (BPy_CurvePoint_Check(obj)) {
@@ -140,7 +134,7 @@ static PyObject *FrsCurve_push_vertex_front(BPy_FrsCurve *self, PyObject *args,
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument");
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -154,7 +148,7 @@ static PyMethodDef BPy_FrsCurve_methods[] = {
(PyCFunction)FrsCurve_push_vertex_front,
METH_VARARGS | METH_KEYWORDS,
FrsCurve_push_vertex_front_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------CurvePoint get/setters ----------------------------*/
@@ -180,55 +174,59 @@ static PyObject *FrsCurve_segments_size_get(BPy_FrsCurve *self, void *UNUSED(clo
}
static PyGetSetDef BPy_FrsCurve_getseters[] = {
- {"is_empty", (getter)FrsCurve_is_empty_get, (setter)NULL, FrsCurve_is_empty_doc, NULL},
+ {"is_empty", (getter)FrsCurve_is_empty_get, (setter) nullptr, FrsCurve_is_empty_doc, nullptr},
{"segments_size",
(getter)FrsCurve_segments_size_get,
- (setter)NULL,
+ (setter) nullptr,
FrsCurve_segments_size_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_FrsCurve type definition ------------------------------*/
PyTypeObject FrsCurve_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Curve", /* tp_name */
- sizeof(BPy_FrsCurve), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Curve", /* tp_name */
+ sizeof(BPy_FrsCurve), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
FrsCurve_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
BPy_FrsCurve_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_FrsCurve_getseters, /* tp_getset */
&Interface1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)FrsCurve_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index b31efe1f923..90cc3e4f1ab 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -50,17 +50,14 @@ PyDoc_STRVAR(Stroke_doc,
"defines the stroke's shape and appearance at this vertex position.\n"
"\n"
".. method:: Stroke()\n"
+ " Stroke(brother)\n"
"\n"
- " Default constructor\n"
- "\n"
- ".. method:: Stroke(brother)\n"
- "\n"
- " Copy constructor");
+ " Creates a :class:`Stroke` using the default constructor or copy constructor\n");
static int Stroke_init(BPy_Stroke *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"brother", NULL};
- PyObject *brother = 0;
+ static const char *kwlist[] = {"brother", nullptr};
+ PyObject *brother = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &Stroke_Type, &brother)) {
return -1;
@@ -94,7 +91,7 @@ static PyObject *Stroke_sq_item(BPy_Stroke *self, int keynum)
}
if (keynum < 0 || keynum >= Stroke_sq_length(self)) {
PyErr_Format(PyExc_IndexError, "Stroke[index]: index %d out of range", keynum);
- return NULL;
+ return nullptr;
}
return BPy_StrokeVertex_from_StrokeVertex(self->s->strokeVerticeAt(keynum));
}
@@ -116,57 +113,54 @@ PyDoc_STRVAR(Stroke_compute_sampling_doc,
static PyObject *Stroke_compute_sampling(BPy_Stroke *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"n", NULL};
+ static const char *kwlist[] = {"n", nullptr};
int i;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i)) {
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(self->s->ComputeSampling(i));
}
PyDoc_STRVAR(Stroke_resample_doc,
".. method:: resample(n)\n"
+ " resample(sampling)\n"
"\n"
- " Resamples the stroke so that it eventually has N points. That means\n"
- " it is going to add N-vertices_size, where vertices_size is the\n"
- " number of points we already have. If vertices_size >= N, no\n"
- " resampling is done.\n"
+ " Resamples the stroke so using one of two methods with the goal\n"
+ " of creating a stroke with fewer points and the same shape.\n"
"\n"
- " :arg n: The number of vertices we eventually want in our stroke.\n"
+ " :arg n: Resamples the stroke so that it eventually has N points. That means\n"
+ " it is going to add N-vertices_size, where vertices_size is the\n"
+ " number of points we already have. If vertices_size >= N, no\n"
+ " resampling is done.\n"
" :type n: int\n"
- "\n"
- ".. method:: resample(sampling)\n"
- "\n"
- " Resamples the stroke with a given sampling. If the sampling is\n"
- " smaller than the actual sampling value, no resampling is done.\n"
- "\n"
- " :arg sampling: The new sampling value.\n"
+ " :arg sampling: Resamples the stroke with a given sampling value. If the\n"
+ " sampling is smaller than the actual sampling value, no resampling is done.\n"
" :type sampling: float");
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};
+ static const char *kwlist_1[] = {"n", nullptr};
+ static const char *kwlist_2[] = {"sampling", nullptr};
int i;
float f;
if (PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist_1, &i)) {
if (self->s->Resample(i) < 0) {
PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex count) failed");
- return NULL;
+ return nullptr;
}
}
else if ((void)PyErr_Clear(),
PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) {
if (self->s->Resample(f) < 0) {
PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex interval) failed");
- return NULL;
+ return nullptr;
}
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument");
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -186,8 +180,8 @@ PyDoc_STRVAR(Stroke_insert_vertex_doc,
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;
+ static const char *kwlist[] = {"vertex", "next", nullptr};
+ PyObject *py_sv = nullptr, *py_sv_it = nullptr;
if (!PyArg_ParseTupleAndKeywords(args,
kwds,
@@ -197,7 +191,7 @@ static PyObject *Stroke_insert_vertex(BPy_Stroke *self, PyObject *args, PyObject
&py_sv,
&StrokeVertexIterator_Type,
&py_sv_it)) {
- return NULL;
+ return nullptr;
}
/* Make the wrapped StrokeVertex internal. */
@@ -220,19 +214,19 @@ PyDoc_STRVAR(Stroke_remove_vertex_doc,
static PyObject *Stroke_remove_vertex(BPy_Stroke *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"vertex", NULL};
- PyObject *py_sv = 0;
+ static const char *kwlist[] = {"vertex", nullptr};
+ PyObject *py_sv = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &StrokeVertex_Type, &py_sv)) {
- return NULL;
+ return nullptr;
}
if (((BPy_StrokeVertex *)py_sv)->sv) {
self->s->RemoveVertex(((BPy_StrokeVertex *)py_sv)->sv);
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument");
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -274,11 +268,11 @@ PyDoc_STRVAR(Stroke_stroke_vertices_begin_doc,
static PyObject *Stroke_stroke_vertices_begin(BPy_Stroke *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"t", NULL};
+ static const char *kwlist[] = {"t", nullptr};
float f = 0.0f;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
- return NULL;
+ return nullptr;
}
StrokeInternal::StrokeVertexIterator sv_it(self->s->strokeVerticesBegin(f));
return BPy_StrokeVertexIterator_from_StrokeVertexIterator(sv_it, false);
@@ -359,7 +353,7 @@ static PyMethodDef BPy_Stroke_methods[] = {
(PyCFunction)Stroke_stroke_vertices_size,
METH_NOARGS,
Stroke_stroke_vertices_size_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------Stroke get/setters ----------------------------*/
@@ -471,75 +465,79 @@ static PyGetSetDef BPy_Stroke_getseters[] = {
(getter)Stroke_medium_type_get,
(setter)Stroke_medium_type_set,
Stroke_medium_type_doc,
- NULL},
+ nullptr},
{"texture_id",
(getter)Stroke_texture_id_get,
(setter)Stroke_texture_id_set,
Stroke_texture_id_doc,
- NULL},
- {"tips", (getter)Stroke_tips_get, (setter)Stroke_tips_set, Stroke_tips_doc, NULL},
+ nullptr},
+ {"tips", (getter)Stroke_tips_get, (setter)Stroke_tips_set, Stroke_tips_doc, nullptr},
{"length_2d",
(getter)Stroke_length_2d_get,
(setter)Stroke_length_2d_set,
Stroke_length_2d_doc,
- NULL},
- {"id", (getter)Stroke_id_get, (setter)Stroke_id_set, Stroke_id_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"id", (getter)Stroke_id_get, (setter)Stroke_id_set, Stroke_id_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_Stroke type definition ------------------------------*/
static PySequenceMethods BPy_Stroke_as_sequence = {
(lenfunc)Stroke_sq_length, /* sq_length */
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
+ nullptr, /* sq_concat */
+ nullptr, /* sq_repeat */
(ssizeargfunc)Stroke_sq_item, /* sq_item */
- NULL, /* sq_slice */
- NULL, /* sq_ass_item */
- NULL, /* *was* sq_ass_slice */
- NULL, /* sq_contains */
- NULL, /* sq_inplace_concat */
- NULL, /* sq_inplace_repeat */
+ nullptr, /* sq_slice */
+ nullptr, /* sq_ass_item */
+ nullptr, /* *was* sq_ass_slice */
+ nullptr, /* sq_contains */
+ nullptr, /* sq_inplace_concat */
+ nullptr, /* sq_inplace_repeat */
};
PyTypeObject Stroke_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Stroke", /* tp_name */
- sizeof(BPy_Stroke), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Stroke", /* tp_name */
+ sizeof(BPy_Stroke), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
&BPy_Stroke_as_sequence, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
Stroke_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
(getiterfunc)Stroke_iter, /* tp_iter */
- 0, /* tp_iternext */
+ nullptr, /* tp_iternext */
BPy_Stroke_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_Stroke_getseters, /* tp_getset */
&Interface1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)Stroke_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
index 58c2ba69c79..c416d860c77 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
@@ -36,28 +36,26 @@ extern "C" {
/*----------------------ViewEdge methods ----------------------------*/
-PyDoc_STRVAR(ViewEdge_doc,
- "Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n"
- "\n"
- "Class defining a ViewEdge. A ViewEdge in an edge of the image graph.\n"
- "it connects two :class:`ViewVertex` objects. It is made by connecting\n"
- "a set of FEdges.\n"
- "\n"
- ".. method:: __init__()\n"
- "\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
- " :arg brother: A ViewEdge object.\n"
- " :type brother: :class:`ViewEdge`");
+PyDoc_STRVAR(
+ ViewEdge_doc,
+ "Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n"
+ "\n"
+ "Class defining a ViewEdge. A ViewEdge in an edge of the image graph.\n"
+ "it connects two :class:`ViewVertex` objects. It is made by connecting\n"
+ "a set of FEdges.\n"
+ "\n"
+ ".. method:: __init__()\n"
+ " __init__(brother)\n"
+ "\n"
+ " Builds a :class:`ViewEdge` using the default constructor or the copy constructor.\n"
+ "\n"
+ " :arg brother: A ViewEdge object.\n"
+ " :type brother: :class:`ViewEdge`");
static int ViewEdge_init(BPy_ViewEdge *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"brother", NULL};
- PyObject *brother = 0;
+ static const char *kwlist[] = {"brother", nullptr};
+ PyObject *brother = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &ViewEdge_Type, &brother)) {
return -1;
@@ -89,7 +87,7 @@ static PyMethodDef BPy_ViewEdge_methods[] = {
(PyCFunction)ViewEdge_update_fedges,
METH_NOARGS,
ViewEdge_update_fedges_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------ViewEdge get/setters ----------------------------*/
@@ -335,88 +333,96 @@ static PyGetSetDef BPy_ViewEdge_getseters[] = {
(getter)ViewEdge_first_viewvertex_get,
(setter)ViewEdge_first_viewvertex_set,
ViewEdge_first_viewvertex_doc,
- NULL},
+ nullptr},
{"last_viewvertex",
(getter)ViewEdge_last_viewvertex_get,
(setter)ViewEdge_last_viewvertex_set,
ViewEdge_last_viewvertex_doc,
- NULL},
+ nullptr},
{"first_fedge",
(getter)ViewEdge_first_fedge_get,
(setter)ViewEdge_first_fedge_set,
ViewEdge_first_fedge_doc,
- NULL},
+ nullptr},
{"last_fedge",
(getter)ViewEdge_last_fedge_get,
(setter)ViewEdge_last_fedge_set,
ViewEdge_last_fedge_doc,
- NULL},
+ nullptr},
{"viewshape",
(getter)ViewEdge_viewshape_get,
(setter)ViewEdge_viewshape_set,
ViewEdge_viewshape_doc,
- NULL},
+ nullptr},
{"occludee",
(getter)ViewEdge_occludee_get,
(setter)ViewEdge_occludee_set,
ViewEdge_occludee_doc,
- NULL},
- {"is_closed", (getter)ViewEdge_is_closed_get, (setter)NULL, ViewEdge_is_closed_doc, NULL},
- {"id", (getter)ViewEdge_id_get, (setter)ViewEdge_id_set, ViewEdge_id_doc, NULL},
+ nullptr},
+ {"is_closed",
+ (getter)ViewEdge_is_closed_get,
+ (setter) nullptr,
+ ViewEdge_is_closed_doc,
+ nullptr},
+ {"id", (getter)ViewEdge_id_get, (setter)ViewEdge_id_set, ViewEdge_id_doc, nullptr},
{"nature",
(getter)ViewEdge_nature_get,
(setter)ViewEdge_nature_set,
ViewEdge_nature_doc,
- NULL},
- {"qi", (getter)ViewEdge_qi_get, (setter)ViewEdge_qi_set, ViewEdge_qi_doc, NULL},
+ nullptr},
+ {"qi", (getter)ViewEdge_qi_get, (setter)ViewEdge_qi_set, ViewEdge_qi_doc, nullptr},
{"chaining_time_stamp",
(getter)ViewEdge_chaining_time_stamp_get,
(setter)ViewEdge_chaining_time_stamp_set,
ViewEdge_chaining_time_stamp_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_ViewEdge type definition ------------------------------*/
PyTypeObject ViewEdge_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ViewEdge", /* tp_name */
- sizeof(BPy_ViewEdge), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewEdge_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_ViewEdge_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_ViewEdge_getseters, /* tp_getset */
- &Interface1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewEdge_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ViewEdge", /* tp_name */
+ sizeof(BPy_ViewEdge), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ViewEdge_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_ViewEdge_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_ViewEdge_getseters, /* tp_getset */
+ &Interface1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ViewEdge_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 9cdc344081e..dcf6c149b7d 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -40,28 +40,22 @@ PyDoc_STRVAR(Chain_doc,
"Splitting and Creation processes.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(id)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds a :class:`Chain` using the default constructor,\n"
+ " copy constructor or from an :class:`Id`.\n"
"\n"
" :arg brother: A Chain object.\n"
" :type brother: :class:`Chain`\n"
- "\n"
- ".. method:: __init__(id)\n"
- "\n"
- " Builds a chain from its Id.\n"
- "\n"
" :arg id: An Id object.\n"
" :type id: :class:`Id`");
static int Chain_init(BPy_Chain *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"id", NULL};
- PyObject *obj = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"id", nullptr};
+ PyObject *obj = nullptr;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &Chain_Type, &obj)) {
if (!obj) {
@@ -98,12 +92,12 @@ PyDoc_STRVAR(Chain_push_viewedge_back_doc,
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;
+ static const char *kwlist[] = {"viewedge", "orientation", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!O!", (char **)kwlist, &ViewEdge_Type, &obj1, &PyBool_Type, &obj2)) {
- return NULL;
+ return nullptr;
}
ViewEdge *ve = ((BPy_ViewEdge *)obj1)->ve;
bool orientation = bool_from_PyBool(obj2);
@@ -124,12 +118,12 @@ PyDoc_STRVAR(Chain_push_viewedge_front_doc,
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;
+ static const char *kwlist[] = {"viewedge", "orientation", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!O!", (char **)kwlist, &ViewEdge_Type, &obj1, &PyBool_Type, &obj2)) {
- return NULL;
+ return nullptr;
}
ViewEdge *ve = ((BPy_ViewEdge *)obj1)->ve;
bool orientation = bool_from_PyBool(obj2);
@@ -146,49 +140,53 @@ static PyMethodDef BPy_Chain_methods[] = {
(PyCFunction)Chain_push_viewedge_front,
METH_VARARGS | METH_KEYWORDS,
Chain_push_viewedge_front_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*-----------------------BPy_Chain type definition ------------------------------*/
PyTypeObject Chain_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Chain", /* tp_name */
- sizeof(BPy_Chain), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Chain", /* tp_name */
+ sizeof(BPy_Chain), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
Chain_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
BPy_Chain_methods, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
&FrsCurve_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)Chain_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 c329a3badd5..454a2bb1c0f 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
@@ -42,20 +42,14 @@ PyDoc_STRVAR(FEdgeSharp_doc,
"a is None.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(first_vertex, second_vertex)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds an :class:`FEdgeSharp` using the default constructor,\n"
+ " copy constructor, or between two :class:`SVertex` objects.\n"
"\n"
" :arg brother: An FEdgeSharp object.\n"
" :type brother: :class:`FEdgeSharp`\n"
- "\n"
- ".. method:: __init__(first_vertex, second_vertex)\n"
- "\n"
- " Builds an FEdgeSharp going from the first vertex to the second.\n"
- "\n"
" :arg first_vertex: The first SVertex object.\n"
" :type first_vertex: :class:`SVertex`\n"
" :arg second_vertex: The second SVertex object.\n"
@@ -63,9 +57,9 @@ PyDoc_STRVAR(FEdgeSharp_doc,
static int FEdgeSharp_init(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"first_vertex", "second_vertex", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"first_vertex", "second_vertex", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &FEdgeSharp_Type, &obj1)) {
if (!obj1) {
@@ -368,85 +362,89 @@ static PyGetSetDef BPy_FEdgeSharp_getseters[] = {
(getter)FEdgeSharp_normal_right_get,
(setter)FEdgeSharp_normal_right_set,
FEdgeSharp_normal_right_doc,
- NULL},
+ nullptr},
{"normal_left",
(getter)FEdgeSharp_normal_left_get,
(setter)FEdgeSharp_normal_left_set,
FEdgeSharp_normal_left_doc,
- NULL},
+ nullptr},
{"material_index_right",
(getter)FEdgeSharp_material_index_right_get,
(setter)FEdgeSharp_material_index_right_set,
FEdgeSharp_material_index_right_doc,
- NULL},
+ nullptr},
{"material_index_left",
(getter)FEdgeSharp_material_index_left_get,
(setter)FEdgeSharp_material_index_left_set,
FEdgeSharp_material_index_left_doc,
- NULL},
+ nullptr},
{"material_right",
(getter)FEdgeSharp_material_right_get,
- (setter)NULL,
+ (setter) nullptr,
FEdgeSharp_material_right_doc,
- NULL},
+ nullptr},
{"material_left",
(getter)FEdgeSharp_material_left_get,
- (setter)NULL,
+ (setter) nullptr,
FEdgeSharp_material_left_doc,
- NULL},
+ nullptr},
{"face_mark_right",
(getter)FEdgeSharp_face_mark_right_get,
(setter)FEdgeSharp_face_mark_right_set,
FEdgeSharp_face_mark_right_doc,
- NULL},
+ nullptr},
{"face_mark_left",
(getter)FEdgeSharp_face_mark_left_get,
(setter)FEdgeSharp_face_mark_left_set,
FEdgeSharp_face_mark_left_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_FEdgeSharp type definition ------------------------------*/
PyTypeObject FEdgeSharp_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "FEdgeSharp", /* tp_name */
- sizeof(BPy_FEdgeSharp), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FEdgeSharp_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_FEdgeSharp_getseters, /* tp_getset */
- &FEdge_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FEdgeSharp_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "FEdgeSharp", /* tp_name */
+ sizeof(BPy_FEdgeSharp), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ FEdgeSharp_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_FEdgeSharp_getseters, /* tp_getset */
+ &FEdge_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)FEdgeSharp_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 3fb739b18db..c0d56ec949c 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
@@ -39,20 +39,14 @@ PyDoc_STRVAR(FEdgeSmooth_doc,
"a suggestive contour.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(first_vertex, second_vertex)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds an :class:`FEdgeSmooth` using the default constructor,\n"
+ " copy constructor, or between two :class:`SVertex`.\n"
"\n"
" :arg brother: An FEdgeSmooth object.\n"
" :type brother: :class:`FEdgeSmooth`\n"
- "\n"
- ".. method:: __init__(first_vertex, second_vertex)\n"
- "\n"
- " Builds an FEdgeSmooth going from the first to the second.\n"
- "\n"
" :arg first_vertex: The first SVertex object.\n"
" :type first_vertex: :class:`SVertex`\n"
" :arg second_vertex: The second SVertex object.\n"
@@ -60,9 +54,9 @@ PyDoc_STRVAR(FEdgeSmooth_doc,
static int FEdgeSmooth_init(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"first_vertex", "second_vertex", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"first_vertex", "second_vertex", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
if (PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist_1, &FEdgeSmooth_Type, &obj1)) {
@@ -233,61 +227,69 @@ static PyGetSetDef BPy_FEdgeSmooth_getseters[] = {
(getter)FEdgeSmooth_normal_get,
(setter)FEdgeSmooth_normal_set,
FEdgeSmooth_normal_doc,
- NULL},
+ nullptr},
{"material_index",
(getter)FEdgeSmooth_material_index_get,
(setter)FEdgeSmooth_material_index_set,
FEdgeSmooth_material_index_doc,
- NULL},
- {"material", (getter)FEdgeSmooth_material_get, (setter)NULL, FEdgeSmooth_material_doc, NULL},
+ nullptr},
+ {"material",
+ (getter)FEdgeSmooth_material_get,
+ (setter) nullptr,
+ FEdgeSmooth_material_doc,
+ nullptr},
{"face_mark",
(getter)FEdgeSmooth_face_mark_get,
(setter)FEdgeSmooth_face_mark_set,
FEdgeSmooth_face_mark_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_FEdgeSmooth type definition ------------------------------*/
PyTypeObject FEdgeSmooth_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "FEdgeSmooth", /* tp_name */
- sizeof(BPy_FEdgeSmooth), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FEdgeSmooth_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_FEdgeSmooth_getseters, /* tp_getset */
- &FEdge_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FEdgeSmooth_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "FEdgeSmooth", /* tp_name */
+ sizeof(BPy_FEdgeSmooth), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ FEdgeSmooth_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_FEdgeSmooth_getseters, /* tp_getset */
+ &FEdge_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)FEdgeSmooth_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
index 90e751333b9..9f5f8d07e26 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
@@ -41,20 +41,14 @@ PyDoc_STRVAR(
"traverse() method of the ChainingIterator.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(vertex, restrict_to_selection=True, restrict_to_unvisited=True)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds an :class:`AdjacencyIterator` using the default constructor,\n"
+ " copy constructor or the overloaded constructor.\n"
"\n"
" :arg brother: An AdjacencyIterator object.\n"
" :type brother: :class:`AdjacencyIterator`\n"
- "\n"
- ".. method:: __init__(vertex, restrict_to_selection=True, restrict_to_unvisited=True)\n"
- "\n"
- " Builds a AdjacencyIterator object.\n"
- "\n"
" :arg vertex: The vertex which is the next crossing.\n"
" :type vertex: :class:`ViewVertex`\n"
" :arg restrict_to_selection: Indicates whether to force the chaining\n"
@@ -66,10 +60,10 @@ PyDoc_STRVAR(
static int AdjacencyIterator_init(BPy_AdjacencyIterator *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
+ static const char *kwlist_1[] = {"brother", nullptr};
static const char *kwlist_2[] = {
- "vertex", "restrict_to_selection", "restrict_to_unvisited", NULL};
- PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0;
+ "vertex", "restrict_to_selection", "restrict_to_unvisited", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr, *obj3 = nullptr;
if (PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist_1, &AdjacencyIterator_Type, &obj1)) {
@@ -83,7 +77,7 @@ static int AdjacencyIterator_init(BPy_AdjacencyIterator *self, PyObject *args, P
}
}
else if ((void)PyErr_Clear(),
- (void)(obj2 = obj3 = 0),
+ (void)(obj2 = obj3 = nullptr),
PyArg_ParseTupleAndKeywords(args,
kwds,
"O!|O!O!",
@@ -119,7 +113,7 @@ static PyObject *AdjacencyIterator_iternext(BPy_AdjacencyIterator *self)
{
if (self->a_it->isEnd()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
if (self->at_start) {
self->at_start = false;
@@ -128,7 +122,7 @@ static PyObject *AdjacencyIterator_iternext(BPy_AdjacencyIterator *self)
self->a_it->increment();
if (self->a_it->isEnd()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
}
ViewEdge *ve = self->a_it->operator->();
@@ -146,7 +140,7 @@ static PyObject *AdjacencyIterator_object_get(BPy_AdjacencyIterator *self, void
{
if (self->a_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
ViewEdge *ve = self->a_it->operator*();
if (ve) {
@@ -166,7 +160,7 @@ static PyObject *AdjacencyIterator_is_incoming_get(BPy_AdjacencyIterator *self,
{
if (self->a_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
return PyBool_from_bool(self->a_it->isIncoming());
}
@@ -174,57 +168,61 @@ static PyObject *AdjacencyIterator_is_incoming_get(BPy_AdjacencyIterator *self,
static PyGetSetDef BPy_AdjacencyIterator_getseters[] = {
{"is_incoming",
(getter)AdjacencyIterator_is_incoming_get,
- (setter)NULL,
+ (setter) nullptr,
AdjacencyIterator_is_incoming_doc,
- NULL},
+ nullptr},
{"object",
(getter)AdjacencyIterator_object_get,
- (setter)NULL,
+ (setter) nullptr,
AdjacencyIterator_object_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_AdjacencyIterator type definition ------------------------------*/
PyTypeObject AdjacencyIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "AdjacencyIterator", /* tp_name */
- sizeof(BPy_AdjacencyIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- AdjacencyIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)AdjacencyIterator_iter, /* tp_iter */
- (iternextfunc)AdjacencyIterator_iternext, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_AdjacencyIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)AdjacencyIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "AdjacencyIterator", /* tp_name */
+ sizeof(BPy_AdjacencyIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ AdjacencyIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)AdjacencyIterator_iter, /* tp_iter */
+ (iternextfunc)AdjacencyIterator_iternext, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_AdjacencyIterator_getseters, /* tp_getset */
+ &Iterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)AdjacencyIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
index 1703fc2bddb..e4cd1cd073b 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
@@ -33,59 +33,56 @@ extern "C" {
//------------------------INSTANCE METHODS ----------------------------------
-PyDoc_STRVAR(ChainPredicateIterator_doc,
-
- "Class hierarchy: :class:`freestyle.types.Iterator` >\n"
- ":class:`freestyle.types.ViewEdgeIterator` >\n"
- ":class:`freestyle.types.ChainingIterator` >\n"
- ":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"
- "First, the unary predicate is evaluated for all potential next\n"
- "ViewEdges in order to only keep the ones respecting a certain\n"
- "constraint. Then, the binary predicate is evaluated on the current\n"
- "ViewEdge together with each ViewEdge of the previous selection. The\n"
- "first ViewEdge respecting both the unary predicate and the binary\n"
- "predicate is kept as the next one. If none of the potential next\n"
- "ViewEdge respects these two predicates, None is returned.\n"
- "\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"
- "\n"
- " :arg upred: The unary predicate that the next ViewEdge must satisfy.\n"
- " :type upred: :class:`freestyle.types.UnaryPredicate1D`\n"
- " :arg bpred: The binary predicate that the next ViewEdge must\n"
- " satisfy together with the actual pointed ViewEdge.\n"
- " :type bpred: :class:`freestyle.types.BinaryPredicate1D`\n"
- " :arg restrict_to_selection: Indicates whether to force the chaining\n"
- " to stay within the set of selected ViewEdges or not.\n"
- " :type restrict_to_selection: bool\n"
- " :arg restrict_to_unvisited: Indicates whether a ViewEdge that has\n"
- " already been chained must be ignored ot not.\n"
- " :type restrict_to_unvisited: bool\n"
- " :arg begin: The ViewEdge from where to start the iteration.\n"
- " :type begin: :class:`freestyle.types.ViewEdge` or None\n"
- " :arg orientation: If true, we'll look for the next ViewEdge among\n"
- " the ViewEdges that surround the ending ViewVertex of begin. If\n"
- " false, we'll search over the ViewEdges surrounding the ending\n"
- " ViewVertex of begin.\n"
- " :type orientation: bool\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
- " :arg brother: A ChainPredicateIterator object.\n"
- " :type brother: :class:`ChainPredicateIterator`");
+PyDoc_STRVAR(
+ ChainPredicateIterator_doc,
+
+ "Class hierarchy: :class:`freestyle.types.Iterator` >\n"
+ ":class:`freestyle.types.ViewEdgeIterator` >\n"
+ ":class:`freestyle.types.ChainingIterator` >\n"
+ ":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"
+ "First, the unary predicate is evaluated for all potential next\n"
+ "ViewEdges in order to only keep the ones respecting a certain\n"
+ "constraint. Then, the binary predicate is evaluated on the current\n"
+ "ViewEdge together with each ViewEdge of the previous selection. The\n"
+ "first ViewEdge respecting both the unary predicate and the binary\n"
+ "predicate is kept as the next one. If none of the potential next\n"
+ "ViewEdge respects these two predicates, None is returned.\n"
+ "\n"
+ ".. method:: __init__(upred, bpred, restrict_to_selection=True, "
+ " restrict_to_unvisited=True, begin=None, "
+ " orientation=True)\n"
+ " __init__(brother)\n"
+ "\n"
+ " Builds a ChainPredicateIterator from a unary predicate, a binary\n"
+ " predicate, a starting ViewEdge and its orientation or using the copy constructor.\n"
+ "\n"
+ " :arg upred: The unary predicate that the next ViewEdge must satisfy.\n"
+ " :type upred: :class:`freestyle.types.UnaryPredicate1D`\n"
+ " :arg bpred: The binary predicate that the next ViewEdge must\n"
+ " satisfy together with the actual pointed ViewEdge.\n"
+ " :type bpred: :class:`freestyle.types.BinaryPredicate1D`\n"
+ " :arg restrict_to_selection: Indicates whether to force the chaining\n"
+ " to stay within the set of selected ViewEdges or not.\n"
+ " :type restrict_to_selection: bool\n"
+ " :arg restrict_to_unvisited: Indicates whether a ViewEdge that has\n"
+ " already been chained must be ignored ot not.\n"
+ " :type restrict_to_unvisited: bool\n"
+ " :arg begin: The ViewEdge from where to start the iteration.\n"
+ " :type begin: :class:`freestyle.types.ViewEdge` or None\n"
+ " :arg orientation: If true, we'll look for the next ViewEdge among\n"
+ " the ViewEdges that surround the ending ViewVertex of begin. If\n"
+ " false, we'll search over the ViewEdges surrounding the ending\n"
+ " ViewVertex of begin.\n"
+ " :type orientation: bool\n"
+ " :arg brother: A ChainPredicateIterator object.\n"
+ " :type brother: :class:`ChainPredicateIterator`");
static int check_begin(PyObject *obj, void *v)
{
- if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
+ if (obj != nullptr && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
return 0;
}
*((PyObject **)v) = obj;
@@ -96,15 +93,16 @@ static int ChainPredicateIterator_init(BPy_ChainPredicateIterator *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
+ static const char *kwlist_1[] = {"brother", nullptr};
static const char *kwlist_2[] = {"upred",
"bpred",
"restrict_to_selection",
"restrict_to_unvisited",
"begin",
"orientation",
- NULL};
- PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0, *obj5 = 0, *obj6 = 0;
+ nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr, *obj3 = nullptr, *obj4 = nullptr, *obj5 = nullptr,
+ *obj6 = nullptr;
if (PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist_1, &ChainPredicateIterator_Type, &obj1)) {
@@ -115,7 +113,7 @@ static int ChainPredicateIterator_init(BPy_ChainPredicateIterator *self,
Py_INCREF(self->bpred);
}
else if ((void)PyErr_Clear(),
- (void)(obj3 = obj4 = obj5 = obj6 = 0),
+ (void)(obj3 = obj4 = obj5 = obj6 = nullptr),
PyArg_ParseTupleAndKeywords(args,
kwds,
"O!O!|O!O!O&O!",
@@ -136,7 +134,7 @@ static int ChainPredicateIterator_init(BPy_ChainPredicateIterator *self,
BinaryPredicate1D *bp1D = ((BPy_BinaryPredicate1D *)obj2)->bp1D;
bool restrict_to_selection = (!obj3) ? true : bool_from_PyBool(obj3);
bool restrict_to_unvisited = (!obj4) ? true : bool_from_PyBool(obj4);
- ViewEdge *begin = (!obj5 || obj5 == Py_None) ? NULL : ((BPy_ViewEdge *)obj5)->ve;
+ ViewEdge *begin = (!obj5 || obj5 == Py_None) ? nullptr : ((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);
@@ -165,43 +163,47 @@ static void ChainPredicateIterator_dealloc(BPy_ChainPredicateIterator *self)
/*-----------------------BPy_ChainPredicateIterator type definition ----------------------------*/
PyTypeObject ChainPredicateIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ChainPredicateIterator", /* tp_name */
- sizeof(BPy_ChainPredicateIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)ChainPredicateIterator_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ChainPredicateIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &ChainingIterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ChainPredicateIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ChainPredicateIterator", /* tp_name */
+ sizeof(BPy_ChainPredicateIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)ChainPredicateIterator_dealloc, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ChainPredicateIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &ChainingIterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ChainPredicateIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
index d8ad82d667c..9aa8984f4af 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
@@ -48,9 +48,10 @@ PyDoc_STRVAR(ChainSilhouetteIterator_doc,
"precedence of the silhouette over the crease criterion.\n"
"\n"
".. method:: __init__(restrict_to_selection=True, begin=None, orientation=True)\n"
+ " __init__(brother)\n"
"\n"
" Builds a ChainSilhouetteIterator from the first ViewEdge used for\n"
- " iteration and its orientation.\n"
+ " iteration and its orientation or the copy constructor.\n"
"\n"
" :arg restrict_to_selection: Indicates whether to force the chaining\n"
" to stay within the set of selected ViewEdges or not.\n"
@@ -62,17 +63,12 @@ PyDoc_STRVAR(ChainSilhouetteIterator_doc,
" false, we'll search over the ViewEdges surrounding the ending\n"
" ViewVertex of begin.\n"
" :type orientation: bool\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
" :arg brother: A ChainSilhouetteIterator object.\n"
" :type brother: :class:`ChainSilhouetteIterator`");
static int check_begin(PyObject *obj, void *v)
{
- if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
+ if (obj != nullptr && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
return 0;
}
*((PyObject **)v) = obj;
@@ -83,16 +79,16 @@ static int ChainSilhouetteIterator_init(BPy_ChainSilhouetteIterator *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"restrict_to_selection", "begin", "orientation", NULL};
- PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"restrict_to_selection", "begin", "orientation", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr, *obj3 = nullptr;
if (PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist_1, &ChainSilhouetteIterator_Type, &obj1)) {
self->cs_it = new ChainSilhouetteIterator(*(((BPy_ChainSilhouetteIterator *)obj1)->cs_it));
}
else if ((void)PyErr_Clear(),
- (void)(obj1 = obj2 = obj3 = 0),
+ (void)(obj1 = obj2 = obj3 = nullptr),
PyArg_ParseTupleAndKeywords(args,
kwds,
"|O!O&O!",
@@ -104,7 +100,7 @@ static int ChainSilhouetteIterator_init(BPy_ChainSilhouetteIterator *self,
&PyBool_Type,
&obj3)) {
bool restrict_to_selection = (!obj1) ? true : bool_from_PyBool(obj1);
- ViewEdge *begin = (!obj2 || obj2 == Py_None) ? NULL : ((BPy_ViewEdge *)obj2)->ve;
+ ViewEdge *begin = (!obj2 || obj2 == Py_None) ? nullptr : ((BPy_ViewEdge *)obj2)->ve;
bool orientation = (!obj3) ? true : bool_from_PyBool(obj3);
self->cs_it = new ChainSilhouetteIterator(restrict_to_selection, begin, orientation);
}
@@ -121,43 +117,47 @@ static int ChainSilhouetteIterator_init(BPy_ChainSilhouetteIterator *self,
/*-----------------------BPy_ChainSilhouetteIterator type definition ----------------------------*/
PyTypeObject ChainSilhouetteIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ChainSilhouetteIterator", /* tp_name */
- sizeof(BPy_ChainSilhouetteIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ChainSilhouetteIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &ChainingIterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ChainSilhouetteIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ChainSilhouetteIterator", /* tp_name */
+ sizeof(BPy_ChainSilhouetteIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ChainSilhouetteIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &ChainingIterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ChainSilhouetteIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
index dbd6e8dd09d..f2441fa9d18 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
@@ -46,11 +46,12 @@ PyDoc_STRVAR(
"they will be included in the adjacency iterator (i.e, the adjacent\n"
"iterator will only stop on \"valid\" edges).\n"
"\n"
- ".. method:: __init__(restrict_to_selection=True, restrict_to_unvisited=True, begin=None, "
- "orientation=True)\n"
+ ".. method:: __init__(restrict_to_selection=True, restrict_to_unvisited=True,"
+ " begin=None, orientation=True)\n"
+ " __init__(brother)\n"
"\n"
" Builds a Chaining Iterator from the first ViewEdge used for\n"
- " iteration and its orientation.\n"
+ " iteration and its orientation or by using the copy constructor.\n"
"\n"
" :arg restrict_to_selection: Indicates whether to force the chaining\n"
" to stay within the set of selected ViewEdges or not.\n"
@@ -63,17 +64,12 @@ PyDoc_STRVAR(
" :arg orientation: The direction to follow to explore the graph. If\n"
" true, the direction indicated by the first ViewEdge is used.\n"
" :type orientation: bool\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
" :arg brother: \n"
" :type brother: ChainingIterator");
static int check_begin(PyObject *obj, void *v)
{
- if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
+ if (obj != nullptr && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
return 0;
}
*((PyObject **)v) = obj;
@@ -82,17 +78,17 @@ static int check_begin(PyObject *obj, void *v)
static int ChainingIterator___init__(BPy_ChainingIterator *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
+ static const char *kwlist_1[] = {"brother", nullptr};
static const char *kwlist_2[] = {
- "restrict_to_selection", "restrict_to_unvisited", "begin", "orientation", NULL};
- PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0;
+ "restrict_to_selection", "restrict_to_unvisited", "begin", "orientation", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr, *obj3 = nullptr, *obj4 = nullptr;
if (PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist_1, &ChainingIterator_Type, &obj1)) {
self->c_it = new ChainingIterator(*(((BPy_ChainingIterator *)obj1)->c_it));
}
else if ((void)PyErr_Clear(),
- (void)(obj1 = obj2 = obj3 = obj4 = 0),
+ (void)(obj1 = obj2 = obj3 = obj4 = nullptr),
PyArg_ParseTupleAndKeywords(args,
kwds,
"|O!O!O&O!",
@@ -107,7 +103,7 @@ static int ChainingIterator___init__(BPy_ChainingIterator *self, PyObject *args,
&obj4)) {
bool restrict_to_selection = (!obj1) ? true : bool_from_PyBool(obj1);
bool restrict_to_unvisited = (!obj2) ? true : bool_from_PyBool(obj2);
- ViewEdge *begin = (!obj3 || obj3 == Py_None) ? NULL : ((BPy_ViewEdge *)obj3)->ve;
+ ViewEdge *begin = (!obj3 || obj3 == Py_None) ? nullptr : ((BPy_ViewEdge *)obj3)->ve;
bool orientation = (!obj4) ? true : bool_from_PyBool(obj4);
self->c_it = new ChainingIterator(
restrict_to_selection, restrict_to_unvisited, begin, orientation);
@@ -135,7 +131,7 @@ static PyObject *ChainingIterator_init(BPy_ChainingIterator *self)
{
if (typeid(*(self->c_it)) == typeid(ChainingIterator)) {
PyErr_SetString(PyExc_TypeError, "init() method not properly overridden");
- return NULL;
+ return nullptr;
}
self->c_it->init();
Py_RETURN_NONE;
@@ -159,16 +155,16 @@ static PyObject *ChainingIterator_traverse(BPy_ChainingIterator *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *py_a_it;
if (typeid(*(self->c_it)) == typeid(ChainingIterator)) {
PyErr_SetString(PyExc_TypeError, "traverse() method not properly overridden");
- return NULL;
+ return nullptr;
}
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &AdjacencyIterator_Type, &py_a_it)) {
- return NULL;
+ return nullptr;
}
if (((BPy_AdjacencyIterator *)py_a_it)->a_it) {
self->c_it->traverse(*(((BPy_AdjacencyIterator *)py_a_it)->a_it));
@@ -182,7 +178,7 @@ static PyMethodDef BPy_ChainingIterator_methods[] = {
(PyCFunction)ChainingIterator_traverse,
METH_VARARGS | METH_KEYWORDS,
ChainingIterator_traverse_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------ChainingIterator get/setters ----------------------------*/
@@ -196,7 +192,7 @@ static PyObject *ChainingIterator_object_get(BPy_ChainingIterator *self, void *U
{
if (self->c_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
ViewEdge *ve = self->c_it->operator*();
if (ve) {
@@ -236,62 +232,66 @@ static PyObject *ChainingIterator_is_incrementing_get(BPy_ChainingIterator *self
static PyGetSetDef BPy_ChainingIterator_getseters[] = {
{"object",
(getter)ChainingIterator_object_get,
- (setter)NULL,
+ (setter) nullptr,
ChainingIterator_object_doc,
- NULL},
+ nullptr},
{"next_vertex",
(getter)ChainingIterator_next_vertex_get,
- (setter)NULL,
+ (setter) nullptr,
ChainingIterator_next_vertex_doc,
- NULL},
+ nullptr},
{"is_incrementing",
(getter)ChainingIterator_is_incrementing_get,
- (setter)NULL,
+ (setter) nullptr,
ChainingIterator_is_incrementing_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_ChainingIterator type definition ------------------------------*/
PyTypeObject ChainingIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ChainingIterator", /* tp_name */
- sizeof(BPy_ChainingIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ChainingIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_ChainingIterator_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_ChainingIterator_getseters, /* tp_getset */
- &ViewEdgeIterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ChainingIterator___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ChainingIterator", /* tp_name */
+ sizeof(BPy_ChainingIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ChainingIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_ChainingIterator_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_ChainingIterator_getseters, /* tp_getset */
+ &ViewEdgeIterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ChainingIterator___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
index 6c496b0308b..ff710e931d4 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -39,20 +39,14 @@ PyDoc_STRVAR(CurvePointIterator_doc,
"through the .object attribute.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(step=0.0)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Builds a CurvePointIterator object using either the default constructor,\n"
+ " copy constructor, or the overloaded constructor.\n"
"\n"
" :arg brother: A CurvePointIterator object.\n"
" :type brother: :class:`CurvePointIterator`\n"
- "\n"
- ".. method:: __init__(step=0.0)\n"
- "\n"
- " Builds a CurvePointIterator object.\n"
- "\n"
" :arg step: A resampling resolution with which the curve is resampled.\n"
" If zero, no resampling is done (i.e., the iterator iterates over\n"
" initial vertices).\n"
@@ -60,9 +54,9 @@ PyDoc_STRVAR(CurvePointIterator_doc,
static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"step", NULL};
- PyObject *brother = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"step", nullptr};
+ PyObject *brother = nullptr;
float step;
if (PyArg_ParseTupleAndKeywords(
@@ -98,7 +92,7 @@ static PyObject *CurvePointIterator_object_get(BPy_CurvePointIterator *self, voi
{
if (self->cp_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
return BPy_CurvePoint_from_CurvePoint(self->cp_it->operator*());
}
@@ -126,54 +120,58 @@ static PyObject *CurvePointIterator_u_get(BPy_CurvePointIterator *self, void *UN
static PyGetSetDef BPy_CurvePointIterator_getseters[] = {
{"object",
(getter)CurvePointIterator_object_get,
- (setter)NULL,
+ (setter) nullptr,
CurvePointIterator_object_doc,
- NULL},
- {"t", (getter)CurvePointIterator_t_get, (setter)NULL, CurvePointIterator_t_doc, NULL},
- {"u", (getter)CurvePointIterator_u_get, (setter)NULL, CurvePointIterator_u_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {"t", (getter)CurvePointIterator_t_get, (setter) nullptr, CurvePointIterator_t_doc, nullptr},
+ {"u", (getter)CurvePointIterator_u_get, (setter) nullptr, CurvePointIterator_u_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_CurvePointIterator type definition ------------------------------*/
PyTypeObject CurvePointIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "CurvePointIterator", /* tp_name */
- sizeof(BPy_CurvePointIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurvePointIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_CurvePointIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurvePointIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "CurvePointIterator", /* tp_name */
+ sizeof(BPy_CurvePointIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ CurvePointIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_CurvePointIterator_getseters, /* tp_getset */
+ &Iterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)CurvePointIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
index 734ed0117f4..d0de53fa424 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -38,17 +38,13 @@ PyDoc_STRVAR(Interface0DIterator_doc,
"this iterator is always obtained from a 1D element.\n"
"\n"
".. method:: __init__(brother)\n"
+ " __init__(it)\n"
"\n"
- " Copy constructor.\n"
+ " Construct a nested Interface0DIterator using either the copy constructor\n"
+ " or the constructor that takes an he argument of a Function0D.\n"
"\n"
" :arg brother: An Interface0DIterator object.\n"
" :type brother: :class:`Interface0DIterator`\n"
- "\n"
- ".. method:: __init__(it)\n"
- "\n"
- " Construct a nested Interface0DIterator that can be the argument of\n"
- " a Function0D.\n"
- "\n"
" :arg it: An iterator object to be nested.\n"
" :type it: :class:`SVertexIterator`, :class:`CurvePointIterator`, or\n"
" :class:`StrokeVertexIterator`");
@@ -69,9 +65,9 @@ static int convert_nested_it(PyObject *obj, void *v)
static int Interface0DIterator_init(BPy_Interface0DIterator *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"it", NULL};
- static const char *kwlist_2[] = {"inter", NULL};
- static const char *kwlist_3[] = {"brother", NULL};
+ static const char *kwlist_1[] = {"it", nullptr};
+ static const char *kwlist_2[] = {"inter", nullptr};
+ static const char *kwlist_3[] = {"brother", nullptr};
Interface0DIteratorNested *nested_it;
PyObject *brother, *inter;
@@ -115,21 +111,21 @@ static PyObject *Interface0DIterator_iternext(BPy_Interface0DIterator *self)
if (self->reversed) {
if (self->if0D_it->isBegin()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
self->if0D_it->decrement();
}
else {
if (self->if0D_it->isEnd()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
if (self->at_start) {
self->at_start = false;
}
else if (self->if0D_it->atLast()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
else {
self->if0D_it->increment();
@@ -154,7 +150,7 @@ static PyObject *Interface0DIterator_object_get(BPy_Interface0DIterator *self,
{
if (self->if0D_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
return Any_BPy_Interface0D_from_Interface0D(self->if0D_it->operator*());
}
@@ -194,59 +190,63 @@ static PyObject *Interface0DIterator_at_last_get(BPy_Interface0DIterator *self,
static PyGetSetDef BPy_Interface0DIterator_getseters[] = {
{"object",
(getter)Interface0DIterator_object_get,
- (setter)NULL,
+ (setter) nullptr,
Interface0DIterator_object_doc,
- NULL},
- {"t", (getter)Interface0DIterator_t_get, (setter)NULL, Interface0DIterator_t_doc, NULL},
- {"u", (getter)Interface0DIterator_u_get, (setter)NULL, Interface0DIterator_u_doc, NULL},
+ nullptr},
+ {"t", (getter)Interface0DIterator_t_get, (setter) nullptr, Interface0DIterator_t_doc, nullptr},
+ {"u", (getter)Interface0DIterator_u_get, (setter) nullptr, Interface0DIterator_u_doc, nullptr},
{"at_last",
(getter)Interface0DIterator_at_last_get,
- (setter)NULL,
+ (setter) nullptr,
Interface0DIterator_at_last_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_Interface0DIterator type definition ------------------------------*/
PyTypeObject Interface0DIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Interface0DIterator", /* tp_name */
- sizeof(BPy_Interface0DIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Interface0DIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)Interface0DIterator_iter, /* tp_iter */
- (iternextfunc)Interface0DIterator_iternext, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_Interface0DIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Interface0DIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Interface0DIterator", /* tp_name */
+ sizeof(BPy_Interface0DIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Interface0DIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)Interface0DIterator_iter, /* tp_iter */
+ (iternextfunc)Interface0DIterator_iternext, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_Interface0DIterator_getseters, /* tp_getset */
+ &Iterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Interface0DIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
index 4a5927ff6eb..c0db79858b7 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -32,45 +32,39 @@ extern "C" {
//------------------------INSTANCE METHODS ----------------------------------
-PyDoc_STRVAR(SVertexIterator_doc,
- "Class hierarchy: :class:`Iterator` > :class:`SVertexIterator`\n"
- "\n"
- "Class representing an iterator over :class:`SVertex` of a\n"
- ":class:`ViewEdge`. An instance of an SVertexIterator can be obtained\n"
- "from a ViewEdge by calling verticesBegin() or verticesEnd().\n"
- "\n"
- ".. method:: __init__()\n"
- "\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
- " :arg brother: An SVertexIterator object.\n"
- " :type brother: :class:`SVertexIterator`\n"
- "\n"
- ".. method:: __init__(vertex, begin, previous_edge, next_edge, t)\n"
- "\n"
- " Build an SVertexIterator that starts iteration from an SVertex\n"
- " object v.\n"
- "\n"
- " :arg vertex: The SVertex from which the iterator starts iteration.\n"
- " :type vertex: :class:`SVertex`\n"
- " :arg begin: The first SVertex of a ViewEdge.\n"
- " :type begin: :class:`SVertex`\n"
- " :arg previous_edge: The previous FEdge coming to vertex.\n"
- " :type previous_edge: :class:`FEdge`\n"
- " :arg next_edge: The next FEdge going out from vertex.\n"
- " :type next_edge: :class:`FEdge`\n"
- " :arg t: The curvilinear abscissa at vertex.\n"
- " :type t: float");
+PyDoc_STRVAR(
+ SVertexIterator_doc,
+ "Class hierarchy: :class:`Iterator` > :class:`SVertexIterator`\n"
+ "\n"
+ "Class representing an iterator over :class:`SVertex` of a\n"
+ ":class:`ViewEdge`. An instance of an SVertexIterator can be obtained\n"
+ "from a ViewEdge by calling verticesBegin() or verticesEnd().\n"
+ "\n"
+ ".. method:: __init__()\n"
+ " __init__(brother)\n"
+ " __init__(vertex, begin, previous_edge, next_edge, t)"
+ "\n"
+ " Build an SVertexIterator using either the default constructor, copy constructor,\n"
+ " or the overloaded constructor that starts iteration from an SVertex object vertex.\n"
+ "\n"
+ " :arg brother: An SVertexIterator object.\n"
+ " :type brother: :class:`SVertexIterator`\n"
+ " :arg vertex: The SVertex from which the iterator starts iteration.\n"
+ " :type vertex: :class:`SVertex`\n"
+ " :arg begin: The first SVertex of a ViewEdge.\n"
+ " :type begin: :class:`SVertex`\n"
+ " :arg previous_edge: The previous FEdge coming to vertex.\n"
+ " :type previous_edge: :class:`FEdge`\n"
+ " :arg next_edge: The next FEdge going out from vertex.\n"
+ " :type next_edge: :class:`FEdge`\n"
+ " :arg t: The curvilinear abscissa at vertex.\n"
+ " :type t: float");
static int SVertexIterator_init(BPy_SVertexIterator *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"vertex", "begin", "previous_edge", "next_edge", "t", NULL};
- PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"vertex", "begin", "previous_edge", "next_edge", "t", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr, *obj3 = nullptr, *obj4 = nullptr;
float t;
if (PyArg_ParseTupleAndKeywords(
@@ -121,7 +115,7 @@ static PyObject *SVertexIterator_object_get(BPy_SVertexIterator *self, void *UNU
{
if (self->sv_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
SVertex *sv = self->sv_it->operator->();
if (sv) {
@@ -151,52 +145,60 @@ static PyObject *SVertexIterator_u_get(BPy_SVertexIterator *self, void *UNUSED(c
}
static PyGetSetDef BPy_SVertexIterator_getseters[] = {
- {"object", (getter)SVertexIterator_object_get, (setter)NULL, SVertexIterator_object_doc, NULL},
- {"t", (getter)SVertexIterator_t_get, (setter)NULL, SVertexIterator_t_doc, NULL},
- {"u", (getter)SVertexIterator_u_get, (setter)NULL, SVertexIterator_u_doc, NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ {"object",
+ (getter)SVertexIterator_object_get,
+ (setter) nullptr,
+ SVertexIterator_object_doc,
+ nullptr},
+ {"t", (getter)SVertexIterator_t_get, (setter) nullptr, SVertexIterator_t_doc, nullptr},
+ {"u", (getter)SVertexIterator_u_get, (setter) nullptr, SVertexIterator_u_doc, nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_SVertexIterator type definition ------------------------------*/
PyTypeObject SVertexIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "SVertexIterator", /* tp_name */
- sizeof(BPy_SVertexIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SVertexIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_SVertexIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SVertexIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "SVertexIterator", /* tp_name */
+ sizeof(BPy_SVertexIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ SVertexIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_SVertexIterator_getseters, /* tp_getset */
+ &Iterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)SVertexIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
index cda4031240b..ceb0d2a7546 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -48,12 +48,10 @@ PyDoc_STRVAR(StrokeVertexIterator_doc,
"by calling Interface0DIterator(it).\n"
"\n"
".. method:: __init__()\n"
+ " __init__(brother)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
+ " Creates a :class:`StrokeVertexIterator` using either the\n"
+ " default constructor or the copy constructor.\n"
"\n"
" :arg brother: A StrokeVertexIterator object.\n"
" :type brother: :class:`StrokeVertexIterator`");
@@ -62,9 +60,9 @@ static int StrokeVertexIterator_init(BPy_StrokeVertexIterator *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"stroke", NULL};
- PyObject *brother = 0, *stroke = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"stroke", nullptr};
+ PyObject *brother = nullptr, *stroke = nullptr;
if (PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist_1, &StrokeVertexIterator_Type, &brother)) {
@@ -113,7 +111,7 @@ static PyObject *StrokeVertexIterator_iternext(BPy_StrokeVertexIterator *self)
if (self->reversed) {
if (self->sv_it->isBegin()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
self->sv_it->decrement();
}
@@ -121,7 +119,7 @@ static PyObject *StrokeVertexIterator_iternext(BPy_StrokeVertexIterator *self)
/* If sv_it.isEnd() is true, the iterator can't be incremented. */
if (self->sv_it->isEnd()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
/* If at the start of the iterator, only return the object
* and don't increment, to keep for-loops in sync */
@@ -132,7 +130,7 @@ static PyObject *StrokeVertexIterator_iternext(BPy_StrokeVertexIterator *self)
* Incrementing it further would lead to a state that the iterator can't be dereferenced. */
else if (self->sv_it->atLast()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
else {
self->sv_it->increment();
@@ -156,7 +154,7 @@ static PyObject *StrokeVertexIterator_incremented(BPy_StrokeVertexIterator *self
{
if (self->sv_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "cannot increment any more");
- return NULL;
+ return nullptr;
}
StrokeInternal::StrokeVertexIterator copy(*self->sv_it);
copy.increment();
@@ -175,7 +173,7 @@ static PyObject *StrokeVertexIterator_decremented(BPy_StrokeVertexIterator *self
{
if (self->sv_it->isBegin()) {
PyErr_SetString(PyExc_RuntimeError, "cannot decrement any more");
- return NULL;
+ return nullptr;
}
StrokeInternal::StrokeVertexIterator copy(*self->sv_it);
copy.decrement();
@@ -209,7 +207,7 @@ static PyMethodDef BPy_StrokeVertexIterator_methods[] = {
(PyCFunction)StrokeVertexIterator_reversed,
METH_NOARGS,
StrokeVertexIterator_reversed_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------StrokeVertexIterator get/setters ----------------------------*/
@@ -224,7 +222,7 @@ static PyObject *StrokeVertexIterator_object_get(BPy_StrokeVertexIterator *self,
{
if (self->sv_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
StrokeVertex *sv = self->sv_it->operator->();
if (sv) {
@@ -267,59 +265,71 @@ static PyObject *StrokeVertexIterator_at_last_get(BPy_StrokeVertexIterator *self
static PyGetSetDef BPy_StrokeVertexIterator_getseters[] = {
{"object",
(getter)StrokeVertexIterator_object_get,
- (setter)NULL,
+ (setter) nullptr,
StrokeVertexIterator_object_doc,
- NULL},
- {"t", (getter)StrokeVertexIterator_t_get, (setter)NULL, StrokeVertexIterator_t_doc, NULL},
- {"u", (getter)StrokeVertexIterator_u_get, (setter)NULL, StrokeVertexIterator_u_doc, NULL},
+ nullptr},
+ {"t",
+ (getter)StrokeVertexIterator_t_get,
+ (setter) nullptr,
+ StrokeVertexIterator_t_doc,
+ nullptr},
+ {"u",
+ (getter)StrokeVertexIterator_u_get,
+ (setter) nullptr,
+ StrokeVertexIterator_u_doc,
+ nullptr},
{"at_last",
(getter)StrokeVertexIterator_at_last_get,
- (setter)NULL,
+ (setter) nullptr,
StrokeVertexIterator_at_last_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_StrokeVertexIterator type definition ------------------------------*/
PyTypeObject StrokeVertexIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "StrokeVertexIterator", /* tp_name */
- sizeof(BPy_StrokeVertexIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeVertexIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)StrokeVertexIterator_iter, /* tp_iter */
- (iternextfunc)StrokeVertexIterator_iternext, /* tp_iternext */
- BPy_StrokeVertexIterator_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_StrokeVertexIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeVertexIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "StrokeVertexIterator", /* tp_name */
+ sizeof(BPy_StrokeVertexIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ StrokeVertexIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)StrokeVertexIterator_iter, /* tp_iter */
+ (iternextfunc)StrokeVertexIterator_iternext, /* tp_iternext */
+ BPy_StrokeVertexIterator_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_StrokeVertexIterator_getseters, /* tp_getset */
+ &Iterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)StrokeVertexIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
index 3d0ed5d5a4d..e01bbe928ce 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -40,9 +40,10 @@ PyDoc_STRVAR(ViewEdgeIterator_doc,
"on a given ViewEdge.\n"
"\n"
".. method:: __init__(begin=None, orientation=True)\n"
+ " __init__(brother)\n"
"\n"
" Builds a ViewEdgeIterator from a starting ViewEdge and its\n"
- " orientation.\n"
+ " orientation or the copy constructor.\n"
"\n"
" :arg begin: The ViewEdge from where to start the iteration.\n"
" :type begin: :class:`ViewEdge` or None\n"
@@ -51,17 +52,12 @@ PyDoc_STRVAR(ViewEdgeIterator_doc,
" false, we'll search over the ViewEdges surrounding the ending\n"
" ViewVertex of begin.\n"
" :type orientation: bool\n"
- "\n"
- ".. method:: __init__(brother)\n"
- "\n"
- " Copy constructor.\n"
- "\n"
" :arg brother: A ViewEdgeIterator object.\n"
" :type brother: :class:`ViewEdgeIterator`");
static int check_begin(PyObject *obj, void *v)
{
- if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
+ if (obj != nullptr && obj != Py_None && !BPy_ViewEdge_Check(obj)) {
return 0;
}
*((PyObject **)v) = obj;
@@ -70,19 +66,19 @@ static int check_begin(PyObject *obj, void *v)
static int ViewEdgeIterator_init(BPy_ViewEdgeIterator *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist_1[] = {"brother", NULL};
- static const char *kwlist_2[] = {"begin", "orientation", NULL};
- PyObject *obj1 = 0, *obj2 = 0;
+ static const char *kwlist_1[] = {"brother", nullptr};
+ static const char *kwlist_2[] = {"begin", "orientation", nullptr};
+ PyObject *obj1 = nullptr, *obj2 = nullptr;
if (PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist_1, &ViewEdgeIterator_Type, &obj1)) {
self->ve_it = new ViewEdgeInternal::ViewEdgeIterator(*(((BPy_ViewEdgeIterator *)obj1)->ve_it));
}
else if ((void)PyErr_Clear(),
- (void)(obj1 = obj2 = 0),
+ (void)(obj1 = obj2 = nullptr),
PyArg_ParseTupleAndKeywords(
args, kwds, "|O&O!", (char **)kwlist_2, check_begin, &obj1, &PyBool_Type, &obj2)) {
- ViewEdge *begin = (!obj1 || obj1 == Py_None) ? NULL : ((BPy_ViewEdge *)obj1)->ve;
+ ViewEdge *begin = (!obj1 || obj1 == Py_None) ? nullptr : ((BPy_ViewEdge *)obj1)->ve;
bool orientation = (!obj2) ? true : bool_from_PyBool(obj2);
self->ve_it = new ViewEdgeInternal::ViewEdgeIterator(begin, orientation);
}
@@ -110,7 +106,7 @@ static PyMethodDef BPy_ViewEdgeIterator_methods[] = {
(PyCFunction)ViewEdgeIterator_change_orientation,
METH_NOARGS,
ViewEdgeIterator_change_orientation_doc},
- {NULL, NULL, 0, NULL},
+ {nullptr, nullptr, 0, nullptr},
};
/*----------------------ViewEdgeIterator get/setters ----------------------------*/
@@ -124,7 +120,7 @@ static PyObject *ViewEdgeIterator_object_get(BPy_ViewEdgeIterator *self, void *U
{
if (!self->ve_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
ViewEdge *ve = self->ve_it->operator*();
if (ve) {
@@ -216,67 +212,71 @@ static int ViewEdgeIterator_begin_set(BPy_ViewEdgeIterator *self,
static PyGetSetDef BPy_ViewEdgeIterator_getseters[] = {
{"object",
(getter)ViewEdgeIterator_object_get,
- (setter)NULL,
+ (setter) nullptr,
ViewEdgeIterator_object_doc,
- NULL},
+ nullptr},
{"current_edge",
(getter)ViewEdgeIterator_current_edge_get,
(setter)ViewEdgeIterator_current_edge_set,
ViewEdgeIterator_current_edge_doc,
- NULL},
+ nullptr},
{"orientation",
(getter)ViewEdgeIterator_orientation_get,
(setter)ViewEdgeIterator_orientation_set,
ViewEdgeIterator_orientation_doc,
- NULL},
+ nullptr},
{"begin",
(getter)ViewEdgeIterator_begin_get,
(setter)ViewEdgeIterator_begin_set,
ViewEdgeIterator_begin_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_ViewEdgeIterator type definition ------------------------------*/
PyTypeObject ViewEdgeIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ViewEdgeIterator", /* tp_name */
- sizeof(BPy_ViewEdgeIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ViewEdgeIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- BPy_ViewEdgeIterator_methods, /* tp_methods */
- 0, /* tp_members */
- BPy_ViewEdgeIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ViewEdgeIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ViewEdgeIterator", /* tp_name */
+ sizeof(BPy_ViewEdgeIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ViewEdgeIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ BPy_ViewEdgeIterator_methods, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_ViewEdgeIterator_getseters, /* tp_getset */
+ &Iterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ViewEdgeIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
index fe6210468d1..735746e33be 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -39,12 +39,10 @@ PyDoc_STRVAR(orientedViewEdgeIterator_doc,
"obtained from a ViewVertex by calling edges_begin() or edges_end().\n"
"\n"
".. method:: __init__()\n"
+ " __init__(iBrother)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(iBrother)\n"
- "\n"
- " Copy constructor.\n"
+ " Creates an :class:`orientedViewEdgeIterator` using either the\n"
+ " default constructor or the copy constructor.\n"
"\n"
" :arg iBrother: An orientedViewEdgeIterator object.\n"
" :type iBrother: :class:`orientedViewEdgeIterator`");
@@ -53,8 +51,8 @@ static int orientedViewEdgeIterator_init(BPy_orientedViewEdgeIterator *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"brother", NULL};
- PyObject *brother = 0;
+ static const char *kwlist[] = {"brother", nullptr};
+ PyObject *brother = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &orientedViewEdgeIterator_Type, &brother)) {
@@ -87,14 +85,14 @@ static PyObject *orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator
if (self->reversed) {
if (self->ove_it->isBegin()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
self->ove_it->decrement();
}
else {
if (self->ove_it->isEnd()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
if (self->at_start) {
self->at_start = false;
@@ -103,7 +101,7 @@ static PyObject *orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator
self->ove_it->increment();
if (self->ove_it->isEnd()) {
PyErr_SetNone(PyExc_StopIteration);
- return NULL;
+ return nullptr;
}
}
}
@@ -125,7 +123,7 @@ static PyObject *orientedViewEdgeIterator_object_get(BPy_orientedViewEdgeIterato
{
if (self->ove_it->isEnd()) {
PyErr_SetString(PyExc_RuntimeError, "iteration has stopped");
- return NULL;
+ return nullptr;
}
return BPy_directedViewEdge_from_directedViewEdge(self->ove_it->operator*());
}
@@ -133,52 +131,56 @@ static PyObject *orientedViewEdgeIterator_object_get(BPy_orientedViewEdgeIterato
static PyGetSetDef BPy_orientedViewEdgeIterator_getseters[] = {
{"object",
(getter)orientedViewEdgeIterator_object_get,
- (setter)NULL,
+ (setter) nullptr,
orientedViewEdgeIterator_object_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_orientedViewEdgeIterator type definition ---------------------------*/
PyTypeObject orientedViewEdgeIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "orientedViewEdgeIterator", /* tp_name */
- sizeof(BPy_orientedViewEdgeIterator), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- orientedViewEdgeIterator_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)orientedViewEdgeIterator_iter, /* tp_iter */
- (iternextfunc)orientedViewEdgeIterator_iternext, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_orientedViewEdgeIterator_getseters, /* tp_getset */
- &Iterator_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)orientedViewEdgeIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "orientedViewEdgeIterator", /* tp_name */
+ sizeof(BPy_orientedViewEdgeIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ orientedViewEdgeIterator_doc, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)orientedViewEdgeIterator_iter, /* tp_iter */
+ (iternextfunc)orientedViewEdgeIterator_iternext, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_orientedViewEdgeIterator_getseters, /* tp_getset */
+ &Iterator_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)orientedViewEdgeIterator_init, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
index efe96b72061..c3b98d12918 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
@@ -54,7 +54,7 @@ static int BackboneStretcherShader___init__(BPy_BackboneStretcherShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"amount", NULL};
+ static const char *kwlist[] = {"amount", nullptr};
float f = 2.0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
@@ -67,43 +67,47 @@ static int BackboneStretcherShader___init__(BPy_BackboneStretcherShader *self,
/*-----------------------BPy_BackboneStretcherShader type definition ----------------------------*/
PyTypeObject BackboneStretcherShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BackboneStretcherShader", /* tp_name */
- sizeof(BPy_BackboneStretcherShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BackboneStretcherShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BackboneStretcherShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "BackboneStretcherShader", /* tp_name */
+ sizeof(BPy_BackboneStretcherShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ BackboneStretcherShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)BackboneStretcherShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
index 2336b1ce902..50fc9938a87 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
@@ -54,7 +54,7 @@ static char BezierCurveShader___doc__[] =
static int BezierCurveShader___init__(BPy_BezierCurveShader *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"error", NULL};
+ static const char *kwlist[] = {"error", nullptr};
float f = 4.0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f)) {
@@ -67,43 +67,47 @@ static int BezierCurveShader___init__(BPy_BezierCurveShader *self, PyObject *arg
/*-----------------------BPy_BezierCurveShader type definition ------------------------------*/
PyTypeObject BezierCurveShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BezierCurveShader", /* tp_name */
- sizeof(BPy_BezierCurveShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BezierCurveShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BezierCurveShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "BezierCurveShader", /* tp_name */
+ sizeof(BPy_BezierCurveShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ BezierCurveShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)BezierCurveShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
index eaed138f61a..e1198266a98 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp
@@ -58,7 +58,7 @@ static int BlenderTextureShader___init__(BPy_BlenderTextureShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"texture", NULL};
+ static const char *kwlist[] = {"texture", nullptr};
PyObject *obj;
MTex *_mtex;
bNodeTree *_nodetree;
@@ -87,43 +87,47 @@ static int BlenderTextureShader___init__(BPy_BlenderTextureShader *self,
/*-----------------------BPy_BlenderTextureShader type definition ------------------------------*/
PyTypeObject BlenderTextureShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BlenderTextureShader", /* tp_name */
- sizeof(BPy_BlenderTextureShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- BlenderTextureShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)BlenderTextureShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "BlenderTextureShader", /* tp_name */
+ sizeof(BPy_BlenderTextureShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ BlenderTextureShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)BlenderTextureShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
index 27af7207b97..e8790df2dd0 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
@@ -67,10 +67,11 @@ static int CalligraphicShader___init__(BPy_CalligraphicShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"thickness_min", "thickness_max", "orientation", "clamp", NULL};
+ static const char *kwlist[] = {
+ "thickness_min", "thickness_max", "orientation", "clamp", nullptr};
double d1, d2;
float f3[2];
- PyObject *obj4 = 0;
+ PyObject *obj4 = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "ddO&O!", (char **)kwlist, &d1, &d2, convert_v2, f3, &PyBool_Type, &obj4)) {
@@ -84,43 +85,47 @@ static int CalligraphicShader___init__(BPy_CalligraphicShader *self,
/*-----------------------BPy_CalligraphicShader type definition ------------------------------*/
PyTypeObject CalligraphicShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "CalligraphicShader", /* tp_name */
- sizeof(BPy_CalligraphicShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CalligraphicShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CalligraphicShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "CalligraphicShader", /* tp_name */
+ sizeof(BPy_CalligraphicShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ CalligraphicShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)CalligraphicShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
index 81320e9b5a1..8fb6e26d8d7 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
@@ -53,7 +53,7 @@ static char ColorNoiseShader___doc__[] =
static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"amplitude", "period", NULL};
+ static const char *kwlist[] = {"amplitude", "period", nullptr};
float f1, f2;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2)) {
@@ -66,43 +66,47 @@ static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args,
/*-----------------------BPy_ColorNoiseShader type definition ------------------------------*/
PyTypeObject ColorNoiseShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ColorNoiseShader", /* tp_name */
- sizeof(BPy_ColorNoiseShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ColorNoiseShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ColorNoiseShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ColorNoiseShader", /* tp_name */
+ sizeof(BPy_ColorNoiseShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ColorNoiseShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ColorNoiseShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
index c5d65734aa5..2b108226e90 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
@@ -59,7 +59,7 @@ static int ConstantColorShader___init__(BPy_ConstantColorShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"red", "green", "blue", "alpha", NULL};
+ static const char *kwlist[] = {"red", "green", "blue", "alpha", nullptr};
float f1, f2, f3, f4 = 1.0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff|f", (char **)kwlist, &f1, &f2, &f3, &f4)) {
@@ -72,43 +72,47 @@ static int ConstantColorShader___init__(BPy_ConstantColorShader *self,
/*-----------------------BPy_ConstantColorShader type definition ------------------------------*/
PyTypeObject ConstantColorShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ConstantColorShader", /* tp_name */
- sizeof(BPy_ConstantColorShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ConstantColorShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ConstantColorShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ConstantColorShader", /* tp_name */
+ sizeof(BPy_ConstantColorShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ConstantColorShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ConstantColorShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
index 00fbfe525c3..0174107f27f 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
@@ -53,7 +53,7 @@ static int ConstantThicknessShader___init__(BPy_ConstantThicknessShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"thickness", NULL};
+ static const char *kwlist[] = {"thickness", nullptr};
float f;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
@@ -66,43 +66,47 @@ static int ConstantThicknessShader___init__(BPy_ConstantThicknessShader *self,
/*-----------------------BPy_ConstantThicknessShader type definition ----------------------------*/
PyTypeObject ConstantThicknessShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ConstantThicknessShader", /* tp_name */
- sizeof(BPy_ConstantThicknessShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ConstantThicknessShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ConstantThicknessShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ConstantThicknessShader", /* tp_name */
+ sizeof(BPy_ConstantThicknessShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ConstantThicknessShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ConstantThicknessShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
index ebafe84fee0..b5c200c17b1 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
@@ -59,7 +59,7 @@ static char ConstrainedIncreasingThicknessShader___doc__[] =
static int ConstrainedIncreasingThicknessShader___init__(
BPy_ConstrainedIncreasingThicknessShader *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"thickness_min", "thickness_max", "ratio", NULL};
+ static const char *kwlist[] = {"thickness_min", "thickness_max", "ratio", nullptr};
float f1, f2, f3;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff", (char **)kwlist, &f1, &f2, &f3)) {
@@ -72,43 +72,47 @@ static int ConstrainedIncreasingThicknessShader___init__(
/*-----------------------BPy_ConstrainedIncreasingThicknessShader type definition ---------------*/
PyTypeObject ConstrainedIncreasingThicknessShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ConstrainedIncreasingThicknessShader", /* tp_name */
- sizeof(BPy_ConstrainedIncreasingThicknessShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ConstrainedIncreasingThicknessShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ConstrainedIncreasingThicknessShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ConstrainedIncreasingThicknessShader", /* tp_name */
+ sizeof(BPy_ConstrainedIncreasingThicknessShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ConstrainedIncreasingThicknessShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ConstrainedIncreasingThicknessShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
index ff875fa98d3..d1c3219b079 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
@@ -61,7 +61,7 @@ static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"offset", NULL};
+ static const char *kwlist[] = {"offset", nullptr};
float f;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
@@ -74,43 +74,47 @@ static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self,
/*-----------------------BPy_GuidingLinesShader type definition ------------------------------*/
PyTypeObject GuidingLinesShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GuidingLinesShader", /* tp_name */
- sizeof(BPy_GuidingLinesShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GuidingLinesShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GuidingLinesShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GuidingLinesShader", /* tp_name */
+ sizeof(BPy_GuidingLinesShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GuidingLinesShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GuidingLinesShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
index 3c7ba689b28..7d1efebe71f 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
@@ -79,7 +79,7 @@ static int IncreasingColorShader___init__(BPy_IncreasingColorShader *self,
"green_max",
"blue_max",
"alpha_max",
- NULL,
+ nullptr,
};
float f1, f2, f3, f4, f5, f6, f7, f8;
@@ -94,43 +94,47 @@ static int IncreasingColorShader___init__(BPy_IncreasingColorShader *self,
/*-----------------------BPy_IncreasingColorShader type definition ------------------------------*/
PyTypeObject IncreasingColorShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "IncreasingColorShader", /* tp_name */
- sizeof(BPy_IncreasingColorShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- IncreasingColorShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)IncreasingColorShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "IncreasingColorShader", /* tp_name */
+ sizeof(BPy_IncreasingColorShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ IncreasingColorShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)IncreasingColorShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
index e04fa45be36..f13930bd4b3 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
@@ -59,7 +59,7 @@ static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader *sel
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"thickness_A", "thickness_B", NULL};
+ static const char *kwlist[] = {"thickness_A", "thickness_B", nullptr};
float f1, f2;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2)) {
@@ -72,43 +72,47 @@ static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader *sel
/*-----------------------BPy_IncreasingThicknessShader type definition --------------------------*/
PyTypeObject IncreasingThicknessShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "IncreasingThicknessShader", /* tp_name */
- sizeof(BPy_IncreasingThicknessShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- IncreasingThicknessShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)IncreasingThicknessShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "IncreasingThicknessShader", /* tp_name */
+ sizeof(BPy_IncreasingThicknessShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ IncreasingThicknessShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)IncreasingThicknessShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
index 8128a6dd8ad..48c63554f06 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
@@ -60,7 +60,7 @@ static int PolygonalizationShader___init__(BPy_PolygonalizationShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"error", NULL};
+ static const char *kwlist[] = {"error", nullptr};
float f;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
@@ -73,43 +73,47 @@ static int PolygonalizationShader___init__(BPy_PolygonalizationShader *self,
/*-----------------------BPy_PolygonalizationShader type definition -----------------------------*/
PyTypeObject PolygonalizationShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "PolygonalizationShader", /* tp_name */
- sizeof(BPy_PolygonalizationShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- PolygonalizationShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)PolygonalizationShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "PolygonalizationShader", /* tp_name */
+ sizeof(BPy_PolygonalizationShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ PolygonalizationShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)PolygonalizationShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
index ad8b8ef786b..5f0a0bfb305 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
@@ -51,7 +51,7 @@ static char SamplingShader___doc__[] =
static int SamplingShader___init__(BPy_SamplingShader *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"sampling", NULL};
+ static const char *kwlist[] = {"sampling", nullptr};
float f;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
@@ -64,43 +64,47 @@ static int SamplingShader___init__(BPy_SamplingShader *self, PyObject *args, PyO
/*-----------------------BPy_SamplingShader type definition ------------------------------*/
PyTypeObject SamplingShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "SamplingShader", /* tp_name */
- sizeof(BPy_SamplingShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SamplingShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SamplingShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "SamplingShader", /* tp_name */
+ sizeof(BPy_SamplingShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ SamplingShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)SamplingShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
index 9e2726061c3..3d30fb4e11b 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 int SmoothingShader___init__(BPy_SmoothingShader *self, PyObject *args, P
"aniso_normal",
"aniso_curvature",
"carricature_factor",
- NULL,
+ nullptr,
};
int i1 = 100;
double d2 = 0.1, d3 = 0.0, d4 = 0.2, d5 = 0.0, d6 = 0.0, d7 = 0.0, d8 = 1.0;
@@ -96,43 +96,47 @@ static int SmoothingShader___init__(BPy_SmoothingShader *self, PyObject *args, P
/*-----------------------BPy_SmoothingShader type definition ------------------------------*/
PyTypeObject SmoothingShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "SmoothingShader", /* tp_name */
- sizeof(BPy_SmoothingShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SmoothingShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SmoothingShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "SmoothingShader", /* tp_name */
+ sizeof(BPy_SmoothingShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ SmoothingShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)SmoothingShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
index f45d97047eb..876dd5f2f63 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
@@ -63,10 +63,11 @@ static int SpatialNoiseShader___init__(BPy_SpatialNoiseShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"amount", "scale", "num_octaves", "smooth", "pure_random", NULL};
+ static const char *kwlist[] = {
+ "amount", "scale", "num_octaves", "smooth", "pure_random", nullptr};
float f1, f2;
int i3;
- PyObject *obj4 = 0, *obj5 = 0;
+ PyObject *obj4 = nullptr, *obj5 = nullptr;
if (!PyArg_ParseTupleAndKeywords(args,
kwds,
@@ -89,43 +90,47 @@ static int SpatialNoiseShader___init__(BPy_SpatialNoiseShader *self,
/*-----------------------BPy_SpatialNoiseShader type definition ------------------------------*/
PyTypeObject SpatialNoiseShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "SpatialNoiseShader", /* tp_name */
- sizeof(BPy_SpatialNoiseShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- SpatialNoiseShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)SpatialNoiseShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "SpatialNoiseShader", /* tp_name */
+ sizeof(BPy_SpatialNoiseShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ SpatialNoiseShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)SpatialNoiseShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
index 93a14edd964..bd70d41717b 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp
@@ -53,7 +53,7 @@ static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"step", NULL};
+ static const char *kwlist[] = {"step", nullptr};
float step = 0.1;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &step)) {
@@ -66,43 +66,47 @@ static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self,
/*-----------------------BPy_StrokeTextureStepShader type definition ----------------------------*/
PyTypeObject StrokeTextureStepShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "StrokeTextureStepShader", /* tp_name */
- sizeof(BPy_StrokeTextureStepShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- StrokeTextureStepShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)StrokeTextureStepShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "StrokeTextureStepShader", /* tp_name */
+ sizeof(BPy_StrokeTextureStepShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ StrokeTextureStepShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)StrokeTextureStepShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
index 966dc050985..fd7f5fabe77 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
@@ -55,7 +55,7 @@ static int ThicknessNoiseShader___init__(BPy_ThicknessNoiseShader *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"amplitude", "period", NULL};
+ static const char *kwlist[] = {"amplitude", "period", nullptr};
float f1, f2;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2)) {
@@ -68,43 +68,47 @@ static int ThicknessNoiseShader___init__(BPy_ThicknessNoiseShader *self,
/*-----------------------BPy_ThicknessNoiseShader type definition ------------------------------*/
PyTypeObject ThicknessNoiseShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ThicknessNoiseShader", /* tp_name */
- sizeof(BPy_ThicknessNoiseShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ThicknessNoiseShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ThicknessNoiseShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ThicknessNoiseShader", /* tp_name */
+ sizeof(BPy_ThicknessNoiseShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ThicknessNoiseShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ThicknessNoiseShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
index 001e6ce23ba..ed575b12b8d 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
@@ -52,7 +52,7 @@ static char TipRemoverShader___doc__[] =
static int TipRemoverShader___init__(BPy_TipRemoverShader *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"tip_length", NULL};
+ static const char *kwlist[] = {"tip_length", nullptr};
double d;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "d", (char **)kwlist, &d)) {
@@ -65,43 +65,47 @@ static int TipRemoverShader___init__(BPy_TipRemoverShader *self, PyObject *args,
/*-----------------------BPy_TipRemoverShader type definition ------------------------------*/
PyTypeObject TipRemoverShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "TipRemoverShader", /* tp_name */
- sizeof(BPy_TipRemoverShader), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TipRemoverShader___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &StrokeShader_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TipRemoverShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "TipRemoverShader", /* tp_name */
+ sizeof(BPy_TipRemoverShader), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ TipRemoverShader___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &StrokeShader_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)TipRemoverShader___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
index 9ced91f6867..5ce96212031 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
@@ -44,7 +44,7 @@ extern "C" {
int UnaryFunction0DDouble_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -133,7 +133,7 @@ static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -158,24 +158,24 @@ static PyObject *UnaryFunction0DDouble___call__(BPy_UnaryFunction0DDouble *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_double)) == typeid(UnaryFunction0D<double>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_double->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(self->uf0D_double->result);
}
@@ -183,43 +183,47 @@ static PyObject *UnaryFunction0DDouble___call__(BPy_UnaryFunction0DDouble *self,
/*-----------------------BPy_UnaryFunction0DDouble type definition ------------------------------*/
PyTypeObject UnaryFunction0DDouble_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DDouble", /* tp_name */
- sizeof(BPy_UnaryFunction0DDouble), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DDouble___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DDouble___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DDouble___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DDouble___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DDouble", /* tp_name */
+ sizeof(BPy_UnaryFunction0DDouble), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DDouble___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DDouble___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DDouble___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DDouble___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
index 7520f647276..8c988d55c91 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
@@ -35,7 +35,7 @@ extern "C" {
int UnaryFunction0DEdgeNature_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -71,7 +71,7 @@ static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature *sel
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -97,24 +97,24 @@ static PyObject *UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNatur
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_edgenature)) == typeid(UnaryFunction0D<Nature::EdgeNature>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_edgenature->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return BPy_Nature_from_Nature(self->uf0D_edgenature->result);
}
@@ -122,43 +122,47 @@ static PyObject *UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNatur
/*-----------------------BPy_UnaryFunction0DEdgeNature type definition --------------------------*/
PyTypeObject UnaryFunction0DEdgeNature_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DEdgeNature", /* tp_name */
- sizeof(BPy_UnaryFunction0DEdgeNature), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DEdgeNature___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DEdgeNature___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DEdgeNature___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DEdgeNature___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DEdgeNature", /* tp_name */
+ sizeof(BPy_UnaryFunction0DEdgeNature), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DEdgeNature___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DEdgeNature___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DEdgeNature___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DEdgeNature___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
index 7ee0d9bd71d..25b19e84b60 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
@@ -40,7 +40,7 @@ extern "C" {
int UnaryFunction0DFloat_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -109,7 +109,7 @@ static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -134,24 +134,24 @@ static PyObject *UnaryFunction0DFloat___call__(BPy_UnaryFunction0DFloat *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_float)) == typeid(UnaryFunction0D<float>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_float->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(self->uf0D_float->result);
}
@@ -159,43 +159,47 @@ static PyObject *UnaryFunction0DFloat___call__(BPy_UnaryFunction0DFloat *self,
/*-----------------------BPy_UnaryFunction0DFloat type definition ------------------------------*/
PyTypeObject UnaryFunction0DFloat_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DFloat", /* tp_name */
- sizeof(BPy_UnaryFunction0DFloat), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DFloat___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DFloat___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DFloat___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DFloat___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DFloat", /* tp_name */
+ sizeof(BPy_UnaryFunction0DFloat), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DFloat___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DFloat___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DFloat___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DFloat___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
index 9c0f833d8fa..b2426cab572 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
@@ -35,7 +35,7 @@ extern "C" {
int UnaryFunction0DId_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -68,7 +68,7 @@ static char UnaryFunction0DId___doc__[] =
static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -93,24 +93,24 @@ static PyObject *UnaryFunction0DId___call__(BPy_UnaryFunction0DId *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_id)) == typeid(UnaryFunction0D<Id>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_id->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return BPy_Id_from_Id(self->uf0D_id->result);
}
@@ -118,43 +118,47 @@ static PyObject *UnaryFunction0DId___call__(BPy_UnaryFunction0DId *self,
/*-----------------------BPy_UnaryFunction0DId type definition ------------------------------*/
PyTypeObject UnaryFunction0DId_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DId", /* tp_name */
- sizeof(BPy_UnaryFunction0DId), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DId___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DId___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DId___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DId___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DId", /* tp_name */
+ sizeof(BPy_UnaryFunction0DId), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DId___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DId___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DId___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DId___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
index 95cdc1522ac..77f89265ba4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
@@ -35,7 +35,7 @@ extern "C" {
int UnaryFunction0DMaterial_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -70,7 +70,7 @@ static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -96,24 +96,24 @@ static PyObject *UnaryFunction0DMaterial___call__(BPy_UnaryFunction0DMaterial *s
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_material)) == typeid(UnaryFunction0D<FrsMaterial>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_material->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return BPy_FrsMaterial_from_FrsMaterial(self->uf0D_material->result);
}
@@ -121,43 +121,47 @@ static PyObject *UnaryFunction0DMaterial___call__(BPy_UnaryFunction0DMaterial *s
/*-----------------------BPy_UnaryFunction0DMaterial type definition ----------------------------*/
PyTypeObject UnaryFunction0DMaterial_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DMaterial", /* tp_name */
- sizeof(BPy_UnaryFunction0DMaterial), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DMaterial___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DMaterial___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DMaterial___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DMaterial___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DMaterial", /* tp_name */
+ sizeof(BPy_UnaryFunction0DMaterial), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DMaterial___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DMaterial___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DMaterial___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DMaterial___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
index 17ddd9773d2..52f990502ef 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
@@ -35,7 +35,7 @@ extern "C" {
int UnaryFunction0DUnsigned_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -71,7 +71,7 @@ static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -97,24 +97,24 @@ static PyObject *UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *s
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_unsigned)) == typeid(UnaryFunction0D<unsigned int>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_unsigned->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return PyLong_FromLong(self->uf0D_unsigned->result);
}
@@ -122,43 +122,47 @@ static PyObject *UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *s
/*-----------------------BPy_UnaryFunction0DUnsigned type definition ----------------------------*/
PyTypeObject UnaryFunction0DUnsigned_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DUnsigned", /* tp_name */
- sizeof(BPy_UnaryFunction0DUnsigned), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DUnsigned___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DUnsigned___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DUnsigned___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DUnsigned___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DUnsigned", /* tp_name */
+ sizeof(BPy_UnaryFunction0DUnsigned), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DUnsigned___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DUnsigned___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DUnsigned___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DUnsigned___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
index 3ff73dca832..45e1144cd32 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
@@ -36,7 +36,7 @@ extern "C" {
int UnaryFunction0DVec2f_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -77,7 +77,7 @@ static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -102,24 +102,24 @@ static PyObject *UnaryFunction0DVec2f___call__(BPy_UnaryFunction0DVec2f *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_vec2f)) == typeid(UnaryFunction0D<Vec2f>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_vec2f->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return Vector_from_Vec2f(self->uf0D_vec2f->result);
}
@@ -127,43 +127,47 @@ static PyObject *UnaryFunction0DVec2f___call__(BPy_UnaryFunction0DVec2f *self,
/*-----------------------BPy_UnaryFunction0DVec2f type definition ------------------------------*/
PyTypeObject UnaryFunction0DVec2f_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DVec2f", /* tp_name */
- sizeof(BPy_UnaryFunction0DVec2f), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DVec2f___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DVec2f___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DVec2f___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DVec2f___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DVec2f", /* tp_name */
+ sizeof(BPy_UnaryFunction0DVec2f), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DVec2f___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DVec2f___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DVec2f___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DVec2f___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
index afbd25df122..18eeae86dd7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
@@ -35,7 +35,7 @@ extern "C" {
int UnaryFunction0DVec3f_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -70,7 +70,7 @@ static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -95,24 +95,24 @@ static PyObject *UnaryFunction0DVec3f___call__(BPy_UnaryFunction0DVec3f *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_vec3f)) == typeid(UnaryFunction0D<Vec3f>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_vec3f->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return Vector_from_Vec3f(self->uf0D_vec3f->result);
}
@@ -120,43 +120,47 @@ static PyObject *UnaryFunction0DVec3f___call__(BPy_UnaryFunction0DVec3f *self,
/*-----------------------BPy_UnaryFunction0DVec3f type definition ------------------------------*/
PyTypeObject UnaryFunction0DVec3f_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DVec3f", /* tp_name */
- sizeof(BPy_UnaryFunction0DVec3f), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DVec3f___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DVec3f___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DVec3f___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DVec3f___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DVec3f", /* tp_name */
+ sizeof(BPy_UnaryFunction0DVec3f), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DVec3f___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DVec3f___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DVec3f___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DVec3f___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
index 4fd6d949974..28c4425b2a4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
@@ -35,7 +35,7 @@ extern "C" {
int UnaryFunction0DVectorViewShape_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -72,7 +72,7 @@ static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorView
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -98,24 +98,24 @@ static PyObject *UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVect
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_vectorviewshape)) == typeid(UnaryFunction0D<std::vector<ViewShape *>>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_vectorviewshape->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
const unsigned int list_len = self->uf0D_vectorviewshape->result.size();
@@ -131,43 +131,47 @@ static PyObject *UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVect
/*-----------------------BPy_UnaryFunction0DVectorViewShape type definition ---------------------*/
PyTypeObject UnaryFunction0DVectorViewShape_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DVectorViewShape", /* tp_name */
- sizeof(BPy_UnaryFunction0DVectorViewShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DVectorViewShape___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DVectorViewShape___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DVectorViewShape", /* tp_name */
+ sizeof(BPy_UnaryFunction0DVectorViewShape), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DVectorViewShape___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DVectorViewShape___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
index 0f623b0e765..75773aaa8d0 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
@@ -36,7 +36,7 @@ extern "C" {
int UnaryFunction0DViewShape_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -78,7 +78,7 @@ static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -104,24 +104,24 @@ static PyObject *UnaryFunction0DViewShape___call__(BPy_UnaryFunction0DViewShape
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"it", NULL};
+ static const char *kwlist[] = {"it", nullptr};
PyObject *obj;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "O!", (char **)kwlist, &Interface0DIterator_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf0D_viewshape)) == typeid(UnaryFunction0D<ViewShape *>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf0D_viewshape->operator()(*(((BPy_Interface0DIterator *)obj)->if0D_it)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return BPy_ViewShape_from_ViewShape(*(self->uf0D_viewshape->result));
}
@@ -129,43 +129,47 @@ static PyObject *UnaryFunction0DViewShape___call__(BPy_UnaryFunction0DViewShape
/*-----------------------BPy_UnaryFunction0DViewShape type definition ---------------------------*/
PyTypeObject UnaryFunction0DViewShape_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DViewShape", /* tp_name */
- sizeof(BPy_UnaryFunction0DViewShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction0DViewShape___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction0DViewShape___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction0DViewShape___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction0DViewShape___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DViewShape", /* tp_name */
+ sizeof(BPy_UnaryFunction0DViewShape), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction0DViewShape___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction0DViewShape___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction0DViewShape___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction0DViewShape___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 6d4406b17a7..b59e72e23d2 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
@@ -57,7 +57,7 @@ static char ShapeIdF0D___doc__[] =
static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -70,43 +70,47 @@ static int ShapeIdF0D___init__(BPy_ShapeIdF0D *self, PyObject *args, PyObject *k
/*-----------------------BPy_ShapeIdF0D type definition ------------------------------*/
PyTypeObject ShapeIdF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ShapeIdF0D", /* tp_name */
- sizeof(BPy_ShapeIdF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ShapeIdF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DId_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ShapeIdF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ShapeIdF0D", /* tp_name */
+ sizeof(BPy_ShapeIdF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ShapeIdF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DId_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ShapeIdF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 a9050c4594e..9f7f2b234f7 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
@@ -60,7 +60,7 @@ static char MaterialF0D___doc__[] =
static int MaterialF0D___init__(BPy_MaterialF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -73,43 +73,47 @@ static int MaterialF0D___init__(BPy_MaterialF0D *self, PyObject *args, PyObject
/*-----------------------BPy_MaterialF0D type definition ------------------------------*/
PyTypeObject MaterialF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "MaterialF0D", /* tp_name */
- sizeof(BPy_MaterialF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- MaterialF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DMaterial_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)MaterialF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "MaterialF0D", /* tp_name */
+ sizeof(BPy_MaterialF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ MaterialF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DMaterial_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)MaterialF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 1173b2434d6..1cd1a4ab8ac 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
@@ -51,7 +51,7 @@ static char CurveNatureF0D___doc__[] =
static int CurveNatureF0D___init__(BPy_CurveNatureF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -64,43 +64,47 @@ static int CurveNatureF0D___init__(BPy_CurveNatureF0D *self, PyObject *args, PyO
/*-----------------------BPy_CurveNatureF0D type definition ------------------------------*/
PyTypeObject CurveNatureF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "CurveNatureF0D", /* tp_name */
- sizeof(BPy_CurveNatureF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurveNatureF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DEdgeNature_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurveNatureF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "CurveNatureF0D", /* tp_name */
+ sizeof(BPy_CurveNatureF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ CurveNatureF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DEdgeNature_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)CurveNatureF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 673522a055e..60cfed83713 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
@@ -53,7 +53,7 @@ static char Normal2DF0D___doc__[] =
static int Normal2DF0D___init__(BPy_Normal2DF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -66,43 +66,47 @@ static int Normal2DF0D___init__(BPy_Normal2DF0D *self, PyObject *args, PyObject
/*-----------------------BPy_Normal2DF0D type definition ------------------------------*/
PyTypeObject Normal2DF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Normal2DF0D", /* tp_name */
- sizeof(BPy_Normal2DF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Normal2DF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DVec2f_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Normal2DF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Normal2DF0D", /* tp_name */
+ sizeof(BPy_Normal2DF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Normal2DF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DVec2f_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Normal2DF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 5ec616c90c1..063f1651486 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
@@ -55,7 +55,7 @@ static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -68,43 +68,47 @@ static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D *self,
/*-----------------------BPy_VertexOrientation2DF0D type definition -----------------------------*/
PyTypeObject VertexOrientation2DF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "VertexOrientation2DF0D", /* tp_name */
- sizeof(BPy_VertexOrientation2DF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- VertexOrientation2DF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DVec2f_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)VertexOrientation2DF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "VertexOrientation2DF0D", /* tp_name */
+ sizeof(BPy_VertexOrientation2DF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ VertexOrientation2DF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DVec2f_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)VertexOrientation2DF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 6db4c9317e2..b0188cd0244 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
@@ -55,7 +55,7 @@ static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -68,43 +68,47 @@ static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D *self,
/*-----------------------BPy_VertexOrientation3DF0D type definition -----------------------------*/
PyTypeObject VertexOrientation3DF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "VertexOrientation3DF0D", /* tp_name */
- sizeof(BPy_VertexOrientation3DF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- VertexOrientation3DF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DVec3f_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)VertexOrientation3DF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "VertexOrientation3DF0D", /* tp_name */
+ sizeof(BPy_VertexOrientation3DF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ VertexOrientation3DF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DVec3f_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)VertexOrientation3DF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 827c089aa1a..ba890477782 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
@@ -50,7 +50,7 @@ static char GetOccludeeF0D___doc__[] =
static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D *self, PyObject *args, PyO
/*-----------------------BPy_GetOccludeeF0D type definition ------------------------------*/
PyTypeObject GetOccludeeF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetOccludeeF0D", /* tp_name */
- sizeof(BPy_GetOccludeeF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetOccludeeF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DViewShape_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetOccludeeF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetOccludeeF0D", /* tp_name */
+ sizeof(BPy_GetOccludeeF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetOccludeeF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DViewShape_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetOccludeeF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 31b36dbf855..531020dc32a 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
@@ -50,7 +50,7 @@ static char GetShapeF0D___doc__[] =
static int GetShapeF0D___init__(BPy_GetShapeF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetShapeF0D___init__(BPy_GetShapeF0D *self, PyObject *args, PyObject
/*-----------------------BPy_GetShapeF0D type definition ------------------------------*/
PyTypeObject GetShapeF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetShapeF0D", /* tp_name */
- sizeof(BPy_GetShapeF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetShapeF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DViewShape_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetShapeF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetShapeF0D", /* tp_name */
+ sizeof(BPy_GetShapeF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetShapeF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DViewShape_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetShapeF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 5f1d123c8d3..cb36e388306 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
@@ -55,7 +55,7 @@ static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -68,43 +68,47 @@ static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D *self,
/*-----------------------BPy_Curvature2DAngleF0D type definition ------------------------------*/
PyTypeObject Curvature2DAngleF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Curvature2DAngleF0D", /* tp_name */
- sizeof(BPy_Curvature2DAngleF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Curvature2DAngleF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Curvature2DAngleF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Curvature2DAngleF0D", /* tp_name */
+ sizeof(BPy_Curvature2DAngleF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Curvature2DAngleF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Curvature2DAngleF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 736afca7fae..ca306a55d1e 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
@@ -59,7 +59,7 @@ static char DensityF0D___doc__[] =
static int DensityF0D___init__(BPy_DensityF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"sigma", NULL};
+ static const char *kwlist[] = {"sigma", nullptr};
double d = 2;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|d", (char **)kwlist, &d)) {
@@ -73,43 +73,47 @@ static int DensityF0D___init__(BPy_DensityF0D *self, PyObject *args, PyObject *k
/*-----------------------BPy_DensityF0D type definition ------------------------------*/
PyTypeObject DensityF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "DensityF0D", /* tp_name */
- sizeof(BPy_DensityF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- DensityF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)DensityF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "DensityF0D", /* tp_name */
+ sizeof(BPy_DensityF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ DensityF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)DensityF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 d3cd14a1aba..6a688212239 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
@@ -50,7 +50,7 @@ static char GetProjectedXF0D___doc__[] =
static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedXF0D type definition ------------------------------*/
PyTypeObject GetProjectedXF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedXF0D", /* tp_name */
- sizeof(BPy_GetProjectedXF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedXF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedXF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedXF0D", /* tp_name */
+ sizeof(BPy_GetProjectedXF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetProjectedXF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetProjectedXF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 92d5a1e4216..8efaaf1b699 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
@@ -50,7 +50,7 @@ static char GetProjectedYF0D___doc__[] =
static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedYF0D type definition ------------------------------*/
PyTypeObject GetProjectedYF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedYF0D", /* tp_name */
- sizeof(BPy_GetProjectedYF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedYF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedYF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedYF0D", /* tp_name */
+ sizeof(BPy_GetProjectedYF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetProjectedYF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetProjectedYF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 cb2a5e3a102..e13c990685f 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
@@ -50,7 +50,7 @@ static char GetProjectedZF0D___doc__[] =
static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedZF0D type definition ------------------------------*/
PyTypeObject GetProjectedZF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedZF0D", /* tp_name */
- sizeof(BPy_GetProjectedZF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedZF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedZF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedZF0D", /* tp_name */
+ sizeof(BPy_GetProjectedZF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetProjectedZF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetProjectedZF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 dd75001f3bd..43cbb433bdd 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
@@ -50,7 +50,7 @@ static char GetXF0D___doc__[] =
static int GetXF0D___init__(BPy_GetXF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetXF0D___init__(BPy_GetXF0D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetXF0D type definition ------------------------------*/
PyTypeObject GetXF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetXF0D", /* tp_name */
- sizeof(BPy_GetXF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetXF0D", /* tp_name */
+ sizeof(BPy_GetXF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
GetXF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
&UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)GetXF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 09e2a84e29f..24bfe3be985 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
@@ -50,7 +50,7 @@ static char GetYF0D___doc__[] =
static int GetYF0D___init__(BPy_GetYF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetYF0D___init__(BPy_GetYF0D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetYF0D type definition ------------------------------*/
PyTypeObject GetYF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetYF0D", /* tp_name */
- sizeof(BPy_GetYF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetYF0D", /* tp_name */
+ sizeof(BPy_GetYF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
GetYF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
&UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)GetYF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 920432530ed..84a985a134d 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
@@ -50,7 +50,7 @@ static char GetZF0D___doc__[] =
static int GetZF0D___init__(BPy_GetZF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetZF0D___init__(BPy_GetZF0D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetZF0D type definition ------------------------------*/
PyTypeObject GetZF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetZF0D", /* tp_name */
- sizeof(BPy_GetZF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetZF0D", /* tp_name */
+ sizeof(BPy_GetZF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
GetZF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
&UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)GetZF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 58e5a1a498a..247473dcb41 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
@@ -57,7 +57,7 @@ static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"mask_size", NULL};
+ static const char *kwlist[] = {"mask_size", nullptr};
double d = 5.0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|d", (char **)kwlist, &d)) {
@@ -71,43 +71,47 @@ static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D *self,
/*-----------------------BPy_LocalAverageDepthF0D type definition ------------------------------*/
PyTypeObject LocalAverageDepthF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "LocalAverageDepthF0D", /* tp_name */
- sizeof(BPy_LocalAverageDepthF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- LocalAverageDepthF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)LocalAverageDepthF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "LocalAverageDepthF0D", /* tp_name */
+ sizeof(BPy_LocalAverageDepthF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ LocalAverageDepthF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)LocalAverageDepthF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 0d1b55f0a00..e82b5f1c557 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
@@ -55,7 +55,7 @@ static char ZDiscontinuityF0D___doc__[] =
static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -68,43 +68,47 @@ static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *arg
/*-----------------------BPy_ZDiscontinuityF0D type definition ------------------------------*/
PyTypeObject ZDiscontinuityF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ZDiscontinuityF0D", /* tp_name */
- sizeof(BPy_ZDiscontinuityF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ZDiscontinuityF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ZDiscontinuityF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ZDiscontinuityF0D", /* tp_name */
+ sizeof(BPy_ZDiscontinuityF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ZDiscontinuityF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ZDiscontinuityF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 a00d4204d69..b4760d10b2c 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
@@ -53,7 +53,7 @@ static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D *sel
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -66,43 +66,47 @@ static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D *sel
/*-----------------------BPy_GetCurvilinearAbscissaF0D type definition --------------------------*/
PyTypeObject GetCurvilinearAbscissaF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetCurvilinearAbscissaF0D", /* tp_name */
- sizeof(BPy_GetCurvilinearAbscissaF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetCurvilinearAbscissaF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetCurvilinearAbscissaF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetCurvilinearAbscissaF0D", /* tp_name */
+ sizeof(BPy_GetCurvilinearAbscissaF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetCurvilinearAbscissaF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DFloat_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetCurvilinearAbscissaF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 b4310685969..d4c735e3572 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
@@ -50,7 +50,7 @@ static char GetParameterF0D___doc__[] =
static int GetParameterF0D___init__(BPy_GetParameterF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -61,45 +61,48 @@ static int GetParameterF0D___init__(BPy_GetParameterF0D *self, PyObject *args, P
}
/*-----------------------BPy_GetParameterF0D type definition ------------------------------*/
-
PyTypeObject GetParameterF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetParameterF0D", /* tp_name */
- sizeof(BPy_GetParameterF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetParameterF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetParameterF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetParameterF0D", /* tp_name */
+ sizeof(BPy_GetParameterF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetParameterF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DFloat_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetParameterF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 ad744918e00..6d5f1ed80c3 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
@@ -57,7 +57,7 @@ static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D *sel
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"level", NULL};
+ static const char *kwlist[] = {"level", nullptr};
int i;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i)) {
@@ -71,43 +71,47 @@ static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D *sel
/*-----------------------BPy_GetViewMapGradientNormF0D type definition --------------------------*/
PyTypeObject GetViewMapGradientNormF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetViewMapGradientNormF0D", /* tp_name */
- sizeof(BPy_GetViewMapGradientNormF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetViewMapGradientNormF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetViewMapGradientNormF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetViewMapGradientNormF0D", /* tp_name */
+ sizeof(BPy_GetViewMapGradientNormF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetViewMapGradientNormF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DFloat_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetViewMapGradientNormF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 685701152f4..bbf2aee5204 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
@@ -55,7 +55,7 @@ static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"level", NULL};
+ static const char *kwlist[] = {"level", nullptr};
int i;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist, &i)) {
@@ -69,43 +69,47 @@ static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D
/*-----------------------BPy_ReadCompleteViewMapPixelF0D type definition ------------------------*/
PyTypeObject ReadCompleteViewMapPixelF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ReadCompleteViewMapPixelF0D", /* tp_name */
- sizeof(BPy_ReadCompleteViewMapPixelF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ReadCompleteViewMapPixelF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ReadCompleteViewMapPixelF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ReadCompleteViewMapPixelF0D", /* tp_name */
+ sizeof(BPy_ReadCompleteViewMapPixelF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ReadCompleteViewMapPixelF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DFloat_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ReadCompleteViewMapPixelF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 b74ee3b33c6..54401153d37 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
@@ -55,7 +55,7 @@ static char ReadMapPixelF0D___doc__[] =
static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"map_name", "level", NULL};
+ static const char *kwlist[] = {"map_name", "level", nullptr};
const char *s;
int i;
@@ -70,43 +70,47 @@ static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D *self, PyObject *args, P
/*-----------------------BPy_ReadMapPixelF0D type definition ------------------------------*/
PyTypeObject ReadMapPixelF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ReadMapPixelF0D", /* tp_name */
- sizeof(BPy_ReadMapPixelF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ReadMapPixelF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ReadMapPixelF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ReadMapPixelF0D", /* tp_name */
+ sizeof(BPy_ReadMapPixelF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ReadMapPixelF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DFloat_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ReadMapPixelF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 a878db99e06..88ca0579870 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
@@ -58,7 +58,7 @@ static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"orientation", "level", NULL};
+ static const char *kwlist[] = {"orientation", "level", nullptr};
unsigned int u;
int i;
@@ -73,43 +73,47 @@ static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0
/*-----------------------BPy_ReadSteerableViewMapPixelF0D type definition -----------------------*/
PyTypeObject ReadSteerableViewMapPixelF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ReadSteerableViewMapPixelF0D", /* tp_name */
- sizeof(BPy_ReadSteerableViewMapPixelF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ReadSteerableViewMapPixelF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DFloat_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ReadSteerableViewMapPixelF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ReadSteerableViewMapPixelF0D", /* tp_name */
+ sizeof(BPy_ReadSteerableViewMapPixelF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ReadSteerableViewMapPixelF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DFloat_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ReadSteerableViewMapPixelF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 57605e42186..d6e00988e68 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
@@ -58,7 +58,7 @@ static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -71,43 +71,47 @@ static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D
/*-----------------------BPy_QuantitativeInvisibilityF0D type definition ------------------------*/
PyTypeObject QuantitativeInvisibilityF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "QuantitativeInvisibilityF0D", /* tp_name */
- sizeof(BPy_QuantitativeInvisibilityF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- QuantitativeInvisibilityF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DUnsigned_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)QuantitativeInvisibilityF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "QuantitativeInvisibilityF0D", /* tp_name */
+ sizeof(BPy_QuantitativeInvisibilityF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ QuantitativeInvisibilityF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DUnsigned_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)QuantitativeInvisibilityF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 e56460601e5..ddff11d7916 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
@@ -51,7 +51,7 @@ static char GetOccludersF0D___doc__[] =
static int GetOccludersF0D___init__(BPy_GetOccludersF0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -64,43 +64,47 @@ static int GetOccludersF0D___init__(BPy_GetOccludersF0D *self, PyObject *args, P
/*-----------------------BPy_GetOccludersF0D type definition ------------------------------*/
PyTypeObject GetOccludersF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetOccludersF0D", /* tp_name */
- sizeof(BPy_GetOccludersF0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetOccludersF0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction0DVectorViewShape_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetOccludersF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetOccludersF0D", /* tp_name */
+ sizeof(BPy_GetOccludersF0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetOccludersF0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction0DVectorViewShape_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetOccludersF0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
index 88705c41204..57b2d61d5c1 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
@@ -49,7 +49,7 @@ extern "C" {
int UnaryFunction1DDouble_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -160,13 +160,10 @@ static char UnaryFunction1DDouble___doc__[] =
":class:`Interface1D` and return a float value.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(integration_type)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(integration_type)\n"
- "\n"
- " Builds a unary 1D function using the integration method given as\n"
- " argument.\n"
+ " Builds a unary 1D function using the default constructor\n"
+ " or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";
@@ -175,8 +172,8 @@ static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -210,23 +207,23 @@ static PyObject *UnaryFunction1DDouble___call__(BPy_UnaryFunction1DDouble *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"inter", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf1D_double)) == typeid(UnaryFunction1D<double>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf1D_double->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(self->uf1D_double->result);
}
@@ -260,50 +257,54 @@ static PyGetSetDef BPy_UnaryFunction1DDouble_getseters[] = {
(getter)integration_type_get,
(setter)integration_type_set,
integration_type_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1DDouble type definition ------------------------------*/
PyTypeObject UnaryFunction1DDouble_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DDouble", /* tp_name */
- sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DDouble___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1DDouble_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DDouble___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DDouble", /* tp_name */
+ sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1DDouble___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1DDouble_getseters, /* tp_getset */
+ &UnaryFunction1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction1DDouble___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
index 3cfc5464296..a987dbb67f5 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
@@ -36,7 +36,7 @@ extern "C" {
int UnaryFunction1DEdgeNature_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -65,13 +65,10 @@ static char UnaryFunction1DEdgeNature___doc__[] =
":class:`Interface1D` and return a :class:`Nature` object.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(integration_type)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(integration_type)\n"
- "\n"
- " Builds a unary 1D function using the integration method given as\n"
- " argument.\n"
+ " Builds a unary 1D function using the default constructor\n"
+ " or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";
@@ -80,8 +77,8 @@ static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *sel
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -117,23 +114,23 @@ static PyObject *UnaryFunction1DEdgeNature___call__(BPy_UnaryFunction1DEdgeNatur
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"inter", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf1D_edgenature)) == typeid(UnaryFunction1D<Nature::EdgeNature>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf1D_edgenature->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return BPy_Nature_from_Nature(self->uf1D_edgenature->result);
}
@@ -167,50 +164,54 @@ static PyGetSetDef BPy_UnaryFunction1DEdgeNature_getseters[] = {
(getter)integration_type_get,
(setter)integration_type_set,
integration_type_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1DEdgeNature type definition --------------------------*/
PyTypeObject UnaryFunction1DEdgeNature_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DEdgeNature", /* tp_name */
- sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DEdgeNature___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1DEdgeNature_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DEdgeNature___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DEdgeNature", /* tp_name */
+ sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1DEdgeNature___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1DEdgeNature_getseters, /* tp_getset */
+ &UnaryFunction1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction1DEdgeNature___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
index 4fdc68a2e89..66499c68c65 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
@@ -34,7 +34,7 @@ extern "C" {
int UnaryFunction1DFloat_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -56,13 +56,10 @@ static char UnaryFunction1DFloat___doc__[] =
":class:`Interface1D` and return a float value.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(integration_type)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(integration_type)\n"
- "\n"
- " Builds a unary 1D function using the integration method given as\n"
- " argument.\n"
+ " Builds a unary 1D function using the default constructor\n"
+ " or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";
@@ -71,8 +68,8 @@ static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -106,23 +103,23 @@ static PyObject *UnaryFunction1DFloat___call__(BPy_UnaryFunction1DFloat *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"inter", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf1D_float)) == typeid(UnaryFunction1D<float>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf1D_float->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return PyFloat_FromDouble(self->uf1D_float->result);
}
@@ -156,50 +153,54 @@ static PyGetSetDef BPy_UnaryFunction1DFloat_getseters[] = {
(getter)integration_type_get,
(setter)integration_type_set,
integration_type_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1DFloat type definition ------------------------------*/
PyTypeObject UnaryFunction1DFloat_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DFloat", /* tp_name */
- sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DFloat___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1DFloat_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DFloat___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DFloat", /* tp_name */
+ sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1DFloat___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1DFloat_getseters, /* tp_getset */
+ &UnaryFunction1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction1DFloat___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
index 218afa3ff10..54c5c786367 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
@@ -36,7 +36,7 @@ extern "C" {
int UnaryFunction1DUnsigned_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -65,13 +65,10 @@ static char UnaryFunction1DUnsigned___doc__[] =
":class:`Interface1D` and return an int value.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(integration_type)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(integration_type)\n"
- "\n"
- " Builds a unary 1D function using the integration method given as\n"
- " argument.\n"
+ " Builds a unary 1D function using the default constructor\n"
+ " or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";
@@ -80,8 +77,8 @@ static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -117,23 +114,23 @@ static PyObject *UnaryFunction1DUnsigned___call__(BPy_UnaryFunction1DUnsigned *s
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"inter", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf1D_unsigned)) == typeid(UnaryFunction1D<unsigned int>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf1D_unsigned->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return PyLong_FromLong(self->uf1D_unsigned->result);
}
@@ -167,50 +164,54 @@ static PyGetSetDef BPy_UnaryFunction1DUnsigned_getseters[] = {
(getter)integration_type_get,
(setter)integration_type_set,
integration_type_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1DUnsigned type definition ----------------------------*/
PyTypeObject UnaryFunction1DUnsigned_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DUnsigned", /* tp_name */
- sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DUnsigned___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1DUnsigned_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DUnsigned___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DUnsigned", /* tp_name */
+ sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1DUnsigned___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1DUnsigned_getseters, /* tp_getset */
+ &UnaryFunction1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction1DUnsigned___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
index 939ccfb8905..8b23163fc95 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
@@ -37,7 +37,7 @@ extern "C" {
int UnaryFunction1DVec2f_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -71,13 +71,10 @@ static char UnaryFunction1DVec2f___doc__[] =
":class:`Interface1D` and return a 2D vector.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(integration_type)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(integration_type)\n"
- "\n"
- " Builds a unary 1D function using the integration method given as\n"
- " argument.\n"
+ " Builds a unary 1D function using the default constructor\n"
+ " or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";
@@ -86,8 +83,8 @@ static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -121,23 +118,23 @@ static PyObject *UnaryFunction1DVec2f___call__(BPy_UnaryFunction1DVec2f *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"inter", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf1D_vec2f)) == typeid(UnaryFunction1D<Vec2f>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf1D_vec2f->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return Vector_from_Vec2f(self->uf1D_vec2f->result);
}
@@ -171,50 +168,54 @@ static PyGetSetDef BPy_UnaryFunction1DVec2f_getseters[] = {
(getter)integration_type_get,
(setter)integration_type_set,
integration_type_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1DVec2f type definition ------------------------------*/
PyTypeObject UnaryFunction1DVec2f_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DVec2f", /* tp_name */
- sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DVec2f___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1DVec2f_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DVec2f___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DVec2f", /* tp_name */
+ sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1DVec2f___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1DVec2f_getseters, /* tp_getset */
+ &UnaryFunction1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction1DVec2f___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
index 02b6373cce4..9b6a2445588 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
@@ -36,7 +36,7 @@ extern "C" {
int UnaryFunction1DVec3f_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -64,13 +64,10 @@ static char UnaryFunction1DVec3f___doc__[] =
":class:`Interface1D` and return a 3D vector.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(integration_type)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(integration_type)\n"
- "\n"
- " Builds a unary 1D function using the integration method given as\n"
- " argument.\n"
+ " Builds a unary 1D function using the default constructor\n"
+ " or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";
@@ -79,8 +76,8 @@ static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -114,23 +111,23 @@ static PyObject *UnaryFunction1DVec3f___call__(BPy_UnaryFunction1DVec3f *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"inter", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf1D_vec3f)) == typeid(UnaryFunction1D<Vec3f>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf1D_vec3f->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
return Vector_from_Vec3f(self->uf1D_vec3f->result);
}
@@ -164,50 +161,54 @@ static PyGetSetDef BPy_UnaryFunction1DVec3f_getseters[] = {
(getter)integration_type_get,
(setter)integration_type_set,
integration_type_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1DVec3f type definition ------------------------------*/
PyTypeObject UnaryFunction1DVec3f_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DVec3f", /* tp_name */
- sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DVec3f___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1DVec3f_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DVec3f___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DVec3f", /* tp_name */
+ sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1DVec3f___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1DVec3f_getseters, /* tp_getset */
+ &UnaryFunction1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction1DVec3f___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
index b2020e9f554..c95595dc953 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
@@ -38,7 +38,7 @@ extern "C" {
int UnaryFunction1DVectorViewShape_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -80,13 +80,10 @@ static char UnaryFunction1DVectorViewShape___doc__[] =
"objects.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(integration_type)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(integration_type)\n"
- "\n"
- " Builds a unary 1D function using the integration method given as\n"
- " argument.\n"
+ " Builds a unary 1D function using the default constructor\n"
+ " or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";
@@ -95,8 +92,8 @@ static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorView
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -132,23 +129,23 @@ static PyObject *UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVect
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"inter", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf1D_vectorviewshape)) == typeid(UnaryFunction1D<std::vector<ViewShape *>>)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf1D_vectorviewshape->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
const unsigned int list_len = self->uf1D_vectorviewshape->result.size();
@@ -192,50 +189,54 @@ static PyGetSetDef BPy_UnaryFunction1DVectorViewShape_getseters[] = {
(getter)integration_type_get,
(setter)integration_type_set,
integration_type_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1DVectorViewShape type definition ---------------------*/
PyTypeObject UnaryFunction1DVectorViewShape_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DVectorViewShape", /* tp_name */
- sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DVectorViewShape___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DVectorViewShape___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DVectorViewShape", /* tp_name */
+ sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1DVectorViewShape___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */
+ &UnaryFunction1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction1DVectorViewShape___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
index 7b25daa24f9..b258b0b27f7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
@@ -38,7 +38,7 @@ extern "C" {
int UnaryFunction1DVoid_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -79,13 +79,10 @@ static char UnaryFunction1DVoid___doc__[] =
":class:`Interface1D`.\n"
"\n"
".. method:: __init__()\n"
+ " __init__(integration_type)\n"
"\n"
- " Default constructor.\n"
- "\n"
- ".. method:: __init__(integration_type)\n"
- "\n"
- " Builds a unary 1D function using the integration method given as\n"
- " argument.\n"
+ " Builds a unary 1D function using either a default constructor\n"
+ " or the integration method given as an argument.\n"
"\n"
" :arg integration_type: An integration method.\n"
" :type integration_type: :class:`IntegrationType`\n";
@@ -94,8 +91,8 @@ static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -129,23 +126,23 @@ static PyObject *UnaryFunction1DVoid___call__(BPy_UnaryFunction1DVoid *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"inter", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"inter", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj)) {
- return NULL;
+ return nullptr;
}
if (typeid(*(self->uf1D_void)) == typeid(UnaryFunction1D_void)) {
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
- return NULL;
+ return nullptr;
}
if (self->uf1D_void->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
if (!PyErr_Occurred()) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
}
- return NULL;
+ return nullptr;
}
Py_RETURN_NONE;
}
@@ -179,50 +176,54 @@ static PyGetSetDef BPy_UnaryFunction1DVoid_getseters[] = {
(getter)integration_type_get,
(setter)integration_type_set,
integration_type_doc,
- NULL},
- {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
+ nullptr},
+ {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
/*-----------------------BPy_UnaryFunction1DVoid type definition ------------------------------*/
PyTypeObject UnaryFunction1DVoid_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DVoid", /* tp_name */
- sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */
- 0, /* tp_itemsize */
- (destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- (ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- UnaryFunction1DVoid___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- BPy_UnaryFunction1DVoid_getseters, /* tp_getset */
- &UnaryFunction1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)UnaryFunction1DVoid___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction1DVoid", /* tp_name */
+ sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ (reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ (ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ UnaryFunction1DVoid___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ BPy_UnaryFunction1DVoid_getseters, /* tp_getset */
+ &UnaryFunction1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)UnaryFunction1DVoid___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 2504a09016c..205820d9a92 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
@@ -61,8 +61,8 @@ static char CurveNatureF1D___doc__[] =
static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -76,43 +76,47 @@ static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyO
/*-----------------------BPy_CurveNatureF1D type definition ------------------------------*/
PyTypeObject CurveNatureF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "CurveNatureF1D", /* tp_name */
- sizeof(BPy_CurveNatureF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurveNatureF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DEdgeNature_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurveNatureF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "CurveNatureF1D", /* tp_name */
+ sizeof(BPy_CurveNatureF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ CurveNatureF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DEdgeNature_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)CurveNatureF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 f1cdd6a0cb8..d22a1ec99ef 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
@@ -55,8 +55,8 @@ static char Normal2DF1D___doc__[] =
static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -70,43 +70,47 @@ static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject
/*-----------------------BPy_Normal2DF1D type definition ------------------------------*/
PyTypeObject Normal2DF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Normal2DF1D", /* tp_name */
- sizeof(BPy_Normal2DF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Normal2DF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVec2f_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Normal2DF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Normal2DF1D", /* tp_name */
+ sizeof(BPy_Normal2DF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Normal2DF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVec2f_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Normal2DF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 27d6c509348..f66bd4c668f 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
@@ -55,8 +55,8 @@ static char Orientation2DF1D___doc__[] =
static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -70,43 +70,47 @@ static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args,
/*-----------------------BPy_Orientation2DF1D type definition ------------------------------*/
PyTypeObject Orientation2DF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Orientation2DF1D", /* tp_name */
- sizeof(BPy_Orientation2DF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Orientation2DF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVec2f_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Orientation2DF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Orientation2DF1D", /* tp_name */
+ sizeof(BPy_Orientation2DF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Orientation2DF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVec2f_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Orientation2DF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 1a2d9c5e745..2f408d45b74 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
@@ -55,8 +55,8 @@ static char Orientation3DF1D___doc__[] =
static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -70,43 +70,47 @@ static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args,
/*-----------------------BPy_Orientation3DF1D type definition ------------------------------*/
PyTypeObject Orientation3DF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Orientation3DF1D", /* tp_name */
- sizeof(BPy_Orientation3DF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Orientation3DF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVec3f_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Orientation3DF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Orientation3DF1D", /* tp_name */
+ sizeof(BPy_Orientation3DF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Orientation3DF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVec3f_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Orientation3DF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 4d0e1a66f56..13455eb3a4c 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
@@ -57,8 +57,8 @@ static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -71,43 +71,47 @@ static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self,
/*-----------------------BPy_Curvature2DAngleF1D type definition ------------------------------*/
PyTypeObject Curvature2DAngleF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Curvature2DAngleF1D", /* tp_name */
- sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- Curvature2DAngleF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Curvature2DAngleF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "Curvature2DAngleF1D", /* tp_name */
+ sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ Curvature2DAngleF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Curvature2DAngleF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 b96406de066..fcf2bebc161 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
@@ -67,8 +67,8 @@ static char DensityF1D___doc__[] =
static int DensityF1D___init__(BPy_DensityF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"sigma", "integration_type", "sampling", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"sigma", "integration_type", "sampling", nullptr};
+ PyObject *obj = nullptr;
double d = 2.0;
float f = 2.0;
@@ -84,43 +84,47 @@ static int DensityF1D___init__(BPy_DensityF1D *self, PyObject *args, PyObject *k
/*-----------------------BPy_DensityF1D type definition ------------------------------*/
PyTypeObject DensityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "DensityF1D", /* tp_name */
- sizeof(BPy_DensityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- DensityF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)DensityF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "DensityF1D", /* tp_name */
+ sizeof(BPy_DensityF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ DensityF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)DensityF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 9f16f53e833..5c352c670c1 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
@@ -71,8 +71,8 @@ static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
+ PyObject *obj = nullptr;
int i;
float f = 2.0;
@@ -88,43 +88,47 @@ static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1
/*-----------------------BPy_GetCompleteViewMapDensityF1D type definition -----------------------*/
PyTypeObject GetCompleteViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetCompleteViewMapDensityF1D", /* tp_name */
- sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetCompleteViewMapDensityF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetCompleteViewMapDensityF1D", /* tp_name */
+ sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetCompleteViewMapDensityF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 8cea26338df..45c6a1b0fb7 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
@@ -77,8 +77,8 @@ static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDen
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"orientation", "level", "integration_type", "sampling", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"orientation", "level", "integration_type", "sampling", nullptr};
+ PyObject *obj = nullptr;
unsigned int u1, u2;
float f = 2.0;
@@ -95,43 +95,47 @@ static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDen
/*-----------------------BPy_GetDirectionalViewMapDensityF1D type definition --------------------*/
PyTypeObject GetDirectionalViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetDirectionalViewMapDensityF1D", /* tp_name */
- sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetDirectionalViewMapDensityF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetDirectionalViewMapDensityF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetDirectionalViewMapDensityF1D", /* tp_name */
+ sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetDirectionalViewMapDensityF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetDirectionalViewMapDensityF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 5f47fb03f8b..0c7276a13ec 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
@@ -55,8 +55,8 @@ static char GetProjectedXF1D___doc__[] =
static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -70,43 +70,47 @@ static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedXF1D type definition ------------------------------*/
PyTypeObject GetProjectedXF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedXF1D", /* tp_name */
- sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedXF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedXF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedXF1D", /* tp_name */
+ sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetProjectedXF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetProjectedXF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 b6e1c2d336e..1f1c01a5344 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
@@ -55,8 +55,8 @@ static char GetProjectedYF1D___doc__[] =
static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -70,43 +70,47 @@ static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedYF1D type definition ------------------------------*/
PyTypeObject GetProjectedYF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedYF1D", /* tp_name */
- sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedYF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedYF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedYF1D", /* tp_name */
+ sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetProjectedYF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetProjectedYF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 dfe7cd82710..cfa06f9d8fd 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
@@ -55,8 +55,8 @@ static char GetProjectedZF1D___doc__[] =
static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -70,43 +70,47 @@ static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedZF1D type definition ------------------------------*/
PyTypeObject GetProjectedZF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedZF1D", /* tp_name */
- sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetProjectedZF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetProjectedZF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetProjectedZF1D", /* tp_name */
+ sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetProjectedZF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetProjectedZF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 a1ed9d15d5e..985e10f2b83 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
@@ -68,8 +68,8 @@ static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensity
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
+ PyObject *obj = nullptr;
int i;
float f = 2.0;
@@ -85,43 +85,47 @@ static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensity
/*-----------------------BPy_GetSteerableViewMapDensityF1D type definition ----------------------*/
PyTypeObject GetSteerableViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetSteerableViewMapDensityF1D", /* tp_name */
- sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetSteerableViewMapDensityF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetSteerableViewMapDensityF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetSteerableViewMapDensityF1D", /* tp_name */
+ sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetSteerableViewMapDensityF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetSteerableViewMapDensityF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 268d140749d..441ea2f5833 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
@@ -68,8 +68,8 @@ static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *sel
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
+ PyObject *obj = nullptr;
int i;
float f = 2.0;
@@ -85,43 +85,47 @@ static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *sel
/*-----------------------BPy_GetViewMapGradientNormF1D type definition --------------------------*/
PyTypeObject GetViewMapGradientNormF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetViewMapGradientNormF1D", /* tp_name */
- sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetViewMapGradientNormF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetViewMapGradientNormF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetViewMapGradientNormF1D", /* tp_name */
+ sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetViewMapGradientNormF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetViewMapGradientNormF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 5a0b7d6aa55..716cfbfe37a 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
@@ -55,8 +55,8 @@ static char GetXF1D___doc__[] =
static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -70,43 +70,47 @@ static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetXF1D type definition ------------------------------*/
PyTypeObject GetXF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetXF1D", /* tp_name */
- sizeof(BPy_GetXF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetXF1D", /* tp_name */
+ sizeof(BPy_GetXF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
GetXF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
&UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)GetXF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 9b523126841..693c2453db2 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
@@ -55,8 +55,8 @@ static char GetYF1D___doc__[] =
static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -69,43 +69,47 @@ static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetYF1D type definition ------------------------------*/
PyTypeObject GetYF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetYF1D", /* tp_name */
- sizeof(BPy_GetYF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetYF1D", /* tp_name */
+ sizeof(BPy_GetYF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
GetYF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
&UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)GetYF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 73407affd8d..e9030625b10 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
@@ -55,8 +55,8 @@ static char GetZF1D___doc__[] =
static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -70,43 +70,47 @@ static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_GetZF1D type definition ------------------------------*/
PyTypeObject GetZF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetZF1D", /* tp_name */
- sizeof(BPy_GetZF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetZF1D", /* tp_name */
+ sizeof(BPy_GetZF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
GetZF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
&UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
0, /* tp_dictoffset */
(initproc)GetZF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 aef67aab928..4ae2cd054e2 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
@@ -64,8 +64,8 @@ static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"sigma", "integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"sigma", "integration_type", nullptr};
+ PyObject *obj = nullptr;
double d;
if (!PyArg_ParseTupleAndKeywords(
@@ -80,43 +80,47 @@ static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self,
/*-----------------------BPy_LocalAverageDepthF1D type definition ------------------------------*/
PyTypeObject LocalAverageDepthF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "LocalAverageDepthF1D", /* tp_name */
- sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- LocalAverageDepthF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)LocalAverageDepthF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "LocalAverageDepthF1D", /* tp_name */
+ sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ LocalAverageDepthF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)LocalAverageDepthF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 cf2162c30ad..9feb07552ca 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
@@ -59,8 +59,8 @@ static char ZDiscontinuityF1D___doc__[] =
static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -74,43 +74,47 @@ static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *arg
/*-----------------------BPy_ZDiscontinuityF1D type definition ------------------------------*/
PyTypeObject ZDiscontinuityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ZDiscontinuityF1D", /* tp_name */
- sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ZDiscontinuityF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DDouble_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ZDiscontinuityF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ZDiscontinuityF1D", /* tp_name */
+ sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ZDiscontinuityF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DDouble_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ZDiscontinuityF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 f843ff52d06..400b5a95fcf 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
@@ -61,8 +61,8 @@ static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"integration_type", NULL};
- PyObject *obj = 0;
+ static const char *kwlist[] = {"integration_type", nullptr};
+ PyObject *obj = nullptr;
if (!PyArg_ParseTupleAndKeywords(
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
@@ -76,43 +76,47 @@ static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D
/*-----------------------BPy_QuantitativeInvisibilityF1D type definition ------------------------*/
PyTypeObject QuantitativeInvisibilityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "QuantitativeInvisibilityF1D", /* tp_name */
- sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- QuantitativeInvisibilityF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DUnsigned_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)QuantitativeInvisibilityF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "QuantitativeInvisibilityF1D", /* tp_name */
+ sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ QuantitativeInvisibilityF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DUnsigned_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)QuantitativeInvisibilityF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 f56d89c469a..7637153017f 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
@@ -51,7 +51,7 @@ static char GetOccludeeF1D___doc__[] =
static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D *self, PyObject *args, PyO
/*-----------------------BPy_GetOccludeeF1D type definition ------------------------------*/
PyTypeObject GetOccludeeF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetOccludeeF1D", /* tp_name */
- sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetOccludeeF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVectorViewShape_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetOccludeeF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetOccludeeF1D", /* tp_name */
+ sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetOccludeeF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVectorViewShape_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetOccludeeF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 3ff4d36bc19..d532268b294 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
@@ -51,7 +51,7 @@ static char GetOccludersF1D___doc__[] =
static int GetOccludersF1D___init__(BPy_GetOccludersF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetOccludersF1D___init__(BPy_GetOccludersF1D *self, PyObject *args, P
/*-----------------------BPy_GetOccludersF1D type definition ------------------------------*/
PyTypeObject GetOccludersF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetOccludersF1D", /* tp_name */
- sizeof(BPy_GetOccludersF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetOccludersF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVectorViewShape_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetOccludersF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetOccludersF1D", /* tp_name */
+ sizeof(BPy_GetOccludersF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetOccludersF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVectorViewShape_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetOccludersF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 08122b76385..dd1492e940e 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
@@ -51,7 +51,7 @@ static char GetShapeF1D___doc__[] =
static int GetShapeF1D___init__(BPy_GetShapeF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int GetShapeF1D___init__(BPy_GetShapeF1D *self, PyObject *args, PyObject
/*-----------------------BPy_GetShapeF1D type definition ------------------------------*/
PyTypeObject GetShapeF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetShapeF1D", /* tp_name */
- sizeof(BPy_GetShapeF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- GetShapeF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVectorViewShape_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)GetShapeF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "GetShapeF1D", /* tp_name */
+ sizeof(BPy_GetShapeF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ GetShapeF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVectorViewShape_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)GetShapeF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 4be8f239fd6..c3750734efc 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
@@ -51,7 +51,7 @@ static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self,
/*-----------------------BPy_ChainingTimeStampF1D type definition ------------------------------*/
PyTypeObject ChainingTimeStampF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ChainingTimeStampF1D", /* tp_name */
- sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ChainingTimeStampF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVoid_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ChainingTimeStampF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ChainingTimeStampF1D", /* tp_name */
+ sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ChainingTimeStampF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVoid_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ChainingTimeStampF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 bca4ebb4236..85738684e44 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
@@ -51,7 +51,7 @@ static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStamp
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -63,43 +63,47 @@ static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStamp
/*-----------------------BPy_IncrementChainingTimeStampF1D type definition ----------------------*/
PyTypeObject IncrementChainingTimeStampF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "IncrementChainingTimeStampF1D", /* tp_name */
- sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- IncrementChainingTimeStampF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVoid_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)IncrementChainingTimeStampF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "IncrementChainingTimeStampF1D", /* tp_name */
+ sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ IncrementChainingTimeStampF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVoid_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)IncrementChainingTimeStampF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
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 e2d0c7d1308..1f577820da4 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
@@ -49,7 +49,7 @@ static char TimeStampF1D___doc__[] =
static int TimeStampF1D___init__(BPy_TimeStampF1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -61,43 +61,47 @@ static int TimeStampF1D___init__(BPy_TimeStampF1D *self, PyObject *args, PyObjec
/*-----------------------BPy_TimeStampF1D type definition ------------------------------*/
PyTypeObject TimeStampF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "TimeStampF1D", /* tp_name */
- sizeof(BPy_TimeStampF1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TimeStampF1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryFunction1DVoid_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TimeStampF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "TimeStampF1D", /* tp_name */
+ sizeof(BPy_TimeStampF1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ TimeStampF1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryFunction1DVoid_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)TimeStampF1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
index 1e8aab3b086..227aca2b5c6 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
@@ -42,7 +42,7 @@ static char FalseUP0D___doc__[] =
static int FalseUP0D___init__(BPy_FalseUP0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -54,43 +54,47 @@ static int FalseUP0D___init__(BPy_FalseUP0D *self, PyObject *args, PyObject *kwd
/*-----------------------BPy_FalseUP0D type definition ------------------------------*/
PyTypeObject FalseUP0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "FalseUP0D", /* tp_name */
- sizeof(BPy_FalseUP0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FalseUP0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FalseUP0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "FalseUP0D", /* tp_name */
+ sizeof(BPy_FalseUP0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ FalseUP0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)FalseUP0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
index ca6c7a5b344..5f5c756b28d 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
@@ -42,7 +42,7 @@ static char TrueUP0D___doc__[] =
static int TrueUP0D___init__(BPy_TrueUP0D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -54,43 +54,47 @@ static int TrueUP0D___init__(BPy_TrueUP0D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_TrueUP0D type definition ------------------------------*/
PyTypeObject TrueUP0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "TrueUP0D", /* tp_name */
- sizeof(BPy_TrueUP0D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TrueUP0D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate0D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TrueUP0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "TrueUP0D", /* tp_name */
+ sizeof(BPy_TrueUP0D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ TrueUP0D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate0D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)TrueUP0D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
index 734aa5a0e84..b3f9c225931 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
@@ -43,7 +43,7 @@ static char ContourUP1D___doc__[] =
static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -55,43 +55,47 @@ static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject
/*-----------------------BPy_ContourUP1D type definition ------------------------------*/
PyTypeObject ContourUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ContourUP1D", /* tp_name */
- sizeof(BPy_ContourUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ContourUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ContourUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ContourUP1D", /* tp_name */
+ sizeof(BPy_ContourUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ContourUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ContourUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
index 2044d663e77..f865fe5013d 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
@@ -58,7 +58,7 @@ static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"threshold", "sigma", NULL};
+ static const char *kwlist[] = {"threshold", "sigma", nullptr};
double d1, d2 = 2.0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|d", (char **)kwlist, &d1, &d2)) {
@@ -71,43 +71,47 @@ static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D *self,
/*-----------------------BPy_DensityLowerThanUP1D type definition ------------------------------*/
PyTypeObject DensityLowerThanUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "DensityLowerThanUP1D", /* tp_name */
- sizeof(BPy_DensityLowerThanUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- DensityLowerThanUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)DensityLowerThanUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "DensityLowerThanUP1D", /* tp_name */
+ sizeof(BPy_DensityLowerThanUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ DensityLowerThanUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)DensityLowerThanUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
index c5feec45844..154b44ff81a 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
@@ -53,7 +53,7 @@ static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"ts", NULL};
+ static const char *kwlist[] = {"ts", nullptr};
unsigned u;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &u)) {
@@ -66,43 +66,47 @@ static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1
/*-----------------------BPy_EqualToChainingTimeStampUP1D type definition -----------------------*/
PyTypeObject EqualToChainingTimeStampUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "EqualToChainingTimeStampUP1D", /* tp_name */
- sizeof(BPy_EqualToChainingTimeStampUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- EqualToChainingTimeStampUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)EqualToChainingTimeStampUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "EqualToChainingTimeStampUP1D", /* tp_name */
+ sizeof(BPy_EqualToChainingTimeStampUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ EqualToChainingTimeStampUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)EqualToChainingTimeStampUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
index fd68878dc45..2bb9dbaf484 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
@@ -52,7 +52,7 @@ static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"ts", NULL};
+ static const char *kwlist[] = {"ts", nullptr};
unsigned u;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &u)) {
@@ -65,43 +65,47 @@ static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D *self,
/*-----------------------BPy_EqualToTimeStampUP1D type definition ------------------------------*/
PyTypeObject EqualToTimeStampUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "EqualToTimeStampUP1D", /* tp_name */
- sizeof(BPy_EqualToTimeStampUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- EqualToTimeStampUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)EqualToTimeStampUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "EqualToTimeStampUP1D", /* tp_name */
+ sizeof(BPy_EqualToTimeStampUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ EqualToTimeStampUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)EqualToTimeStampUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
index 3ddadcf2d4f..7b9923d7b6c 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
@@ -47,7 +47,7 @@ static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -59,43 +59,47 @@ static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D *self,
/*-----------------------BPy_ExternalContourUP1D type definition ------------------------------*/
PyTypeObject ExternalContourUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ExternalContourUP1D", /* tp_name */
- sizeof(BPy_ExternalContourUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ExternalContourUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ExternalContourUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ExternalContourUP1D", /* tp_name */
+ sizeof(BPy_ExternalContourUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ExternalContourUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ExternalContourUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
index a93ce638f33..ec1a02e13aa 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
@@ -42,7 +42,7 @@ static char FalseUP1D___doc__[] =
static int FalseUP1D___init__(BPy_FalseUP1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -54,43 +54,47 @@ static int FalseUP1D___init__(BPy_FalseUP1D *self, PyObject *args, PyObject *kwd
/*-----------------------BPy_FalseUP1D type definition ------------------------------*/
PyTypeObject FalseUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "FalseUP1D", /* tp_name */
- sizeof(BPy_FalseUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- FalseUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)FalseUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "FalseUP1D", /* tp_name */
+ sizeof(BPy_FalseUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ FalseUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)FalseUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
index 153fbf56ba8..b9a76f91c21 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
@@ -57,7 +57,7 @@ static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"qi", NULL};
+ static const char *kwlist[] = {"qi", nullptr};
int i = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|i", (char **)kwlist, &i)) {
@@ -70,43 +70,47 @@ static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1
/*-----------------------BPy_QuantitativeInvisibilityUP1D type definition -----------------------*/
PyTypeObject QuantitativeInvisibilityUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "QuantitativeInvisibilityUP1D", /* tp_name */
- sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- QuantitativeInvisibilityUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)QuantitativeInvisibilityUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "QuantitativeInvisibilityUP1D", /* tp_name */
+ sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ QuantitativeInvisibilityUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)QuantitativeInvisibilityUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
index 8a57b3173e5..68f0ea7a913 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
@@ -53,7 +53,7 @@ static char ShapeUP1D___doc__[] =
static int ShapeUP1D___init__(BPy_ShapeUP1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {"first", "second", NULL};
+ static const char *kwlist[] = {"first", "second", nullptr};
unsigned u1, u2 = 0;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "I|I", (char **)kwlist, &u1, &u2)) {
@@ -66,43 +66,47 @@ static int ShapeUP1D___init__(BPy_ShapeUP1D *self, PyObject *args, PyObject *kwd
/*-----------------------BPy_ShapeUP1D type definition ------------------------------*/
PyTypeObject ShapeUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ShapeUP1D", /* tp_name */
- sizeof(BPy_ShapeUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- ShapeUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)ShapeUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "ShapeUP1D", /* tp_name */
+ sizeof(BPy_ShapeUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ ShapeUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)ShapeUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
index 9c1bf4ecd18..362bcc4cea8 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp
@@ -42,7 +42,7 @@ static char TrueUP1D___doc__[] =
static int TrueUP1D___init__(BPy_TrueUP1D *self, PyObject *args, PyObject *kwds)
{
- static const char *kwlist[] = {NULL};
+ static const char *kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
return -1;
@@ -54,43 +54,47 @@ static int TrueUP1D___init__(BPy_TrueUP1D *self, PyObject *args, PyObject *kwds)
/*-----------------------BPy_TrueUP1D type definition ------------------------------*/
PyTypeObject TrueUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "TrueUP1D", /* tp_name */
- sizeof(BPy_TrueUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- TrueUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)TrueUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "TrueUP1D", /* tp_name */
+ sizeof(BPy_TrueUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ TrueUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)TrueUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
index 4fb486f1366..9329e3a7628 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
@@ -53,7 +53,7 @@ static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self,
PyObject *args,
PyObject *kwds)
{
- static const char *kwlist[] = {"xmin", "ymin", "xmax", "ymax", NULL};
+ static const char *kwlist[] = {"xmin", "ymin", "xmax", "ymax", nullptr};
double xmin, ymin, xmax, ymax;
if (!PyArg_ParseTupleAndKeywords(
@@ -67,43 +67,47 @@ static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self,
/*-----------------------BPy_TrueUP1D type definition ------------------------------*/
PyTypeObject WithinImageBoundaryUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "WithinImageBoundaryUP1D", /* tp_name */
- sizeof(BPy_WithinImageBoundaryUP1D), /* tp_basicsize */
- 0, /* tp_itemsize */
- 0, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- WithinImageBoundaryUP1D___doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &UnaryPredicate1D_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)WithinImageBoundaryUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ PyVarObject_HEAD_INIT(nullptr, 0) "WithinImageBoundaryUP1D", /* tp_name */
+ sizeof(BPy_WithinImageBoundaryUP1D), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ nullptr, /* tp_dealloc */
+#if PY_VERSION_HEX >= 0x03080000
+ 0, /* tp_vectorcall_offset */
+#else
+ nullptr, /* tp_print */
+#endif
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* tp_repr */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
+ nullptr, /* tp_call */
+ nullptr, /* tp_str */
+ nullptr, /* tp_getattro */
+ nullptr, /* tp_setattro */
+ nullptr, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ WithinImageBoundaryUP1D___doc__, /* tp_doc */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ nullptr, /* tp_iter */
+ nullptr, /* tp_iternext */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
+ nullptr, /* tp_getset */
+ &UnaryPredicate1D_Type, /* tp_base */
+ nullptr, /* tp_dict */
+ nullptr, /* tp_descr_get */
+ nullptr, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)WithinImageBoundaryUP1D___init__, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
index fe0fc715e34..cc29bc77595 100644
--- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
+++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
@@ -23,27 +23,27 @@
namespace Freestyle {
-IndexedFaceSet::IndexedFaceSet() : Rep()
+IndexedFaceSet::IndexedFaceSet()
{
- _Vertices = NULL;
- _Normals = NULL;
- _FrsMaterials = 0;
- _TexCoords = NULL;
- _FaceEdgeMarks = 0;
+ _Vertices = nullptr;
+ _Normals = nullptr;
+ _FrsMaterials = nullptr;
+ _TexCoords = nullptr;
+ _FaceEdgeMarks = nullptr;
_VSize = 0;
_NSize = 0;
_MSize = 0;
_TSize = 0;
_NumFaces = 0;
- _NumVertexPerFace = NULL;
- _FaceStyle = NULL;
- _VIndices = NULL;
+ _NumVertexPerFace = nullptr;
+ _FaceStyle = nullptr;
+ _VIndices = nullptr;
_VISize = 0;
- _NIndices = NULL;
+ _NIndices = nullptr;
_NISize = 0;
- _MIndices = NULL;
+ _MIndices = nullptr;
_MISize = 0;
- _TIndices = NULL;
+ _TIndices = nullptr;
_TISize = 0;
}
@@ -68,7 +68,6 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
unsigned *iTIndices,
unsigned iTISize,
unsigned iCopy)
- : Rep()
{
if (1 == iCopy) {
_VSize = iVSize;
@@ -80,7 +79,7 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
memcpy(_Normals, iNormals, iNSize * sizeof(float));
_MSize = iMSize;
- _FrsMaterials = 0;
+ _FrsMaterials = nullptr;
if (iMaterials) {
_FrsMaterials = new FrsMaterial *[_MSize];
for (unsigned int i = 0; i < _MSize; ++i) {
@@ -88,7 +87,7 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
}
}
_TSize = iTSize;
- _TexCoords = 0;
+ _TexCoords = nullptr;
if (_TSize) {
_TexCoords = new float[_TSize];
memcpy(_TexCoords, iTexCoords, iTSize * sizeof(float));
@@ -113,13 +112,13 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
memcpy(_NIndices, iNIndices, _NISize * sizeof(unsigned));
_MISize = iMISize;
- _MIndices = 0;
+ _MIndices = nullptr;
if (iMIndices) {
_MIndices = new unsigned[_MISize];
memcpy(_MIndices, iMIndices, _MISize * sizeof(unsigned));
}
_TISize = iTISize;
- _TIndices = 0;
+ _TIndices = nullptr;
if (_TISize) {
_TIndices = new unsigned[_TISize];
memcpy(_TIndices, iTIndices, _TISize * sizeof(unsigned));
@@ -133,7 +132,7 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
_Normals = iNormals;
_MSize = iMSize;
- _FrsMaterials = 0;
+ _FrsMaterials = nullptr;
if (iMaterials) {
_FrsMaterials = iMaterials;
}
@@ -153,7 +152,7 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
_NIndices = iNIndices;
_MISize = iMISize;
- _MIndices = 0;
+ _MIndices = nullptr;
if (iMISize) {
_MIndices = iMIndices;
}
@@ -181,11 +180,11 @@ IndexedFaceSet::IndexedFaceSet(const IndexedFaceSet &iBrother) : Rep(iBrother)
}
}
else {
- _FrsMaterials = 0;
+ _FrsMaterials = nullptr;
}
_TSize = iBrother.tsize();
- _TexCoords = 0;
+ _TexCoords = nullptr;
if (_TSize) {
_TexCoords = new float[_TSize];
memcpy(_TexCoords, iBrother.texCoords(), _TSize * sizeof(float));
@@ -215,11 +214,11 @@ IndexedFaceSet::IndexedFaceSet(const IndexedFaceSet &iBrother) : Rep(iBrother)
memcpy(_MIndices, iBrother.mindices(), _MISize * sizeof(unsigned));
}
else {
- _MIndices = 0;
+ _MIndices = nullptr;
}
_TISize = iBrother.tisize();
- _TIndices = 0;
+ _TIndices = nullptr;
if (_TISize) {
_TIndices = new unsigned[_TISize];
memcpy(_TIndices, iBrother.tindices(), _TISize * sizeof(unsigned));
@@ -228,61 +227,61 @@ IndexedFaceSet::IndexedFaceSet(const IndexedFaceSet &iBrother) : Rep(iBrother)
IndexedFaceSet::~IndexedFaceSet()
{
- if (NULL != _Vertices) {
+ if (nullptr != _Vertices) {
delete[] _Vertices;
- _Vertices = NULL;
+ _Vertices = nullptr;
}
- if (NULL != _Normals) {
+ if (nullptr != _Normals) {
delete[] _Normals;
- _Normals = NULL;
+ _Normals = nullptr;
}
- if (NULL != _FrsMaterials) {
+ if (nullptr != _FrsMaterials) {
for (unsigned int i = 0; i < _MSize; ++i) {
delete _FrsMaterials[i];
}
delete[] _FrsMaterials;
- _FrsMaterials = NULL;
+ _FrsMaterials = nullptr;
}
- if (NULL != _TexCoords) {
+ if (nullptr != _TexCoords) {
delete[] _TexCoords;
- _TexCoords = NULL;
+ _TexCoords = nullptr;
}
- if (NULL != _NumVertexPerFace) {
+ if (nullptr != _NumVertexPerFace) {
delete[] _NumVertexPerFace;
- _NumVertexPerFace = NULL;
+ _NumVertexPerFace = nullptr;
}
- if (NULL != _FaceStyle) {
+ if (nullptr != _FaceStyle) {
delete[] _FaceStyle;
- _FaceStyle = NULL;
+ _FaceStyle = nullptr;
}
- if (NULL != _FaceEdgeMarks) {
+ if (nullptr != _FaceEdgeMarks) {
delete[] _FaceEdgeMarks;
- _FaceEdgeMarks = NULL;
+ _FaceEdgeMarks = nullptr;
}
- if (NULL != _VIndices) {
+ if (nullptr != _VIndices) {
delete[] _VIndices;
- _VIndices = NULL;
+ _VIndices = nullptr;
}
- if (NULL != _NIndices) {
+ if (nullptr != _NIndices) {
delete[] _NIndices;
- _NIndices = NULL;
+ _NIndices = nullptr;
}
- if (NULL != _MIndices) {
+ if (nullptr != _MIndices) {
delete[] _MIndices;
- _MIndices = NULL;
+ _MIndices = nullptr;
}
- if (NULL != _TIndices) {
+ if (nullptr != _TIndices) {
delete[] _TIndices;
- _TIndices = NULL;
+ _TIndices = nullptr;
}
}
diff --git a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
index 4bbb4a6c58a..69c33ea02a1 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
@@ -27,7 +27,7 @@ namespace Freestyle {
void NodeGroup::AddChild(Node *iChild)
{
- if (NULL == iChild) {
+ if (nullptr == iChild) {
return;
}
diff --git a/source/blender/freestyle/intern/scene_graph/NodeLight.cpp b/source/blender/freestyle/intern/scene_graph/NodeLight.cpp
index f6585d9f932..7200ae5e83c 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeLight.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeLight.cpp
@@ -25,7 +25,7 @@ namespace Freestyle {
int NodeLight::numberOfLights = 0;
-NodeLight::NodeLight() : Node()
+NodeLight::NodeLight()
{
if (numberOfLights > 7) {
_number = 7;
diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp b/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp
index 95d4735ddc4..4e0253c88e9 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp
@@ -25,9 +25,7 @@
#include "../view_map/Functions0D.h"
#include "../view_map/SteerableViewMap.h"
-namespace Freestyle {
-
-namespace Functions0D {
+namespace Freestyle::Functions0D {
int DensityF0D::operator()(Interface0DIterator &iter)
{
@@ -114,6 +112,4 @@ int GetViewMapGradientNormF0D::operator()(Interface0DIterator &iter)
return 0;
}
-} // end of namespace Functions0D
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Functions0D
diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
index ef151365fa0..7a516470e6b 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
@@ -24,10 +24,7 @@
#include "../view_map/SteerableViewMap.h"
-namespace Freestyle {
-
-// FIXME
-namespace Functions1D {
+namespace Freestyle::Functions1D {
int GetSteerableViewMapDensityF1D::operator()(Interface1D &inter)
{
@@ -43,7 +40,7 @@ int GetSteerableViewMapDensityF1D::operator()(Interface1D &inter)
Interface0D &i0D = (*it);
Interface0D &i0Dnext = (*itnext);
fe = i0D.getFEdge(i0Dnext);
- if (fe == 0) {
+ if (fe == nullptr) {
cerr << "GetSteerableViewMapDensityF1D warning: no FEdge between " << i0D.getId() << " and "
<< i0Dnext.getId() << endl;
// compute the direction between these two ???
@@ -127,6 +124,4 @@ int GetViewMapGradientNormF1D::operator()(Interface1D &inter)
return 0;
}
-} // namespace Functions1D
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Functions1D
diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
index abe3871c395..7e2dcb8f99f 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
@@ -37,7 +37,6 @@ CalligraphicShader::CalligraphicShader(real iMinThickness,
real iMaxThickness,
const Vec2f &iOrientation,
bool clamp)
- : StrokeShader()
{
_minThickness = iMinThickness;
_maxThickness = iMaxThickness;
@@ -90,7 +89,6 @@ static const unsigned NB_VALUE_NOISE = 512;
SpatialNoiseShader::SpatialNoiseShader(
float iAmount, float ixScale, int nbOctave, bool smooth, bool pureRandom)
- : StrokeShader()
{
_amount = iAmount;
if (ixScale == 0) {
@@ -169,7 +167,6 @@ SmoothingShader::SmoothingShader(int iNbIteration,
real iAnisoNormal,
real iAnisoCurvature,
real iCarricatureFactor)
- : StrokeShader()
{
_nbIterations = iNbIteration;
_factorCurvature = ifactorCurvature;
diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
index 36234ad619c..335bfdffe90 100644
--- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
@@ -40,9 +40,7 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-namespace Freestyle {
-
-namespace StrokeShaders {
+namespace Freestyle::StrokeShaders {
//
// Thickness modifiers
@@ -170,13 +168,13 @@ int LengthDependingThicknessShader::shade(Stroke &stroke) const
static const unsigned NB_VALUE_NOISE = 512;
-ThicknessNoiseShader::ThicknessNoiseShader() : StrokeShader()
+ThicknessNoiseShader::ThicknessNoiseShader()
{
_amplitude = 1.0f;
_scale = 1.0f / 2.0f / (float)NB_VALUE_NOISE;
}
-ThicknessNoiseShader::ThicknessNoiseShader(float iAmplitude, float iPeriod) : StrokeShader()
+ThicknessNoiseShader::ThicknessNoiseShader(float iAmplitude, float iPeriod)
{
_amplitude = iAmplitude;
_scale = 1.0f / iPeriod / (float)NB_VALUE_NOISE;
@@ -256,13 +254,13 @@ int MaterialColorShader::shade(Stroke &stroke) const
return 0;
}
-ColorNoiseShader::ColorNoiseShader() : StrokeShader()
+ColorNoiseShader::ColorNoiseShader()
{
_amplitude = 1.0f;
_scale = 1.0f / 2.0f / (float)NB_VALUE_NOISE;
}
-ColorNoiseShader::ColorNoiseShader(float iAmplitude, float iPeriod) : StrokeShader()
+ColorNoiseShader::ColorNoiseShader(float iAmplitude, float iPeriod)
{
_amplitude = iAmplitude;
_scale = 1.0f / iPeriod / (float)NB_VALUE_NOISE;
@@ -384,13 +382,13 @@ int BezierCurveShader::shade(Stroke &stroke) const
// Build the Bezier curve from this set of data points:
vector<Vec2d> data;
StrokeInternal::StrokeVertexIterator v = stroke.strokeVerticesBegin(), vend;
- data.push_back(Vec2d(v->x(), v->y())); // first one
+ data.emplace_back(v->x(), v->y()); // first one
StrokeInternal::StrokeVertexIterator previous = v;
++v;
for (vend = stroke.strokeVerticesEnd(); v != vend; ++v) {
if (!((fabs(v->x() - (previous)->x()) < M_EPSILON) &&
((fabs(v->y() - (previous)->y()) < M_EPSILON)))) {
- data.push_back(Vec2d(v->x(), v->y()));
+ data.emplace_back(v->x(), v->y());
}
previous = v;
}
@@ -646,7 +644,7 @@ int GuidingLinesShader::shade(Stroke &stroke) const
//
/////////////////////////////////////////
-TipRemoverShader::TipRemoverShader(real tipLength) : StrokeShader()
+TipRemoverShader::TipRemoverShader(real tipLength)
{
_tipLength = tipLength;
}
@@ -697,6 +695,4 @@ int TipRemoverShader::shade(Stroke &stroke) const
return 0;
}
-} // end of namespace StrokeShaders
-
-} /* namespace Freestyle */
+} // namespace Freestyle::StrokeShaders
diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h
index 8663cfd42bf..0ac0aa09cf9 100644
--- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h
+++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h
@@ -56,7 +56,7 @@ class ConstantThicknessShader : public StrokeShader {
* \param thickness:
* The thickness that must be assigned to the stroke.
*/
- ConstantThicknessShader(float thickness) : StrokeShader()
+ ConstantThicknessShader(float thickness)
{
_thickness = thickness;
}
@@ -86,7 +86,7 @@ class ConstantThicknessShader : public StrokeShader {
*/
class ConstantExternThicknessShader : public StrokeShader {
public:
- ConstantExternThicknessShader(float thickness) : StrokeShader()
+ ConstantExternThicknessShader(float thickness)
{
_thickness = thickness;
}
@@ -120,7 +120,7 @@ class IncreasingThicknessShader : public StrokeShader {
* \param iThicknessMax:
* The second thickness value.
*/
- IncreasingThicknessShader(float iThicknessMin, float iThicknessMax) : StrokeShader()
+ IncreasingThicknessShader(float iThicknessMin, float iThicknessMax)
{
_ThicknessMin = iThicknessMin;
_ThicknessMax = iThicknessMax;
@@ -164,7 +164,7 @@ class ConstrainedIncreasingThicknessShader : public StrokeShader {
* The ration thickness/length we don't want to exceed.
*/
ConstrainedIncreasingThicknessShader(float iThicknessMin, float iThicknessMax, float iRatio)
- : StrokeShader()
+
{
_ThicknessMin = iThicknessMin;
_ThicknessMax = iThicknessMax;
@@ -199,7 +199,7 @@ class LengthDependingThicknessShader : public StrokeShader {
// l < 50
public:
- LengthDependingThicknessShader(float iMinThickness, float iMaxThickness) : StrokeShader()
+ LengthDependingThicknessShader(float iMinThickness, float iMaxThickness)
{
_minThickness = iMinThickness;
_maxThickness = iMaxThickness;
@@ -265,7 +265,7 @@ class ConstantColorShader : public StrokeShader {
* \param iAlpha:
* The alpha value
*/
- ConstantColorShader(float iR, float iG, float iB, float iAlpha = 1.0f) : StrokeShader()
+ ConstantColorShader(float iR, float iG, float iB, float iAlpha = 1.0f)
{
_color[0] = iR;
_color[1] = iG;
@@ -322,7 +322,7 @@ class IncreasingColorShader : public StrokeShader {
float iGM,
float iBM,
float iAlphaM)
- : StrokeShader()
+
{
_colorMin[0] = iRm;
_colorMin[1] = iGm;
@@ -353,7 +353,7 @@ class MaterialColorShader : public StrokeShader {
float _coefficient;
public:
- MaterialColorShader(float coeff = 1.0f) : StrokeShader()
+ MaterialColorShader(float coeff = 1.0f)
{
_coefficient = coeff;
}
@@ -411,7 +411,7 @@ class BackboneStretcherShader : public StrokeShader {
* \param iAmount:
* The stretching amount value.
*/
- BackboneStretcherShader(float iAmount = 2.0f) : StrokeShader()
+ BackboneStretcherShader(float iAmount = 2.0f)
{
_amount = iAmount;
}
@@ -438,7 +438,7 @@ class SamplingShader : public StrokeShader {
* \param sampling:
* The sampling to use for the stroke resampling
*/
- SamplingShader(float sampling) : StrokeShader()
+ SamplingShader(float sampling)
{
_sampling = sampling;
}
@@ -457,7 +457,7 @@ class ExternalContourStretcherShader : public StrokeShader {
float _amount;
public:
- ExternalContourStretcherShader(float iAmount = 2.0f) : StrokeShader()
+ ExternalContourStretcherShader(float iAmount = 2.0f)
{
_amount = iAmount;
}
@@ -486,7 +486,7 @@ class BezierCurveShader : public StrokeShader {
* The error we're allowing for the approximation.
* This error is the max distance allowed between the new curve and the original geometry.
*/
- BezierCurveShader(float error = 4.0) : StrokeShader()
+ BezierCurveShader(float error = 4.0)
{
_error = error;
}
@@ -517,7 +517,7 @@ class PolygonalizationShader : public StrokeShader {
* geometry. The smaller, the closer the new stroke to the original one.
* This error corresponds * to the maximum distance between the new stroke and the old one.
*/
- PolygonalizationShader(float iError) : StrokeShader()
+ PolygonalizationShader(float iError)
{
_error = iError;
}
@@ -548,7 +548,7 @@ class GuidingLinesShader : public StrokeShader {
* "bbox". iOffset is the value of the displacement which is applied to this line along its
* normal.
*/
- GuidingLinesShader(float iOffset) : StrokeShader()
+ GuidingLinesShader(float iOffset)
{
_offset = iOffset;
}
@@ -604,7 +604,7 @@ class BlenderTextureShader : public StrokeShader {
* \param mtex:
* The blender texture to use.
*/
- BlenderTextureShader(MTex *mtex) : StrokeShader()
+ BlenderTextureShader(MTex *mtex)
{
_mtex = mtex;
_nodeTree = NULL;
@@ -614,7 +614,7 @@ class BlenderTextureShader : public StrokeShader {
* \param nodetree:
* A node tree (of new shading nodes) to define textures.
*/
- BlenderTextureShader(bNodeTree *nodetree) : StrokeShader()
+ BlenderTextureShader(bNodeTree *nodetree)
{
_nodeTree = nodetree;
_mtex = NULL;
@@ -642,7 +642,7 @@ class StrokeTextureStepShader : public StrokeShader {
* \param id:
* The number of the preset to use.
*/
- StrokeTextureStepShader(float step) : StrokeShader()
+ StrokeTextureStepShader(float step)
{
_step = step;
}
diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp
index 14c74c0f127..dc1a6fac4a9 100644
--- a/source/blender/freestyle/intern/stroke/Canvas.cpp
+++ b/source/blender/freestyle/intern/stroke/Canvas.cpp
@@ -48,17 +48,17 @@ using namespace std;
namespace Freestyle {
-Canvas *Canvas::_pInstance = 0;
+Canvas *Canvas::_pInstance = nullptr;
-const char *Canvas::_MapsPath = 0;
+const char *Canvas::_MapsPath = nullptr;
Canvas::Canvas()
{
- _SelectedFEdge = 0;
+ _SelectedFEdge = nullptr;
_pInstance = this;
PseudoNoise::init(42);
- _Renderer = 0;
- _current_sm = NULL;
+ _Renderer = nullptr;
+ _current_sm = nullptr;
_steerableViewMap = new SteerableViewMap(NB_STEERABLE_VIEWMAP - 1);
_basic = false;
}
@@ -76,12 +76,12 @@ Canvas::Canvas(const Canvas &iBrother)
Canvas::~Canvas()
{
- _pInstance = 0;
+ _pInstance = nullptr;
Clear();
if (_Renderer) {
delete _Renderer;
- _Renderer = 0;
+ _Renderer = nullptr;
}
// FIXME: think about an easy control for the maps memory management...
if (!_maps.empty()) {
@@ -347,8 +347,8 @@ void Canvas::loadMap(const char *iFileName,
qimg = &newMap;
#endif
/* OCIO_TODO: support different input color space */
- ImBuf *qimg = IMB_loadiffname(filePath.c_str(), 0, NULL);
- if (qimg == 0) {
+ ImBuf *qimg = IMB_loadiffname(filePath.c_str(), 0, nullptr);
+ if (qimg == nullptr) {
cerr << "Could not load image file " << filePath << endl;
return;
}
diff --git a/source/blender/freestyle/intern/stroke/Chain.cpp b/source/blender/freestyle/intern/stroke/Chain.cpp
index 562ca32be78..4a0f31bc910 100644
--- a/source/blender/freestyle/intern/stroke/Chain.cpp
+++ b/source/blender/freestyle/intern/stroke/Chain.cpp
@@ -53,7 +53,7 @@ void Chain::push_viewedge_back(ViewEdge *iViewEdge, bool orientation)
}
// Ensure the continuity of underlying FEdges
CurvePoint *cp =
- _Vertices.back(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.f);
+ _Vertices.back(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.0f);
SVertex *sv_first = (*vfirst);
FEdge *fe = _fedgeB->duplicate();
fe->setTemporary(true);
@@ -117,7 +117,7 @@ void Chain::push_viewedge_front(ViewEdge *iViewEdge, bool orientation)
}
// Ensure the continuity of underlying FEdges
CurvePoint *cp =
- _Vertices.front(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.f);
+ _Vertices.front(); // assumed to be instantiated as new CurvePoint(iSVertex, 0, 0.0f);
SVertex *sv_last = cp->A();
SVertex *sv_curr = (*v);
FEdge *fe = (orientation) ? iViewEdge->fedgeA() : iViewEdge->fedgeB();
diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.cpp b/source/blender/freestyle/intern/stroke/ChainingIterators.cpp
index 2b2ab0dc14a..51c04c8346e 100644
--- a/source/blender/freestyle/intern/stroke/ChainingIterators.cpp
+++ b/source/blender/freestyle/intern/stroke/ChainingIterators.cpp
@@ -76,19 +76,19 @@ int ChainingIterator::increment()
_increment = true;
ViewVertex *vertex = getVertex();
if (!vertex) {
- _edge = 0;
+ _edge = nullptr;
return 0;
}
AdjacencyIterator it = AdjacencyIterator(vertex, _restrictToSelection, _restrictToUnvisited);
if (it.isEnd()) {
- _edge = 0;
+ _edge = nullptr;
return 0;
}
if (traverse(it) < 0) {
return -1;
}
_edge = result;
- if (_edge == 0) {
+ if (_edge == nullptr) {
return 0;
}
if (_edge->A() == vertex) {
@@ -105,19 +105,19 @@ int ChainingIterator::decrement()
_increment = false;
ViewVertex *vertex = getVertex();
if (!vertex) {
- _edge = 0;
+ _edge = nullptr;
return 0;
}
AdjacencyIterator it = AdjacencyIterator(vertex, _restrictToSelection, _restrictToUnvisited);
if (it.isEnd()) {
- _edge = 0;
+ _edge = nullptr;
return 0;
}
if (traverse(it) < 0) {
return -1;
}
_edge = result;
- if (_edge == 0) {
+ if (_edge == nullptr) {
return 0;
}
if (_edge->B() == vertex) {
@@ -150,12 +150,12 @@ int ChainSilhouetteIterator::traverse(const AdjacencyIterator &ait)
}
++it;
}
- result = 0;
+ result = nullptr;
return 0;
}
if (nextVertex->getNature() & Nature::NON_T_VERTEX) {
// soc NonTVertex *nontvertex = (NonTVertex*)nextVertex;
- ViewEdge *newEdge(0);
+ ViewEdge *newEdge(nullptr);
// we'll try to chain the edges by keeping the same nature...
// the preseance order is : SILHOUETTE, BORDER, CREASE, MATERIAL_BOUNDARY, EDGE_MARK,
// SUGGESTIVE, VALLEY, RIDGE
@@ -185,13 +185,13 @@ int ChainSilhouetteIterator::traverse(const AdjacencyIterator &ait)
result = newEdge;
}
else {
- result = 0;
+ result = nullptr;
}
return 0;
}
}
}
- result = 0;
+ result = nullptr;
return 0;
}
@@ -218,7 +218,7 @@ int ChainPredicateIterator::traverse(const AdjacencyIterator &ait)
}
++it;
}
- result = 0;
+ result = nullptr;
return 0;
}
diff --git a/source/blender/freestyle/intern/stroke/ContextFunctions.cpp b/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
index 5609013a417..c6140f463ab 100644
--- a/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
+++ b/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
@@ -26,9 +26,7 @@
#include "../system/TimeStamp.h"
-namespace Freestyle {
-
-namespace ContextFunctions {
+namespace Freestyle::ContextFunctions {
unsigned GetTimeStampCF()
{
@@ -78,6 +76,4 @@ FEdge *GetSelectedFEdgeCF()
return Canvas::getInstance()->selectedFEdge();
}
-} // namespace ContextFunctions
-
-} /* namespace Freestyle */
+} // namespace Freestyle::ContextFunctions
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index 7129a35ffdb..c3dac81477d 100644
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -40,8 +40,8 @@ namespace Freestyle {
CurvePoint::CurvePoint()
{
- __A = 0;
- __B = 0;
+ __A = nullptr;
+ __B = nullptr;
_t2d = 0;
}
@@ -50,11 +50,11 @@ CurvePoint::CurvePoint(SVertex *iA, SVertex *iB, float t)
__A = iA;
__B = iB;
_t2d = t;
- if ((iA == 0) && (t == 1.0f)) {
+ if ((iA == nullptr) && (t == 1.0f)) {
_Point2d = __B->point2d();
_Point3d = __B->point3d();
}
- else if ((iB == 0) && (t == 0.0f)) {
+ else if ((iB == nullptr) && (t == 0.0f)) {
_Point2d = __A->point2d();
_Point3d = __A->point3d();
}
@@ -66,17 +66,17 @@ CurvePoint::CurvePoint(SVertex *iA, SVertex *iB, float t)
CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)
{
- __A = 0;
- __B = 0;
+ __A = nullptr;
+ __B = nullptr;
float t1 = iA->t2d();
float t2 = iB->t2d();
- if ((iA->A() == iB->A()) && (iA->B() == iB->B()) && (iA->A() != 0) && (iA->B() != 0) &&
- (iB->A() != 0) && (iB->B() != 0)) {
+ if ((iA->A() == iB->A()) && (iA->B() == iB->B()) && (iA->A() != nullptr) &&
+ (iA->B() != nullptr) && (iB->A() != nullptr) && (iB->B() != nullptr)) {
__A = iA->A();
__B = iB->B();
_t2d = t1 + t2 * t3 - t1 * t3;
}
- else if ((iA->B() == 0) && (iB->B() == 0)) {
+ else if ((iA->B() == nullptr) && (iB->B() == nullptr)) {
__A = iA->A();
__B = iB->A();
_t2d = t3;
@@ -133,15 +133,15 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)
_t2d = t2 * t3;
}
}
- else if (iA->A() != 0 && iB->A() != 0 &&
+ else if (iA->A() != nullptr && iB->A() != nullptr &&
(iA->A()->point3d() - iB->A()->point3d()).norm() < 1.0e-6) {
goto iA_A_eq_iB_A;
}
- else if (iA->B() != 0 && iB->B() != 0 &&
+ else if (iA->B() != nullptr && iB->B() != nullptr &&
(iA->B()->point3d() - iB->B()->point3d()).norm() < 1.0e-6) {
goto iA_B_eq_iB_B;
}
- else if (iA->B() != 0 && iB->A() != 0 &&
+ else if (iA->B() != nullptr && iB->A() != nullptr &&
(iA->B()->point3d() - iB->A()->point3d()).norm() < 1.0e-6) {
goto iA_B_eq_iB_A;
}
@@ -162,7 +162,7 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)
cerr << "Fatal error in CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)"
<< endl;
}
- BLI_assert(__A != 0 && __B != 0);
+ BLI_assert(__A != nullptr && __B != nullptr);
#if 0
_Point2d = __A->point2d() + _t2d * (__B->point2d() - __A->point2d());
@@ -195,7 +195,7 @@ CurvePoint &CurvePoint::operator=(const CurvePoint &iBrother)
FEdge *CurvePoint::fedge()
{
if (getNature() & Nature::T_VERTEX) {
- return 0;
+ return nullptr;
}
return __A->fedge();
}
@@ -206,14 +206,14 @@ FEdge *CurvePoint::getFEdge(Interface0D &inter)
if (!iVertexB) {
cerr << "Warning: CurvePoint::getFEdge() failed to cast the given 0D element to CurvePoint."
<< endl;
- return 0;
+ return nullptr;
}
if (((__A == iVertexB->__A) && (__B == iVertexB->__B)) ||
((__A == iVertexB->__B) && (__B == iVertexB->__A))) {
return __A->getFEdge(*__B);
}
- if (__B == 0) {
- if (iVertexB->__B == 0) {
+ if (__B == nullptr) {
+ if (iVertexB->__B == nullptr) {
return __A->getFEdge(*(iVertexB->__A));
}
if (iVertexB->__A == __A) {
@@ -223,7 +223,7 @@ FEdge *CurvePoint::getFEdge(Interface0D &inter)
return __A->getFEdge(*(iVertexB->__A));
}
}
- if (iVertexB->__B == 0) {
+ if (iVertexB->__B == nullptr) {
if (iVertexB->__A == __A) {
return __B->getFEdge(*(iVertexB->__A));
}
@@ -284,15 +284,15 @@ FEdge *CurvePoint::getFEdge(Interface0D &inter)
#endif
cerr << "Warning: CurvePoint::getFEdge() failed." << endl;
- return NULL;
+ return nullptr;
}
Vec3r CurvePoint::normal() const
{
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->normal();
}
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->normal();
}
Vec3r Na = __A->normal();
@@ -328,7 +328,7 @@ Id CurvePoint::shape_id() const
const SShape *CurvePoint::shape() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->shape();
}
return __A->shape();
@@ -357,10 +357,10 @@ const unsigned CurvePoint::qi() const
occluder_container::const_iterator CurvePoint::occluders_begin() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->occluders_begin();
}
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->occluders_begin();
}
return __A->getFEdge(*__B)->occluders_begin();
@@ -368,10 +368,10 @@ occluder_container::const_iterator CurvePoint::occluders_begin() const
occluder_container::const_iterator CurvePoint::occluders_end() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->occluders_end();
}
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->occluders_end();
}
return __A->getFEdge(*__B)->occluders_end();
@@ -379,10 +379,10 @@ occluder_container::const_iterator CurvePoint::occluders_end() const
bool CurvePoint::occluders_empty() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->occluders_empty();
}
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->occluders_empty();
}
return __A->getFEdge(*__B)->occluders_empty();
@@ -390,10 +390,10 @@ bool CurvePoint::occluders_empty() const
int CurvePoint::occluders_size() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->occluders_size();
}
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->occluders_size();
}
return __A->getFEdge(*__B)->occluders_size();
@@ -401,10 +401,10 @@ int CurvePoint::occluders_size() const
const SShape *CurvePoint::occluded_shape() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->occluded_shape();
}
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->occluded_shape();
}
return __A->getFEdge(*__B)->occluded_shape();
@@ -412,10 +412,10 @@ const SShape *CurvePoint::occluded_shape() const
const Polygon3r &CurvePoint::occludee() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->occludee();
}
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->occludee();
}
return __A->getFEdge(*__B)->occludee();
@@ -423,10 +423,10 @@ const Polygon3r &CurvePoint::occludee() const
bool CurvePoint::occludee_empty() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->occludee_empty();
}
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->occludee_empty();
}
return __A->getFEdge(*__B)->occludee_empty();
@@ -434,13 +434,13 @@ bool CurvePoint::occludee_empty() const
real CurvePoint::z_discontinuity() const
{
- if (__A == 0) {
+ if (__A == nullptr) {
return __B->z_discontinuity();
}
- if (__B == 0) {
+ if (__B == nullptr) {
return __A->z_discontinuity();
}
- if (__A->getFEdge(*__B) == 0) {
+ if (__A->getFEdge(*__B) == nullptr) {
return 0.0;
}
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index 25954c7ecbf..c73bb739e47 100644
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -34,7 +34,7 @@ namespace Freestyle {
Operators::I1DContainer Operators::_current_view_edges_set;
Operators::I1DContainer Operators::_current_chains_set;
-Operators::I1DContainer *Operators::_current_set = NULL;
+Operators::I1DContainer *Operators::_current_set = nullptr;
Operators::StrokesContainer Operators::_current_strokes_set;
int Operators::select(UnaryPredicate1D &pred)
@@ -656,7 +656,7 @@ int Operators::sequentialSplit(UnaryPredicate0D &startingPred,
goto error;
}
} while (!startingPred.result);
- } while ((itStart != end) && (itStart != last));
+ } while (!ELEM(itStart, end, last));
}
// Update the current set of chains:
@@ -738,7 +738,7 @@ static int __recursiveSplit(Chain *_curve,
// retrieves the current splitting id
Id *newId = _curve->getSplittingId();
- if (newId == 0) {
+ if (newId == nullptr) {
newId = new Id(_curve->getId());
_curve->setSplittingId(newId);
}
@@ -810,7 +810,7 @@ int Operators::recursiveSplit(UnaryFunction0D<double> &func,
return 0;
}
- Chain *currentChain = 0;
+ Chain *currentChain = nullptr;
I1DContainer splitted_chains;
I1DContainer newChains;
I1DContainer::iterator cit = _current_chains_set.begin(), citend = _current_chains_set.end();
@@ -885,7 +885,7 @@ static int __recursiveSplit(Chain *_curve,
#endif
real _min = FLT_MAX;
++it;
- real mean = 0.f;
+ real mean = 0.0f;
// soc unused - real variance = 0.0f;
unsigned count = 0;
CurveInternal::CurvePointIterator next = it;
@@ -921,7 +921,7 @@ static int __recursiveSplit(Chain *_curve,
// retrieves the current splitting id
Id *newId = _curve->getSplittingId();
- if (newId == NULL) {
+ if (newId == nullptr) {
newId = new Id(_curve->getId());
_curve->setSplittingId(newId);
}
@@ -994,7 +994,7 @@ int Operators::recursiveSplit(UnaryFunction0D<double> &func,
return 0;
}
- Chain *currentChain = 0;
+ Chain *currentChain = nullptr;
I1DContainer splitted_chains;
I1DContainer newChains;
I1DContainer::iterator cit = _current_chains_set.begin(), citend = _current_chains_set.end();
@@ -1095,7 +1095,7 @@ static Stroke *createStroke(Interface1D &inter)
Vec2r previous = current;
SVertex *sv;
CurvePoint *cp;
- StrokeVertex *stroke_vertex = NULL;
+ StrokeVertex *stroke_vertex = nullptr;
bool hasSingularity = false;
do {
@@ -1122,7 +1122,7 @@ static Stroke *createStroke(Interface1D &inter)
stroke->push_back(stroke_vertex);
previous = current;
++it;
- } while ((it != itend) && (it != itfirst));
+ } while (!ELEM(it, itend, itfirst));
if (it == itfirst) {
// Add last vertex:
@@ -1152,7 +1152,7 @@ static Stroke *createStroke(Interface1D &inter)
// Discard the stroke if the number of stroke vertices is less than two
if (stroke->strokeVerticesSize() < 2) {
delete stroke;
- return NULL;
+ return nullptr;
}
stroke->setLength(currentCurvilignAbscissa);
if (hasSingularity) {
@@ -1198,7 +1198,7 @@ static Stroke *createStroke(Interface1D &inter)
else {
// Discard the stroke because all stroke vertices are overlapping
delete stroke;
- return NULL;
+ return nullptr;
}
current = overlapping_vertices.front()->getPoint();
Vec2r dir(target - current);
diff --git a/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp b/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
index c2c263696bc..0e3fea3ddf8 100644
--- a/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
@@ -24,7 +24,7 @@
namespace Freestyle {
-PSStrokeRenderer::PSStrokeRenderer(const char *iFileName) : StrokeRenderer()
+PSStrokeRenderer::PSStrokeRenderer(const char *iFileName)
{
if (!iFileName) {
iFileName = "freestyle.ps";
diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp
index aa87dc473e2..79eb37ae870 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.cpp
+++ b/source/blender/freestyle/intern/stroke/Stroke.cpp
@@ -47,9 +47,9 @@ StrokeAttribute::StrokeAttribute()
_color[i] = 0.2f;
}
_color[0] = 0.8f;
- _userAttributesReal = NULL;
- _userAttributesVec2f = NULL;
- _userAttributesVec3f = NULL;
+ _userAttributesReal = nullptr;
+ _userAttributesVec2f = nullptr;
+ _userAttributesVec3f = nullptr;
_visible = true;
}
@@ -66,19 +66,19 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute &iBrother)
_userAttributesReal = new realMap(*iBrother._userAttributesReal);
}
else {
- _userAttributesReal = NULL;
+ _userAttributesReal = nullptr;
}
if (iBrother._userAttributesVec2f) {
_userAttributesVec2f = new Vec2fMap(*iBrother._userAttributesVec2f);
}
else {
- _userAttributesVec2f = NULL;
+ _userAttributesVec2f = nullptr;
}
if (iBrother._userAttributesVec3f) {
_userAttributesVec3f = new Vec3fMap(*iBrother._userAttributesVec3f);
}
else {
- _userAttributesVec3f = NULL;
+ _userAttributesVec3f = nullptr;
}
}
@@ -100,9 +100,9 @@ StrokeAttribute::StrokeAttribute(float iRColor,
_visible = true;
- _userAttributesReal = NULL;
- _userAttributesVec2f = NULL;
- _userAttributesVec3f = NULL;
+ _userAttributesReal = nullptr;
+ _userAttributesVec2f = nullptr;
+ _userAttributesVec3f = nullptr;
}
StrokeAttribute::StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribute &a2, float t)
@@ -129,7 +129,7 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribut
}
}
else {
- _userAttributesReal = NULL;
+ _userAttributesReal = nullptr;
}
if ((a1._userAttributesVec2f) && (a2._userAttributesVec2f)) {
if (a1._userAttributesVec2f->size() == a2._userAttributesVec2f->size()) {
@@ -143,7 +143,7 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribut
}
}
else {
- _userAttributesVec2f = NULL;
+ _userAttributesVec2f = nullptr;
}
if ((a1._userAttributesVec3f) && (a2._userAttributesVec3f)) {
if (a1._userAttributesVec3f->size() == a2._userAttributesVec3f->size()) {
@@ -157,7 +157,7 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribut
}
}
else {
- _userAttributesVec3f = NULL;
+ _userAttributesVec3f = nullptr;
}
}
@@ -194,7 +194,7 @@ StrokeAttribute &StrokeAttribute::operator=(const StrokeAttribute &iBrother)
_userAttributesReal = new realMap(*(iBrother._userAttributesReal));
}
else {
- _userAttributesReal = NULL;
+ _userAttributesReal = nullptr;
}
if (iBrother._userAttributesVec2f) {
if (!_userAttributesVec2f) {
@@ -203,7 +203,7 @@ StrokeAttribute &StrokeAttribute::operator=(const StrokeAttribute &iBrother)
_userAttributesVec2f = new Vec2fMap(*(iBrother._userAttributesVec2f));
}
else {
- _userAttributesVec2f = NULL;
+ _userAttributesVec2f = nullptr;
}
if (iBrother._userAttributesVec3f) {
if (!_userAttributesVec3f) {
@@ -212,7 +212,7 @@ StrokeAttribute &StrokeAttribute::operator=(const StrokeAttribute &iBrother)
_userAttributesVec3f = new Vec3fMap(*(iBrother._userAttributesVec3f));
}
else {
- _userAttributesVec3f = NULL;
+ _userAttributesVec3f = nullptr;
}
return *this;
}
@@ -342,7 +342,7 @@ void StrokeAttribute::setAttributeVec3f(const char *iName, const Vec3f &att)
/* */
/**********************************/
-StrokeVertex::StrokeVertex() : CurvePoint()
+StrokeVertex::StrokeVertex()
{
_CurvilignAbscissa = 0.0f;
_StrokeLength = 0.0f;
@@ -355,7 +355,7 @@ StrokeVertex::StrokeVertex(const StrokeVertex &iBrother) : CurvePoint(iBrother)
_StrokeLength = 0.0f;
}
-StrokeVertex::StrokeVertex(SVertex *iSVertex) : CurvePoint(iSVertex, 0, 0.0f)
+StrokeVertex::StrokeVertex(SVertex *iSVertex) : CurvePoint(iSVertex, nullptr, 0.0f)
{
_CurvilignAbscissa = 0.0f;
_StrokeLength = 0.0f;
@@ -376,7 +376,7 @@ StrokeVertex::StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3) : Curve
}
StrokeVertex::StrokeVertex(SVertex *iSVertex, const StrokeAttribute &iAttribute)
- : CurvePoint(iSVertex, 0, 0.0f)
+ : CurvePoint(iSVertex, nullptr, 0.0f)
{
_Attribute = iAttribute;
_CurvilignAbscissa = 0.0f;
@@ -416,11 +416,11 @@ Stroke::Stroke()
_textureId = 0;
_textureStep = 1.0;
for (int a = 0; a < MAX_MTEX; a++) {
- _mtex[a] = NULL;
+ _mtex[a] = nullptr;
}
- _nodeTree = NULL;
+ _nodeTree = nullptr;
_tips = false;
- _rep = NULL;
+ _rep = nullptr;
}
Stroke::Stroke(const Stroke &iBrother) : Interface1D(iBrother)
@@ -447,7 +447,7 @@ Stroke::Stroke(const Stroke &iBrother) : Interface1D(iBrother)
_rep = new StrokeRep(*(iBrother._rep));
}
else {
- _rep = NULL;
+ _rep = nullptr;
}
}
@@ -464,7 +464,7 @@ Stroke::~Stroke()
_ViewEdges.clear();
if (_rep) {
delete _rep;
- _rep = NULL;
+ _rep = nullptr;
}
}
@@ -489,7 +489,7 @@ Stroke &Stroke::operator=(const Stroke &iBrother)
_rep = new StrokeRep(*(iBrother._rep));
}
else {
- _rep = NULL;
+ _rep = nullptr;
}
return *this;
}
@@ -550,7 +550,7 @@ int Stroke::Resample(int iNPoints)
vertex_container newVertices;
real t = 0.0f;
- StrokeVertex *newVertex = NULL;
+ StrokeVertex *newVertex = nullptr;
vector<StrokeSegment> strokeSegments;
int N = 0;
float meanlength = 0;
@@ -562,7 +562,7 @@ int Stroke::Resample(int iNPoints)
real norm_var = vec_tmp.norm();
int numberOfPointsToAdd = (int)floor(NPointsToAdd * norm_var / _Length);
float csampling = norm_var / (float)(numberOfPointsToAdd + 1);
- strokeSegments.push_back(StrokeSegment(it, next, norm_var, numberOfPointsToAdd, csampling));
+ strokeSegments.emplace_back(it, next, norm_var, numberOfPointsToAdd, csampling);
N += numberOfPointsToAdd;
meanlength += norm_var;
++nsegments;
@@ -661,7 +661,7 @@ int Stroke::Resample(float iSampling)
vertex_container newVertices;
real t = 0.0f;
const real limit = 0.99;
- StrokeVertex *newVertex = NULL;
+ StrokeVertex *newVertex = nullptr;
StrokeInternal::StrokeVertexIterator it = strokeVerticesBegin();
StrokeInternal::StrokeVertexIterator next = it;
++next;
@@ -691,7 +691,7 @@ int Stroke::Resample(float iSampling)
++next;
}
// add last:
- if ((it != itend) && (next == itend) /* && (t == 0.f)*/) {
+ if ((it != itend) && (next == itend) /* && (t == 0.0f)*/) {
newVertices.push_back(&(*it));
}
diff --git a/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp b/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp
index 5b2beb8f068..a4268e43a56 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp
@@ -35,7 +35,7 @@ namespace Freestyle {
/* */
/**********************************/
-TextureManager *StrokeRenderer::_textureManager = 0;
+TextureManager *StrokeRenderer::_textureManager = nullptr;
StrokeRenderer::StrokeRenderer()
{
@@ -59,7 +59,7 @@ bool StrokeRenderer::loadTextures()
/* */
/**********************************/
-TextureManager *TextureManager::_pInstance = 0;
+TextureManager *TextureManager::_pInstance = nullptr;
string TextureManager::_patterns_path;
@@ -77,7 +77,7 @@ TextureManager::~TextureManager()
if (!_brushesMap.empty()) {
_brushesMap.clear();
}
- _pInstance = 0;
+ _pInstance = nullptr;
}
void TextureManager::load()
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index 3678461253c..aadc42beb4b 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -563,8 +563,8 @@ void Strip::computeTexCoordWithTips(const vector<StrokeVertex *> &iStrokeVertice
float texStep)
{
vector<StrokeVertex *>::const_iterator v, vend;
- StrokeVertex *sv = NULL;
- StrokeVertexRep *tvRep[2] = {NULL};
+ StrokeVertex *sv = nullptr;
+ StrokeVertexRep *tvRep[2] = {nullptr};
float l, fact, t;
float u = 0, uPrev = 0;
@@ -750,13 +750,13 @@ void Strip::computeTexCoordWithTips(const vector<StrokeVertex *> &iStrokeVertice
StrokeRep::StrokeRep()
{
- _stroke = 0;
+ _stroke = nullptr;
_strokeType = Stroke::OPAQUE_MEDIUM;
- _nodeTree = NULL;
+ _nodeTree = nullptr;
_hasTex = false;
_textureStep = 1.0;
for (int a = 0; a < MAX_MTEX; a++) {
- _mtex[a] = NULL;
+ _mtex[a] = nullptr;
}
TextureManager *ptm = TextureManager::getInstance();
if (ptm) {
@@ -786,7 +786,7 @@ StrokeRep::StrokeRep(Stroke *iStroke)
_mtex[a] = iStroke->getMTex(a);
}
else {
- _mtex[a] = NULL;
+ _mtex[a] = nullptr;
}
}
if (_textureId == 0) {
@@ -822,7 +822,7 @@ StrokeRep::StrokeRep(const StrokeRep &iBrother)
_mtex[a] = iBrother._mtex[a];
}
else {
- _mtex[a] = NULL;
+ _mtex[a] = nullptr;
}
}
for (vector<Strip *>::const_iterator s = iBrother._strips.begin(), send = iBrother._strips.end();
diff --git a/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp b/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp
index e9a50067d4d..d4ebaac2459 100644
--- a/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp
@@ -30,8 +30,8 @@ namespace Freestyle {
LineRep *StrokeTesselator::Tesselate(Stroke *iStroke)
{
- if (0 == iStroke) {
- return 0;
+ if (nullptr == iStroke) {
+ return nullptr;
}
LineRep *line;
diff --git a/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp b/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp
index f579bd72038..fa131743afc 100644
--- a/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp
@@ -20,7 +20,7 @@
namespace Freestyle {
-TextStrokeRenderer::TextStrokeRenderer(const char *iFileName) : StrokeRenderer()
+TextStrokeRenderer::TextStrokeRenderer(const char *iFileName)
{
if (!iFileName) {
iFileName = "freestyle.txt";
diff --git a/source/blender/freestyle/intern/system/StringUtils.cpp b/source/blender/freestyle/intern/system/StringUtils.cpp
index 90210f33a25..b488987dd41 100644
--- a/source/blender/freestyle/intern/system/StringUtils.cpp
+++ b/source/blender/freestyle/intern/system/StringUtils.cpp
@@ -24,9 +24,7 @@
#include "StringUtils.h"
#include "FreestyleConfig.h"
-namespace Freestyle {
-
-namespace StringUtils {
+namespace Freestyle::StringUtils {
void getPathName(const string &path, const string &base, vector<string> &pathnames)
{
@@ -46,7 +44,7 @@ void getPathName(const string &path, const string &base, vector<string> &pathnam
dir = path.substr(pos, sep - pos);
BLI_strncpy(cleaned, dir.c_str(), FILE_MAX);
- BLI_path_normalize(NULL, cleaned);
+ BLI_path_normalize(nullptr, cleaned);
res = string(cleaned);
if (!base.empty()) {
@@ -57,6 +55,4 @@ void getPathName(const string &path, const string &base, vector<string> &pathnam
}
}
-} // end of namespace StringUtils
-
-} /* namespace Freestyle */
+} // namespace Freestyle::StringUtils
diff --git a/source/blender/freestyle/intern/view_map/AutoPtrHelper.h b/source/blender/freestyle/intern/view_map/AutoPtrHelper.h
index 94fd80bc0fb..cfcfa5e651b 100644
--- a/source/blender/freestyle/intern/view_map/AutoPtrHelper.h
+++ b/source/blender/freestyle/intern/view_map/AutoPtrHelper.h
@@ -27,6 +27,8 @@ namespace Freestyle {
template<typename T> class AutoPtr : public std::unique_ptr<T> {
public:
+ using std::unique_ptr<T>::unique_ptr;
+
AutoPtr() : std::unique_ptr<T>()
{
}
@@ -42,6 +44,8 @@ template<typename T> class AutoPtr : public std::unique_ptr<T> {
other.release();
}
+ using std::unique_ptr<T>::operator=;
+
template<typename X> AutoPtr &operator=(AutoPtr<X> &other) = delete;
};
diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.cpp b/source/blender/freestyle/intern/view_map/BoxGrid.cpp
index 5a490e3c7cc..e81291c94bc 100644
--- a/source/blender/freestyle/intern/view_map/BoxGrid.cpp
+++ b/source/blender/freestyle/intern/view_map/BoxGrid.cpp
@@ -157,7 +157,7 @@ void BoxGrid::assignCells(OccluderSource & /*source*/,
Vec3r point = transform((*f)->center3d());
unsigned int i, j;
getCellCoordinates(point, i, j);
- if (_cells[i * _cellsY + j] == NULL) {
+ if (_cells[i * _cellsY + j] == nullptr) {
// This is an uninitialized cell
real x, y, width, height;
@@ -181,7 +181,7 @@ void BoxGrid::distributePolygons(OccluderSource &source)
unsigned long nKeptFaces = 0;
for (source.begin(); source.isValid(); source.next()) {
- OccluderData *occluder = NULL;
+ OccluderData *occluder = nullptr;
try {
if (insertOccluder(source, occluder)) {
@@ -242,7 +242,7 @@ bool BoxGrid::enableQI() const
return _enableQI;
}
-BoxGrid::Transform::Transform() : GridHelpers::Transform()
+BoxGrid::Transform::Transform()
{
}
diff --git a/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp b/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
index cb3a297076a..a6781bfc8d1 100644
--- a/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
+++ b/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
@@ -146,7 +146,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe
// For each feature edge, while bestOccluderTarget not found and view edge not visible
bool bestOccluderTargetFound = false;
- FEdge *bestOccluderTarget = NULL;
+ FEdge *bestOccluderTarget = nullptr;
real bestOccluderDistance = 0.0;
FEdge *festart = (*ve)->fedgeA();
FEdge *fe = festart;
@@ -173,7 +173,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe
else {
real d = distance2D(fe->center2d(), prosceniumOrigin);
// If center point is closer to viewport origin than current target
- if (bestOccluderTarget == NULL || d < bestOccluderDistance) {
+ if (bestOccluderTarget == nullptr || d < bestOccluderDistance) {
// Then store as bestOccluderTarget
bestOccluderDistance = d;
bestOccluderTarget = fe;
@@ -187,18 +187,18 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe
(*ve)->setIsInImage(true);
}
fe = fe->nextEdge();
- } while (fe != NULL && fe != festart && !(bestOccluderTargetFound && (*ve)->isInImage()));
+ } while (fe != nullptr && fe != festart && !(bestOccluderTargetFound && (*ve)->isInImage()));
// Either we have run out of FEdges, or we already have the one edge we need to determine
// visibility Cull all remaining edges.
- while (fe != NULL && fe != festart) {
+ while (!ELEM(fe, NULL, festart)) {
fe->setIsInImage(false);
fe = fe->nextEdge();
}
// If bestOccluderTarget was not found inside the occluder proscenium,
// we need to expand the occluder proscenium to include it.
- if ((*ve)->isInImage() && bestOccluderTarget != NULL && !bestOccluderTargetFound) {
+ if ((*ve)->isInImage() && bestOccluderTarget != nullptr && !bestOccluderTargetFound) {
// Expand occluder proscenium to enclose bestOccluderTarget
Vec3r point = bestOccluderTarget->center2d();
if (point[0] < occluderProscenium[0]) {
@@ -253,7 +253,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe
expandGridSpaceOccluderProscenium(fe);
}
fe = fe->nextEdge();
- } while (fe != NULL && fe != festart);
+ } while (!ELEM(fe, NULL, festart));
}
}
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
index 3788b5e3545..7e8937bfe80 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
@@ -39,7 +39,7 @@ void FEdgeXDetector::processShapes(WingedEdge &we)
vector<WShape *> wshapes = we.getWShapes();
WXShape *wxs;
- if (_pProgressBar != NULL) {
+ if (_pProgressBar != nullptr) {
_pProgressBar->reset();
_pProgressBar->setLabelText("Detecting feature lines");
_pProgressBar->setTotalSteps(wshapes.size() * 3);
@@ -228,7 +228,7 @@ void FEdgeXDetector::computeCurvatures(WXVertex *vertex)
}
// view dependent
C = vertex->curvatures();
- if (C == 0) {
+ if (C == nullptr) {
return;
}
@@ -370,7 +370,7 @@ void FEdgeXDetector::ProcessBorderEdge(WXEdge *iEdge)
{
// first check whether it is a border edge: BORDER ?
//---------
- if (iEdge->GetaFace() == 0) {
+ if (iEdge->GetaFace() == nullptr) {
// it is a border edge
iEdge->AddNature(Nature::BORDER);
}
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.cpp b/source/blender/freestyle/intern/view_map/Functions0D.cpp
index 892b9b33b4b..4ea163c47cf 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions0D.cpp
@@ -26,9 +26,7 @@
using namespace std;
-namespace Freestyle {
-
-namespace Functions0D {
+namespace Freestyle::Functions0D {
// Internal function
FEdge *getFEdge(Interface0D &it1, Interface0D &it2)
@@ -47,7 +45,7 @@ void getFEdges(Interface0DIterator &it, FEdge *&fe1, FEdge *&fe2)
}
if (count < 3) {
// if we only have 2 vertices
- FEdge *fe = 0;
+ FEdge *fe = nullptr;
Interface0DIterator tmp = it;
if (it.isBegin()) {
++tmp;
@@ -58,7 +56,7 @@ void getFEdges(Interface0DIterator &it, FEdge *&fe1, FEdge *&fe2)
fe = it->getFEdge(*tmp);
}
fe1 = fe;
- fe2 = NULL;
+ fe2 = nullptr;
}
else {
// we have more than 2 vertices
@@ -77,11 +75,11 @@ void getFEdges(Interface0DIterator &it, FEdge *&fe1, FEdge *&fe2)
}
if (begin) {
fe1 = it->getFEdge(*next);
- fe2 = NULL;
+ fe2 = nullptr;
}
else if (last) {
fe1 = previous->getFEdge(*it);
- fe2 = NULL;
+ fe2 = nullptr;
}
else {
fe1 = previous->getFEdge(*it);
@@ -95,14 +93,14 @@ void getViewEdges(Interface0DIterator &it, ViewEdge *&ve1, ViewEdge *&ve2)
FEdge *fe1, *fe2;
getFEdges(it, fe1, fe2);
ve1 = fe1->viewedge();
- if (fe2 != NULL) {
+ if (fe2 != nullptr) {
ve2 = fe2->viewedge();
if (ve2 == ve1) {
- ve2 = NULL;
+ ve2 = nullptr;
}
}
else {
- ve2 = NULL;
+ ve2 = nullptr;
}
}
@@ -124,7 +122,7 @@ void getOccludersF0D(Interface0DIterator &it, set<ViewShape *> &oOccluders)
oOccluders.insert((*oit));
}
- if (ve2 != NULL) {
+ if (ve2 != nullptr) {
oit = ve2->occluders_begin();
oitend = ve2->occluders_end();
for (; oit != oitend; ++oit) {
@@ -280,7 +278,7 @@ int ZDiscontinuityF0D::operator()(Interface0DIterator &iter)
FEdge *fe1, *fe2;
getFEdges(iter, fe1, fe2);
result = fe1->z_discontinuity();
- if (fe2 != NULL) {
+ if (fe2 != nullptr) {
result += fe2->z_discontinuity();
result /= 2.0f;
}
@@ -294,7 +292,7 @@ int Normal2DF0D::operator()(Interface0DIterator &iter)
Vec3f e1(fe1->orientation2d());
Vec2f n1(e1[1], -e1[0]);
Vec2f n(n1);
- if (fe2 != NULL) {
+ if (fe2 != nullptr) {
Vec3f e2(fe2->orientation2d());
Vec2f n2(e2[1], -e2[0]);
n += n2;
@@ -308,7 +306,7 @@ int MaterialF0D::operator()(Interface0DIterator &iter)
{
FEdge *fe1, *fe2;
getFEdges(iter, fe1, fe2);
- if (fe1 == NULL) {
+ if (fe1 == nullptr) {
return -1;
}
if (fe1->isSmooth()) {
@@ -337,7 +335,7 @@ int QuantitativeInvisibilityF0D::operator()(Interface0DIterator &iter)
getViewEdges(iter, ve1, ve2);
unsigned int qi1, qi2;
qi1 = ve1->qi();
- if (ve2 != NULL) {
+ if (ve2 != nullptr) {
qi2 = ve2->qi();
if (qi2 != qi1) {
if (G.debug & G_DEBUG_FREESTYLE) {
@@ -356,7 +354,7 @@ int CurveNatureF0D::operator()(Interface0DIterator &iter)
ViewEdge *ve1, *ve2;
getViewEdges(iter, ve1, ve2);
nat |= ve1->getNature();
- if (ve2 != NULL) {
+ if (ve2 != nullptr) {
nat |= ve2->getNature();
}
result = nat;
@@ -388,6 +386,4 @@ int GetOccludeeF0D::operator()(Interface0DIterator &iter)
return 0;
}
-} // end of namespace Functions0D
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Functions0D
diff --git a/source/blender/freestyle/intern/view_map/Functions1D.cpp b/source/blender/freestyle/intern/view_map/Functions1D.cpp
index a0a320a6e6d..999d7f6e753 100644
--- a/source/blender/freestyle/intern/view_map/Functions1D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions1D.cpp
@@ -23,9 +23,7 @@
using namespace std;
-namespace Freestyle {
-
-namespace Functions1D {
+namespace Freestyle::Functions1D {
int GetXF1D::operator()(Interface1D &inter)
{
@@ -219,8 +217,8 @@ void getOccludeeF1D(Interface1D &inter, set<ViewShape *> &oShapes)
ViewEdge *ve = dynamic_cast<ViewEdge *>(&inter);
if (ve) {
ViewShape *aShape = ve->aShape();
- if (aShape == 0) {
- oShapes.insert((ViewShape *)0);
+ if (aShape == nullptr) {
+ oShapes.insert((ViewShape *)nullptr);
return;
}
oShapes.insert(aShape);
@@ -266,6 +264,4 @@ void getShapeF1D(Interface1D &inter, set<ViewShape *> &oShapes)
}
}
-} // end of namespace Functions1D
-
-} /* namespace Freestyle */
+} // namespace Freestyle::Functions1D
diff --git a/source/blender/freestyle/intern/view_map/Interface0D.cpp b/source/blender/freestyle/intern/view_map/Interface0D.cpp
index 2961b0f58e5..907b21ad5cf 100644
--- a/source/blender/freestyle/intern/view_map/Interface0D.cpp
+++ b/source/blender/freestyle/intern/view_map/Interface0D.cpp
@@ -79,7 +79,7 @@ Geometry::Vec2r Interface0D::getPoint2D() const
FEdge *Interface0D::getFEdge(Interface0D &UNUSED(element))
{
PyErr_SetString(PyExc_TypeError, "method getFEdge() not properly overridden");
- return 0;
+ return nullptr;
}
Id Interface0D::getId() const
@@ -97,25 +97,25 @@ Nature::VertexNature Interface0D::getNature() const
SVertex *Interface0D::castToSVertex()
{
PyErr_SetString(PyExc_TypeError, "method castToSVertex() not properly overridden");
- return 0;
+ return nullptr;
}
ViewVertex *Interface0D::castToViewVertex()
{
PyErr_SetString(PyExc_TypeError, "method castToViewVertex() not properly overridden");
- return 0;
+ return nullptr;
}
NonTVertex *Interface0D::castToNonTVertex()
{
PyErr_SetString(PyExc_TypeError, "method castToNonTVertex() not properly overridden");
- return 0;
+ return nullptr;
}
TVertex *Interface0D::castToTVertex()
{
PyErr_SetString(PyExc_TypeError, "method castToTVertex() not properly overridden");
- return 0;
+ return nullptr;
}
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/OccluderSource.cpp b/source/blender/freestyle/intern/view_map/OccluderSource.cpp
index e75856edc35..618fa781fa7 100644
--- a/source/blender/freestyle/intern/view_map/OccluderSource.cpp
+++ b/source/blender/freestyle/intern/view_map/OccluderSource.cpp
@@ -97,7 +97,7 @@ bool OccluderSource::isValid()
WFace *OccluderSource::getWFace()
{
- return valid ? *currentFace : NULL;
+ return valid ? *currentFace : nullptr;
}
Polygon3r OccluderSource::getCameraSpacePolygon()
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.cpp b/source/blender/freestyle/intern/view_map/Silhouette.cpp
index 3280e56ea7e..0f9d1f166b2 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.cpp
+++ b/source/blender/freestyle/intern/view_map/Silhouette.cpp
@@ -158,14 +158,14 @@ real SVertex::z_discontinuity() const
FEdge *SVertex::fedge()
{
if (getNature() & Nature::T_VERTEX) {
- return NULL;
+ return nullptr;
}
return _FEdges[0];
}
FEdge *SVertex::getFEdge(Interface0D &inter)
{
- FEdge *result = NULL;
+ FEdge *result = nullptr;
SVertex *iVertexB = dynamic_cast<SVertex *>(&inter);
if (!iVertexB) {
return result;
@@ -177,7 +177,7 @@ FEdge *SVertex::getFEdge(Interface0D &inter)
result = (*fe);
}
}
- if ((result == 0) && (getNature() & Nature::T_VERTEX)) {
+ if ((result == nullptr) && (getNature() & Nature::T_VERTEX)) {
SVertex *brother;
ViewVertex *vvertex = viewvertex();
TVertex *tvertex = dynamic_cast<TVertex *>(vvertex);
@@ -195,7 +195,7 @@ FEdge *SVertex::getFEdge(Interface0D &inter)
}
}
}
- if ((result == 0) && (iVertexB->getNature() & Nature::T_VERTEX)) {
+ if ((result == nullptr) && (iVertexB->getNature() & Nature::T_VERTEX)) {
SVertex *brother;
ViewVertex *vvertex = iVertexB->viewvertex();
TVertex *tvertex = dynamic_cast<TVertex *>(vvertex);
@@ -239,8 +239,8 @@ float FEdge::viewedge_length() const
const SShape *FEdge::occluded_shape() const
{
ViewShape *aShape = _ViewEdge->aShape();
- if (aShape == 0) {
- return 0;
+ if (aShape == nullptr) {
+ return nullptr;
}
return aShape->sshape();
}
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
index 2624c70c988..21b0827a660 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
@@ -73,7 +73,7 @@ real SilhouetteGeomEngine::_znear = 0.0;
real SilhouetteGeomEngine::_zfar = 100.0;
bool SilhouetteGeomEngine::_isOrthographicProjection = false;
-SilhouetteGeomEngine *SilhouetteGeomEngine::_pInstance = NULL;
+SilhouetteGeomEngine *SilhouetteGeomEngine::_pInstance = nullptr;
void SilhouetteGeomEngine::setTransform(const real iModelViewMatrix[4][4],
const real iProjectionMatrix[4][4],
diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.cpp b/source/blender/freestyle/intern/view_map/SphericalGrid.cpp
index 0c6e9741fbd..db567d6b5ef 100644
--- a/source/blender/freestyle/intern/view_map/SphericalGrid.cpp
+++ b/source/blender/freestyle/intern/view_map/SphericalGrid.cpp
@@ -154,7 +154,7 @@ void SphericalGrid::assignCells(OccluderSource & /*source*/,
Vec3r point = SphericalGrid::Transform::sphericalProjection((*f)->center3d());
unsigned i, j;
getCellCoordinates(point, i, j);
- if (_cells[i * _cellsY + j] == NULL) {
+ if (_cells[i * _cellsY + j] == nullptr) {
// This is an uninitialized cell
real x, y, width, height;
@@ -178,7 +178,7 @@ void SphericalGrid::distributePolygons(OccluderSource &source)
unsigned long nKeptFaces = 0;
for (source.begin(); source.isValid(); source.next()) {
- OccluderData *occluder = NULL;
+ OccluderData *occluder = nullptr;
try {
if (insertOccluder(source, occluder)) {
@@ -238,7 +238,7 @@ bool SphericalGrid::enableQI() const
return _enableQI;
}
-SphericalGrid::Transform::Transform() : GridHelpers::Transform()
+SphericalGrid::Transform::Transform()
{
}
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
index 7790dd64cf5..d8a1e597a1d 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
@@ -45,8 +45,8 @@ SteerableViewMap::SteerableViewMap(unsigned int nbOrientations)
_nbOrientations = nbOrientations;
_bound = cos(M_PI / (float)_nbOrientations);
for (unsigned int i = 0; i < _nbOrientations; ++i) {
- _directions.push_back(Vec2d(cos((float)i * M_PI / (float)_nbOrientations),
- sin((float)i * M_PI / (float)_nbOrientations)));
+ _directions.emplace_back(cos((float)i * M_PI / (float)_nbOrientations),
+ sin((float)i * M_PI / (float)_nbOrientations));
}
Build();
}
@@ -88,7 +88,7 @@ void SteerableViewMap::Clear()
}
}
delete[] _imagesPyramids;
- _imagesPyramids = 0;
+ _imagesPyramids = nullptr;
}
if (!_mapping.empty()) {
for (map<unsigned int, double *>::iterator m = _mapping.begin(), mend = _mapping.end();
@@ -240,7 +240,7 @@ unsigned int SteerableViewMap::getNumberOfPyramidLevels() const
void SteerableViewMap::saveSteerableViewMap() const
{
for (unsigned int i = 0; i <= _nbOrientations; ++i) {
- if (_imagesPyramids[i] == 0) {
+ if (_imagesPyramids[i] == nullptr) {
cerr << "SteerableViewMap warning: orientation " << i
<< " of steerable View Map whas not been computed yet" << endl;
continue;
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
index aecd37fa0de..8d5955fc0ae 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
@@ -33,13 +33,13 @@ namespace Freestyle {
void ViewEdgeXBuilder::Init(ViewShape *oVShape)
{
- if (NULL == oVShape) {
+ if (nullptr == oVShape) {
return;
}
// for design convenience, we store the current SShape.
_pCurrentSShape = oVShape->sshape();
- if (0 == _pCurrentSShape) {
+ if (nullptr == _pCurrentSShape) {
return;
}
@@ -164,7 +164,7 @@ ViewEdge *ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer &iFaceLayer)
if (iFaceLayer.fl->nature() & Nature::RIDGE) {
if (size < 4) {
- return 0;
+ return nullptr;
}
}
@@ -176,9 +176,9 @@ ViewEdge *ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer &iFaceLayer)
_pCurrentVShape->AddEdge(newVEdge);
// build FEdges
- FEdge *feprevious = NULL;
- FEdge *fefirst = NULL;
- FEdge *fe = NULL;
+ FEdge *feprevious = nullptr;
+ FEdge *fefirst = nullptr;
+ FEdge *fe = nullptr;
for (list<OWXFaceLayer>::iterator fl = facesChain.begin(), flend = facesChain.end(); fl != flend;
++fl) {
fe = BuildSmoothFEdge(feprevious, (*fl));
@@ -201,8 +201,8 @@ ViewEdge *ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer &iFaceLayer)
if ((first == end) && (size != 1)) {
fefirst->setPreviousEdge(fe);
fe->setNextEdge(fefirst);
- newVEdge->setA(0);
- newVEdge->setB(0);
+ newVEdge->setA(nullptr);
+ newVEdge->setB(nullptr);
}
else {
ViewVertex *vva = MakeViewVertex(fefirst->vertexA());
@@ -262,9 +262,9 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge &iWEdge)
firstWEdge = edgesChain.front();
// build FEdges
- FEdge *feprevious = NULL;
- FEdge *fefirst = NULL;
- FEdge *fe = NULL;
+ FEdge *feprevious = nullptr;
+ FEdge *fefirst = nullptr;
+ FEdge *fe = nullptr;
for (list<OWXEdge>::iterator we = edgesChain.begin(), weend = edgesChain.end(); we != weend;
++we) {
fe = BuildSharpFEdge(feprevious, (*we));
@@ -284,8 +284,8 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge &iWEdge)
if ((firstWEdge == endWEdge) && (size != 1)) {
fefirst->setPreviousEdge(fe);
fe->setNextEdge(fefirst);
- newVEdge->setA(0);
- newVEdge->setB(0);
+ newVEdge->setA(nullptr);
+ newVEdge->setB(nullptr);
}
else {
ViewVertex *vva = MakeViewVertex(fefirst->vertexA());
@@ -303,7 +303,7 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge &iWEdge)
OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer)
{
- WXFace *nextFace = NULL;
+ WXFace *nextFace = nullptr;
WOEdge *woeend;
real tend;
if (iFaceLayer.order) {
@@ -315,7 +315,7 @@ OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer)
tend = iFaceLayer.fl->getSmoothEdge()->ta();
}
// special case of EDGE_VERTEX config:
- if ((tend == 0.0) || (tend == 1.0)) {
+ if (ELEM(tend, 0.0, 1.0)) {
WVertex *nextVertex;
if (tend == 0.0) {
nextVertex = woeend->GetaVertex();
@@ -324,14 +324,14 @@ OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer)
nextVertex = woeend->GetbVertex();
}
if (nextVertex->isBoundary()) { // if it's a non-manifold vertex -> ignore
- return OWXFaceLayer(0, true);
+ return OWXFaceLayer(nullptr, true);
}
bool found = false;
WVertex::face_iterator f = nextVertex->faces_begin();
WVertex::face_iterator fend = nextVertex->faces_end();
while ((!found) && (f != fend)) {
nextFace = dynamic_cast<WXFace *>(*f);
- if ((0 != nextFace) && (nextFace != iFaceLayer.fl->getFace())) {
+ if ((nullptr != nextFace) && (nextFace != iFaceLayer.fl->getFace())) {
vector<WXFaceLayer *> sameNatureLayers;
nextFace->retrieveSmoothEdgesLayers(iFaceLayer.fl->nature(), sameNatureLayers);
// don't know... Maybe should test whether this face has also a vertex_edge configuration.
@@ -339,7 +339,7 @@ OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer)
WXFaceLayer *winner = sameNatureLayers[0];
// check face mark continuity
if (winner->getFace()->GetMark() != iFaceLayer.fl->getFace()->GetMark()) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
if (woeend == winner->getSmoothEdge()->woea()->twin()) {
return OWXFaceLayer(winner, true);
@@ -354,24 +354,24 @@ OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer)
else {
nextFace = dynamic_cast<WXFace *>(iFaceLayer.fl->getFace()->GetBordingFace(woeend));
if (!nextFace) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
// if the next face layer has either no smooth edge or no smooth edge of same nature, no next
// face
if (!nextFace->hasSmoothEdges()) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
vector<WXFaceLayer *> sameNatureLayers;
nextFace->retrieveSmoothEdgesLayers(iFaceLayer.fl->nature(), sameNatureLayers);
// don't know how to deal with several edges of same nature on a single face
if ((sameNatureLayers.empty()) || (sameNatureLayers.size() != 1)) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
WXFaceLayer *winner = sameNatureLayers[0];
// check face mark continuity
if (winner->getFace()->GetMark() != iFaceLayer.fl->getFace()->GetMark()) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
if (woeend == winner->getSmoothEdge()->woea()->twin()) {
return OWXFaceLayer(winner, true);
@@ -379,12 +379,12 @@ OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer &iFaceLayer)
return OWXFaceLayer(winner, false);
}
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLayer)
{
- WXFace *previousFace = NULL;
+ WXFace *previousFace = nullptr;
WOEdge *woebegin;
real tend;
if (iFaceLayer.order) {
@@ -397,7 +397,7 @@ OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLa
}
// special case of EDGE_VERTEX config:
- if ((tend == 0.0) || (tend == 1.0)) {
+ if (ELEM(tend, 0.0, 1.0)) {
WVertex *previousVertex;
if (tend == 0.0) {
previousVertex = woebegin->GetaVertex();
@@ -406,14 +406,14 @@ OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLa
previousVertex = woebegin->GetbVertex();
}
if (previousVertex->isBoundary()) { // if it's a non-manifold vertex -> ignore
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
bool found = false;
WVertex::face_iterator f = previousVertex->faces_begin();
WVertex::face_iterator fend = previousVertex->faces_end();
for (; (!found) && (f != fend); ++f) {
previousFace = dynamic_cast<WXFace *>(*f);
- if ((0 != previousFace) && (previousFace != iFaceLayer.fl->getFace())) {
+ if ((nullptr != previousFace) && (previousFace != iFaceLayer.fl->getFace())) {
vector<WXFaceLayer *> sameNatureLayers;
previousFace->retrieveSmoothEdgesLayers(iFaceLayer.fl->nature(), sameNatureLayers);
// don't know... Maybe should test whether this face has also a vertex_edge configuration
@@ -421,7 +421,7 @@ OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLa
WXFaceLayer *winner = sameNatureLayers[0];
// check face mark continuity
if (winner->getFace()->GetMark() != iFaceLayer.fl->getFace()->GetMark()) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
if (woebegin == winner->getSmoothEdge()->woeb()->twin()) {
return OWXFaceLayer(winner, true);
@@ -434,25 +434,25 @@ OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLa
}
else {
previousFace = dynamic_cast<WXFace *>(iFaceLayer.fl->getFace()->GetBordingFace(woebegin));
- if (0 == previousFace) {
- return OWXFaceLayer(NULL, true);
+ if (nullptr == previousFace) {
+ return OWXFaceLayer(nullptr, true);
}
// if the next face layer has either no smooth edge or no smooth edge of same nature, no next
// face
if (!previousFace->hasSmoothEdges()) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
vector<WXFaceLayer *> sameNatureLayers;
previousFace->retrieveSmoothEdgesLayers(iFaceLayer.fl->nature(), sameNatureLayers);
// don't know how to deal with several edges of same nature on a single face
if ((sameNatureLayers.empty()) || (sameNatureLayers.size() != 1)) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
WXFaceLayer *winner = sameNatureLayers[0];
// check face mark continuity
if (winner->getFace()->GetMark() != iFaceLayer.fl->getFace()->GetMark()) {
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
if (woebegin == winner->getSmoothEdge()->woeb()->twin()) {
return OWXFaceLayer(winner, true);
@@ -460,7 +460,7 @@ OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer &iFaceLa
return OWXFaceLayer(winner, false);
}
- return OWXFaceLayer(NULL, true);
+ return OWXFaceLayer(nullptr, true);
}
FEdge *ViewEdgeXBuilder::BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer &ifl)
@@ -487,7 +487,8 @@ FEdge *ViewEdgeXBuilder::BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer
Vec3r normal;
// Make the 2 Svertices
- if (feprevious == 0) { // that means that we don't have any vertex already built for that face
+ if (feprevious ==
+ nullptr) { // that means that we don't have any vertex already built for that face
Vec3r A1(woea->GetaVertex()->GetVertex());
Vec3r A2(woea->GetbVertex()->GetVertex());
Vec3r A(A1 + ta * (A2 - A1));
@@ -543,7 +544,7 @@ FEdge *ViewEdgeXBuilder::BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer
fe->setFrsMaterialIndex(ifl.fl->getFace()->frs_materialIndex());
fe->setFace(ifl.fl->getFace());
fe->setFaceMark(ifl.fl->getFace()->GetMark());
- if (feprevious == 0) {
+ if (feprevious == nullptr) {
normal.normalize();
}
fe->setNormal(normal);
@@ -562,10 +563,10 @@ FEdge *ViewEdgeXBuilder::BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer
bool ViewEdgeXBuilder::stopSmoothViewEdge(WXFaceLayer *iFaceLayer)
{
- if (NULL == iFaceLayer) {
+ if (nullptr == iFaceLayer) {
return true;
}
- if (iFaceLayer->userdata == 0) {
+ if (iFaceLayer->userdata == nullptr) {
return false;
}
return true;
@@ -588,7 +589,7 @@ int ViewEdgeXBuilder::retrieveFaceMarks(WXEdge *iEdge)
OWXEdge ViewEdgeXBuilder::FindNextWEdge(const OWXEdge &iEdge)
{
if (Nature::NO_FEATURE == iEdge.e->nature()) {
- return OWXEdge(NULL, true);
+ return OWXEdge(nullptr, true);
}
WVertex *v;
@@ -600,7 +601,7 @@ OWXEdge ViewEdgeXBuilder::FindNextWEdge(const OWXEdge &iEdge)
}
if (((WXVertex *)v)->isFeature()) {
- return 0; /* XXX eeek? NULL? OWXEdge(NULL, true/false)?*/
+ return nullptr; /* XXX eeek? NULL? OWXEdge(NULL, true/false)?*/
}
int faceMarks = retrieveFaceMarks(iEdge.e);
@@ -631,13 +632,13 @@ OWXEdge ViewEdgeXBuilder::FindNextWEdge(const OWXEdge &iEdge)
return OWXEdge(wxe, false);
}
// we did not find:
- return OWXEdge(NULL, true);
+ return OWXEdge(nullptr, true);
}
OWXEdge ViewEdgeXBuilder::FindPreviousWEdge(const OWXEdge &iEdge)
{
if (Nature::NO_FEATURE == iEdge.e->nature()) {
- return OWXEdge(NULL, true);
+ return OWXEdge(nullptr, true);
}
WVertex *v;
@@ -649,7 +650,7 @@ OWXEdge ViewEdgeXBuilder::FindPreviousWEdge(const OWXEdge &iEdge)
}
if (((WXVertex *)v)->isFeature()) {
- return 0;
+ return nullptr;
}
int faceMarks = retrieveFaceMarks(iEdge.e);
@@ -676,7 +677,7 @@ OWXEdge ViewEdgeXBuilder::FindPreviousWEdge(const OWXEdge &iEdge)
return OWXEdge(wxe, false);
}
// we did not find:
- return OWXEdge(NULL, true);
+ return OWXEdge(nullptr, true);
}
FEdge *ViewEdgeXBuilder::BuildSharpFEdge(FEdge *feprevious, const OWXEdge &iwe)
@@ -750,10 +751,10 @@ FEdge *ViewEdgeXBuilder::BuildSharpFEdge(FEdge *feprevious, const OWXEdge &iwe)
bool ViewEdgeXBuilder::stopSharpViewEdge(WXEdge *iEdge)
{
- if (NULL == iEdge) {
+ if (nullptr == iEdge) {
return true;
}
- if (iEdge->userdata == 0) {
+ if (iEdge->userdata == nullptr) {
return false;
}
return true;
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp
index fa2f95dac72..60d0e45b9fb 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp
@@ -37,7 +37,7 @@ namespace Freestyle {
/* */
/**********************************/
-ViewMap *ViewMap::_pInstance = NULL;
+ViewMap *ViewMap::_pInstance = nullptr;
ViewMap::~ViewMap()
{
@@ -103,7 +103,7 @@ const FEdge *ViewMap::getClosestFEdge(real x, real y) const
{
// find the closest of this candidates:
real minDist = DBL_MAX;
- FEdge *winner = NULL;
+ FEdge *winner = nullptr;
for (fedges_container::const_iterator fe = _FEdges.begin(), feend = _FEdges.end(); fe != feend;
fe++) {
Vec2d A((*fe)->vertexA()->point2D()[0], (*fe)->vertexA()->point2D()[1]);
@@ -122,7 +122,7 @@ const ViewEdge *ViewMap::getClosestViewEdge(real x, real y) const
{
// find the closest of this candidates:
real minDist = DBL_MAX;
- FEdge *winner = NULL;
+ FEdge *winner = nullptr;
for (fedges_container::const_iterator fe = _FEdges.begin(), feend = _FEdges.end(); fe != feend;
fe++) {
Vec2d A((*fe)->vertexA()->point2D()[0], (*fe)->vertexA()->point2D()[1]);
@@ -134,7 +134,7 @@ const ViewEdge *ViewMap::getClosestViewEdge(real x, real y) const
}
}
if (!winner) {
- return NULL;
+ return nullptr;
}
return winner->viewedge();
@@ -194,9 +194,9 @@ ViewVertex *ViewMap::InsertViewVertex(SVertex *iVertex, vector<ViewEdge *> &newV
const vector<FEdge *> &fedges = iVertex->fedges();
if (fedges.size() != 2) {
cerr << "ViewMap warning: Can't split the ViewEdge" << endl;
- return NULL;
+ return nullptr;
}
- FEdge *fend(NULL), *fbegin(NULL);
+ FEdge *fend(nullptr), *fbegin(nullptr);
for (vector<FEdge *>::const_iterator fe = fedges.begin(), feend = fedges.end(); fe != feend;
++fe) {
if ((*fe)->vertexB() == iVertex) {
@@ -205,7 +205,7 @@ ViewVertex *ViewMap::InsertViewVertex(SVertex *iVertex, vector<ViewEdge *> &newV
if ((*fe)->vertexA() == iVertex) {
fbegin = (*fe);
}
- if ((fbegin != NULL) && (fend != NULL)) {
+ if ((fbegin != nullptr) && (fend != nullptr)) {
break;
}
}
@@ -213,7 +213,7 @@ ViewVertex *ViewMap::InsertViewVertex(SVertex *iVertex, vector<ViewEdge *> &newV
ViewShape *vshape = ioEdge->viewShape();
vva = new NonTVertex(iVertex);
// if the ViewEdge is a closed loop, we don't create a new VEdge
- if (ioEdge->A() == 0) {
+ if (ioEdge->A() == nullptr) {
// closed loop
ioEdge->setA(vva);
ioEdge->setB(vva);
@@ -225,8 +225,8 @@ ViewVertex *ViewMap::InsertViewVertex(SVertex *iVertex, vector<ViewEdge *> &newV
ioEdge->setFEdgeB(fend);
// Update FEdges
- fend->setNextEdge(NULL);
- fbegin->setPreviousEdge(NULL);
+ fend->setNextEdge(nullptr);
+ fbegin->setPreviousEdge(nullptr);
// update new View Vertex:
vva->AddOutgoingViewEdge(ioEdge);
@@ -246,8 +246,8 @@ ViewVertex *ViewMap::InsertViewVertex(SVertex *iVertex, vector<ViewEdge *> &newV
ioEdge->setFEdgeB(fend);
// Update FEdges
- fend->setNextEdge(NULL);
- fbegin->setPreviousEdge(NULL);
+ fend->setNextEdge(nullptr);
+ fbegin->setPreviousEdge(nullptr);
// update new View Vertex:
vva->AddOutgoingViewEdge(newVEdge);
@@ -711,56 +711,56 @@ ViewEdge::const_fedge_iterator ViewEdge::fedge_iterator_last() const
ViewEdge::fedge_iterator ViewEdge::fedge_iterator_end()
{
- return fedge_iterator(0, this->_FEdgeB);
+ return fedge_iterator(nullptr, this->_FEdgeB);
}
ViewEdge::const_fedge_iterator ViewEdge::fedge_iterator_end() const
{
- return const_fedge_iterator(0, this->_FEdgeB);
+ return const_fedge_iterator(nullptr, this->_FEdgeB);
}
//! embedding vertex iterator
ViewEdge::const_vertex_iterator ViewEdge::vertices_begin() const
{
- return const_vertex_iterator(this->_FEdgeA->vertexA(), 0, _FEdgeA);
+ return const_vertex_iterator(this->_FEdgeA->vertexA(), nullptr, _FEdgeA);
}
ViewEdge::vertex_iterator ViewEdge::vertices_begin()
{
- return vertex_iterator(this->_FEdgeA->vertexA(), 0, _FEdgeA);
+ return vertex_iterator(this->_FEdgeA->vertexA(), nullptr, _FEdgeA);
}
ViewEdge::const_vertex_iterator ViewEdge::vertices_last() const
{
- return const_vertex_iterator(this->_FEdgeB->vertexB(), _FEdgeB, 0);
+ return const_vertex_iterator(this->_FEdgeB->vertexB(), _FEdgeB, nullptr);
}
ViewEdge::vertex_iterator ViewEdge::vertices_last()
{
- return vertex_iterator(this->_FEdgeB->vertexB(), _FEdgeB, 0);
+ return vertex_iterator(this->_FEdgeB->vertexB(), _FEdgeB, nullptr);
}
ViewEdge::const_vertex_iterator ViewEdge::vertices_end() const
{
- return const_vertex_iterator(0, _FEdgeB, 0);
+ return const_vertex_iterator(nullptr, _FEdgeB, nullptr);
}
ViewEdge::vertex_iterator ViewEdge::vertices_end()
{
- return vertex_iterator(0, _FEdgeB, 0);
+ return vertex_iterator(nullptr, _FEdgeB, nullptr);
}
Interface0DIterator ViewEdge::verticesBegin()
{
Interface0DIterator ret(new ViewEdgeInternal::SVertexIterator(
- this->_FEdgeA->vertexA(), this->_FEdgeA->vertexA(), NULL, _FEdgeA, 0.0f));
+ this->_FEdgeA->vertexA(), this->_FEdgeA->vertexA(), nullptr, _FEdgeA, 0.0f));
return ret;
}
Interface0DIterator ViewEdge::verticesEnd()
{
Interface0DIterator ret(new ViewEdgeInternal::SVertexIterator(
- NULL, this->_FEdgeA->vertexA(), _FEdgeB, NULL, getLength2D()));
+ nullptr, this->_FEdgeA->vertexA(), _FEdgeB, nullptr, getLength2D()));
return ret;
}
@@ -795,7 +795,7 @@ ViewShape::~ViewShape()
if (_SShape) {
delete _SShape;
- _SShape = NULL;
+ _SShape = nullptr;
}
}
@@ -836,7 +836,7 @@ void ViewEdge::UpdateFEdges()
do {
currentEdge->setViewEdge(this);
currentEdge = currentEdge->nextEdge();
- } while ((currentEdge != NULL) && (currentEdge != _FEdgeB));
+ } while (!ELEM(currentEdge, NULL, _FEdgeB));
// last one
_FEdgeB->setViewEdge(this);
}
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
index a0989c52e4e..de30ee0460a 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
@@ -61,7 +61,7 @@ static void findOccludee(FEdge *fe,
Vec3r &edgeDir,
vector<WVertex *> &faceVertices)
{
- WFace *face = NULL;
+ WFace *face = nullptr;
if (fe->isSmooth()) {
FEdgeSmooth *fes = dynamic_cast<FEdgeSmooth *>(fe);
face = (WFace *)fes->face();
@@ -71,7 +71,7 @@ static void findOccludee(FEdge *fe,
WVertex::incoming_edge_iterator ie;
- *oaWFace = NULL;
+ *oaWFace = nullptr;
if (((fe)->getNature() & Nature::SILHOUETTE) || ((fe)->getNature() & Nature::BORDER)) {
// we cast a ray from A in the same direction but looking behind
Vec3r v(-u[0], -u[1], -u[2]);
@@ -90,7 +90,7 @@ static void findOccludee(FEdge *fe,
real d = -((p->getVertices())[0] * p->getNormal());
real t, t_u, t_v;
- if (0 != face) {
+ if (nullptr != face) {
skipFace = false;
if (face == oface) {
@@ -110,7 +110,7 @@ static void findOccludee(FEdge *fe,
WVertex::incoming_edge_iterator iebegin = (*fv)->incoming_edges_begin();
WVertex::incoming_edge_iterator ieend = (*fv)->incoming_edges_end();
for (ie = iebegin; ie != ieend; ++ie) {
- if ((*ie) == 0) {
+ if ((*ie) == nullptr) {
continue;
}
@@ -172,7 +172,7 @@ static void findOccludee(FEdge *fe,
}
if (noIntersection) {
- *oaWFace = NULL;
+ *oaWFace = nullptr;
}
}
}
@@ -198,7 +198,7 @@ static void findOccludee(FEdge *fe, G &grid, real epsilon, ViewEdge * /*ve*/, WF
vector<WVertex *> faceVertices;
- WFace *face = NULL;
+ WFace *face = nullptr;
if (fe->isSmooth()) {
FEdgeSmooth *fes = dynamic_cast<FEdgeSmooth *>(fe);
face = (WFace *)fes->face();
@@ -245,7 +245,7 @@ static int computeVisibility(ViewMap *viewMap,
real raylength = u.norm();
u.normalize();
- WFace *face = NULL;
+ WFace *face = nullptr;
if (fe->isSmooth()) {
FEdgeSmooth *fes = dynamic_cast<FEdgeSmooth *>(fe);
face = (WFace *)fes->face();
@@ -330,7 +330,7 @@ static int computeVisibility(ViewMap *viewMap,
WVertex::incoming_edge_iterator iebegin = (*fv)->incoming_edges_begin();
WVertex::incoming_edge_iterator ieend = (*fv)->incoming_edges_end();
for (ie = iebegin; ie != ieend; ++ie) {
- if ((*ie) == 0) {
+ if ((*ie) == nullptr) {
continue;
}
@@ -400,7 +400,7 @@ static int computeVisibility(ViewMap *viewMap,
cout << "\t\tIs occluder" << endl;
}
#endif
- if (foundOccluders != NULL) {
+ if (foundOccluders != nullptr) {
ViewShape *vshape = viewMap->viewShape(oface->GetVertex(0)->shape()->GetId());
foundOccluders->insert(vshape);
}
@@ -443,7 +443,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap,
FEdge *fe, *festart;
int nSamples = 0;
vector<WFace *> wFaces;
- WFace *wFace = NULL;
+ WFace *wFace = nullptr;
unsigned cnt = 0;
unsigned cntStep = (unsigned)ceil(0.01f * vedges.size());
unsigned tmpQI = 0;
@@ -472,7 +472,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap,
if (!(*ve)->isInImage()) {
// This view edge has been proscenium culled
(*ve)->setQI(255);
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
#if LOGGING
if (_global.debug & G_DEBUG_FREESTYLE) {
cout << "\tCulled." << endl;
@@ -486,7 +486,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap,
fe = (*ve)->fedgeA();
qiMajority = 0;
do {
- if (fe != NULL && fe->isInImage()) {
+ if (fe != nullptr && fe->isInImage()) {
qiMajority++;
}
fe = fe->nextEdge();
@@ -501,7 +501,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap,
// We can recover from this error:
// Treat this edge as fully visible with no occludee
(*ve)->setQI(0);
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
continue;
}
@@ -566,7 +566,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap,
if (wFace) {
vector<Vec3r> vertices;
for (int i = 0, numEdges = wFace->numberOfEdges(); i < numEdges; ++i) {
- vertices.push_back(Vec3r(wFace->GetVertex(i)->GetVertex()));
+ vertices.emplace_back(wFace->GetVertex(i)->GetVertex());
}
Polygon3r poly(vertices, wFace->GetNormal());
poly.userdata = (void *)wFace;
@@ -622,7 +622,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap,
// occludee --
if (!wFaces.empty()) {
if (wFaces.size() <= (float)nSamples / 2.0f) {
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
}
else {
ViewShape *vshape = ioViewMap->viewShape(
@@ -652,7 +652,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap,
FEdge *fe, *festart;
int nSamples = 0;
vector<WFace *> wFaces;
- WFace *wFace = NULL;
+ WFace *wFace = nullptr;
unsigned tmpQI = 0;
unsigned qiClasses[256];
unsigned maxIndex, maxCard;
@@ -670,7 +670,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap,
if (!(*ve)->isInImage()) {
// This view edge has been proscenium culled
(*ve)->setQI(255);
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
#if LOGGING
if (_global.debug & G_DEBUG_FREESTYLE) {
cout << "\tCulled." << endl;
@@ -684,7 +684,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap,
fe = (*ve)->fedgeA();
qiMajority = 0;
do {
- if (fe != NULL && fe->isInImage()) {
+ if (fe != nullptr && fe->isInImage()) {
qiMajority++;
}
fe = fe->nextEdge();
@@ -699,7 +699,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap,
// We can recover from this error:
// Treat this edge as fully visible with no occludee
(*ve)->setQI(0);
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
continue;
}
@@ -721,7 +721,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap,
fe = (*ve)->fedgeA();
do {
- if (fe == NULL || !fe->isInImage()) {
+ if (fe == nullptr || !fe->isInImage()) {
fe = fe->nextEdge();
continue;
}
@@ -764,7 +764,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap,
if (wFace) {
vector<Vec3r> vertices;
for (int i = 0, numEdges = wFace->numberOfEdges(); i < numEdges; ++i) {
- vertices.push_back(Vec3r(wFace->GetVertex(i)->GetVertex()));
+ vertices.emplace_back(wFace->GetVertex(i)->GetVertex());
}
Polygon3r poly(vertices, wFace->GetNormal());
poly.userdata = (void *)wFace;
@@ -811,7 +811,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap,
// occludee --
if (!wFaces.empty()) {
if (wFaces.size() <= (float)nSamples / 2.0f) {
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
}
else {
ViewShape *vshape = ioViewMap->viewShape(
@@ -832,7 +832,7 @@ static void computeFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
FEdge *fe, *festart;
unsigned nSamples = 0;
vector<WFace *> wFaces;
- WFace *wFace = NULL;
+ WFace *wFace = nullptr;
unsigned tmpQI = 0;
unsigned qiClasses[256];
unsigned maxIndex, maxCard;
@@ -843,7 +843,7 @@ static void computeFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
if (!(*ve)->isInImage()) {
// This view edge has been proscenium culled
(*ve)->setQI(255);
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
continue;
}
@@ -870,7 +870,7 @@ static void computeFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
// We can recover from this error:
// Treat this edge as fully visible with no occludee
(*ve)->setQI(0);
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
continue;
}
@@ -918,7 +918,7 @@ static void computeFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
if (wFace) {
vector<Vec3r> vertices;
for (int i = 0, numEdges = wFace->numberOfEdges(); i < numEdges; ++i) {
- vertices.push_back(Vec3r(wFace->GetVertex(i)->GetVertex()));
+ vertices.emplace_back(wFace->GetVertex(i)->GetVertex());
}
Polygon3r poly(vertices, wFace->GetNormal());
poly.userdata = (void *)wFace;
@@ -945,7 +945,7 @@ static void computeFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
// occludee --
if (!wFaces.empty()) {
if (wFaces.size() < nSamples / 2) {
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
}
else {
ViewShape *vshape = ioViewMap->viewShape(
@@ -965,14 +965,14 @@ static void computeVeryFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
FEdge *fe;
unsigned qi = 0;
- WFace *wFace = 0;
+ WFace *wFace = nullptr;
for (vector<ViewEdge *>::iterator ve = vedges.begin(), veend = vedges.end(); ve != veend; ve++) {
// Find an edge to test
if (!(*ve)->isInImage()) {
// This view edge has been proscenium culled
(*ve)->setQI(255);
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
continue;
}
fe = (*ve)->fedgeA();
@@ -992,7 +992,7 @@ static void computeVeryFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
// We can recover from this error:
// Treat this edge as fully visible with no occludee
qi = 0;
- wFace = NULL;
+ wFace = nullptr;
}
else {
qi = computeVisibility<G, I>(ioViewMap, fe, grid, epsilon, *ve, &wFace, NULL);
@@ -1002,7 +1002,7 @@ static void computeVeryFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
if (wFace) {
vector<Vec3r> vertices;
for (int i = 0, numEdges = wFace->numberOfEdges(); i < numEdges; ++i) {
- vertices.push_back(Vec3r(wFace->GetVertex(i)->GetVertex()));
+ vertices.emplace_back(wFace->GetVertex(i)->GetVertex());
}
Polygon3r poly(vertices, wFace->GetNormal());
poly.userdata = (void *)wFace;
@@ -1011,7 +1011,7 @@ static void computeVeryFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon)
(*ve)->setaShape(vshape);
}
else {
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
}
(*ve)->setQI(qi);
}
@@ -1138,7 +1138,7 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap,
// For each feature edge, while bestOccluderTarget not found and view edge not visible
bool bestOccluderTargetFound = false;
- FEdge *bestOccluderTarget = NULL;
+ FEdge *bestOccluderTarget = nullptr;
real bestOccluderDistance = 0.0;
FEdge *festart = (*ve)->fedgeA();
FEdge *fe = festart;
@@ -1164,7 +1164,7 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap,
else {
real d = distance2D(fe->center2d(), prosceniumOrigin);
// If center point is closer to viewport origin than current target
- if (bestOccluderTarget == NULL || d < bestOccluderDistance) {
+ if (bestOccluderTarget == nullptr || d < bestOccluderDistance) {
// Then store as bestOccluderTarget
bestOccluderDistance = d;
bestOccluderTarget = fe;
@@ -1189,7 +1189,7 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap,
// If bestOccluderTarget was not found inside the occluder proscenium, we need to expand the
// occluder proscenium to include it.
- if ((*ve)->isInImage() && bestOccluderTarget != NULL && !bestOccluderTargetFound) {
+ if ((*ve)->isInImage() && bestOccluderTarget != nullptr && !bestOccluderTargetFound) {
// Expand occluder proscenium to enclose bestOccluderTarget
Vec3r point = bestOccluderTarget->center2d();
if (point[0] < occluderProscenium[0]) {
@@ -1337,7 +1337,7 @@ void ViewMapBuilder::computeCusps(ViewMap *ioViewMap)
first = false;
}
// If we're in a positive part, we need a stronger negative value to change
- NonTVertex *cusp = NULL;
+ NonTVertex *cusp = nullptr;
if (positive) {
if (((crossP) * (viewvector)) < -0.1) {
// state changes
@@ -1381,17 +1381,17 @@ void ViewMapBuilder::ComputeCumulativeVisibility(ViewMap *ioViewMap,
AutoPtr<OccluderSource> source;
if (_orthographicProjection) {
- transform.reset(new BoxGrid::Transform);
+ transform = std::make_unique<BoxGrid::Transform>();
}
else {
- transform.reset(new SphericalGrid::Transform);
+ transform = std::make_unique<SphericalGrid::Transform>();
}
if (cull) {
- source.reset(new CulledOccluderSource(*transform, we, *ioViewMap, true));
+ source = std::make_unique<CulledOccluderSource>(*transform, we, *ioViewMap, true);
}
else {
- source.reset(new OccluderSource(*transform, we));
+ source = std::make_unique<OccluderSource>(*transform, we);
}
AutoPtr<GridDensityProvider> density(factory.newGridDensityProvider(*source, bbox, *transform));
@@ -1419,17 +1419,17 @@ void ViewMapBuilder::ComputeDetailedVisibility(ViewMap *ioViewMap,
AutoPtr<OccluderSource> source;
if (_orthographicProjection) {
- transform.reset(new BoxGrid::Transform);
+ transform = std::make_unique<BoxGrid::Transform>();
}
else {
- transform.reset(new SphericalGrid::Transform);
+ transform = std::make_unique<SphericalGrid::Transform>();
}
if (cull) {
- source.reset(new CulledOccluderSource(*transform, we, *ioViewMap, true));
+ source = std::make_unique<CulledOccluderSource>(*transform, we, *ioViewMap, true);
}
else {
- source.reset(new OccluderSource(*transform, we));
+ source = std::make_unique<OccluderSource>(*transform, we);
}
AutoPtr<GridDensityProvider> density(factory.newGridDensityProvider(*source, bbox, *transform));
@@ -1556,7 +1556,7 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, real epsilo
unsigned vEdgesSize = vedges.size();
unsigned fEdgesSize = ioViewMap->FEdges().size();
- if (_pProgressBar != NULL && fEdgesSize > gProgressBarMinSize) {
+ if (_pProgressBar != nullptr && fEdgesSize > gProgressBarMinSize) {
unsigned progressBarSteps = min(gProgressBarMaxSteps, vEdgesSize);
progressBarStep = vEdgesSize / progressBarSteps;
_pProgressBar->reset();
@@ -1570,7 +1570,7 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, real epsilo
FEdge *fe, *festart;
int nSamples = 0;
vector<Polygon3r *> aFaces;
- Polygon3r *aFace = NULL;
+ Polygon3r *aFace = nullptr;
unsigned tmpQI = 0;
unsigned qiClasses[256];
unsigned maxIndex, maxCard;
@@ -1683,7 +1683,7 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, real epsilo
// occludee --
if (!aFaces.empty()) {
if (aFaces.size() <= (float)nSamples / 2.0f) {
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
}
else {
vector<Polygon3r *>::iterator p = aFaces.begin();
@@ -1713,7 +1713,7 @@ void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, real ep
unsigned vEdgesSize = vedges.size();
unsigned fEdgesSize = ioViewMap->FEdges().size();
- if (_pProgressBar != NULL && fEdgesSize > gProgressBarMinSize) {
+ if (_pProgressBar != nullptr && fEdgesSize > gProgressBarMinSize) {
unsigned progressBarSteps = min(gProgressBarMaxSteps, vEdgesSize);
progressBarStep = vEdgesSize / progressBarSteps;
_pProgressBar->reset();
@@ -1727,7 +1727,7 @@ void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, real ep
FEdge *fe, *festart;
unsigned nSamples = 0;
vector<Polygon3r *> aFaces;
- Polygon3r *aFace = NULL;
+ Polygon3r *aFace = nullptr;
unsigned tmpQI = 0;
unsigned qiClasses[256];
unsigned maxIndex, maxCard;
@@ -1801,7 +1801,7 @@ void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, real ep
if (!aFaces.empty()) {
if (aFaces.size() < nSamples / 2) {
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
}
else {
vector<Polygon3r *>::iterator p = aFaces.begin();
@@ -1846,7 +1846,7 @@ void ViewMapBuilder::ComputeVeryFastRayCastingVisibility(ViewMap *ioViewMap, rea
unsigned vEdgesSize = vedges.size();
unsigned fEdgesSize = ioViewMap->FEdges().size();
- if (_pProgressBar != NULL && fEdgesSize > gProgressBarMinSize) {
+ if (_pProgressBar != nullptr && fEdgesSize > gProgressBarMinSize) {
unsigned progressBarSteps = min(gProgressBarMaxSteps, vEdgesSize);
progressBarStep = vEdgesSize / progressBarSteps;
_pProgressBar->reset();
@@ -1859,7 +1859,7 @@ void ViewMapBuilder::ComputeVeryFastRayCastingVisibility(ViewMap *ioViewMap, rea
unsigned counter = progressBarStep;
FEdge *fe;
unsigned qi = 0;
- Polygon3r *aFace = NULL;
+ Polygon3r *aFace = nullptr;
static unsigned timestamp = 1;
for (vector<ViewEdge *>::iterator ve = vedges.begin(), veend = vedges.end(); ve != veend; ve++) {
if (_pRenderMonitor && _pRenderMonitor->testBreak()) {
@@ -1877,7 +1877,7 @@ void ViewMapBuilder::ComputeVeryFastRayCastingVisibility(ViewMap *ioViewMap, rea
(*ve)->setaShape(vshape);
}
else {
- (*ve)->setaShape(0);
+ (*ve)->setaShape(nullptr);
}
(*ve)->setQI(qi);
@@ -1903,7 +1903,7 @@ void ViewMapBuilder::FindOccludee(FEdge *fe,
Vec3r &edgeDir,
vector<WVertex *> &faceVertices)
{
- WFace *face = NULL;
+ WFace *face = nullptr;
if (fe->isSmooth()) {
FEdgeSmooth *fes = dynamic_cast<FEdgeSmooth *>(fe);
face = (WFace *)fes->face();
@@ -1915,7 +1915,7 @@ void ViewMapBuilder::FindOccludee(FEdge *fe,
WVertex::incoming_edge_iterator ie;
OccludersSet::iterator p, pend;
- *oaPolygon = NULL;
+ *oaPolygon = nullptr;
if (((fe)->getNature() & Nature::SILHOUETTE) || ((fe)->getNature() & Nature::BORDER)) {
occluders.clear();
// we cast a ray from A in the same direction but looking behind
@@ -1955,7 +1955,7 @@ void ViewMapBuilder::FindOccludee(FEdge *fe,
WVertex::incoming_edge_iterator iebegin = (*fv)->incoming_edges_begin();
WVertex::incoming_edge_iterator ieend = (*fv)->incoming_edges_end();
for (ie = iebegin; ie != ieend; ++ie) {
- if ((*ie) == 0) {
+ if ((*ie) == nullptr) {
continue;
}
@@ -1994,7 +1994,7 @@ void ViewMapBuilder::FindOccludee(FEdge *fe,
}
if (noIntersection) {
- *oaPolygon = NULL;
+ *oaPolygon = nullptr;
}
}
}
@@ -2026,7 +2026,7 @@ void ViewMapBuilder::FindOccludee(
vector<WVertex *> faceVertices;
- WFace *face = NULL;
+ WFace *face = nullptr;
if (fe->isSmooth()) {
FEdgeSmooth *fes = dynamic_cast<FEdgeSmooth *>(fe);
face = (WFace *)fes->face();
@@ -2101,7 +2101,7 @@ int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe,
iGrid->castRay(center, vp, occluders, timestamp);
- WFace *face = NULL;
+ WFace *face = nullptr;
if (fe->isSmooth()) {
FEdgeSmooth *fes = dynamic_cast<FEdgeSmooth *>(fe);
face = (WFace *)fes->face();
@@ -2168,7 +2168,7 @@ int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe,
WVertex::incoming_edge_iterator iebegin = (*fv)->incoming_edges_begin();
WVertex::incoming_edge_iterator ieend = (*fv)->incoming_edges_end();
for (ie = iebegin; ie != ieend; ++ie) {
- if ((*ie) == 0) {
+ if ((*ie) == nullptr) {
continue;
}
@@ -2322,7 +2322,7 @@ struct less_Intersection {
};
struct silhouette_binary_rule : public binary_rule<segment, segment> {
- silhouette_binary_rule() : binary_rule<segment, segment>()
+ silhouette_binary_rule()
{
}
@@ -2358,7 +2358,7 @@ void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsi
#endif
unsigned progressBarStep = 0;
- if (_pProgressBar != NULL && fEdgesSize > gProgressBarMinSize) {
+ if (_pProgressBar != nullptr && fEdgesSize > gProgressBarMinSize) {
unsigned progressBarSteps = min(gProgressBarMaxSteps, sVerticesSize);
progressBarStep = sVerticesSize / progressBarSteps;
_pProgressBar->reset();
@@ -2428,7 +2428,7 @@ void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsi
// reset userdata:
for (fe = ioEdges.begin(), fend = ioEdges.end(); fe != fend; fe++) {
- (*fe)->userdata = NULL;
+ (*fe)->userdata = nullptr;
}
// list containing the new edges resulting from splitting operations.
@@ -2561,7 +2561,7 @@ void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsi
// reset userdata:
for (fe = ioEdges.begin(), fend = ioEdges.end(); fe != fend; fe++) {
- (*fe)->userdata = NULL;
+ (*fe)->userdata = nullptr;
}
// delete segments
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index 3cbf42ed388..aed5d6b5adc 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -50,9 +50,7 @@
} \
(void)0
-namespace Freestyle {
-
-namespace ViewMapIO {
+namespace Freestyle::ViewMapIO {
namespace Internal {
@@ -228,8 +226,8 @@ static int load(istream &in, FEdge *fe)
bool b;
- FEdgeSmooth *fesmooth = NULL;
- FEdgeSharp *fesharp = NULL;
+ FEdgeSmooth *fesmooth = nullptr;
+ FEdgeSharp *fesharp = nullptr;
if (fe->isSmooth()) {
fesmooth = dynamic_cast<FEdgeSmooth *>(fe);
}
@@ -1239,25 +1237,25 @@ int save(ostream &out, ViewMap *vm, ProgressBar *pb)
for (vector<ViewShape *>::const_iterator j0 = vm->ViewShapes().begin();
j0 != vm->ViewShapes().end();
j0++) {
- (*j0)->userdata = NULL;
- (*j0)->sshape()->userdata = NULL;
+ (*j0)->userdata = nullptr;
+ (*j0)->sshape()->userdata = nullptr;
}
for (vector<FEdge *>::const_iterator j1 = vm->FEdges().begin(); j1 != vm->FEdges().end(); j1++) {
- (*j1)->userdata = NULL;
+ (*j1)->userdata = nullptr;
}
for (vector<SVertex *>::const_iterator j2 = vm->SVertices().begin(); j2 != vm->SVertices().end();
j2++) {
- (*j2)->userdata = NULL;
+ (*j2)->userdata = nullptr;
}
for (vector<ViewEdge *>::const_iterator j3 = vm->ViewEdges().begin();
j3 != vm->ViewEdges().end();
j3++) {
- (*j3)->userdata = NULL;
+ (*j3)->userdata = nullptr;
}
for (vector<ViewVertex *>::const_iterator j4 = vm->ViewVertices().begin();
j4 != vm->ViewVertices().end();
j4++) {
- (*j4)->userdata = NULL;
+ (*j4)->userdata = nullptr;
}
SET_PROGRESS(6);
@@ -1307,6 +1305,4 @@ string getModelsPath()
} // namespace Options
-} // End of namespace ViewMapIO
-
-} /* namespace Freestyle */
+} // namespace Freestyle::ViewMapIO
diff --git a/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp b/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
index a1f76c120fb..9b87bf762fa 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
@@ -26,7 +26,7 @@ namespace Freestyle {
NodeGroup *ViewMapTesselator::Tesselate(ViewMap *iViewMap)
{
if (iViewMap->ViewEdges().empty()) {
- return NULL;
+ return nullptr;
}
const vector<ViewEdge *> &viewedges = iViewMap->ViewEdges();
@@ -35,7 +35,7 @@ NodeGroup *ViewMapTesselator::Tesselate(ViewMap *iViewMap)
NodeGroup *ViewMapTesselator::Tesselate(WShape *UNUSED(iWShape))
{
- return NULL;
+ return nullptr;
}
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
index c8805c144e3..0811fe336b7 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
@@ -63,7 +63,7 @@ WVertex::WVertex(WVertex &iBrother)
_Shape = iBrother._Shape;
_Smooth = iBrother._Smooth;
_Border = iBrother._Border;
- userdata = NULL;
+ userdata = nullptr;
iBrother.userdata = new vertexdata;
((vertexdata *)(iBrother.userdata))->_copy = this;
}
@@ -84,12 +84,12 @@ void WVertex::incoming_edge_iterator::increment()
WOEdge *twin = _current->twin();
if (!twin) {
// we reached a hole
- _current = 0;
+ _current = nullptr;
return;
}
WOEdge *next = twin->getPrevOnFace();
if (next == _begin) {
- next = NULL;
+ next = nullptr;
}
_current = next;
}
@@ -98,7 +98,7 @@ WFace *WVertex::face_iterator::operator*()
{
WOEdge *woedge = *_edge_it;
if (!woedge) {
- return NULL;
+ return nullptr;
}
return (woedge)->GetbFace();
}
@@ -163,7 +163,7 @@ WVertex::incoming_edge_iterator WVertex::incoming_edges_end()
else {
begin = _EdgeList.front()->GetbOEdge();
}
- return incoming_edge_iterator(this, begin, 0);
+ return incoming_edge_iterator(this, begin, nullptr);
}
#if 0
WOEdge **WVertex::incoming_edge_iterator::operator->()
@@ -194,7 +194,7 @@ WOEdge::WOEdge(WOEdge &iBrother)
_paFace = iBrother.GetaFace();
_pbFace = iBrother.GetbFace();
_pOwner = iBrother.GetOwner();
- userdata = NULL;
+ userdata = nullptr;
iBrother.userdata = new oedgedata;
((oedgedata *)(iBrother.userdata))->_copy = this;
@@ -228,11 +228,11 @@ WOEdge *WOEdge::getPrevOnFace()
WEdge::WEdge(WEdge &iBrother)
{
- _paOEdge = NULL;
- _pbOEdge = NULL;
+ _paOEdge = nullptr;
+ _pbOEdge = nullptr;
WOEdge *aoedge = iBrother.GetaOEdge();
WOEdge *boedge = iBrother.GetbOEdge();
- userdata = NULL;
+ userdata = nullptr;
if (aoedge) {
//_paOEdge = new WOEdge(*aoedge);
@@ -272,7 +272,7 @@ WFace::WFace(WFace &iBrother)
_Id = iBrother.GetId();
_FrsMaterialIndex = iBrother._FrsMaterialIndex;
_Mark = iBrother._Mark;
- userdata = NULL;
+ userdata = nullptr;
iBrother.userdata = new facedata;
((facedata *)(iBrother.userdata))->_copy = this;
}
@@ -332,7 +332,7 @@ WOEdge *WFace::MakeEdge(WVertex *v1, WVertex *v2)
// checks whether this edge already exists or not
// If it exists, it points outward v2
bool exist = false;
- WOEdge *pInvertEdge = NULL; // The inverted edge if it exists
+ WOEdge *pInvertEdge = nullptr; // The inverted edge if it exists
vector<WEdge *> &v2Edges = v2->GetEdges();
vector<WEdge *>::iterator it;
for (it = v2Edges.begin(); it != v2Edges.end(); it++) {
@@ -394,7 +394,7 @@ bool WFace::getOppositeEdge(const WVertex *v, WOEdge *&e)
}
vector<WOEdge *>::iterator it;
- e = NULL;
+ e = nullptr;
for (it = _OEdgeList.begin(); it != _OEdgeList.end(); it++) {
if ((*it)->GetaVertex() == v) {
e = *it;
@@ -403,7 +403,7 @@ bool WFace::getOppositeEdge(const WVertex *v, WOEdge *&e)
if (!e) {
return false;
}
- e = NULL;
+ e = nullptr;
for (it = _OEdgeList.begin(); it != _OEdgeList.end(); it++) {
if (((*it)->GetaVertex() != v) && ((*it)->GetbVertex() != v)) {
e = *it;
@@ -449,7 +449,7 @@ WOEdge *WFace::GetPrevOEdge(WOEdge *iOEdge)
return prev;
}
- return NULL;
+ return nullptr;
}
WShape *WFace::getShape()
@@ -570,22 +570,22 @@ WShape::WShape(WShape &iBrother)
vend = iBrother.getVertexList().end();
for (v = iBrother.getVertexList().begin(); v != vend; ++v) {
delete (vertexdata *)((*v)->userdata);
- (*v)->userdata = NULL;
+ (*v)->userdata = nullptr;
}
// Edges and OEdges:
eend = iBrother.getEdgeList().end();
for (e = iBrother.getEdgeList().begin(); e != eend; ++e) {
delete (edgedata *)((*e)->userdata);
- (*e)->userdata = NULL;
+ (*e)->userdata = nullptr;
// OEdge a:
delete (oedgedata *)((*e)->GetaOEdge()->userdata);
- (*e)->GetaOEdge()->userdata = NULL;
+ (*e)->GetaOEdge()->userdata = nullptr;
// OEdge b:
WOEdge *oedgeb = (*e)->GetbOEdge();
if (oedgeb) {
delete (oedgedata *)(oedgeb->userdata);
- oedgeb->userdata = NULL;
+ oedgeb->userdata = nullptr;
}
}
@@ -593,7 +593,7 @@ WShape::WShape(WShape &iBrother)
fend = iBrother.GetFaceList().end();
for (f = iBrother.GetFaceList().begin(); f != fend; ++f) {
delete (facedata *)((*f)->userdata);
- (*f)->userdata = NULL;
+ (*f)->userdata = nullptr;
}
}
@@ -621,7 +621,7 @@ WFace *WShape::MakeFace(vector<WVertex *> &iVertexList,
WFace *face = MakeFace(iVertexList, iFaceEdgeMarksList, iMaterial);
if (!face) {
- return NULL;
+ return nullptr;
}
// set the list of per-vertex normals
@@ -649,7 +649,7 @@ WFace *WShape::MakeFace(vector<WVertex *> &iVertexList,
if ((iVertexList[0] == iVertexList[1]) || (iVertexList[0] == iVertexList[2]) ||
(iVertexList[2] == iVertexList[1])) {
cerr << "Warning: degenerated triangle detected, correcting" << endl;
- return NULL;
+ return nullptr;
}
}
@@ -695,7 +695,7 @@ WFace *WShape::MakeFace(vector<WVertex *> &iVertexList,
}
if (!oedge) {
- return NULL;
+ return nullptr;
}
WEdge *edge = oedge->GetOwner();
diff --git a/source/blender/freestyle/intern/winged_edge/WFillGrid.cpp b/source/blender/freestyle/intern/winged_edge/WFillGrid.cpp
index f54b54f5a3a..9898255aaa7 100644
--- a/source/blender/freestyle/intern/winged_edge/WFillGrid.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WFillGrid.cpp
@@ -42,7 +42,7 @@ void WFillGrid::fillGrid()
(*f)->RetrieveVertexList(fvertices);
for (vector<WVertex *>::const_iterator wv = fvertices.begin(); wv != fvertices.end(); ++wv) {
- vectors.push_back(Vec3r((*wv)->GetVertex()));
+ vectors.emplace_back((*wv)->GetVertex());
}
// occluder will be deleted by the grid
diff --git a/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp b/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp
index e1cb1c29f63..3ca021ec2c6 100644
--- a/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp
@@ -42,7 +42,7 @@ void WSFillGrid::fillGrid()
(*f)->RetrieveVertexList(fvertices);
for (vector<WVertex *>::const_iterator wv = fvertices.begin(); wv != fvertices.end(); ++wv) {
- vectors.push_back(Vec3r((*wv)->GetVertex()));
+ vectors.emplace_back((*wv)->GetVertex());
}
// occluder will be deleted by the grid
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
index f11f30130c8..bedf4192d64 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
@@ -74,13 +74,13 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
return _pSmoothEdge;
}
float ta, tb;
- WOEdge *woea(0), *woeb(0);
+ WOEdge *woea(nullptr), *woeb(nullptr);
bool ok = false;
vector<int> cuspEdgesIndices;
int indexStart, indexEnd;
unsigned nedges = _pWXFace->numberOfEdges();
if (_nNullDotP == nedges) {
- _pSmoothEdge = NULL;
+ _pSmoothEdge = nullptr;
return _pSmoothEdge;
}
if ((_nPosDotP != 0) && (_nPosDotP != _DotP.size()) && (_nNullDotP == 0)) {
@@ -89,7 +89,7 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
// We retrieve the 2 edges for which we have opposite signs for each extremity
RetrieveCuspEdgesIndices(cuspEdgesIndices);
if (cuspEdgesIndices.size() != 2) { // we necessarly have 2 cusp edges
- return 0;
+ return nullptr;
}
// let us determine which cusp edge corresponds to the starting:
@@ -119,8 +119,8 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
else if (_nNullDotP == 1) {
// that means that we have exactly one of the 2 extremities of our silhouette edge is a vertex
// of the mesh
- if ((_nPosDotP == 2) || (_nPosDotP == 0)) {
- _pSmoothEdge = NULL;
+ if (ELEM(_nPosDotP, 2, 0)) {
+ _pSmoothEdge = nullptr;
return _pSmoothEdge;
}
RetrieveCuspEdgesIndices(cuspEdgesIndices);
@@ -129,8 +129,8 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
if (G.debug & G_DEBUG_FREESTYLE) {
cout << "Warning in BuildSmoothEdge: weird WXFace configuration" << endl;
}
- _pSmoothEdge = NULL;
- return NULL;
+ _pSmoothEdge = nullptr;
+ return nullptr;
}
unsigned index0 = Get0VertexIndex(); // retrieve the 0 vertex index
unsigned nedges = _pWXFace->numberOfEdges();
@@ -275,7 +275,7 @@ WFace *WXShape::MakeFace(vector<WVertex *> &iVertexList,
{
WFace *face = WShape::MakeFace(iVertexList, iFaceEdgeMarksList, iMaterialIndex);
if (!face) {
- return NULL;
+ return nullptr;
}
Vec3f center;
diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
index c989d77a730..d9d6a6675c2 100644
--- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
@@ -69,7 +69,7 @@ void WingedEdgeBuilder::visitNodeTransformAfter(NodeTransform &UNUSED(transform)
delete _current_matrix;
if (_matrices_stack.empty()) {
- _current_matrix = NULL;
+ _current_matrix = nullptr;
return;
}
@@ -133,12 +133,12 @@ bool WingedEdgeBuilder::buildWShape(WShape &shape, IndexedFaceSet &ifs)
const unsigned int *vindices = ifs.vindices();
const unsigned int *nindices = ifs.nindices();
- const unsigned int *tindices = NULL;
+ const unsigned int *tindices = nullptr;
if (ifs.tsize()) {
tindices = ifs.tindices();
}
- const unsigned int *mindices = NULL;
+ const unsigned int *mindices = nullptr;
if (ifs.msize()) {
mindices = ifs.mindices();
}
@@ -282,23 +282,23 @@ void WingedEdgeBuilder::buildTriangleStrip(const float * /*vertices*/,
triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle + 1] / 3]);
triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle + 2] / 3]);
- triangleNormals.push_back(Vec3f(normals[nindices[nTriangle]],
- normals[nindices[nTriangle] + 1],
- normals[nindices[nTriangle] + 2]));
- triangleNormals.push_back(Vec3f(normals[nindices[nTriangle + 1]],
- normals[nindices[nTriangle + 1] + 1],
- normals[nindices[nTriangle + 1] + 2]));
- triangleNormals.push_back(Vec3f(normals[nindices[nTriangle + 2]],
- normals[nindices[nTriangle + 2] + 1],
- normals[nindices[nTriangle + 2] + 2]));
+ triangleNormals.emplace_back(normals[nindices[nTriangle]],
+ normals[nindices[nTriangle] + 1],
+ normals[nindices[nTriangle] + 2]);
+ triangleNormals.emplace_back(normals[nindices[nTriangle + 1]],
+ normals[nindices[nTriangle + 1] + 1],
+ normals[nindices[nTriangle + 1] + 2]);
+ triangleNormals.emplace_back(normals[nindices[nTriangle + 2]],
+ normals[nindices[nTriangle + 2] + 1],
+ normals[nindices[nTriangle + 2] + 2]);
if (texCoords) {
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[nTriangle]], texCoords[tindices[nTriangle] + 1]));
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[nTriangle + 1]], texCoords[tindices[nTriangle + 1] + 1]));
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[nTriangle + 2]], texCoords[tindices[nTriangle + 2] + 1]));
+ triangleTexCoords.emplace_back(texCoords[tindices[nTriangle]],
+ texCoords[tindices[nTriangle] + 1]);
+ triangleTexCoords.emplace_back(texCoords[tindices[nTriangle + 1]],
+ texCoords[tindices[nTriangle + 1] + 1]);
+ triangleTexCoords.emplace_back(texCoords[tindices[nTriangle + 2]],
+ texCoords[tindices[nTriangle + 2] + 1]);
}
}
else { // if nTriangle is odd
@@ -306,23 +306,23 @@ void WingedEdgeBuilder::buildTriangleStrip(const float * /*vertices*/,
triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle + 2] / 3]);
triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle + 1] / 3]);
- triangleNormals.push_back(Vec3f(normals[nindices[nTriangle]],
- normals[nindices[nTriangle] + 1],
- normals[nindices[nTriangle] + 2]));
- triangleNormals.push_back(Vec3f(normals[nindices[nTriangle + 2]],
- normals[nindices[nTriangle + 2] + 1],
- normals[nindices[nTriangle + 2] + 2]));
- triangleNormals.push_back(Vec3f(normals[nindices[nTriangle + 1]],
- normals[nindices[nTriangle + 1] + 1],
- normals[nindices[nTriangle + 1] + 2]));
+ triangleNormals.emplace_back(normals[nindices[nTriangle]],
+ normals[nindices[nTriangle] + 1],
+ normals[nindices[nTriangle] + 2]);
+ triangleNormals.emplace_back(normals[nindices[nTriangle + 2]],
+ normals[nindices[nTriangle + 2] + 1],
+ normals[nindices[nTriangle + 2] + 2]);
+ triangleNormals.emplace_back(normals[nindices[nTriangle + 1]],
+ normals[nindices[nTriangle + 1] + 1],
+ normals[nindices[nTriangle + 1] + 2]);
if (texCoords) {
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[nTriangle]], texCoords[tindices[nTriangle] + 1]));
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[nTriangle + 2]], texCoords[tindices[nTriangle + 2] + 1]));
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[nTriangle + 1]], texCoords[tindices[nTriangle + 1] + 1]));
+ triangleTexCoords.emplace_back(texCoords[tindices[nTriangle]],
+ texCoords[tindices[nTriangle] + 1]);
+ triangleTexCoords.emplace_back(texCoords[tindices[nTriangle + 2]],
+ texCoords[tindices[nTriangle + 2] + 1]);
+ triangleTexCoords.emplace_back(texCoords[tindices[nTriangle + 1]],
+ texCoords[tindices[nTriangle + 1] + 1]);
}
}
triangleFaceEdgeMarks.push_back((iFaceEdgeMarks[nTriangle / 3] & IndexedFaceSet::FACE_MARK) !=
@@ -386,22 +386,21 @@ void WingedEdgeBuilder::buildTriangles(const float * /*vertices*/,
triangleVertices.push_back(currentShape->getVertexList()[vindices[3 * i + 1] / 3]);
triangleVertices.push_back(currentShape->getVertexList()[vindices[3 * i + 2] / 3]);
- triangleNormals.push_back(Vec3f(
- normals[nindices[3 * i]], normals[nindices[3 * i] + 1], normals[nindices[3 * i] + 2]));
- triangleNormals.push_back(Vec3f(normals[nindices[3 * i + 1]],
- normals[nindices[3 * i + 1] + 1],
- normals[nindices[3 * i + 1] + 2]));
- triangleNormals.push_back(Vec3f(normals[nindices[3 * i + 2]],
- normals[nindices[3 * i + 2] + 1],
- normals[nindices[3 * i + 2] + 2]));
+ triangleNormals.emplace_back(
+ normals[nindices[3 * i]], normals[nindices[3 * i] + 1], normals[nindices[3 * i] + 2]);
+ triangleNormals.emplace_back(normals[nindices[3 * i + 1]],
+ normals[nindices[3 * i + 1] + 1],
+ normals[nindices[3 * i + 1] + 2]);
+ triangleNormals.emplace_back(normals[nindices[3 * i + 2]],
+ normals[nindices[3 * i + 2] + 1],
+ normals[nindices[3 * i + 2] + 2]);
if (texCoords) {
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[3 * i]], texCoords[tindices[3 * i] + 1]));
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[3 * i + 1]], texCoords[tindices[3 * i + 1] + 1]));
- triangleTexCoords.push_back(
- Vec2f(texCoords[tindices[3 * i + 2]], texCoords[tindices[3 * i + 2] + 1]));
+ triangleTexCoords.emplace_back(texCoords[tindices[3 * i]], texCoords[tindices[3 * i] + 1]);
+ triangleTexCoords.emplace_back(texCoords[tindices[3 * i + 1]],
+ texCoords[tindices[3 * i + 1] + 1]);
+ triangleTexCoords.emplace_back(texCoords[tindices[3 * i + 2]],
+ texCoords[tindices[3 * i + 2] + 1]);
}
triangleFaceEdgeMarks.push_back((iFaceEdgeMarks[i] & IndexedFaceSet::FACE_MARK) != 0);