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:
-rw-r--r--.clang-tidy1
-rw-r--r--source/blender/blenkernel/intern/fcurve_test.cc2
-rw-r--r--source/blender/blenkernel/intern/lattice_deform_test.cc12
-rw-r--r--source/blender/blenkernel/intern/simulation.cc4
-rw-r--r--source/blender/blenkernel/intern/volume.cc46
-rw-r--r--source/blender/blenkernel/intern/volume_render.cc6
-rw-r--r--source/blender/blenlib/intern/delaunay_2d.cc38
-rw-r--r--source/blender/blenlib/intern/mesh_intersect.cc6
-rw-r--r--source/blender/blenlib/intern/task_pool.cc10
-rw-r--r--source/blender/blenlib/intern/task_range.cc6
-rw-r--r--source/blender/blenlib/tests/BLI_array_store_test.cc18
-rw-r--r--source/blender/blenlib/tests/BLI_array_utils_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_delaunay_2d_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc12
-rw-r--r--source/blender/blenlib/tests/BLI_ghash_test.cc18
-rw-r--r--source/blender/blenlib/tests/BLI_heap_simple_test.cc14
-rw-r--r--source/blender/blenlib/tests/BLI_heap_test.cc22
-rw-r--r--source/blender/blenlib/tests/BLI_kdopbvh_test.cc4
-rw-r--r--source/blender/blenlib/tests/BLI_linklist_lockfree_test.cc12
-rw-r--r--source/blender/blenlib/tests/BLI_listbase_test.cc22
-rw-r--r--source/blender/blenlib/tests/BLI_path_util_test.cc84
-rw-r--r--source/blender/blenlib/tests/BLI_polyfill_2d_test.cc4
-rw-r--r--source/blender/blenlib/tests/BLI_string_test.cc42
-rw-r--r--source/blender/blenlib/tests/BLI_string_utf8_test.cc4
-rw-r--r--source/blender/blenlib/tests/BLI_task_graph_test.cc46
-rw-r--r--source/blender/blenlib/tests/BLI_task_test.cc16
-rw-r--r--source/blender/blenlib/tests/BLI_vector_test.cc8
-rw-r--r--source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc12
-rw-r--r--source/blender/blenlib/tests/performance/BLI_task_performance_test.cc4
-rw-r--r--source/blender/blenloader/tests/blendfile_loading_base_test.cc4
-rw-r--r--source/blender/bmesh/tests/bmesh_core_test.cc10
-rw-r--r--source/blender/bmesh/tools/bmesh_boolean.cc28
-rw-r--r--source/blender/compositor/intern/COM_CPUDevice.cpp2
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.cpp8
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp10
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp20
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp4
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.cpp6
-rw-r--r--source/blender/compositor/intern/COM_Node.cpp20
-rw-r--r--source/blender/compositor/intern/COM_NodeGraph.cpp6
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.cpp8
-rw-r--r--source/blender/compositor/intern/COM_NodeOperationBuilder.cpp22
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.cpp6
-rw-r--r--source/blender/compositor/intern/COM_SingleThreadedOperation.cpp6
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp38
-rw-r--r--source/blender/compositor/nodes/COM_BlurNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ChannelMatteNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_CombineColorNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_FilterNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ImageNode.cpp12
-rw-r--r--source/blender/compositor/nodes/COM_KeyingNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_MathNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_MovieClipNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.cpp12
-rw-r--r--source/blender/compositor/nodes/COM_SeparateColorNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.cpp2
-rw-r--r--source/blender/compositor/operations/COM_AntiAliasOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.cpp36
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ConvertOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_DenoiseOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DespeckleOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_GlareBaseOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cpp54
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MapRangeOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp42
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp38
-rw-r--r--source/blender/compositor/operations/COM_PixelateOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_PreviewOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp26
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SplitOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_SunBeamsOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.cpp44
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.cpp34
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.cpp28
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc4
-rw-r--r--source/blender/freestyle/intern/application/AppCanvas.cpp4
-rw-r--r--source/blender/freestyle/intern/application/AppConfig.cpp6
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp56
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp22
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp48
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp32
-rw-r--r--source/blender/freestyle/intern/geometry/FastGrid.cpp2
-rw-r--r--source/blender/freestyle/intern/geometry/Grid.cpp6
-rw-r--r--source/blender/freestyle/intern/image/GaussianFilter.cpp2
-rw-r--r--source/blender/freestyle/intern/python/BPy_BBox.cpp58
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp66
-rw-r--r--source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp66
-rw-r--r--source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp22
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.cpp82
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp30
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp76
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsNoise.cpp102
-rw-r--r--source/blender/freestyle/intern/python/BPy_Id.cpp62
-rw-r--r--source/blender/freestyle/intern/python/BPy_IntegrationType.cpp74
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface0D.cpp100
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.cpp84
-rw-r--r--source/blender/freestyle/intern/python/BPy_Iterator.cpp68
-rw-r--r--source/blender/freestyle/intern/python/BPy_MediumType.cpp62
-rw-r--r--source/blender/freestyle/intern/python/BPy_Nature.cpp130
-rw-r--r--source/blender/freestyle/intern/python/BPy_Operators.cpp188
-rw-r--r--source/blender/freestyle/intern/python/BPy_SShape.cpp82
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp118
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeShader.cpp70
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp68
-rw-r--r--source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp68
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewMap.cpp68
-rw-r--r--source/blender/freestyle/intern/python/BPy_ViewShape.cpp94
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/Director.cpp4
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp78
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp90
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp68
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp86
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp64
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp74
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp96
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp86
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp118
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp84
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp76
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp84
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp72
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp78
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp68
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp70
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp92
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp74
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp80
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp72
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp84
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp82
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp70
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp62
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp62
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp64
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp70
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp62
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp60
-rw-r--r--source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp86
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeGroup.cpp2
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp2
-rw-r--r--source/blender/freestyle/intern/stroke/Canvas.cpp18
-rw-r--r--source/blender/freestyle/intern/stroke/ChainingIterators.cpp22
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.cpp78
-rw-r--r--source/blender/freestyle/intern/stroke/Operators.cpp16
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.cpp50
-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/system/StringUtils.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/BoxGrid.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp8
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp6
-rw-r--r--source/blender/freestyle/intern/view_map/Functions0D.cpp26
-rw-r--r--source/blender/freestyle/intern/view_map/Functions1D.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/Interface0D.cpp10
-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.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp88
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.cpp46
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp102
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.cpp16
-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/WXEdge.cpp14
-rw-r--r--source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp6
-rw-r--r--source/blender/gpu/intern/gpu_batch.cc20
-rw-r--r--source/blender/gpu/intern/gpu_context.cc10
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.cc30
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc18
-rw-r--r--source/blender/gpu/intern/gpu_index_buffer.cc6
-rw-r--r--source/blender/gpu/intern/gpu_matrix.cc16
-rw-r--r--source/blender/gpu/intern/gpu_shader.cc24
-rw-r--r--source/blender/gpu/intern/gpu_texture.cc16
-rw-r--r--source/blender/gpu/intern/gpu_uniform_buffer.cc16
-rw-r--r--source/blender/gpu/intern/gpu_vertex_buffer.cc10
-rw-r--r--source/blender/gpu/opengl/gl_batch.cc18
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc18
-rw-r--r--source/blender/gpu/opengl/gl_drawlist.cc18
-rw-r--r--source/blender/gpu/opengl/gl_framebuffer.cc10
-rw-r--r--source/blender/gpu/opengl/gl_immediate.cc8
-rw-r--r--source/blender/gpu/opengl/gl_shader.cc8
-rw-r--r--source/blender/gpu/opengl/gl_shader_interface.cc4
-rw-r--r--source/blender/gpu/opengl/gl_texture.cc32
-rw-r--r--source/blender/gpu/opengl/gl_uniform_buffer.cc4
-rw-r--r--source/blender/gpu/opengl/gl_vertex_array.cc2
-rw-r--r--source/blender/gpu/opengl/gl_vertex_buffer.cc8
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp70
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.cpp2
-rw-r--r--source/blender/imbuf/intern/dds/Image.cpp4
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp26
-rw-r--r--source/blender/imbuf/intern/oiio/openimageio_api.cpp24
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp84
-rw-r--r--source/blender/io/alembic/exporter/abc_export_capi.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_curves.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_hair.cc6
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_nurbs.cc4
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_points.cc2
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_transform.cc2
-rw-r--r--source/blender/io/alembic/intern/abc_reader_curves.cc6
-rw-r--r--source/blender/io/alembic/intern/abc_reader_mesh.cc20
-rw-r--r--source/blender/io/alembic/intern/abc_reader_object.cc6
-rw-r--r--source/blender/io/alembic/intern/abc_reader_points.cc4
-rw-r--r--source/blender/io/alembic/intern/abc_reader_transform.cc2
-rw-r--r--source/blender/io/alembic/intern/abc_util.cc4
-rw-r--r--source/blender/io/alembic/intern/alembic_capi.cc32
-rw-r--r--source/blender/io/collada/AnimationExporter.cpp6
-rw-r--r--source/blender/io/collada/AnimationImporter.cpp44
-rw-r--r--source/blender/io/collada/ArmatureExporter.cpp4
-rw-r--r--source/blender/io/collada/ArmatureImporter.cpp54
-rw-r--r--source/blender/io/collada/BCAnimationCurve.cpp22
-rw-r--r--source/blender/io/collada/BCAnimationSampler.cpp14
-rw-r--r--source/blender/io/collada/BCSampleData.cpp2
-rw-r--r--source/blender/io/collada/ControllerExporter.cpp14
-rw-r--r--source/blender/io/collada/DocumentExporter.cpp8
-rw-r--r--source/blender/io/collada/DocumentImporter.cpp68
-rw-r--r--source/blender/io/collada/ExtraHandler.cpp6
-rw-r--r--source/blender/io/collada/GeometryExporter.cpp6
-rw-r--r--source/blender/io/collada/ImageExporter.cpp6
-rw-r--r--source/blender/io/collada/Materials.cpp10
-rw-r--r--source/blender/io/collada/MeshImporter.cpp32
-rw-r--r--source/blender/io/collada/SceneExporter.cpp4
-rw-r--r--source/blender/io/collada/SkinInfo.cpp6
-rw-r--r--source/blender/io/collada/TransformReader.cpp2
-rw-r--r--source/blender/io/collada/TransformWriter.cpp4
-rw-r--r--source/blender/io/collada/collada.cpp2
-rw-r--r--source/blender/io/collada/collada_utils.cpp44
-rw-r--r--source/blender/io/common/intern/hierarchy_context_order_test.cc20
-rw-r--r--source/blender/modifiers/intern/MOD_mask.cc36
-rw-r--r--source/blender/modifiers/intern/MOD_mesh_to_volume.cc56
-rw-r--r--source/blender/modifiers/intern/MOD_simulation.cc24
-rw-r--r--source/blender/modifiers/intern/MOD_volume_displace.cc46
-rw-r--r--source/blender/modifiers/intern/MOD_volume_to_mesh.cc52
-rw-r--r--source/blender/nodes/intern/node_socket.cc12
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_valToRgb.cc4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_value.cc2
-rw-r--r--source/blender/nodes/simulation/nodes/node_sim_common.cc4
-rw-r--r--source/blender/simulation/intern/SIM_mass_spring.cpp32
-rw-r--r--source/blender/simulation/intern/hair_volume.cpp2
426 files changed, 7145 insertions, 7146 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 70851d0023f..cb825598c12 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -38,7 +38,6 @@ Checks: >
-modernize-deprecated-headers,
-modernize-avoid-c-arrays,
-modernize-use-equals-default,
- -modernize-use-nullptr,
-modernize-concat-nested-namespaces,
-modernize-use-nodiscard,
-modernize-use-using,
diff --git a/source/blender/blenkernel/intern/fcurve_test.cc b/source/blender/blenkernel/intern/fcurve_test.cc
index a230c8f2e96..97dd541e2b9 100644
--- a/source/blender/blenkernel/intern/fcurve_test.cc
+++ b/source/blender/blenkernel/intern/fcurve_test.cc
@@ -290,7 +290,7 @@ TEST(fcurve_active_keyframe, ActiveKeyframe)
EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), 2);
/* Check clearing the index. */
- BKE_fcurve_active_keyframe_set(fcu, NULL);
+ BKE_fcurve_active_keyframe_set(fcu, nullptr);
EXPECT_EQ(fcu->active_keyframe_index, FCURVE_ACTIVE_KEYFRAME_NONE);
EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), FCURVE_ACTIVE_KEYFRAME_NONE);
diff --git a/source/blender/blenkernel/intern/lattice_deform_test.cc b/source/blender/blenkernel/intern/lattice_deform_test.cc
index 7db9d941458..f08d0349598 100644
--- a/source/blender/blenkernel/intern/lattice_deform_test.cc
+++ b/source/blender/blenkernel/intern/lattice_deform_test.cc
@@ -83,7 +83,7 @@ static void test_lattice_deform_free(LatticeDeformTestContext *ctx)
TEST(lattice_deform_performance, performance_no_dvert_1)
{
const int32_t num_items = 1;
- LatticeDeformTestContext ctx = {{{0}}};
+ LatticeDeformTestContext ctx = {{{nullptr}}};
RandomNumberGenerator rng;
test_lattice_deform_init(&ctx, &rng, num_items);
test_lattice_deform(&ctx, num_items);
@@ -92,7 +92,7 @@ TEST(lattice_deform_performance, performance_no_dvert_1)
TEST(lattice_deform_performance, performance_no_dvert_1000)
{
const int32_t num_items = 1000;
- LatticeDeformTestContext ctx = {{{0}}};
+ LatticeDeformTestContext ctx = {{{nullptr}}};
RandomNumberGenerator rng;
test_lattice_deform_init(&ctx, &rng, num_items);
test_lattice_deform(&ctx, num_items);
@@ -101,7 +101,7 @@ TEST(lattice_deform_performance, performance_no_dvert_1000)
TEST(lattice_deform_performance, performance_no_dvert_10000)
{
const int32_t num_items = 10000;
- LatticeDeformTestContext ctx = {{{0}}};
+ LatticeDeformTestContext ctx = {{{nullptr}}};
RandomNumberGenerator rng;
test_lattice_deform_init(&ctx, &rng, num_items);
test_lattice_deform(&ctx, num_items);
@@ -110,7 +110,7 @@ TEST(lattice_deform_performance, performance_no_dvert_10000)
TEST(lattice_deform_performance, performance_no_dvert_100000)
{
const int32_t num_items = 100000;
- LatticeDeformTestContext ctx = {{{0}}};
+ LatticeDeformTestContext ctx = {{{nullptr}}};
RandomNumberGenerator rng;
test_lattice_deform_init(&ctx, &rng, num_items);
test_lattice_deform(&ctx, num_items);
@@ -119,7 +119,7 @@ TEST(lattice_deform_performance, performance_no_dvert_100000)
TEST(lattice_deform_performance, performance_no_dvert_1000000)
{
const int32_t num_items = 1000000;
- LatticeDeformTestContext ctx = {{{0}}};
+ LatticeDeformTestContext ctx = {{{nullptr}}};
RandomNumberGenerator rng;
test_lattice_deform_init(&ctx, &rng, num_items);
test_lattice_deform(&ctx, num_items);
@@ -128,7 +128,7 @@ TEST(lattice_deform_performance, performance_no_dvert_1000000)
TEST(lattice_deform_performance, performance_no_dvert_10000000)
{
const int32_t num_items = 10000000;
- LatticeDeformTestContext ctx = {{{0}}};
+ LatticeDeformTestContext ctx = {{{nullptr}}};
RandomNumberGenerator rng;
test_lattice_deform_init(&ctx, &rng, num_items);
test_lattice_deform(&ctx, num_items);
diff --git a/source/blender/blenkernel/intern/simulation.cc b/source/blender/blenkernel/intern/simulation.cc
index 6e4ce2eaee2..861779ec700 100644
--- a/source/blender/blenkernel/intern/simulation.cc
+++ b/source/blender/blenkernel/intern/simulation.cc
@@ -165,14 +165,14 @@ IDTypeInfo IDType_ID_SIM = {
/* free_data */ simulation_free_data,
/* make_local */ nullptr,
/* foreach_id */ simulation_foreach_id,
- /* foreach_cache */ NULL,
+ /* foreach_cache */ nullptr,
/* blend_write */ simulation_blend_write,
/* blend_read_data */ simulation_blend_read_data,
/* blend_read_lib */ simulation_blend_read_lib,
/* blend_read_expand */ simulation_blend_read_expand,
- /* blend_read_undo_preserve */ NULL,
+ /* blend_read_undo_preserve */ nullptr,
};
void *BKE_simulation_add(Main *bmain, const char *name)
diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
index 9c60cb842ae..b18bc3c7e6e 100644
--- a/source/blender/blenkernel/intern/volume.cc
+++ b/source/blender/blenkernel/intern/volume.cc
@@ -265,12 +265,12 @@ static struct VolumeFileCache {
struct VolumeGrid {
VolumeGrid(const VolumeFileCache::Entry &template_entry, const int simplify_level)
- : entry(NULL), simplify_level(simplify_level), is_loaded(false)
+ : entry(nullptr), simplify_level(simplify_level), is_loaded(false)
{
entry = GLOBAL_CACHE.add_metadata_user(template_entry);
}
- VolumeGrid(const openvdb::GridBase::Ptr &grid) : entry(NULL), local_grid(grid), is_loaded(true)
+ VolumeGrid(const openvdb::GridBase::Ptr &grid) : entry(nullptr), local_grid(grid), is_loaded(true)
{
}
@@ -295,7 +295,7 @@ struct VolumeGrid {
void load(const char *volume_name, const char *filepath)
{
/* If already loaded or not file-backed, nothing to do. */
- if (is_loaded || entry == NULL) {
+ if (is_loaded || entry == nullptr) {
return;
}
@@ -337,7 +337,7 @@ struct VolumeGrid {
void unload(const char *volume_name)
{
/* Not loaded or not file-backed, nothing to do. */
- if (!is_loaded || entry == NULL) {
+ if (!is_loaded || entry == nullptr) {
return;
}
@@ -364,7 +364,7 @@ struct VolumeGrid {
local_grid = grid()->copyGridWithNewTree();
if (entry) {
GLOBAL_CACHE.remove_user(*entry, is_loaded);
- entry = NULL;
+ entry = nullptr;
}
is_loaded = true;
}
@@ -378,7 +378,7 @@ struct VolumeGrid {
local_grid = grid()->deepCopyGrid();
if (entry) {
GLOBAL_CACHE.remove_user(*entry, is_loaded);
- entry = NULL;
+ entry = nullptr;
}
is_loaded = true;
}
@@ -398,7 +398,7 @@ struct VolumeGrid {
return entry->error_msg.c_str();
}
- return NULL;
+ return nullptr;
}
bool grid_is_loaded() const
@@ -562,7 +562,7 @@ static void volume_blend_write(BlendWriter *writer, ID *id, const void *id_addre
Volume *volume = (Volume *)id;
if (volume->id.us > 0 || BLO_write_is_undo(writer)) {
/* Clean up, important in undo case to reduce false detection of changed datablocks. */
- volume->runtime.grids = 0;
+ volume->runtime.grids = nullptr;
/* write LibData */
BLO_write_id_struct(writer, Volume, id_address, &volume->id);
@@ -634,13 +634,13 @@ IDTypeInfo IDType_ID_VO = {
/* blend_read_lib */ volume_blend_read_lib,
/* blend_read_expand */ volume_blend_read_expand,
- /* blend_read_undo_preserve */ NULL,
+ /* blend_read_undo_preserve */ nullptr,
};
void BKE_volume_init_grids(Volume *volume)
{
#ifdef WITH_OPENVDB
- if (volume->runtime.grids == NULL) {
+ if (volume->runtime.grids == nullptr) {
volume->runtime.grids = OBJECT_GUARDED_NEW(VolumeGridVector);
}
#else
@@ -871,11 +871,11 @@ BoundBox *BKE_volume_boundbox_get(Object *ob)
{
BLI_assert(ob->type == OB_VOLUME);
- if (ob->runtime.bb != NULL && (ob->runtime.bb->flag & BOUNDBOX_DIRTY) == 0) {
+ if (ob->runtime.bb != nullptr && (ob->runtime.bb->flag & BOUNDBOX_DIRTY) == 0) {
return ob->runtime.bb;
}
- if (ob->runtime.bb == NULL) {
+ if (ob->runtime.bb == nullptr) {
Volume *volume = (Volume *)ob->data;
ob->runtime.bb = (BoundBox *)MEM_callocN(sizeof(BoundBox), "volume boundbox");
@@ -1006,7 +1006,7 @@ static Volume *volume_evaluate_modifiers(struct Depsgraph *depsgraph,
if (volume_next && volume_next != volume) {
/* If the modifier returned a new volume, release the old one. */
if (volume != volume_input) {
- BKE_id_free(NULL, volume);
+ BKE_id_free(nullptr, volume);
}
volume = volume_next;
}
@@ -1057,7 +1057,7 @@ void BKE_volume_grids_backup_restore(Volume *volume, VolumeGridVector *grids, co
/* Restore grids after datablock was re-copied from original by depsgraph,
* we don't want to load them again if possible. */
BLI_assert(volume->id.tag & LIB_TAG_COPIED_ON_WRITE);
- BLI_assert(volume->runtime.grids != NULL && grids != NULL);
+ BLI_assert(volume->runtime.grids != nullptr && grids != nullptr);
if (!grids->is_loaded()) {
/* No grids loaded in CoW datablock, nothing lost by discarding. */
@@ -1080,8 +1080,8 @@ void BKE_volume_grids_backup_restore(Volume *volume, VolumeGridVector *grids, co
/* Draw Cache */
-void (*BKE_volume_batch_cache_dirty_tag_cb)(Volume *volume, int mode) = NULL;
-void (*BKE_volume_batch_cache_free_cb)(Volume *volume) = NULL;
+void (*BKE_volume_batch_cache_dirty_tag_cb)(Volume *volume, int mode) = nullptr;
+void (*BKE_volume_batch_cache_free_cb)(Volume *volume) = nullptr;
void BKE_volume_batch_cache_dirty_tag(Volume *volume, int mode)
{
@@ -1138,7 +1138,7 @@ VolumeGrid *BKE_volume_grid_get(const Volume *volume, int grid_index)
return &grid;
}
}
- return NULL;
+ return nullptr;
#else
UNUSED_VARS(volume, grid_index);
return NULL;
@@ -1149,7 +1149,7 @@ VolumeGrid *BKE_volume_grid_active_get(const Volume *volume)
{
const int num_grids = BKE_volume_num_grids(volume);
if (num_grids == 0) {
- return NULL;
+ return nullptr;
}
const int index = clamp_i(volume->active_grid, 0, num_grids - 1);
@@ -1167,7 +1167,7 @@ VolumeGrid *BKE_volume_grid_find(const Volume *volume, const char *name)
}
}
- return NULL;
+ return nullptr;
}
/* Grid Loading */
@@ -1352,7 +1352,7 @@ bool BKE_volume_grid_bounds(const VolumeGrid *volume_grid, float min[3], float m
Volume *BKE_volume_new_for_eval(const Volume *volume_src)
{
- Volume *volume_dst = (Volume *)BKE_id_new_nomain(ID_VO, NULL);
+ Volume *volume_dst = (Volume *)BKE_id_new_nomain(ID_VO, nullptr);
STRNCPY(volume_dst->id.name, volume_src->id.name);
volume_dst->mat = (Material **)MEM_dupallocN(volume_src->mat);
@@ -1372,7 +1372,7 @@ Volume *BKE_volume_copy_for_eval(Volume *volume_src, bool reference)
flags |= LIB_ID_COPY_CD_REFERENCE;
}
- Volume *result = (Volume *)BKE_id_copy_ex(NULL, &volume_src->id, NULL, flags);
+ Volume *result = (Volume *)BKE_id_copy_ex(nullptr, &volume_src->id, nullptr, flags);
return result;
}
@@ -1395,12 +1395,12 @@ VolumeGrid *BKE_volume_grid_add(Volume *volume, const char *name, VolumeGridType
{
#ifdef WITH_OPENVDB
VolumeGridVector &grids = *volume->runtime.grids;
- BLI_assert(BKE_volume_grid_find(volume, name) == NULL);
+ BLI_assert(BKE_volume_grid_find(volume, name) == nullptr);
BLI_assert(type != VOLUME_GRID_UNKNOWN);
openvdb::GridBase::Ptr vdb_grid = BKE_volume_grid_type_operation(type, CreateGridOp{});
if (!vdb_grid) {
- return NULL;
+ return nullptr;
}
vdb_grid->setName(name);
diff --git a/source/blender/blenkernel/intern/volume_render.cc b/source/blender/blenkernel/intern/volume_render.cc
index 37b397a9c6d..55e04911d42 100644
--- a/source/blender/blenkernel/intern/volume_render.cc
+++ b/source/blender/blenkernel/intern/volume_render.cc
@@ -123,7 +123,7 @@ bool BKE_volume_grid_dense_floats(const Volume *volume,
const int channels = BKE_volume_grid_channels(volume_grid);
const int elem_size = sizeof(float) * channels;
float *voxels = static_cast<float *>(MEM_malloc_arrayN(num_voxels, elem_size, __func__));
- if (voxels == NULL) {
+ if (voxels == nullptr) {
return false;
}
@@ -143,7 +143,7 @@ bool BKE_volume_grid_dense_floats(const Volume *volume,
void BKE_volume_dense_float_grid_clear(DenseFloatVolumeGrid *dense_grid)
{
- if (dense_grid->voxels != NULL) {
+ if (dense_grid->voxels != nullptr) {
MEM_freeN(dense_grid->voxels);
}
}
@@ -339,7 +339,7 @@ void BKE_volume_grid_wireframe(const Volume *volume,
void *cb_userdata)
{
if (volume->display.wireframe_type == VOLUME_WIREFRAME_NONE) {
- cb(cb_userdata, NULL, NULL, 0, 0);
+ cb(cb_userdata, nullptr, nullptr, 0, 0);
return;
}
diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc
index 568a3206b18..daa006fd5cc 100644
--- a/source/blender/blenlib/intern/delaunay_2d.cc
+++ b/source/blender/blenlib/intern/delaunay_2d.cc
@@ -654,12 +654,12 @@ template<typename T> inline bool is_border_edge(const CDTEdge<T> *e, const CDT_s
template<typename T> inline bool is_constrained_edge(const CDTEdge<T> *e)
{
- return e->input_ids != NULL;
+ return e->input_ids != nullptr;
}
template<typename T> inline bool is_deleted_edge(const CDTEdge<T> *e)
{
- return e->symedges[0].next == NULL;
+ return e->symedges[0].next == nullptr;
}
template<typename T> inline bool is_original_vert(const CDTVert<T> *v, CDT_state<T> *cdt)
@@ -1386,8 +1386,8 @@ void fill_crossdata_for_through_vert(CDTVert<T> *v,
cd_next->lambda = T(0);
cd_next->vert = v;
- cd_next->in = NULL;
- cd_next->out = NULL;
+ cd_next->in = nullptr;
+ cd_next->out = nullptr;
if (cd->lambda == 0) {
cd->out = cd_out;
}
@@ -1630,10 +1630,10 @@ void add_edge_constraint(
if (dbg_level > 0) {
std::cout << "\nADD EDGE CONSTRAINT\n" << vertname(v1) << " " << vertname(v2) << "\n";
}
- LinkNodePair edge_list = {NULL, NULL};
+ LinkNodePair edge_list = {nullptr, nullptr};
if (r_edges) {
- *r_edges = NULL;
+ *r_edges = nullptr;
}
/*
@@ -1648,7 +1648,7 @@ void add_edge_constraint(
if (t != nullptr) {
/* Segment already there. */
add_to_input_ids(&t->edge->input_ids, input_id);
- if (r_edges != NULL) {
+ if (r_edges != nullptr) {
BLI_linklist_append(&edge_list, t->edge);
*r_edges = edge_list.list;
}
@@ -1736,15 +1736,15 @@ void add_edge_constraint(
SymEdge<T> *se;
if (cd_prev->lambda == 0.0) {
se = find_symedge_between_verts(cd_prev->vert, v);
- if (se == NULL) {
+ if (se == nullptr) {
return;
}
cd_prev->out = se;
- cd->in = NULL;
+ cd->in = nullptr;
}
else {
se = find_symedge_with_face(v, sym(cd_prev->in)->face);
- if (se == NULL) {
+ if (se == nullptr) {
return;
}
cd->in = se;
@@ -1783,7 +1783,7 @@ void add_edge_constraint(
if (cd->lambda == -1.0) {
continue; /* This crossing was deleted. */
}
- t = NULL;
+ t = nullptr;
SymEdge<T> *tnext = t;
CDTEdge<T> *edge;
if (cd->lambda != 0.0) {
@@ -1795,7 +1795,7 @@ void add_edge_constraint(
else if (cd->lambda == 0.0) {
t = cd->in;
tnext = cd->out;
- if (t == NULL) {
+ if (t == nullptr) {
/* Previous non-deleted crossing must also have been a vert, and segment should exist. */
int j;
CrossData<T> *cd_prev;
@@ -1809,12 +1809,12 @@ void add_edge_constraint(
BLI_assert(cd_prev->out->next->vert == cd->vert);
edge = cd_prev->out->edge;
add_to_input_ids(&edge->input_ids, input_id);
- if (r_edges != NULL) {
+ if (r_edges != nullptr) {
BLI_linklist_append(&edge_list, edge);
}
}
}
- if (t != NULL) {
+ if (t != nullptr) {
if (tstart->next->vert == t->vert) {
edge = tstart->edge;
}
@@ -1822,7 +1822,7 @@ void add_edge_constraint(
edge = cdt_state->cdt.add_diagonal(tstart, t);
}
add_to_input_ids(&edge->input_ids, input_id);
- if (r_edges != NULL) {
+ if (r_edges != nullptr) {
BLI_linklist_append(&edge_list, edge);
}
/* Now retriangulate upper and lower gaps. */
@@ -1830,7 +1830,7 @@ void add_edge_constraint(
re_delaunay_triangulate(&cdt_state->cdt, &edge->symedges[1]);
}
if (i < ncrossings - 1) {
- if (tnext != NULL) {
+ if (tnext != nullptr) {
tstart = tnext;
}
}
@@ -2011,7 +2011,7 @@ template<typename T> void dissolve_symedge(CDT_state<T> *cdt_state, SymEdge<T> *
if (ELEM(cdt->outer_face->symedge, se, symse)) {
/* Advancing by 2 to get past possible 'sym(se)'. */
if (se->next->next == se) {
- cdt->outer_face->symedge = NULL;
+ cdt->outer_face->symedge = nullptr;
}
else {
cdt->outer_face->symedge = se->next->next;
@@ -2177,9 +2177,9 @@ template<typename T> void remove_outer_edges_until_constraints(CDT_state<T> *cdt
}
se = se->next;
} while (se != se_start);
- while (to_dissolve != NULL) {
+ while (to_dissolve != nullptr) {
se = static_cast<SymEdge<T> *>(BLI_linklist_pop(&to_dissolve));
- if (se->next != NULL) {
+ if (se->next != nullptr) {
dissolve_symedge(cdt_state, se);
}
}
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index 6647f8b8c92..53c104aae09 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -1137,7 +1137,7 @@ static bool non_trivially_2d_hex_overlap(int orients[2][3][3])
for (int ab = 0; ab < 2; ++ab) {
for (int i = 0; i < 3; ++i) {
bool ok = orients[ab][i][0] + orients[ab][i][1] + orients[ab][i][2] == 1 &&
- orients[ab][i][0] != 0 && orients[ab][i][1] != 0 && orients[i][2] != 0;
+ orients[ab][i][0] != 0 && orients[ab][i][1] != 0 && orients[i][2] != nullptr;
if (!ok) {
return false;
}
@@ -2460,12 +2460,12 @@ class TriOverlaps {
if (two_trees_no_self) {
BLI_bvhtree_balance(tree_b_);
/* Don't expect a lot of trivial intersects in this case. */
- overlap_ = BLI_bvhtree_overlap(tree_, tree_b_, &overlap_tot_, NULL, NULL);
+ overlap_ = BLI_bvhtree_overlap(tree_, tree_b_, &overlap_tot_, nullptr, nullptr);
}
else {
CBData cbdata{tm, shape_fn, nshapes, use_self};
if (nshapes == 1) {
- overlap_ = BLI_bvhtree_overlap(tree_, tree_, &overlap_tot_, NULL, NULL);
+ overlap_ = BLI_bvhtree_overlap(tree_, tree_, &overlap_tot_, nullptr, nullptr);
}
else {
overlap_ = BLI_bvhtree_overlap(
diff --git a/source/blender/blenlib/intern/task_pool.cc b/source/blender/blenlib/intern/task_pool.cc
index cf328ec407c..1a119e135d5 100644
--- a/source/blender/blenlib/intern/task_pool.cc
+++ b/source/blender/blenlib/intern/task_pool.cc
@@ -83,11 +83,11 @@ class Task {
free_taskdata(other.free_taskdata),
freedata(other.freedata)
{
- other.pool = NULL;
- other.run = NULL;
- other.taskdata = NULL;
+ other.pool = nullptr;
+ other.run = nullptr;
+ other.taskdata = nullptr;
other.free_taskdata = false;
- other.freedata = NULL;
+ other.freedata = nullptr;
}
#if defined(WITH_TBB) && TBB_INTERFACE_VERSION_MAJOR < 10
@@ -302,7 +302,7 @@ static void *background_task_run(void *userdata)
task->~Task();
MEM_freeN(task);
}
- return NULL;
+ return nullptr;
}
static void background_task_pool_create(TaskPool *pool)
diff --git a/source/blender/blenlib/intern/task_range.cc b/source/blender/blenlib/intern/task_range.cc
index 27e0fb0ed07..229129bd088 100644
--- a/source/blender/blenlib/intern/task_range.cc
+++ b/source/blender/blenlib/intern/task_range.cc
@@ -70,7 +70,7 @@ struct RangeTask {
~RangeTask()
{
- if (settings->func_free != NULL) {
+ if (settings->func_free != nullptr) {
settings->func_free(userdata, userdata_chunk);
}
MEM_SAFE_FREE(userdata_chunk);
@@ -83,7 +83,7 @@ struct RangeTask {
memcpy(userdata_chunk, from_chunk, settings->userdata_chunk_size);
}
else {
- userdata_chunk = NULL;
+ userdata_chunk = nullptr;
}
}
@@ -139,7 +139,7 @@ void BLI_task_parallel_range(const int start,
for (int i = start; i < stop; i++) {
func(userdata, i, &tls);
}
- if (settings->func_free != NULL) {
+ if (settings->func_free != nullptr) {
settings->func_free(userdata, settings->userdata_chunk);
}
}
diff --git a/source/blender/blenlib/tests/BLI_array_store_test.cc b/source/blender/blenlib/tests/BLI_array_store_test.cc
index a1ec8ec7bb3..ff050ce24db 100644
--- a/source/blender/blenlib/tests/BLI_array_store_test.cc
+++ b/source/blender/blenlib/tests/BLI_array_store_test.cc
@@ -125,7 +125,7 @@ static TestBuffer *testbuffer_list_add(ListBase *lb, const void *data, size_t da
TestBuffer *tb = (TestBuffer *)MEM_mallocN(sizeof(*tb), __func__);
tb->data = data;
tb->data_len = data_len;
- tb->state = NULL;
+ tb->state = nullptr;
BLI_addtail(lb, tb);
return tb;
}
@@ -244,10 +244,10 @@ static void testbuffer_list_data_randomize(ListBase *lb, unsigned int random_see
static void testbuffer_list_store_populate(BArrayStore *bs, ListBase *lb)
{
- for (TestBuffer *tb = (TestBuffer *)lb->first, *tb_prev = NULL; tb;
+ for (TestBuffer *tb = (TestBuffer *)lb->first, *tb_prev = nullptr; tb;
tb_prev = tb, tb = tb->next) {
tb->state = BLI_array_store_state_add(
- bs, tb->data, tb->data_len, (tb_prev ? tb_prev->state : NULL));
+ bs, tb->data, tb->data_len, (tb_prev ? tb_prev->state : nullptr));
}
}
@@ -255,7 +255,7 @@ static void testbuffer_list_store_clear(BArrayStore *bs, ListBase *lb)
{
for (TestBuffer *tb = (TestBuffer *)lb->first; tb; tb = tb->next) {
BLI_array_store_state_remove(bs, tb->state);
- tb->state = NULL;
+ tb->state = nullptr;
}
}
@@ -313,7 +313,7 @@ TEST(array_store, NopState)
{
BArrayStore *bs = BLI_array_store_create(1, 32);
const unsigned char data[] = "test";
- BArrayState *state = BLI_array_store_state_add(bs, data, sizeof(data) - 1, NULL);
+ BArrayState *state = BLI_array_store_state_add(bs, data, sizeof(data) - 1, nullptr);
EXPECT_EQ(BLI_array_store_state_size_get(state), sizeof(data) - 1);
BLI_array_store_state_remove(bs, state);
BLI_array_store_destroy(bs);
@@ -324,7 +324,7 @@ TEST(array_store, Single)
BArrayStore *bs = BLI_array_store_create(1, 32);
const char data_src[] = "test";
const char *data_dst;
- BArrayState *state = BLI_array_store_state_add(bs, data_src, sizeof(data_src), NULL);
+ BArrayState *state = BLI_array_store_state_add(bs, data_src, sizeof(data_src), nullptr);
size_t data_dst_len;
data_dst = (char *)BLI_array_store_state_data_get_alloc(state, &data_dst_len);
EXPECT_STREQ(data_src, data_dst);
@@ -339,7 +339,7 @@ TEST(array_store, DoubleNop)
const char data_src[] = "test";
const char *data_dst;
- BArrayState *state_a = BLI_array_store_state_add(bs, data_src, sizeof(data_src), NULL);
+ BArrayState *state_a = BLI_array_store_state_add(bs, data_src, sizeof(data_src), nullptr);
BArrayState *state_b = BLI_array_store_state_add(bs, data_src, sizeof(data_src), state_a);
EXPECT_EQ(BLI_array_store_calc_size_compacted_get(bs), sizeof(data_src));
@@ -366,7 +366,7 @@ TEST(array_store, DoubleDiff)
const char data_src_b[] = "####";
const char *data_dst;
- BArrayState *state_a = BLI_array_store_state_add(bs, data_src_a, sizeof(data_src_a), NULL);
+ BArrayState *state_a = BLI_array_store_state_add(bs, data_src_a, sizeof(data_src_a), nullptr);
BArrayState *state_b = BLI_array_store_state_add(bs, data_src_b, sizeof(data_src_b), state_a);
size_t data_dst_len;
@@ -594,7 +594,7 @@ static void testbuffer_list_state_random_data(ListBase *lb,
size_t data_len = rand_range_i(rng, data_min_len, data_max_len + stride, stride);
char *data = (char *)MEM_mallocN(data_len, __func__);
- if (lb->last == NULL) {
+ if (lb->last == nullptr) {
BLI_rng_get_char_n(rng, data, data_len);
}
else {
diff --git a/source/blender/blenlib/tests/BLI_array_utils_test.cc b/source/blender/blenlib/tests/BLI_array_utils_test.cc
index 33b4cd35d52..5d12b8fbd4d 100644
--- a/source/blender/blenlib/tests/BLI_array_utils_test.cc
+++ b/source/blender/blenlib/tests/BLI_array_utils_test.cc
@@ -91,7 +91,7 @@ TEST(array_utils, FindIndexInt4_DupeMid)
TEST(array_utils, FindIndexPointer)
{
- const char *data[4] = {NULL};
+ const char *data[4] = {nullptr};
STACK_DECLARE(data);
STACK_INIT(data, ARRAY_SIZE(data));
diff --git a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
index caacbf1a2c4..338d6f96bef 100644
--- a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
+++ b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
@@ -1513,7 +1513,7 @@ TEST(delaunay_d, CintTwoFace)
input.edges_len = 0;
input.faces_len = 2;
input.vert_coords = vert_coords;
- input.edges = NULL;
+ input.edges = nullptr;
input.faces = faces;
input.faces_len_table = faces_len;
input.faces_start_table = faces_start;
diff --git a/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc b/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc
index aad21ae4ad4..390f687dbd1 100644
--- a/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc
+++ b/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc
@@ -12,7 +12,7 @@
static void expr_pylike_parse_fail_test(const char *str)
{
- ExprPyLike_Parsed *expr = BLI_expr_pylike_parse(str, NULL, 0);
+ ExprPyLike_Parsed *expr = BLI_expr_pylike_parse(str, nullptr, 0);
EXPECT_FALSE(BLI_expr_pylike_is_valid(expr));
@@ -21,7 +21,7 @@ static void expr_pylike_parse_fail_test(const char *str)
static void expr_pylike_const_test(const char *str, double value, bool force_const)
{
- ExprPyLike_Parsed *expr = BLI_expr_pylike_parse(str, NULL, 0);
+ ExprPyLike_Parsed *expr = BLI_expr_pylike_parse(str, nullptr, 0);
if (force_const) {
EXPECT_TRUE(BLI_expr_pylike_is_constant(expr));
@@ -32,7 +32,7 @@ static void expr_pylike_const_test(const char *str, double value, bool force_con
}
double result;
- eExprPyLike_EvalStatus status = BLI_expr_pylike_eval(expr, NULL, 0, &result);
+ eExprPyLike_EvalStatus status = BLI_expr_pylike_eval(expr, nullptr, 0, &result);
EXPECT_EQ(status, EXPR_PYLIKE_SUCCESS);
EXPECT_EQ(result, value);
@@ -344,10 +344,10 @@ TEST_ERROR(Mixed3, "sqrt(x) + 1 / max(0, x)", 1.0, EXPR_PYLIKE_SUCCESS)
TEST(expr_pylike, Error_Invalid)
{
- ExprPyLike_Parsed *expr = BLI_expr_pylike_parse("", NULL, 0);
+ ExprPyLike_Parsed *expr = BLI_expr_pylike_parse("", nullptr, 0);
double result;
- EXPECT_EQ(BLI_expr_pylike_eval(expr, NULL, 0, &result), EXPR_PYLIKE_INVALID);
+ EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID);
BLI_expr_pylike_free(expr);
}
@@ -357,7 +357,7 @@ TEST(expr_pylike, Error_ArgumentCount)
ExprPyLike_Parsed *expr = parse_for_eval("x", false);
double result;
- EXPECT_EQ(BLI_expr_pylike_eval(expr, NULL, 0, &result), EXPR_PYLIKE_FATAL_ERROR);
+ EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_FATAL_ERROR);
BLI_expr_pylike_free(expr);
}
diff --git a/source/blender/blenlib/tests/BLI_ghash_test.cc b/source/blender/blenlib/tests/BLI_ghash_test.cc
index 484f158a85c..a0b24e96fcc 100644
--- a/source/blender/blenlib/tests/BLI_ghash_test.cc
+++ b/source/blender/blenlib/tests/BLI_ghash_test.cc
@@ -77,7 +77,7 @@ TEST(ghash, InsertLookup)
EXPECT_EQ(POINTER_AS_UINT(v), *k);
}
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
}
/* Here we simply insert and then remove all keys, ensuring we do get an empty,
@@ -98,14 +98,14 @@ TEST(ghash, InsertRemove)
bkt_size = BLI_ghash_buckets_len(ghash);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- void *v = BLI_ghash_popkey(ghash, POINTER_FROM_UINT(*k), NULL);
+ void *v = BLI_ghash_popkey(ghash, POINTER_FROM_UINT(*k), nullptr);
EXPECT_EQ(POINTER_AS_UINT(v), *k);
}
EXPECT_EQ(BLI_ghash_len(ghash), 0);
EXPECT_EQ(BLI_ghash_buckets_len(ghash), bkt_size);
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
}
/* Same as above, but this time we allow ghash to shrink. */
@@ -126,14 +126,14 @@ TEST(ghash, InsertRemoveShrink)
bkt_size = BLI_ghash_buckets_len(ghash);
for (i = TESTCASE_SIZE, k = keys; i--; k++) {
- void *v = BLI_ghash_popkey(ghash, POINTER_FROM_UINT(*k), NULL);
+ void *v = BLI_ghash_popkey(ghash, POINTER_FROM_UINT(*k), nullptr);
EXPECT_EQ(POINTER_AS_UINT(v), *k);
}
EXPECT_EQ(BLI_ghash_len(ghash), 0);
EXPECT_LT(BLI_ghash_buckets_len(ghash), bkt_size);
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
}
/* Check copy. */
@@ -152,7 +152,7 @@ TEST(ghash, Copy)
EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
- ghash_copy = BLI_ghash_copy(ghash, NULL, NULL);
+ ghash_copy = BLI_ghash_copy(ghash, nullptr, nullptr);
EXPECT_EQ(BLI_ghash_len(ghash_copy), TESTCASE_SIZE);
EXPECT_EQ(BLI_ghash_buckets_len(ghash_copy), BLI_ghash_buckets_len(ghash));
@@ -162,8 +162,8 @@ TEST(ghash, Copy)
EXPECT_EQ(POINTER_AS_UINT(v), *k);
}
- BLI_ghash_free(ghash, NULL, NULL);
- BLI_ghash_free(ghash_copy, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
+ BLI_ghash_free(ghash_copy, nullptr, nullptr);
}
/* Check pop. */
@@ -205,5 +205,5 @@ TEST(ghash, Pop)
}
EXPECT_EQ(BLI_ghash_len(ghash), 0);
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
}
diff --git a/source/blender/blenlib/tests/BLI_heap_simple_test.cc b/source/blender/blenlib/tests/BLI_heap_simple_test.cc
index e717a6e2653..f3a65125eeb 100644
--- a/source/blender/blenlib/tests/BLI_heap_simple_test.cc
+++ b/source/blender/blenlib/tests/BLI_heap_simple_test.cc
@@ -29,7 +29,7 @@ TEST(heap, SimpleEmpty)
heap = BLI_heapsimple_new();
EXPECT_TRUE(BLI_heapsimple_is_empty(heap));
EXPECT_EQ(BLI_heapsimple_len(heap), 0);
- BLI_heapsimple_free(heap, NULL);
+ BLI_heapsimple_free(heap, nullptr);
}
TEST(heap, SimpleOne)
@@ -45,7 +45,7 @@ TEST(heap, SimpleOne)
EXPECT_EQ(in, BLI_heapsimple_pop_min(heap));
EXPECT_TRUE(BLI_heapsimple_is_empty(heap));
EXPECT_EQ(BLI_heapsimple_len(heap), 0);
- BLI_heapsimple_free(heap, NULL);
+ BLI_heapsimple_free(heap, nullptr);
}
TEST(heap, SimpleRange)
@@ -59,7 +59,7 @@ TEST(heap, SimpleRange)
EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heapsimple_pop_min(heap)));
}
EXPECT_TRUE(BLI_heapsimple_is_empty(heap));
- BLI_heapsimple_free(heap, NULL);
+ BLI_heapsimple_free(heap, nullptr);
}
TEST(heap, SimpleRangeReverse)
@@ -73,7 +73,7 @@ TEST(heap, SimpleRangeReverse)
EXPECT_EQ(-out_test, POINTER_AS_INT(BLI_heapsimple_pop_min(heap)));
}
EXPECT_TRUE(BLI_heapsimple_is_empty(heap));
- BLI_heapsimple_free(heap, NULL);
+ BLI_heapsimple_free(heap, nullptr);
}
TEST(heap, SimpleDuplicates)
@@ -81,13 +81,13 @@ TEST(heap, SimpleDuplicates)
const int items_total = SIZE;
HeapSimple *heap = BLI_heapsimple_new();
for (int in = 0; in < items_total; in++) {
- BLI_heapsimple_insert(heap, 1.0f, 0);
+ BLI_heapsimple_insert(heap, 1.0f, nullptr);
}
for (int out_test = 0; out_test < items_total; out_test++) {
EXPECT_EQ(0, POINTER_AS_INT(BLI_heapsimple_pop_min(heap)));
}
EXPECT_TRUE(BLI_heapsimple_is_empty(heap));
- BLI_heapsimple_free(heap, NULL);
+ BLI_heapsimple_free(heap, nullptr);
}
static void random_heapsimple_helper(const int items_total, const int random_seed)
@@ -103,7 +103,7 @@ static void random_heapsimple_helper(const int items_total, const int random_see
EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heapsimple_pop_min(heap)));
}
EXPECT_TRUE(BLI_heapsimple_is_empty(heap));
- BLI_heapsimple_free(heap, NULL);
+ BLI_heapsimple_free(heap, nullptr);
MEM_freeN(values);
}
diff --git a/source/blender/blenlib/tests/BLI_heap_test.cc b/source/blender/blenlib/tests/BLI_heap_test.cc
index 87e68c175a2..8b207c17c84 100644
--- a/source/blender/blenlib/tests/BLI_heap_test.cc
+++ b/source/blender/blenlib/tests/BLI_heap_test.cc
@@ -28,7 +28,7 @@ TEST(heap, Empty)
heap = BLI_heap_new();
EXPECT_TRUE(BLI_heap_is_empty(heap));
EXPECT_EQ(BLI_heap_len(heap), 0);
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
}
TEST(heap, One)
@@ -44,7 +44,7 @@ TEST(heap, One)
EXPECT_EQ(in, BLI_heap_pop_min(heap));
EXPECT_TRUE(BLI_heap_is_empty(heap));
EXPECT_EQ(BLI_heap_len(heap), 0);
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
}
TEST(heap, Range)
@@ -58,7 +58,7 @@ TEST(heap, Range)
EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
}
TEST(heap, RangeReverse)
@@ -72,7 +72,7 @@ TEST(heap, RangeReverse)
EXPECT_EQ(-out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
}
TEST(heap, RangeRemove)
@@ -85,13 +85,13 @@ TEST(heap, RangeRemove)
}
for (int i = 0; i < items_total; i += 2) {
BLI_heap_remove(heap, nodes[i]);
- nodes[i] = NULL;
+ nodes[i] = nullptr;
}
for (int out_test = 1; out_test < items_total; out_test += 2) {
EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
MEM_freeN(nodes);
}
@@ -100,13 +100,13 @@ TEST(heap, Duplicates)
const int items_total = SIZE;
Heap *heap = BLI_heap_new();
for (int in = 0; in < items_total; in++) {
- BLI_heap_insert(heap, 1.0f, 0);
+ BLI_heap_insert(heap, 1.0f, nullptr);
}
for (int out_test = 0; out_test < items_total; out_test++) {
EXPECT_EQ(0, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
}
static void random_heap_helper(const int items_total, const int random_seed)
@@ -122,7 +122,7 @@ static void random_heap_helper(const int items_total, const int random_seed)
EXPECT_EQ(out_test, POINTER_AS_INT(BLI_heap_pop_min(heap)));
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
MEM_freeN(values);
}
@@ -156,7 +156,7 @@ TEST(heap, ReInsertSimple)
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
MEM_freeN(nodes);
}
@@ -181,7 +181,7 @@ static void random_heap_reinsert_helper(const int items_total, const int random_
BLI_heap_pop_min(heap);
}
EXPECT_TRUE(BLI_heap_is_empty(heap));
- BLI_heap_free(heap, NULL);
+ BLI_heap_free(heap, nullptr);
MEM_freeN(nodes);
}
diff --git a/source/blender/blenlib/tests/BLI_kdopbvh_test.cc b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc
index 2e8032400e3..f921c3ae2a4 100644
--- a/source/blender/blenlib/tests/BLI_kdopbvh_test.cc
+++ b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc
@@ -82,11 +82,11 @@ static void find_nearest_points_test(
BLI_bvhtree_balance(tree);
/* first find each point */
- BVHTree_NearestPointCallback callback = optimal ? optimal_check_callback : NULL;
+ BVHTree_NearestPointCallback callback = optimal ? optimal_check_callback : nullptr;
int flags = optimal ? BVH_NEAREST_OPTIMAL_ORDER : 0;
for (int i = 0; i < points_len; i++) {
- const int j = BLI_bvhtree_find_nearest_ex(tree, points[i], NULL, callback, points, flags);
+ const int j = BLI_bvhtree_find_nearest_ex(tree, points[i], nullptr, callback, points, flags);
if (j != i) {
#if 0
const float dist = len_v3v3(points[i], points[j]);
diff --git a/source/blender/blenlib/tests/BLI_linklist_lockfree_test.cc b/source/blender/blenlib/tests/BLI_linklist_lockfree_test.cc
index d1a527d57ac..f2ae121e8ae 100644
--- a/source/blender/blenlib/tests/BLI_linklist_lockfree_test.cc
+++ b/source/blender/blenlib/tests/BLI_linklist_lockfree_test.cc
@@ -15,7 +15,7 @@ TEST(LockfreeLinkList, Init)
BLI_linklist_lockfree_init(&list);
EXPECT_EQ(list.head, &list.dummy_node);
EXPECT_EQ(list.tail, &list.dummy_node);
- BLI_linklist_lockfree_free(&list, NULL);
+ BLI_linklist_lockfree_free(&list, nullptr);
}
TEST(LockfreeLinkList, InsertSingle)
@@ -27,7 +27,7 @@ TEST(LockfreeLinkList, InsertSingle)
EXPECT_EQ(list.head, &list.dummy_node);
EXPECT_EQ(list.head->next, &node);
EXPECT_EQ(list.tail, &node);
- BLI_linklist_lockfree_free(&list, NULL);
+ BLI_linklist_lockfree_free(&list, nullptr);
}
TEST(LockfreeLinkList, InsertMultiple)
@@ -45,7 +45,7 @@ TEST(LockfreeLinkList, InsertMultiple)
EXPECT_EQ(list.tail, &nodes[num_nodes - 1]);
/* Check rest of the nodes. */
int node_index = 0;
- for (LockfreeLinkNode *node = BLI_linklist_lockfree_begin(&list); node != NULL;
+ for (LockfreeLinkNode *node = BLI_linklist_lockfree_begin(&list); node != nullptr;
node = node->next, ++node_index) {
EXPECT_EQ(node, &nodes[node_index]);
if (node_index != num_nodes - 1) {
@@ -53,7 +53,7 @@ TEST(LockfreeLinkList, InsertMultiple)
}
}
/* Free list. */
- BLI_linklist_lockfree_free(&list, NULL);
+ BLI_linklist_lockfree_free(&list, nullptr);
}
namespace {
@@ -84,7 +84,7 @@ TEST(LockfreeLinkList, InsertMultipleConcurrent)
TaskPool *pool = BLI_task_pool_create_suspended(&list, TASK_PRIORITY_HIGH);
/* Push tasks to the pool. */
for (int i = 0; i < num_nodes; ++i) {
- BLI_task_pool_push(pool, concurrent_insert, POINTER_FROM_INT(i), false, NULL);
+ BLI_task_pool_push(pool, concurrent_insert, POINTER_FROM_INT(i), false, nullptr);
}
/* Run all the tasks. */
BLI_task_pool_work_and_wait(pool);
@@ -92,7 +92,7 @@ TEST(LockfreeLinkList, InsertMultipleConcurrent)
EXPECT_EQ(list.head, &list.dummy_node);
bool *visited_nodes = (bool *)MEM_callocN(sizeof(bool) * num_nodes, "visited nodes");
/* First, we make sure that none of the nodes are added twice. */
- for (LockfreeLinkNode *node_v = BLI_linklist_lockfree_begin(&list); node_v != NULL;
+ for (LockfreeLinkNode *node_v = BLI_linklist_lockfree_begin(&list); node_v != nullptr;
node_v = node_v->next) {
IndexedNode *node = (IndexedNode *)node_v;
EXPECT_GE(node->index, 0);
diff --git a/source/blender/blenlib/tests/BLI_listbase_test.cc b/source/blender/blenlib/tests/BLI_listbase_test.cc
index e5b504a0040..ff85cf79e87 100644
--- a/source/blender/blenlib/tests/BLI_listbase_test.cc
+++ b/source/blender/blenlib/tests/BLI_listbase_test.cc
@@ -22,19 +22,19 @@ static bool listbase_is_valid(const ListBase *listbase)
if (listbase->first) {
const Link *prev, *link;
link = (Link *)listbase->first;
- TESTFAIL(link->prev == NULL);
+ TESTFAIL(link->prev == nullptr);
link = (Link *)listbase->last;
- TESTFAIL(link->next == NULL);
+ TESTFAIL(link->next == nullptr);
- prev = NULL;
+ prev = nullptr;
link = (Link *)listbase->first;
do {
TESTFAIL(link->prev == prev);
} while ((void)(prev = link), (link = link->next));
TESTFAIL(prev == listbase->last);
- prev = NULL;
+ prev = nullptr;
link = (Link *)listbase->last;
do {
TESTFAIL(link->next == prev);
@@ -42,7 +42,7 @@ static bool listbase_is_valid(const ListBase *listbase)
TESTFAIL(prev == listbase->first);
}
else {
- TESTFAIL(listbase->last == NULL);
+ TESTFAIL(listbase->last == nullptr);
}
#undef TESTFAIL
@@ -73,12 +73,12 @@ TEST(listbase, FindLinkOrIndex)
/* Empty list */
BLI_listbase_clear(&lb);
- EXPECT_EQ(BLI_findlink(&lb, -1), (void *)NULL);
- EXPECT_EQ(BLI_findlink(&lb, 0), (void *)NULL);
- EXPECT_EQ(BLI_findlink(&lb, 1), (void *)NULL);
- EXPECT_EQ(BLI_rfindlink(&lb, -1), (void *)NULL);
- EXPECT_EQ(BLI_rfindlink(&lb, 0), (void *)NULL);
- EXPECT_EQ(BLI_rfindlink(&lb, 1), (void *)NULL);
+ EXPECT_EQ(BLI_findlink(&lb, -1), (void *)nullptr);
+ EXPECT_EQ(BLI_findlink(&lb, 0), (void *)nullptr);
+ EXPECT_EQ(BLI_findlink(&lb, 1), (void *)nullptr);
+ EXPECT_EQ(BLI_rfindlink(&lb, -1), (void *)nullptr);
+ EXPECT_EQ(BLI_rfindlink(&lb, 0), (void *)nullptr);
+ EXPECT_EQ(BLI_rfindlink(&lb, 1), (void *)nullptr);
EXPECT_EQ(BLI_findindex(&lb, link1), -1);
/* One link */
diff --git a/source/blender/blenlib/tests/BLI_path_util_test.cc b/source/blender/blenlib/tests/BLI_path_util_test.cc
index d8c10f60093..cf5135731e2 100644
--- a/source/blender/blenlib/tests/BLI_path_util_test.cc
+++ b/source/blender/blenlib/tests/BLI_path_util_test.cc
@@ -18,46 +18,46 @@ TEST(path_util, Clean)
/* "/./" -> "/" */
{
char path[FILE_MAX] = "/a/./b/./c/./";
- BLI_path_normalize(NULL, path);
+ BLI_path_normalize(nullptr, path);
EXPECT_STREQ("/a/b/c/", path);
}
{
char path[FILE_MAX] = "/./././";
- BLI_path_normalize(NULL, path);
+ BLI_path_normalize(nullptr, path);
EXPECT_STREQ("/", path);
}
{
char path[FILE_MAX] = "/a/./././b/";
- BLI_path_normalize(NULL, path);
+ BLI_path_normalize(nullptr, path);
EXPECT_STREQ("/a/b/", path);
}
/* "//" -> "/" */
{
char path[FILE_MAX] = "a////";
- BLI_path_normalize(NULL, path);
+ BLI_path_normalize(nullptr, path);
EXPECT_STREQ("a/", path);
}
if (false) /* FIXME */
{
char path[FILE_MAX] = "./a////";
- BLI_path_normalize(NULL, path);
+ BLI_path_normalize(nullptr, path);
EXPECT_STREQ("./a/", path);
}
/* "foo/bar/../" -> "foo/" */
{
char path[FILE_MAX] = "/a/b/c/../../../";
- BLI_path_normalize(NULL, path);
+ BLI_path_normalize(nullptr, path);
EXPECT_STREQ("/", path);
}
{
char path[FILE_MAX] = "/a/../a/b/../b/c/../c/";
- BLI_path_normalize(NULL, path);
+ BLI_path_normalize(nullptr, path);
EXPECT_STREQ("/a/b/c/", path);
}
@@ -96,10 +96,10 @@ TEST(path_util, NameAtIndex_Single)
AT_INDEX("//a//", 0, "a");
AT_INDEX("a/b", 0, "a");
- AT_INDEX("/a", 1, NULL);
- AT_INDEX("/a/", 1, NULL);
- AT_INDEX("a/", 1, NULL);
- AT_INDEX("//a//", 1, NULL);
+ AT_INDEX("/a", 1, nullptr);
+ AT_INDEX("/a/", 1, nullptr);
+ AT_INDEX("a/", 1, nullptr);
+ AT_INDEX("//a//", 1, nullptr);
}
TEST(path_util, NameAtIndex_SingleNeg)
{
@@ -109,10 +109,10 @@ TEST(path_util, NameAtIndex_SingleNeg)
AT_INDEX("//a//", -1, "a");
AT_INDEX("a/b", -1, "b");
- AT_INDEX("/a", -2, NULL);
- AT_INDEX("/a/", -2, NULL);
- AT_INDEX("a/", -2, NULL);
- AT_INDEX("//a//", -2, NULL);
+ AT_INDEX("/a", -2, nullptr);
+ AT_INDEX("/a/", -2, nullptr);
+ AT_INDEX("a/", -2, nullptr);
+ AT_INDEX("//a//", -2, nullptr);
}
TEST(path_util, NameAtIndex_Double)
@@ -123,10 +123,10 @@ TEST(path_util, NameAtIndex_Double)
AT_INDEX("//ab//", 0, "ab");
AT_INDEX("ab/c", 0, "ab");
- AT_INDEX("/ab", 1, NULL);
- AT_INDEX("/ab/", 1, NULL);
- AT_INDEX("ab/", 1, NULL);
- AT_INDEX("//ab//", 1, NULL);
+ AT_INDEX("/ab", 1, nullptr);
+ AT_INDEX("/ab/", 1, nullptr);
+ AT_INDEX("ab/", 1, nullptr);
+ AT_INDEX("//ab//", 1, nullptr);
}
TEST(path_util, NameAtIndex_DoublNeg)
@@ -137,10 +137,10 @@ TEST(path_util, NameAtIndex_DoublNeg)
AT_INDEX("//ab//", -1, "ab");
AT_INDEX("ab/c", -1, "c");
- AT_INDEX("/ab", -2, NULL);
- AT_INDEX("/ab/", -2, NULL);
- AT_INDEX("ab/", -2, NULL);
- AT_INDEX("//ab//", -2, NULL);
+ AT_INDEX("/ab", -2, nullptr);
+ AT_INDEX("/ab/", -2, nullptr);
+ AT_INDEX("ab/", -2, nullptr);
+ AT_INDEX("//ab//", -2, nullptr);
}
TEST(path_util, NameAtIndex_Misc)
@@ -149,8 +149,8 @@ TEST(path_util, NameAtIndex_Misc)
AT_INDEX("/how/now/brown/cow", 1, "now");
AT_INDEX("/how/now/brown/cow", 2, "brown");
AT_INDEX("/how/now/brown/cow", 3, "cow");
- AT_INDEX("/how/now/brown/cow", 4, NULL);
- AT_INDEX("/how/now/brown/cow/", 4, NULL);
+ AT_INDEX("/how/now/brown/cow", 4, nullptr);
+ AT_INDEX("/how/now/brown/cow/", 4, nullptr);
}
TEST(path_util, NameAtIndex_MiscNeg)
@@ -159,8 +159,8 @@ TEST(path_util, NameAtIndex_MiscNeg)
AT_INDEX("/how/now/brown/cow", 1, "now");
AT_INDEX("/how/now/brown/cow", 2, "brown");
AT_INDEX("/how/now/brown/cow", 3, "cow");
- AT_INDEX("/how/now/brown/cow", 4, NULL);
- AT_INDEX("/how/now/brown/cow/", 4, NULL);
+ AT_INDEX("/how/now/brown/cow", 4, nullptr);
+ AT_INDEX("/how/now/brown/cow/", 4, nullptr);
}
TEST(path_util, NameAtIndex_MiscComplex)
@@ -169,8 +169,8 @@ TEST(path_util, NameAtIndex_MiscComplex)
AT_INDEX("//how///now\\/brown/cow", 1, "now");
AT_INDEX("/how/now\\//brown\\/cow", 2, "brown");
AT_INDEX("/how/now/brown/cow//\\", 3, "cow");
- AT_INDEX("/how/now/brown/\\cow", 4, NULL);
- AT_INDEX("how/now/brown/\\cow\\", 4, NULL);
+ AT_INDEX("/how/now/brown/\\cow", 4, nullptr);
+ AT_INDEX("how/now/brown/\\cow\\", 4, nullptr);
}
TEST(path_util, NameAtIndex_MiscComplexNeg)
@@ -179,24 +179,24 @@ TEST(path_util, NameAtIndex_MiscComplexNeg)
AT_INDEX("//how///now\\/brown/cow", -3, "now");
AT_INDEX("/how/now\\//brown\\/cow", -2, "brown");
AT_INDEX("/how/now/brown/cow//\\", -1, "cow");
- AT_INDEX("/how/now/brown/\\cow", -5, NULL);
- AT_INDEX("how/now/brown/\\cow\\", -5, NULL);
+ AT_INDEX("/how/now/brown/\\cow", -5, nullptr);
+ AT_INDEX("how/now/brown/\\cow\\", -5, nullptr);
}
TEST(path_util, NameAtIndex_NoneComplex)
{
- AT_INDEX("", 0, NULL);
- AT_INDEX("/", 0, NULL);
- AT_INDEX("//", 0, NULL);
- AT_INDEX("///", 0, NULL);
+ AT_INDEX("", 0, nullptr);
+ AT_INDEX("/", 0, nullptr);
+ AT_INDEX("//", 0, nullptr);
+ AT_INDEX("///", 0, nullptr);
}
TEST(path_util, NameAtIndex_NoneComplexNeg)
{
- AT_INDEX("", -1, NULL);
- AT_INDEX("/", -1, NULL);
- AT_INDEX("//", -1, NULL);
- AT_INDEX("///", -1, NULL);
+ AT_INDEX("", -1, nullptr);
+ AT_INDEX("/", -1, nullptr);
+ AT_INDEX("//", -1, nullptr);
+ AT_INDEX("///", -1, nullptr);
}
#undef AT_INDEX
@@ -590,9 +590,9 @@ TEST(path_util, PathFrameGet)
/* BLI_path_extension */
TEST(path_util, PathExtension)
{
- EXPECT_EQ(NULL, BLI_path_extension("some.def/file"));
- EXPECT_EQ(NULL, BLI_path_extension("Text"));
- EXPECT_EQ(NULL, BLI_path_extension("Text…001"));
+ EXPECT_EQ(nullptr, BLI_path_extension("some.def/file"));
+ EXPECT_EQ(nullptr, BLI_path_extension("Text"));
+ EXPECT_EQ(nullptr, BLI_path_extension("Text…001"));
EXPECT_STREQ(".", BLI_path_extension("some/file."));
EXPECT_STREQ(".gz", BLI_path_extension("some/file.tar.gz"));
diff --git a/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc b/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc
index 624a296e758..3c9d12c7178 100644
--- a/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc
+++ b/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc
@@ -118,7 +118,7 @@ static void test_polyfill_topology(const float /*poly*/[][2],
}
BLI_edgehashIterator_free(ehi);
- BLI_edgehash_free(edgehash, NULL);
+ BLI_edgehash_free(edgehash, nullptr);
}
/**
@@ -205,7 +205,7 @@ static void test_polyfill_template(const char *id,
test_polyfill_template_check(id, is_degenerate, poly, poly_tot, tris, tris_tot);
BLI_memarena_free(pf_arena);
- BLI_heap_free(pf_heap, NULL);
+ BLI_heap_free(pf_heap, nullptr);
}
#endif
}
diff --git a/source/blender/blenlib/tests/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc
index e8fe505a6c9..58135adbcca 100644
--- a/source/blender/blenlib/tests/BLI_string_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_test.cc
@@ -66,8 +66,8 @@ TEST(string, StrPartition)
/* "" -> "", NULL, NULL, 0 */
pre_ln = BLI_str_partition(str, delim, &sep, &suf);
EXPECT_EQ(pre_ln, 0);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
{
@@ -76,8 +76,8 @@ TEST(string, StrPartition)
/* "material" -> "material", NULL, NULL, 8 */
pre_ln = BLI_str_partition(str, delim, &sep, &suf);
EXPECT_EQ(pre_ln, 8);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
}
@@ -125,8 +125,8 @@ TEST(string, StrRPartition)
/* "" -> "", NULL, NULL, 0 */
pre_ln = BLI_str_rpartition(str, delim, &sep, &suf);
EXPECT_EQ(pre_ln, 0);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
{
@@ -135,8 +135,8 @@ TEST(string, StrRPartition)
/* "material" -> "material", NULL, NULL, 8 */
pre_ln = BLI_str_rpartition(str, delim, &sep, &suf);
EXPECT_EQ(pre_ln, 8);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
}
@@ -166,8 +166,8 @@ TEST(string, StrPartitionEx)
/* "mate.rial" over "mate" -> "mate.rial", NULL, NULL, 4 */
pre_ln = BLI_str_partition_ex(str, str + 4, delim, &sep, &suf, true);
EXPECT_EQ(pre_ln, 4);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
}
@@ -215,8 +215,8 @@ TEST(string, StrPartitionUtf8)
/* "" -> "", NULL, NULL, 0 */
pre_ln = BLI_str_partition_utf8(str, delim, &sep, &suf);
EXPECT_EQ(pre_ln, 0);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
{
@@ -225,8 +225,8 @@ TEST(string, StrPartitionUtf8)
/* "material" -> "material", NULL, NULL, 8 */
pre_ln = BLI_str_partition_utf8(str, delim, &sep, &suf);
EXPECT_EQ(pre_ln, 8);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
}
@@ -274,8 +274,8 @@ TEST(string, StrRPartitionUtf8)
/* "" -> "", NULL, NULL, 0 */
pre_ln = BLI_str_rpartition_utf8(str, delim, &sep, &suf);
EXPECT_EQ(pre_ln, 0);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
{
@@ -284,8 +284,8 @@ TEST(string, StrRPartitionUtf8)
/* "material" -> "material", NULL, NULL, 8 */
pre_ln = BLI_str_rpartition_utf8(str, delim, &sep, &suf);
EXPECT_EQ(pre_ln, 8);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
}
@@ -316,8 +316,8 @@ TEST(string, StrPartitionExUtf8)
/* "mate\xe2\x98\xafrial" over "mate" -> "mate\xe2\x98\xafrial", NULL, NULL, 4 */
pre_ln = BLI_str_partition_ex_utf8(str, str + 4, delim, &sep, &suf, true);
EXPECT_EQ(pre_ln, 4);
- EXPECT_EQ(sep, (void *)NULL);
- EXPECT_EQ(suf, (void *)NULL);
+ EXPECT_EQ(sep, (void *)nullptr);
+ EXPECT_EQ(suf, (void *)nullptr);
}
}
@@ -567,7 +567,7 @@ TEST(string, StringStrncasestr)
EXPECT_EQ(res, str_test0 + 1);
res = BLI_strncasestr(str_test0, "not there", 9);
- EXPECT_EQ(res, (void *)NULL);
+ EXPECT_EQ(res, (void *)nullptr);
}
/* BLI_string_max_possible_word_count */
diff --git a/source/blender/blenlib/tests/BLI_string_utf8_test.cc b/source/blender/blenlib/tests/BLI_string_utf8_test.cc
index 9743c1387a0..1833945b3fd 100644
--- a/source/blender/blenlib/tests/BLI_string_utf8_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_utf8_test.cc
@@ -262,14 +262,14 @@ const char *utf8_invalid_tests[][3] = {
/* For now, we ignore those, they do not seem to be crucial anyway... */
/* 5.3.3 U+FDD0 .. U+FDEF
* 5.3.4 U+nFFFE U+nFFFF (for n = 1..10) */
- {NULL, NULL, NULL},
+ {nullptr, nullptr, nullptr},
};
/* clang-format on */
/* BLI_utf8_invalid_strip (and indirectly, BLI_utf8_invalid_byte). */
TEST(string, Utf8InvalidBytes)
{
- for (int i = 0; utf8_invalid_tests[i][0] != NULL; i++) {
+ for (int i = 0; utf8_invalid_tests[i][0] != nullptr; i++) {
const char *tst = utf8_invalid_tests[i][0];
const char *tst_stripped = utf8_invalid_tests[i][1];
const int num_errors = (int)utf8_invalid_tests[i][2][0];
diff --git a/source/blender/blenlib/tests/BLI_task_graph_test.cc b/source/blender/blenlib/tests/BLI_task_graph_test.cc
index efcbf923625..3374411b2bd 100644
--- a/source/blender/blenlib/tests/BLI_task_graph_test.cc
+++ b/source/blender/blenlib/tests/BLI_task_graph_test.cc
@@ -52,16 +52,16 @@ TEST(task, GraphSequential)
TaskGraph *graph = BLI_task_graph_create();
/* 0 => 1 */
- TaskNode *node_a = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, NULL);
+ TaskNode *node_a = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, nullptr);
/* 1 => 2 */
TaskNode *node_b = BLI_task_graph_node_create(
- graph, TaskData_multiply_by_two_value, &data, NULL);
+ graph, TaskData_multiply_by_two_value, &data, nullptr);
/* 2 => 1 */
- TaskNode *node_c = BLI_task_graph_node_create(graph, TaskData_decrease_value, &data, NULL);
+ TaskNode *node_c = BLI_task_graph_node_create(graph, TaskData_decrease_value, &data, nullptr);
/* 2 => 1 */
- TaskNode *node_d = BLI_task_graph_node_create(graph, TaskData_square_value, &data, NULL);
+ TaskNode *node_d = BLI_task_graph_node_create(graph, TaskData_square_value, &data, nullptr);
/* 1 => 1 */
- TaskNode *node_e = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, NULL);
+ TaskNode *node_e = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, nullptr);
/* 1 => 2 */
const int expected_value = 2;
@@ -82,12 +82,12 @@ TEST(task, GraphStartAtAnyNode)
TaskData data = {4};
TaskGraph *graph = BLI_task_graph_create();
- TaskNode *node_a = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, NULL);
+ TaskNode *node_a = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, nullptr);
TaskNode *node_b = BLI_task_graph_node_create(
- graph, TaskData_multiply_by_two_value, &data, NULL);
- TaskNode *node_c = BLI_task_graph_node_create(graph, TaskData_decrease_value, &data, NULL);
- TaskNode *node_d = BLI_task_graph_node_create(graph, TaskData_square_value, &data, NULL);
- TaskNode *node_e = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, NULL);
+ graph, TaskData_multiply_by_two_value, &data, nullptr);
+ TaskNode *node_c = BLI_task_graph_node_create(graph, TaskData_decrease_value, &data, nullptr);
+ TaskNode *node_d = BLI_task_graph_node_create(graph, TaskData_square_value, &data, nullptr);
+ TaskNode *node_e = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, nullptr);
// ((4 - 1) * (4 - 1)) + 1
const int expected_value = 10;
@@ -109,11 +109,11 @@ TEST(task, GraphSplit)
TaskData data = {1};
TaskGraph *graph = BLI_task_graph_create();
- TaskNode *node_a = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, NULL);
- TaskNode *node_b = BLI_task_graph_node_create(graph, TaskData_store_value, &data, NULL);
- TaskNode *node_c = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, NULL);
+ TaskNode *node_a = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, nullptr);
+ TaskNode *node_b = BLI_task_graph_node_create(graph, TaskData_store_value, &data, nullptr);
+ TaskNode *node_c = BLI_task_graph_node_create(graph, TaskData_increase_value, &data, nullptr);
TaskNode *node_d = BLI_task_graph_node_create(
- graph, TaskData_multiply_by_two_store, &data, NULL);
+ graph, TaskData_multiply_by_two_store, &data, nullptr);
BLI_task_graph_edge_create(node_a, node_b);
BLI_task_graph_edge_create(node_b, node_c);
BLI_task_graph_edge_create(node_b, node_d);
@@ -134,12 +134,12 @@ TEST(task, GraphForest)
{
TaskNode *tree1_node_a = BLI_task_graph_node_create(
- graph, TaskData_increase_value, &data1, NULL);
- TaskNode *tree1_node_b = BLI_task_graph_node_create(graph, TaskData_store_value, &data1, NULL);
+ graph, TaskData_increase_value, &data1, nullptr);
+ TaskNode *tree1_node_b = BLI_task_graph_node_create(graph, TaskData_store_value, &data1, nullptr);
TaskNode *tree1_node_c = BLI_task_graph_node_create(
- graph, TaskData_increase_value, &data1, NULL);
+ graph, TaskData_increase_value, &data1, nullptr);
TaskNode *tree1_node_d = BLI_task_graph_node_create(
- graph, TaskData_multiply_by_two_store, &data1, NULL);
+ graph, TaskData_multiply_by_two_store, &data1, nullptr);
BLI_task_graph_edge_create(tree1_node_a, tree1_node_b);
BLI_task_graph_edge_create(tree1_node_b, tree1_node_c);
BLI_task_graph_edge_create(tree1_node_b, tree1_node_d);
@@ -148,12 +148,12 @@ TEST(task, GraphForest)
{
TaskNode *tree2_node_a = BLI_task_graph_node_create(
- graph, TaskData_increase_value, &data2, NULL);
- TaskNode *tree2_node_b = BLI_task_graph_node_create(graph, TaskData_store_value, &data2, NULL);
+ graph, TaskData_increase_value, &data2, nullptr);
+ TaskNode *tree2_node_b = BLI_task_graph_node_create(graph, TaskData_store_value, &data2, nullptr);
TaskNode *tree2_node_c = BLI_task_graph_node_create(
- graph, TaskData_increase_value, &data2, NULL);
+ graph, TaskData_increase_value, &data2, nullptr);
TaskNode *tree2_node_d = BLI_task_graph_node_create(
- graph, TaskData_multiply_by_two_store, &data2, NULL);
+ graph, TaskData_multiply_by_two_store, &data2, nullptr);
BLI_task_graph_edge_create(tree2_node_a, tree2_node_b);
BLI_task_graph_edge_create(tree2_node_b, tree2_node_c);
BLI_task_graph_edge_create(tree2_node_b, tree2_node_d);
@@ -175,7 +175,7 @@ TEST(task, GraphTaskData)
TaskGraph *graph = BLI_task_graph_create();
TaskNode *node_a = BLI_task_graph_node_create(
graph, TaskData_store_value, &data, TaskData_increase_value);
- TaskNode *node_b = BLI_task_graph_node_create(graph, TaskData_store_value, &data, NULL);
+ TaskNode *node_b = BLI_task_graph_node_create(graph, TaskData_store_value, &data, nullptr);
BLI_task_graph_edge_create(node_a, node_b);
EXPECT_TRUE(BLI_task_graph_node_push_work(node_a));
BLI_task_graph_work_and_wait(graph);
diff --git a/source/blender/blenlib/tests/BLI_task_test.cc b/source/blender/blenlib/tests/BLI_task_test.cc
index 3abaf6a6c0b..2a3fddf5e3d 100644
--- a/source/blender/blenlib/tests/BLI_task_test.cc
+++ b/source/blender/blenlib/tests/BLI_task_test.cc
@@ -72,7 +72,7 @@ static void task_mempool_iter_func(void *userdata, MempoolIterData *item)
int *data = (int *)item;
int *count = (int *)userdata;
- EXPECT_TRUE(data != NULL);
+ EXPECT_TRUE(data != nullptr);
*data += 1;
atomic_sub_and_fetch_uint32((uint32_t *)count, 1);
@@ -97,12 +97,12 @@ TEST(task, MempoolIter)
for (i = 0; i < NUM_ITEMS; i += 3) {
BLI_mempool_free(mempool, data[i]);
- data[i] = NULL;
+ data[i] = nullptr;
num_items--;
}
for (i = 0; i < NUM_ITEMS; i += 7) {
- if (data[i] == NULL) {
+ if (data[i] == nullptr) {
data[i] = (int *)BLI_mempool_alloc(mempool);
*data[i] = i - 1;
num_items++;
@@ -111,9 +111,9 @@ TEST(task, MempoolIter)
for (i = 0; i < NUM_ITEMS - 5; i += 23) {
for (int j = 0; j < 5; j++) {
- if (data[i + j] != NULL) {
+ if (data[i + j] != nullptr) {
BLI_mempool_free(mempool, data[i + j]);
- data[i + j] = NULL;
+ data[i + j] = nullptr;
num_items--;
}
}
@@ -125,7 +125,7 @@ TEST(task, MempoolIter)
* expected. */
EXPECT_EQ(num_items, 0);
for (i = 0; i < NUM_ITEMS; i++) {
- if (data[i] != NULL) {
+ if (data[i] != nullptr) {
EXPECT_EQ(*data[i], i);
}
}
@@ -150,7 +150,7 @@ static void task_listbase_iter_func(void *userdata,
TEST(task, ListBaseIter)
{
- ListBase list = {NULL, NULL};
+ ListBase list = {nullptr, nullptr};
LinkData *items_buffer = (LinkData *)MEM_calloc_arrayN(
NUM_ITEMS, sizeof(*items_buffer), __func__);
BLI_threadapi_init();
@@ -172,7 +172,7 @@ TEST(task, ListBaseIter)
* as expected. */
EXPECT_EQ(num_items, 0);
LinkData *item;
- for (i = 0, item = (LinkData *)list.first; i < NUM_ITEMS && item != NULL;
+ for (i = 0, item = (LinkData *)list.first; i < NUM_ITEMS && item != nullptr;
i++, item = item->next) {
EXPECT_EQ(POINTER_AS_INT(item->data), i);
}
diff --git a/source/blender/blenlib/tests/BLI_vector_test.cc b/source/blender/blenlib/tests/BLI_vector_test.cc
index ffdebd33873..0088ae21983 100644
--- a/source/blender/blenlib/tests/BLI_vector_test.cc
+++ b/source/blender/blenlib/tests/BLI_vector_test.cc
@@ -79,11 +79,11 @@ struct TestListValue {
TEST(vector, ListBaseConstructor)
{
- TestListValue *value1 = new TestListValue{0, 0, 4};
- TestListValue *value2 = new TestListValue{0, 0, 5};
- TestListValue *value3 = new TestListValue{0, 0, 6};
+ TestListValue *value1 = new TestListValue{nullptr, nullptr, 4};
+ TestListValue *value2 = new TestListValue{nullptr, nullptr, 5};
+ TestListValue *value3 = new TestListValue{nullptr, nullptr, 6};
- ListBase list = {NULL, NULL};
+ ListBase list = {nullptr, nullptr};
BLI_addtail(&list, value1);
BLI_addtail(&list, value2);
BLI_addtail(&list, value3);
diff --git a/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc b/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc
index 6400bec93f9..9a374cd0b1f 100644
--- a/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc
+++ b/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc
@@ -152,7 +152,7 @@ static void str_ghash_tests(GHash *ghash, const char *id)
TIMEIT_END(string_lookup);
}
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
MEM_freeN(data);
MEM_freeN(data_p);
MEM_freeN(data_w);
@@ -227,7 +227,7 @@ static void int_ghash_tests(GHash *ghash, const char *id, const unsigned int nbr
}
EXPECT_EQ(BLI_ghash_len(ghash), 0);
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
printf("========== ENDED %s ==========\n\n", id);
}
@@ -309,7 +309,7 @@ static void randint_ghash_tests(GHash *ghash, const char *id, const unsigned int
TIMEIT_END(int_lookup);
}
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
MEM_freeN(data);
printf("========== ENDED %s ==========\n\n", id);
@@ -421,7 +421,7 @@ static void int4_ghash_tests(GHash *ghash, const char *id, const unsigned int nb
TIMEIT_END(int_v4_lookup);
}
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
MEM_freeN(data);
printf("========== ENDED %s ==========\n\n", id);
@@ -506,7 +506,7 @@ static void multi_small_ghash_tests_one(GHash *ghash, RNG *rng, const unsigned i
EXPECT_EQ(POINTER_AS_UINT(v), *dt);
}
- BLI_ghash_clear(ghash, NULL, NULL);
+ BLI_ghash_clear(ghash, nullptr, nullptr);
MEM_freeN(data);
}
@@ -538,7 +538,7 @@ static void multi_small_ghash_tests(GHash *ghash, const char *id, const unsigned
TIMEIT_END(multi_small2_ghash);
- BLI_ghash_free(ghash, NULL, NULL);
+ BLI_ghash_free(ghash, nullptr, nullptr);
BLI_rng_free(rng);
printf("========== ENDED %s ==========\n\n", id);
diff --git a/source/blender/blenlib/tests/performance/BLI_task_performance_test.cc b/source/blender/blenlib/tests/performance/BLI_task_performance_test.cc
index 208f168b599..c5b0f86e384 100644
--- a/source/blender/blenlib/tests/performance/BLI_task_performance_test.cc
+++ b/source/blender/blenlib/tests/performance/BLI_task_performance_test.cc
@@ -119,7 +119,7 @@ static void task_listbase_test_do(ListBase *list,
}
LinkData *item;
int j;
- for (j = 0, item = (LinkData *)list->first; j < num_items && item != NULL;
+ for (j = 0, item = (LinkData *)list->first; j < num_items && item != nullptr;
j++, item = item->next) {
EXPECT_EQ(POINTER_AS_INT(item->data), j);
item->data = POINTER_FROM_INT(0);
@@ -139,7 +139,7 @@ static void task_listbase_test(const char *id, const int nbr, const bool use_thr
{
printf("\n========== STARTING %s ==========\n", id);
- ListBase list = {NULL, NULL};
+ ListBase list = {nullptr, nullptr};
LinkData *items_buffer = (LinkData *)MEM_calloc_arrayN(nbr, sizeof(*items_buffer), __func__);
BLI_threadapi_init();
diff --git a/source/blender/blenloader/tests/blendfile_loading_base_test.cc b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
index cb5fcdbe3c6..a3aabf6ac10 100644
--- a/source/blender/blenloader/tests/blendfile_loading_base_test.cc
+++ b/source/blender/blenloader/tests/blendfile_loading_base_test.cc
@@ -127,7 +127,7 @@ bool BlendfileLoadingBaseTest::blendfile_load(const char *filepath)
char abspath[FILENAME_MAX];
BLI_path_join(abspath, sizeof(abspath), test_assets_dir.c_str(), filepath, NULL);
- bfile = BLO_read_from_file(abspath, BLO_READ_SKIP_NONE, NULL /* reports */);
+ bfile = BLO_read_from_file(abspath, BLO_READ_SKIP_NONE, nullptr /* reports */);
if (bfile == nullptr) {
ADD_FAILURE() << "Unable to load file '" << filepath << "' from test assets dir '"
<< test_assets_dir << "'";
@@ -144,7 +144,7 @@ void BlendfileLoadingBaseTest::blendfile_free()
wmWindowManager *wm = static_cast<wmWindowManager *>(bfile->main->wm.first);
if (wm != nullptr) {
- wm_close_and_free(NULL, wm);
+ wm_close_and_free(nullptr, wm);
}
BLO_blendfiledata_free(bfile);
bfile = nullptr;
diff --git a/source/blender/bmesh/tests/bmesh_core_test.cc b/source/blender/bmesh/tests/bmesh_core_test.cc
index afbc11e0722..202d16b09e3 100644
--- a/source/blender/bmesh/tests/bmesh_core_test.cc
+++ b/source/blender/bmesh/tests/bmesh_core_test.cc
@@ -16,8 +16,8 @@ TEST(bmesh_core, BMVertCreate)
EXPECT_EQ(bm->totvert, 0);
/* make a custom layer so we can see if it is copied properly */
BM_data_layer_add(bm, &bm->vdata, CD_PROP_FLOAT);
- bv1 = BM_vert_create(bm, co1, NULL, BM_CREATE_NOP);
- ASSERT_TRUE(bv1 != NULL);
+ bv1 = BM_vert_create(bm, co1, nullptr, BM_CREATE_NOP);
+ ASSERT_TRUE(bv1 != nullptr);
EXPECT_EQ(bv1->co[0], 1.0f);
EXPECT_EQ(bv1->co[1], 2.0f);
EXPECT_EQ(bv1->co[2], 0.0f);
@@ -25,14 +25,14 @@ TEST(bmesh_core, BMVertCreate)
EXPECT_EQ(bv1->head.htype, (char)BM_VERT);
EXPECT_EQ(bv1->head.hflag, 0);
EXPECT_EQ(bv1->head.api_flag, 0);
- bv2 = BM_vert_create(bm, NULL, NULL, BM_CREATE_NOP);
- ASSERT_TRUE(bv2 != NULL);
+ bv2 = BM_vert_create(bm, nullptr, nullptr, BM_CREATE_NOP);
+ ASSERT_TRUE(bv2 != nullptr);
EXPECT_TRUE(is_zero_v3(bv2->co));
/* create with example should copy custom data but not select flag */
BM_vert_select_set(bm, bv2, true);
BM_elem_float_data_set(&bm->vdata, bv2, CD_PROP_FLOAT, 1.5f);
bv3 = BM_vert_create(bm, co1, bv2, BM_CREATE_NOP);
- ASSERT_TRUE(bv3 != NULL);
+ ASSERT_TRUE(bv3 != nullptr);
EXPECT_FALSE(BM_elem_flag_test((BMElem *)bv3, BM_ELEM_SELECT));
EXPECT_EQ(BM_elem_float_data_get(&bm->vdata, bv3, CD_PROP_FLOAT), 1.5f);
EXPECT_EQ(BM_mesh_elem_count(bm, BM_VERT), 3);
diff --git a/source/blender/bmesh/tools/bmesh_boolean.cc b/source/blender/bmesh/tools/bmesh_boolean.cc
index 56585cb722e..819ee420661 100644
--- a/source/blender/bmesh/tools/bmesh_boolean.cc
+++ b/source/blender/bmesh/tools/bmesh_boolean.cc
@@ -121,7 +121,7 @@ static bool face_has_verts_in_order(BMesh *bm, BMFace *bmf, const BMVert *v1, co
{
BMIter liter;
BMLoop *l = static_cast<BMLoop *>(BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, bmf));
- while (l != NULL) {
+ while (l != nullptr) {
if (l->v == v1 && l->next->v == v2) {
return true;
}
@@ -184,7 +184,7 @@ static bool apply_mesh_output_to_bmesh(BMesh *bm, IMesh &m_out)
for (int i = 0; i < 3; ++i) {
co[i] = static_cast<float>(d_co[i]);
}
- BMVert *bmv = BM_vert_create(bm, co, NULL, BM_CREATE_NOP);
+ BMVert *bmv = BM_vert_create(bm, co, nullptr, BM_CREATE_NOP);
new_bmvs[v] = bmv;
BM_elem_flag_enable(bmv, KEEP_FLAG);
any_change = true;
@@ -231,7 +231,7 @@ static bool apply_mesh_output_to_bmesh(BMesh *bm, IMesh &m_out)
BMFace *bmf = BM_face_exists(face_bmverts.data(), flen);
/* #BM_face_exists checks if the face exists with the vertices in either order.
* We can only reuse the face if the orientations are the same. */
- if (bmf != NULL && face_has_verts_in_order(bm, bmf, face_bmverts[0], face_bmverts[1])) {
+ if (bmf != nullptr && face_has_verts_in_order(bm, bmf, face_bmverts[0], face_bmverts[1])) {
BM_elem_flag_enable(bmf, KEEP_FLAG);
}
else {
@@ -242,20 +242,20 @@ static bool apply_mesh_output_to_bmesh(BMesh *bm, IMesh &m_out)
orig_face = old_bmfs[orig];
}
else {
- orig_face = NULL;
+ orig_face = nullptr;
}
/* Make or find #BMEdge's. */
for (int i = 0; i < flen; ++i) {
BMVert *bmv1 = face_bmverts[i];
BMVert *bmv2 = face_bmverts[(i + 1) % flen];
BMEdge *bme = BM_edge_exists(bmv1, bmv2);
- if (bme == NULL) {
- BMEdge *orig_edge = NULL;
+ if (bme == nullptr) {
+ BMEdge *orig_edge = nullptr;
if (face.edge_orig[i] != NO_INDEX) {
orig_edge = old_edges[face.edge_orig[i]];
}
bme = BM_edge_create(bm, bmv1, bmv2, orig_edge, BM_CREATE_NOP);
- if (orig_edge != NULL) {
+ if (orig_edge != nullptr) {
BM_elem_select_copy(bm, bme, orig_edge);
}
}
@@ -269,15 +269,15 @@ static bool apply_mesh_output_to_bmesh(BMesh *bm, IMesh &m_out)
}
BMFace *bmf = BM_face_create(
bm, face_bmverts.data(), face_bmedges.data(), flen, orig_face, BM_CREATE_NOP);
- if (orig_face != NULL) {
+ if (orig_face != nullptr) {
BM_elem_select_copy(bm, bmf, orig_face);
}
BM_elem_flag_enable(bmf, KEEP_FLAG);
/* Now do interpolation of loop data (e.g., UV's) using the example face. */
- if (orig_face != NULL) {
+ if (orig_face != nullptr) {
BMIter liter;
BMLoop *l = static_cast<BMLoop *>(BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, bmf));
- while (l != NULL) {
+ while (l != nullptr) {
BM_loop_interp_from_face(bm, l, orig_face, true, true);
l = static_cast<BMLoop *>(BM_iter_step(&liter));
}
@@ -290,8 +290,8 @@ static bool apply_mesh_output_to_bmesh(BMesh *bm, IMesh &m_out)
/* #BM_ITER_MESH_MUTABLE macro needs type casts for C++, so expand here.
* TODO(howard): make some nice C++ iterators for #BMesh. */
BMIter iter;
- BMFace *bmf = static_cast<BMFace *>(BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL));
- while (bmf != NULL) {
+ BMFace *bmf = static_cast<BMFace *>(BM_iter_new(&iter, bm, BM_FACES_OF_MESH, nullptr));
+ while (bmf != nullptr) {
# ifdef DEBUG
iter.count = BM_iter_mesh_count(BM_FACES_OF_MESH, bm);
# endif
@@ -308,8 +308,8 @@ static bool apply_mesh_output_to_bmesh(BMesh *bm, IMesh &m_out)
}
bmf = bmf_next;
}
- BMVert *bmv = static_cast<BMVert *>(BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL));
- while (bmv != NULL) {
+ BMVert *bmv = static_cast<BMVert *>(BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, nullptr));
+ while (bmv != nullptr) {
# ifdef DEBUG
iter.count = BM_iter_mesh_count(BM_VERTS_OF_MESH, bm);
# endif
diff --git a/source/blender/compositor/intern/COM_CPUDevice.cpp b/source/blender/compositor/intern/COM_CPUDevice.cpp
index 26fe1ba0bc3..7ea12866148 100644
--- a/source/blender/compositor/intern/COM_CPUDevice.cpp
+++ b/source/blender/compositor/intern/COM_CPUDevice.cpp
@@ -32,5 +32,5 @@ void CPUDevice::execute(WorkPackage *work)
executionGroup->getOutputOperation()->executeRegion(&rect, chunkNumber);
- executionGroup->finalizeChunkExecution(chunkNumber, NULL);
+ executionGroup->finalizeChunkExecution(chunkNumber, nullptr);
}
diff --git a/source/blender/compositor/intern/COM_CompositorContext.cpp b/source/blender/compositor/intern/COM_CompositorContext.cpp
index 3d55fcba086..52e705ffb79 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.cpp
+++ b/source/blender/compositor/intern/COM_CompositorContext.cpp
@@ -22,13 +22,13 @@
CompositorContext::CompositorContext()
{
- this->m_scene = NULL;
- this->m_rd = NULL;
+ this->m_scene = nullptr;
+ this->m_rd = nullptr;
this->m_quality = COM_QUALITY_HIGH;
this->m_hasActiveOpenCLDevices = false;
this->m_fastCalculation = false;
- this->m_viewSettings = NULL;
- this->m_displaySettings = NULL;
+ this->m_viewSettings = nullptr;
+ this->m_displaySettings = nullptr;
}
int CompositorContext::getFramenumber() const
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index 15a52d10071..f7250de8566 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -133,11 +133,11 @@ bool Converter::is_fast_node(bNode *b_node)
Node *Converter::convert(bNode *b_node)
{
- Node *node = NULL;
+ Node *node = nullptr;
/* ignore undefined nodes with missing or invalid node data */
if (!nodeIsRegistered(b_node)) {
- return NULL;
+ return nullptr;
}
switch (b_node->type) {
@@ -439,7 +439,7 @@ NodeOperation *Converter::convertDataType(NodeOperationOutput *from, NodeOperati
return new ConvertVectorToColorOperation();
}
- return NULL;
+ return nullptr;
}
void Converter::convertResolution(NodeOperationBuilder &builder,
@@ -498,8 +498,8 @@ void Converter::convertResolution(NodeOperationBuilder &builder,
}
if (doCenter) {
- NodeOperation *first = NULL;
- ScaleOperation *scaleOperation = NULL;
+ NodeOperation *first = nullptr;
+ ScaleOperation *scaleOperation = nullptr;
if (doScale) {
scaleOperation = new ScaleOperation();
scaleOperation->getInputSocket(1)->setResizeMode(COM_SC_NO_RESIZE);
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index ad980177ae5..27cec28f5d5 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -45,8 +45,8 @@ ExecutionGroup::ExecutionGroup()
{
this->m_isOutput = false;
this->m_complex = false;
- this->m_chunkExecutionStates = NULL;
- this->m_bTree = NULL;
+ this->m_chunkExecutionStates = nullptr;
+ this->m_bTree = nullptr;
this->m_height = 0;
this->m_width = 0;
this->m_cachedMaxReadBufferOffset = 0;
@@ -121,13 +121,13 @@ NodeOperation *ExecutionGroup::getOutputOperation() const
void ExecutionGroup::initExecution()
{
- if (this->m_chunkExecutionStates != NULL) {
+ if (this->m_chunkExecutionStates != nullptr) {
MEM_freeN(this->m_chunkExecutionStates);
}
unsigned int index;
determineNumberOfChunks();
- this->m_chunkExecutionStates = NULL;
+ this->m_chunkExecutionStates = nullptr;
if (this->m_numberOfChunks != 0) {
this->m_chunkExecutionStates = (ChunkExecutionState *)MEM_mallocN(
sizeof(ChunkExecutionState) * this->m_numberOfChunks, __func__);
@@ -152,15 +152,15 @@ void ExecutionGroup::initExecution()
void ExecutionGroup::deinitExecution()
{
- if (this->m_chunkExecutionStates != NULL) {
+ if (this->m_chunkExecutionStates != nullptr) {
MEM_freeN(this->m_chunkExecutionStates);
- this->m_chunkExecutionStates = NULL;
+ this->m_chunkExecutionStates = nullptr;
}
this->m_numberOfChunks = 0;
this->m_numberOfXChunks = 0;
this->m_numberOfYChunks = 0;
this->m_cachedReadOperations.clear();
- this->m_bTree = NULL;
+ this->m_bTree = nullptr;
}
void ExecutionGroup::determineResolution(unsigned int resolution[2])
{
@@ -415,7 +415,7 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
MemoryBuffer *buffer = memoryBuffers[index];
if (buffer) {
if (buffer->isTemporarily()) {
- memoryBuffers[index] = NULL;
+ memoryBuffers[index] = nullptr;
delete buffer;
}
}
@@ -478,7 +478,7 @@ MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int /*chunkNumber*/, rcti *re
MemoryBuffer *buffer = new MemoryBuffer(writeOperation->getMemoryProxy(), rect);
return buffer;
}
- return NULL;
+ return nullptr;
}
bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area)
@@ -562,7 +562,7 @@ bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph, int xChun
determineDependingAreaOfInterest(&rect, readOperation, &area);
ExecutionGroup *group = memoryProxy->getExecutor();
- if (group != NULL) {
+ if (group != nullptr) {
if (!group->scheduleAreaWhenPossible(graph, &area)) {
canBeExecuted = false;
}
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index f58d7a768cc..a13db6bb09e 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -83,7 +83,7 @@ MemoryBuffer::MemoryBuffer(DataType dataType, rcti *rect)
this->m_width = BLI_rcti_size_x(&this->m_rect);
this->m_height = BLI_rcti_size_y(&this->m_rect);
this->m_height = this->m_rect.ymax - this->m_rect.ymin;
- this->m_memoryProxy = NULL;
+ this->m_memoryProxy = nullptr;
this->m_chunkNumber = -1;
this->m_num_channels = determine_num_channels(dataType);
this->m_buffer = (float *)MEM_mallocN_aligned(
@@ -145,7 +145,7 @@ MemoryBuffer::~MemoryBuffer()
{
if (this->m_buffer) {
MEM_freeN(this->m_buffer);
- this->m_buffer = NULL;
+ this->m_buffer = nullptr;
}
}
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.cpp b/source/blender/compositor/intern/COM_MemoryProxy.cpp
index b73bac469d0..7d590cd0ef6 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.cpp
+++ b/source/blender/compositor/intern/COM_MemoryProxy.cpp
@@ -20,8 +20,8 @@
MemoryProxy::MemoryProxy(DataType datatype)
{
- this->m_writeBufferOperation = NULL;
- this->m_executor = NULL;
+ this->m_writeBufferOperation = nullptr;
+ this->m_executor = nullptr;
this->m_datatype = datatype;
}
@@ -40,6 +40,6 @@ void MemoryProxy::free()
{
if (this->m_buffer) {
delete this->m_buffer;
- this->m_buffer = NULL;
+ this->m_buffer = nullptr;
}
}
diff --git a/source/blender/compositor/intern/COM_Node.cpp b/source/blender/compositor/intern/COM_Node.cpp
index 30ebd7e0d4b..74aefaf0e6d 100644
--- a/source/blender/compositor/intern/COM_Node.cpp
+++ b/source/blender/compositor/intern/COM_Node.cpp
@@ -37,14 +37,14 @@
**************/
Node::Node(bNode *editorNode, bool create_sockets)
- : m_editorNodeTree(NULL),
+ : m_editorNodeTree(nullptr),
m_editorNode(editorNode),
m_inActiveGroup(false),
m_instanceKey(NODE_INSTANCE_KEY_NONE)
{
if (create_sockets) {
bNodeSocket *input = (bNodeSocket *)editorNode->inputs.first;
- while (input != NULL) {
+ while (input != nullptr) {
DataType dt = COM_DT_VALUE;
if (input->type == SOCK_RGBA) {
dt = COM_DT_COLOR;
@@ -57,7 +57,7 @@ Node::Node(bNode *editorNode, bool create_sockets)
input = input->next;
}
bNodeSocket *output = (bNodeSocket *)editorNode->outputs.first;
- while (output != NULL) {
+ while (output != nullptr) {
DataType dt = COM_DT_VALUE;
if (output->type == SOCK_RGBA) {
dt = COM_DT_COLOR;
@@ -86,7 +86,7 @@ Node::~Node()
void Node::addInputSocket(DataType datatype)
{
- this->addInputSocket(datatype, NULL);
+ this->addInputSocket(datatype, nullptr);
}
void Node::addInputSocket(DataType datatype, bNodeSocket *bSocket)
@@ -97,7 +97,7 @@ void Node::addInputSocket(DataType datatype, bNodeSocket *bSocket)
void Node::addOutputSocket(DataType datatype)
{
- this->addOutputSocket(datatype, NULL);
+ this->addOutputSocket(datatype, nullptr);
}
void Node::addOutputSocket(DataType datatype, bNodeSocket *bSocket)
{
@@ -121,27 +121,27 @@ bNodeSocket *Node::getEditorInputSocket(int editorNodeInputSocketIndex)
{
bNodeSocket *bSock = (bNodeSocket *)this->getbNode()->inputs.first;
int index = 0;
- while (bSock != NULL) {
+ while (bSock != nullptr) {
if (index == editorNodeInputSocketIndex) {
return bSock;
}
index++;
bSock = bSock->next;
}
- return NULL;
+ return nullptr;
}
bNodeSocket *Node::getEditorOutputSocket(int editorNodeOutputSocketIndex)
{
bNodeSocket *bSock = (bNodeSocket *)this->getbNode()->outputs.first;
int index = 0;
- while (bSock != NULL) {
+ while (bSock != nullptr) {
if (index == editorNodeOutputSocketIndex) {
return bSock;
}
index++;
bSock = bSock->next;
}
- return NULL;
+ return nullptr;
}
/*******************
@@ -149,7 +149,7 @@ bNodeSocket *Node::getEditorOutputSocket(int editorNodeOutputSocketIndex)
*******************/
NodeInput::NodeInput(Node *node, bNodeSocket *b_socket, DataType datatype)
- : m_node(node), m_editorSocket(b_socket), m_datatype(datatype), m_link(NULL)
+ : m_node(node), m_editorSocket(b_socket), m_datatype(datatype), m_link(nullptr)
{
}
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp
index fe680f61a90..b604b8ced88 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cpp
+++ b/source/blender/compositor/intern/COM_NodeGraph.cpp
@@ -61,7 +61,7 @@ bNodeSocket *NodeGraph::find_b_node_input(bNode *b_node, const char *identifier)
return b_sock;
}
}
- return NULL;
+ return nullptr;
}
bNodeSocket *NodeGraph::find_b_node_output(bNode *b_node, const char *identifier)
@@ -71,7 +71,7 @@ bNodeSocket *NodeGraph::find_b_node_output(bNode *b_node, const char *identifier
return b_sock;
}
}
- return NULL;
+ return nullptr;
}
void NodeGraph::add_node(Node *node,
@@ -179,7 +179,7 @@ NodeOutput *NodeGraph::find_output(const NodeRange &node_range, bNodeSocket *b_s
}
}
}
- return NULL;
+ return nullptr;
}
void NodeGraph::add_bNodeLink(const NodeRange &node_range, bNodeLink *b_nodelink)
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cpp b/source/blender/compositor/intern/COM_NodeOperation.cpp
index 4e3c5d2df6c..0842721a9e5 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperation.cpp
@@ -36,7 +36,7 @@ NodeOperation::NodeOperation()
this->m_height = 0;
this->m_isResolutionSet = false;
this->m_openCL = false;
- this->m_btree = NULL;
+ this->m_btree = nullptr;
}
NodeOperation::~NodeOperation()
@@ -146,7 +146,7 @@ NodeOperation *NodeOperation::getInputOperation(unsigned int inputSocketIndex)
return &input->getLink()->getOperation();
}
- return NULL;
+ return nullptr;
}
void NodeOperation::getConnectedInputSockets(Inputs *sockets)
@@ -199,7 +199,7 @@ bool NodeOperation::determineDependingAreaOfInterest(rcti *input,
NodeOperationInput::NodeOperationInput(NodeOperation *op,
DataType datatype,
InputResizeMode resizeMode)
- : m_operation(op), m_datatype(datatype), m_resizeMode(resizeMode), m_link(NULL)
+ : m_operation(op), m_datatype(datatype), m_resizeMode(resizeMode), m_link(nullptr)
{
}
@@ -209,7 +209,7 @@ SocketReader *NodeOperationInput::getReader()
return &m_link->getOperation();
}
- return NULL;
+ return nullptr;
}
void NodeOperationInput::determineResolution(unsigned int resolution[2],
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
index 53a6d115e97..1237e728079 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
@@ -38,7 +38,7 @@
#include "COM_NodeOperationBuilder.h" /* own include */
NodeOperationBuilder::NodeOperationBuilder(const CompositorContext *context, bNodeTree *b_nodetree)
- : m_context(context), m_current_node(NULL), m_active_viewer(NULL)
+ : m_context(context), m_current_node(nullptr), m_active_viewer(nullptr)
{
m_graph.from_bNodeTree(*context, b_nodetree);
}
@@ -61,7 +61,7 @@ void NodeOperationBuilder::convertToOperations(ExecutionSystem *system)
node->convertToOperations(converter, *m_context);
}
- m_current_node = NULL;
+ m_current_node = nullptr;
/* The input map constructed by nodes maps operation inputs to node inputs.
* Inverting yields a map of node inputs to all connected operation inputs,
@@ -168,7 +168,7 @@ void NodeOperationBuilder::removeInputLink(NodeOperationInput *to)
Link &link = *it;
if (link.to() == to) {
/* unregister with the input */
- to->setLink(NULL);
+ to->setLink(nullptr);
m_links.erase(it);
return;
@@ -203,15 +203,15 @@ PreviewOperation *NodeOperationBuilder::make_preview_operation() const
BLI_assert(m_current_node);
if (!(m_current_node->getbNode()->flag & NODE_PREVIEW)) {
- return NULL;
+ return nullptr;
}
/* previews only in the active group */
if (!m_current_node->isInActiveGroup()) {
- return NULL;
+ return nullptr;
}
/* do not calculate previews of hidden nodes */
if (m_current_node->getbNode()->flag & NODE_HIDDEN) {
- return NULL;
+ return nullptr;
}
bNodeInstanceHash *previews = m_context->getPreviewHash();
@@ -223,7 +223,7 @@ PreviewOperation *NodeOperationBuilder::make_preview_operation() const
return operation;
}
- return NULL;
+ return nullptr;
}
void NodeOperationBuilder::addPreview(NodeOperationOutput *output)
@@ -476,7 +476,7 @@ WriteBufferOperation *NodeOperationBuilder::find_attached_write_buffer_operation
}
}
}
- return NULL;
+ return nullptr;
}
void NodeOperationBuilder::add_input_buffers(NodeOperation * /*operation*/,
@@ -526,13 +526,13 @@ void NodeOperationBuilder::add_output_buffers(NodeOperation *operation,
return;
}
- WriteBufferOperation *writeOperation = NULL;
+ WriteBufferOperation *writeOperation = nullptr;
for (OpInputs::const_iterator it = targets.begin(); it != targets.end(); ++it) {
NodeOperationInput *target = *it;
/* try to find existing write buffer operation */
if (target->getOperation().isWriteBufferOperation()) {
- BLI_assert(writeOperation == NULL); /* there should only be one write op connected */
+ BLI_assert(writeOperation == nullptr); /* there should only be one write op connected */
writeOperation = (WriteBufferOperation *)(&target->getOperation());
}
else {
@@ -728,7 +728,7 @@ void NodeOperationBuilder::group_operations()
ReadBufferOperation *read_op = (ReadBufferOperation *)op;
MemoryProxy *memproxy = read_op->getMemoryProxy();
- if (memproxy->getExecutor() == NULL) {
+ if (memproxy->getExecutor() == nullptr) {
ExecutionGroup *group = make_group(memproxy->getWriteBufferOperation());
memproxy->setExecutor(group);
}
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cpp b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
index 2529637801d..35579bac925 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.cpp
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
@@ -41,7 +41,7 @@ OpenCLDevice::OpenCLDevice(cl_context context,
this->m_device = device;
this->m_context = context;
this->m_program = program;
- this->m_queue = NULL;
+ this->m_queue = nullptr;
this->m_vendorID = vendorId;
}
@@ -196,7 +196,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
(size_t)outputMemoryBuffer->getHeight(),
};
- error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
+ error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, nullptr, size, nullptr, 0, nullptr, nullptr);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
@@ -243,7 +243,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel,
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
- error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
+ error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, nullptr, size, nullptr, 0, nullptr, nullptr);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
diff --git a/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp b/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
index 98239166860..5febf3802de 100644
--- a/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
+++ b/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
@@ -20,7 +20,7 @@
SingleThreadedOperation::SingleThreadedOperation()
{
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
setComplex(true);
}
@@ -39,7 +39,7 @@ void SingleThreadedOperation::deinitExecution()
deinitMutex();
if (this->m_cachedInstance) {
delete this->m_cachedInstance;
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
}
}
void *SingleThreadedOperation::initializeTileData(rcti *rect)
@@ -49,7 +49,7 @@ void *SingleThreadedOperation::initializeTileData(rcti *rect)
}
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
//
this->m_cachedInstance = createMemoryBuffer(rect);
}
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 570e1eeba20..450b64eec5a 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -80,7 +80,7 @@ void *WorkScheduler::thread_execute_cpu(void *data)
delete work;
}
- return NULL;
+ return nullptr;
}
void *WorkScheduler::thread_execute_gpu(void *data)
@@ -93,7 +93,7 @@ void *WorkScheduler::thread_execute_gpu(void *data)
delete work;
}
- return NULL;
+ return nullptr;
}
#endif
@@ -166,13 +166,13 @@ void WorkScheduler::stop()
BLI_thread_queue_nowait(g_cpuqueue);
BLI_threadpool_end(&g_cputhreads);
BLI_thread_queue_free(g_cpuqueue);
- g_cpuqueue = NULL;
+ g_cpuqueue = nullptr;
# ifdef COM_OPENCL_ENABLED
if (g_openclActive) {
BLI_thread_queue_nowait(g_gpuqueue);
BLI_threadpool_end(&g_gputhreads);
BLI_thread_queue_free(g_gpuqueue);
- g_gpuqueue = NULL;
+ g_gpuqueue = nullptr;
}
# endif
#endif
@@ -234,8 +234,8 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
# ifdef COM_OPENCL_ENABLED
/* deinitialize OpenCL GPU's */
if (use_opencl && !g_openclInitialized) {
- g_context = NULL;
- g_program = NULL;
+ g_context = nullptr;
+ g_program = nullptr;
/* This will check for errors and skip if already initialized. */
if (clewInit() != CLEW_SUCCESS) {
@@ -245,7 +245,7 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
if (clCreateContextFromType) {
cl_uint numberOfPlatforms = 0;
cl_int error;
- error = clGetPlatformIDs(0, 0, &numberOfPlatforms);
+ error = clGetPlatformIDs(0, nullptr, &numberOfPlatforms);
if (error == -1001) {
} /* GPU not supported */
else if (error != CL_SUCCESS) {
@@ -256,40 +256,40 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
}
cl_platform_id *platforms = (cl_platform_id *)MEM_mallocN(
sizeof(cl_platform_id) * numberOfPlatforms, __func__);
- error = clGetPlatformIDs(numberOfPlatforms, platforms, 0);
+ error = clGetPlatformIDs(numberOfPlatforms, platforms, nullptr);
unsigned int indexPlatform;
for (indexPlatform = 0; indexPlatform < numberOfPlatforms; indexPlatform++) {
cl_platform_id platform = platforms[indexPlatform];
cl_uint numberOfDevices = 0;
- clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, 0, &numberOfDevices);
+ clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, nullptr, &numberOfDevices);
if (numberOfDevices <= 0) {
continue;
}
cl_device_id *cldevices = (cl_device_id *)MEM_mallocN(
sizeof(cl_device_id) * numberOfDevices, __func__);
- clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numberOfDevices, cldevices, 0);
+ clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numberOfDevices, cldevices, nullptr);
g_context = clCreateContext(
- NULL, numberOfDevices, cldevices, clContextError, NULL, &error);
+ nullptr, numberOfDevices, cldevices, clContextError, nullptr, &error);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
- const char *cl_str[2] = {datatoc_COM_OpenCLKernels_cl, NULL};
- g_program = clCreateProgramWithSource(g_context, 1, cl_str, 0, &error);
- error = clBuildProgram(g_program, numberOfDevices, cldevices, 0, 0, 0);
+ const char *cl_str[2] = {datatoc_COM_OpenCLKernels_cl, nullptr};
+ g_program = clCreateProgramWithSource(g_context, 1, cl_str, nullptr, &error);
+ error = clBuildProgram(g_program, numberOfDevices, cldevices, nullptr, nullptr, nullptr);
if (error != CL_SUCCESS) {
cl_int error2;
size_t ret_val_size = 0;
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
error2 = clGetProgramBuildInfo(
- g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, 0, NULL, &ret_val_size);
+ g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, 0, nullptr, &ret_val_size);
if (error2 != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
char *build_log = (char *)MEM_mallocN(sizeof(char) * ret_val_size + 1, __func__);
error2 = clGetProgramBuildInfo(
- g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, ret_val_size, build_log, NULL);
+ g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, ret_val_size, build_log, nullptr);
if (error2 != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
@@ -303,7 +303,7 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
cl_device_id device = cldevices[indexDevices];
cl_int vendorID = 0;
cl_int error2 = clGetDeviceInfo(
- device, CL_DEVICE_VENDOR_ID, sizeof(cl_int), &vendorID, NULL);
+ device, CL_DEVICE_VENDOR_ID, sizeof(cl_int), &vendorID, nullptr);
if (error2 != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error2, clewErrorString(error2));
}
@@ -351,11 +351,11 @@ void WorkScheduler::deinitialize()
}
if (g_program) {
clReleaseProgram(g_program);
- g_program = NULL;
+ g_program = nullptr;
}
if (g_context) {
clReleaseContext(g_context);
- g_context = NULL;
+ g_context = nullptr;
}
g_openclInitialized = false;
diff --git a/source/blender/compositor/nodes/COM_BlurNode.cpp b/source/blender/compositor/nodes/COM_BlurNode.cpp
index 808c1b22bdb..b82bede8443 100644
--- a/source/blender/compositor/nodes/COM_BlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_BlurNode.cpp
@@ -46,7 +46,7 @@ void BlurNode::convertToOperations(NodeConverter &converter,
const bool extend_bounds = (editorNode->custom1 & CMP_NODEFLAG_BLUR_EXTEND_BOUNDS) != 0;
CompositorQuality quality = context.getQuality();
- NodeOperation *input_operation = NULL, *output_operation = NULL;
+ NodeOperation *input_operation = nullptr, *output_operation = nullptr;
if (data->filtertype == R_FILTER_FAST_GAUSS) {
FastGaussianBlurOperation *operationfgb = new FastGaussianBlurOperation();
diff --git a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
index d320a6645e1..c927865489b 100644
--- a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
@@ -36,7 +36,7 @@ void ChannelMatteNode::convertToOperations(NodeConverter &converter,
NodeOutput *outputSocketImage = this->getOutputSocket(0);
NodeOutput *outputSocketMatte = this->getOutputSocket(1);
- NodeOperation *convert = NULL, *inv_convert = NULL;
+ NodeOperation *convert = nullptr, *inv_convert = nullptr;
/* colorspace */
switch (node->custom1) {
case CMP_NODE_CHANNEL_MATTE_CS_RGB:
@@ -67,7 +67,7 @@ void ChannelMatteNode::convertToOperations(NodeConverter &converter,
SetAlphaOperation *operationAlpha = new SetAlphaOperation();
converter.addOperation(operationAlpha);
- if (convert != NULL) {
+ if (convert != nullptr) {
converter.addOperation(convert);
converter.mapInputSocket(inputSocketImage, convert->getInputSocket(0));
@@ -82,7 +82,7 @@ void ChannelMatteNode::convertToOperations(NodeConverter &converter,
converter.mapOutputSocket(outputSocketMatte, operation->getOutputSocket(0));
converter.addLink(operation->getOutputSocket(), operationAlpha->getInputSocket(1));
- if (inv_convert != NULL) {
+ if (inv_convert != nullptr) {
converter.addOperation(inv_convert);
converter.addLink(operationAlpha->getOutputSocket(0), inv_convert->getInputSocket(0));
converter.mapOutputSocket(outputSocketImage, inv_convert->getOutputSocket());
diff --git a/source/blender/compositor/nodes/COM_CombineColorNode.cpp b/source/blender/compositor/nodes/COM_CombineColorNode.cpp
index 2f9b14db6af..12968f06a10 100644
--- a/source/blender/compositor/nodes/COM_CombineColorNode.cpp
+++ b/source/blender/compositor/nodes/COM_CombineColorNode.cpp
@@ -67,7 +67,7 @@ void CombineColorNode::convertToOperations(NodeConverter &converter,
NodeOperation *CombineRGBANode::getColorConverter(const CompositorContext & /*context*/) const
{
- return NULL; /* no conversion needed */
+ return nullptr; /* no conversion needed */
}
NodeOperation *CombineHSVANode::getColorConverter(const CompositorContext & /*context*/) const
diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
index da8985de5ac..2921b44c95b 100644
--- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
+++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
@@ -23,7 +23,7 @@
void ConvertAlphaNode::convertToOperations(NodeConverter &converter,
const CompositorContext & /*context*/) const
{
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
bNode *node = this->getbNode();
/* value hardcoded in rna_nodetree.c */
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.cpp b/source/blender/compositor/nodes/COM_DefocusNode.cpp
index 0f09e5bfc91..393b1f2dabb 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.cpp
+++ b/source/blender/compositor/nodes/COM_DefocusNode.cpp
@@ -41,7 +41,7 @@ void DefocusNode::convertToOperations(NodeConverter &converter,
bNode *node = this->getbNode();
NodeDefocus *data = (NodeDefocus *)node->storage;
Scene *scene = node->id ? (Scene *)node->id : context.getScene();
- Object *camob = scene ? scene->camera : NULL;
+ Object *camob = scene ? scene->camera : nullptr;
NodeOperation *radiusOperation;
if (data->no_zbuf) {
diff --git a/source/blender/compositor/nodes/COM_FilterNode.cpp b/source/blender/compositor/nodes/COM_FilterNode.cpp
index 8b8ff55d544..1147c11794f 100644
--- a/source/blender/compositor/nodes/COM_FilterNode.cpp
+++ b/source/blender/compositor/nodes/COM_FilterNode.cpp
@@ -34,7 +34,7 @@ void FilterNode::convertToOperations(NodeConverter &converter,
NodeInput *inputSocket = this->getInputSocket(0);
NodeInput *inputImageSocket = this->getInputSocket(1);
NodeOutput *outputSocket = this->getOutputSocket(0);
- ConvolutionFilterOperation *operation = NULL;
+ ConvolutionFilterOperation *operation = nullptr;
switch (this->getbNode()->custom1) {
case CMP_FILT_SOFT:
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp
index 1ff058ce7d4..ef088e42205 100644
--- a/source/blender/compositor/nodes/COM_GlareNode.cpp
+++ b/source/blender/compositor/nodes/COM_GlareNode.cpp
@@ -38,7 +38,7 @@ void GlareNode::convertToOperations(NodeConverter &converter,
bNode *node = this->getbNode();
NodeGlare *glare = (NodeGlare *)node->storage;
- GlareBaseOperation *glareoperation = NULL;
+ GlareBaseOperation *glareoperation = nullptr;
switch (glare->type) {
default:
case 3:
diff --git a/source/blender/compositor/nodes/COM_ImageNode.cpp b/source/blender/compositor/nodes/COM_ImageNode.cpp
index 1662b81c265..596a448e6a0 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.cpp
+++ b/source/blender/compositor/nodes/COM_ImageNode.cpp
@@ -44,7 +44,7 @@ NodeOperation *ImageNode::doMultilayerCheck(NodeConverter &converter,
DataType datatype) const
{
NodeOutput *outputSocket = this->getOutputSocket(outputsocketIndex);
- MultilayerBaseOperation *operation = NULL;
+ MultilayerBaseOperation *operation = nullptr;
switch (datatype) {
case COM_DT_VALUE:
operation = new MultilayerValueOperation(passindex, view);
@@ -84,7 +84,7 @@ void ImageNode::convertToOperations(NodeConverter &converter,
/* force a load, we assume iuser index will be set OK anyway */
if (image && image->type == IMA_TYPE_MULTILAYER) {
bool is_multilayer_ok = false;
- ImBuf *ibuf = BKE_image_acquire_ibuf(image, imageuser, NULL);
+ ImBuf *ibuf = BKE_image_acquire_ibuf(image, imageuser, nullptr);
if (image->rr) {
RenderLayer *rl = (RenderLayer *)BLI_findlink(&image->rr->layers, imageuser->layer);
if (rl) {
@@ -94,7 +94,7 @@ void ImageNode::convertToOperations(NodeConverter &converter,
is_multilayer_ok = true;
for (index = 0; index < numberOfOutputs; index++) {
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
socket = this->getOutputSocket(index);
bNodeSocket *bnodeSocket = socket->getbNodeSocket();
NodeImageLayer *storage = (NodeImageLayer *)bnodeSocket->storage;
@@ -196,13 +196,13 @@ void ImageNode::convertToOperations(NodeConverter &converter,
}
/* In case we can't load the layer. */
- if (operation == NULL) {
+ if (operation == nullptr) {
converter.setInvalidOutput(getOutputSocket(index));
}
}
}
}
- BKE_image_release_ibuf(image, ibuf, NULL);
+ BKE_image_release_ibuf(image, ibuf, nullptr);
/* without this, multilayer that fail to load will crash blender T32490. */
if (is_multilayer_ok == false) {
@@ -263,7 +263,7 @@ void ImageNode::convertToOperations(NodeConverter &converter,
/* happens when unlinking image datablock from multilayer node */
for (int i = 3; i < numberOfOutputs; i++) {
NodeOutput *output = this->getOutputSocket(i);
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
switch (output->getDataType()) {
case COM_DT_VALUE: {
SetValueOperation *valueoperation = new SetValueOperation();
diff --git a/source/blender/compositor/nodes/COM_KeyingNode.cpp b/source/blender/compositor/nodes/COM_KeyingNode.cpp
index 53cf64c5c3f..89ad4edce02 100644
--- a/source/blender/compositor/nodes/COM_KeyingNode.cpp
+++ b/source/blender/compositor/nodes/COM_KeyingNode.cpp
@@ -228,7 +228,7 @@ void KeyingNode::convertToOperations(NodeConverter &converter,
NodeOutput *outputImage = this->getOutputSocket(0);
NodeOutput *outputMatte = this->getOutputSocket(1);
NodeOutput *outputEdges = this->getOutputSocket(2);
- NodeOperationOutput *postprocessedMatte = NULL, *postprocessedImage = NULL, *edgesMatte = NULL;
+ NodeOperationOutput *postprocessedMatte = nullptr, *postprocessedImage = nullptr, *edgesMatte = nullptr;
/* keying operation */
KeyingOperation *keyingOperation = new KeyingOperation();
diff --git a/source/blender/compositor/nodes/COM_MathNode.cpp b/source/blender/compositor/nodes/COM_MathNode.cpp
index 227e26af2b2..0edf880400f 100644
--- a/source/blender/compositor/nodes/COM_MathNode.cpp
+++ b/source/blender/compositor/nodes/COM_MathNode.cpp
@@ -23,7 +23,7 @@
void MathNode::convertToOperations(NodeConverter &converter,
const CompositorContext & /*context*/) const
{
- MathBaseOperation *operation = NULL;
+ MathBaseOperation *operation = nullptr;
switch (this->getbNode()->custom1) {
case NODE_MATH_ADD:
diff --git a/source/blender/compositor/nodes/COM_MovieClipNode.cpp b/source/blender/compositor/nodes/COM_MovieClipNode.cpp
index 3366a8c20d6..7cc8f2ea19c 100644
--- a/source/blender/compositor/nodes/COM_MovieClipNode.cpp
+++ b/source/blender/compositor/nodes/COM_MovieClipNode.cpp
@@ -49,7 +49,7 @@ void MovieClipNode::convertToOperations(NodeConverter &converter,
MovieClipUser *movieClipUser = (MovieClipUser *)editorNode->storage;
bool cacheFrame = !context.isRendering();
- ImBuf *ibuf = NULL;
+ ImBuf *ibuf = nullptr;
if (movieClip) {
if (cacheFrame) {
ibuf = BKE_movieclip_get_ibuf(movieClip, movieClipUser);
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cpp b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
index 1269e0b7f77..09528e09f1f 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.cpp
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
@@ -100,7 +100,7 @@ void OutputFileNode::convertToOperations(NodeConverter &converter,
/* combine file path for the input */
BLI_join_dirfile(path, FILE_MAX, storage->base_path, sockdata->path);
- NodeOperation *outputOperation = NULL;
+ NodeOperation *outputOperation = nullptr;
if (is_multiview && format->views_format == R_IMF_VIEWS_MULTIVIEW) {
outputOperation = new OutputOpenExrSingleLayerMultiViewOperation(
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
index d66dd3fd434..6be86c04c4d 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
@@ -58,17 +58,17 @@ void RenderLayersNode::testRenderLink(NodeConverter &converter,
Scene *scene = (Scene *)this->getbNode()->id;
const short layerId = this->getbNode()->custom1;
RenderResult *rr = RE_AcquireResultRead(re);
- if (rr == NULL) {
+ if (rr == nullptr) {
missingRenderLink(converter);
return;
}
ViewLayer *view_layer = (ViewLayer *)BLI_findlink(&scene->view_layers, layerId);
- if (view_layer == NULL) {
+ if (view_layer == nullptr) {
missingRenderLink(converter);
return;
}
RenderLayer *rl = RE_GetRenderLayer(rr, view_layer->name);
- if (rl == NULL) {
+ if (rl == nullptr) {
missingRenderLink(converter);
return;
}
@@ -78,7 +78,7 @@ void RenderLayersNode::testRenderLink(NodeConverter &converter,
NodeImageLayer *storage = (NodeImageLayer *)output->getbNodeSocket()->storage;
RenderPass *rpass = (RenderPass *)BLI_findstring(
&rl->passes, storage->pass_name, offsetof(RenderPass, name));
- if (rpass == NULL) {
+ if (rpass == nullptr) {
missingSocketLink(converter, output);
continue;
}
@@ -164,9 +164,9 @@ void RenderLayersNode::convertToOperations(NodeConverter &converter,
const CompositorContext &context) const
{
Scene *scene = (Scene *)this->getbNode()->id;
- Render *re = (scene) ? RE_GetSceneRender(scene) : NULL;
+ Render *re = (scene) ? RE_GetSceneRender(scene) : nullptr;
- if (re != NULL) {
+ if (re != nullptr) {
testRenderLink(converter, context, re);
RE_ReleaseResult(re);
}
diff --git a/source/blender/compositor/nodes/COM_SeparateColorNode.cpp b/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
index 712ba1e1f2d..203aa25c9e9 100644
--- a/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
+++ b/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
@@ -99,7 +99,7 @@ void SeparateColorNode::convertToOperations(NodeConverter &converter,
NodeOperation *SeparateRGBANode::getColorConverter(const CompositorContext & /*context*/) const
{
- return NULL; /* no conversion needed */
+ return nullptr; /* no conversion needed */
}
NodeOperation *SeparateHSVANode::getColorConverter(const CompositorContext & /*context*/) const
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
index df201289ca4..b61c018d029 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
@@ -32,7 +32,7 @@ void ZCombineNode::convertToOperations(NodeConverter &converter,
const CompositorContext &context) const
{
if ((context.getRenderData()->scemode & R_FULL_SAMPLE) || this->getbNode()->custom2) {
- ZCombineOperation *operation = NULL;
+ ZCombineOperation *operation = nullptr;
if (this->getbNode()->custom1) {
operation = new ZCombineAlphaOperation();
}
diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
index e1e58c9521a..b0d63d7b791 100644
--- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
+++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
@@ -116,7 +116,7 @@ AntiAliasOperation::AntiAliasOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_valueReader = NULL;
+ this->m_valueReader = nullptr;
this->setComplex(true);
}
@@ -179,7 +179,7 @@ void AntiAliasOperation::executePixel(float output[4], int x, int y, void *data)
void AntiAliasOperation::deinitExecution()
{
- this->m_valueReader = NULL;
+ this->m_valueReader = nullptr;
}
bool AntiAliasOperation::determineDependingAreaOfInterest(rcti *input,
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
index 93193aef360..35b0092fa5f 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
@@ -28,8 +28,8 @@ BilateralBlurOperation::BilateralBlurOperation()
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputColorProgram = NULL;
- this->m_inputDeterminatorProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputDeterminatorProgram = nullptr;
}
void BilateralBlurOperation::initExecution()
@@ -94,8 +94,8 @@ void BilateralBlurOperation::executePixel(float output[4], int x, int y, void *d
void BilateralBlurOperation::deinitExecution()
{
- this->m_inputColorProgram = NULL;
- this->m_inputDeterminatorProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputDeterminatorProgram = nullptr;
}
bool BilateralBlurOperation::determineDependingAreaOfInterest(rcti *input,
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
index 0d9a1a184d6..3fe154c397e 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -29,7 +29,7 @@ BlurBaseOperation::BlurBaseOperation(DataType data_type)
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(data_type);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
memset(&m_data, 0, sizeof(NodeBlurData));
this->m_size = 1.0f;
this->m_sizeavailable = false;
@@ -154,8 +154,8 @@ float *BlurBaseOperation::make_dist_fac_inverse(float rad, int size, int falloff
void BlurBaseOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- this->m_inputSize = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputSize = nullptr;
}
void BlurBaseOperation::setData(const NodeBlurData *data)
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index 987c5946e48..f7b7816e1a1 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -34,9 +34,9 @@ BokehBlurOperation::BokehBlurOperation()
this->m_size = 1.0f;
this->m_sizeavailable = false;
- this->m_inputProgram = NULL;
- this->m_inputBokehProgram = NULL;
- this->m_inputBoundingBoxReader = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBokehProgram = nullptr;
+ this->m_inputBoundingBoxReader = nullptr;
this->m_extend_bounds = false;
}
@@ -47,7 +47,7 @@ void *BokehBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateSize();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -133,9 +133,9 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
void BokehBlurOperation::deinitExecution()
{
deinitMutex();
- this->m_inputProgram = NULL;
- this->m_inputBokehProgram = NULL;
- this->m_inputBoundingBoxReader = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBokehProgram = nullptr;
+ this->m_inputBoundingBoxReader = nullptr;
}
bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input,
@@ -196,7 +196,7 @@ void BokehBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL);
+ cl_kernel kernel = device->COM_clCreateKernel("bokehBlurKernel", nullptr);
if (!this->m_sizeavailable) {
updateSize();
}
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index be3f637e4bb..473a43c1776 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -113,7 +113,7 @@ void BokehImageOperation::deinitExecution()
if (this->m_deleteData) {
if (this->m_data) {
delete this->m_data;
- this->m_data = NULL;
+ this->m_data = nullptr;
}
}
}
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
index d7d779ed0bb..662b08bdee9 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -25,8 +25,8 @@ BoxMaskOperation::BoxMaskOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputMask = NULL;
- this->m_inputValue = NULL;
+ this->m_inputMask = nullptr;
+ this->m_inputValue = nullptr;
this->m_cosine = 0.0f;
this->m_sine = 0.0f;
}
@@ -105,6 +105,6 @@ void BoxMaskOperation::executePixelSampled(float output[4], float x, float y, Pi
void BoxMaskOperation::deinitExecution()
{
- this->m_inputMask = NULL;
- this->m_inputValue = NULL;
+ this->m_inputMask = nullptr;
+ this->m_inputValue = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.cpp b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
index c72d227138d..3ae1b4aaef4 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.cpp
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
@@ -24,7 +24,7 @@ BrightnessOperation::BrightnessOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_use_premultiply = false;
}
@@ -85,7 +85,7 @@ void BrightnessOperation::executePixelSampled(float output[4],
void BrightnessOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- this->m_inputBrightnessProgram = NULL;
- this->m_inputContrastProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBrightnessProgram = nullptr;
+ this->m_inputContrastProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
index 115d415a8f8..9ccf9d7f1ef 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
@@ -26,7 +26,7 @@ CalculateMeanOperation::CalculateMeanOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_imageReader = NULL;
+ this->m_imageReader = nullptr;
this->m_iscalculated = false;
this->m_setting = 1;
this->setComplex(true);
@@ -45,7 +45,7 @@ void CalculateMeanOperation::executePixel(float output[4], int /*x*/, int /*y*/,
void CalculateMeanOperation::deinitExecution()
{
- this->m_imageReader = NULL;
+ this->m_imageReader = nullptr;
NodeOperation::deinitMutex();
}
@@ -77,7 +77,7 @@ void *CalculateMeanOperation::initializeTileData(rcti *rect)
this->m_iscalculated = true;
}
unlockMutex();
- return NULL;
+ return nullptr;
}
void CalculateMeanOperation::calculateMean(MemoryBuffer *tile)
diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
index 476626ffcb6..9ef77b9e5ea 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
@@ -99,5 +99,5 @@ void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect)
this->m_iscalculated = true;
}
unlockMutex();
- return NULL;
+ return nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
index b7ee3ad6de3..6bc9fa53c31 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
@@ -25,7 +25,7 @@ ChangeHSVOperation::ChangeHSVOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void ChangeHSVOperation::initExecution()
@@ -38,10 +38,10 @@ void ChangeHSVOperation::initExecution()
void ChangeHSVOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_hueOperation = NULL;
- this->m_saturationOperation = NULL;
- this->m_valueOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_hueOperation = nullptr;
+ this->m_saturationOperation = nullptr;
+ this->m_valueOperation = nullptr;
}
void ChangeHSVOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
index 8dcee8c6070..956a2cc86ee 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
@@ -24,7 +24,7 @@ ChannelMatteOperation::ChannelMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
}
void ChannelMatteOperation::initExecution()
@@ -77,7 +77,7 @@ void ChannelMatteOperation::initExecution()
void ChannelMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
}
void ChannelMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
index c55f434801d..389aeaf6fed 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
@@ -25,8 +25,8 @@ ChromaMatteOperation::ChromaMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void ChromaMatteOperation::initExecution()
@@ -37,8 +37,8 @@ void ChromaMatteOperation::initExecution()
void ChromaMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void ChromaMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
index 91418c47665..f9eaaf6f7a0 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
@@ -36,8 +36,8 @@ ColorBalanceASCCDLOperation::ColorBalanceASCCDLOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueOperation = NULL;
- this->m_inputColorOperation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColorOperation = nullptr;
this->setResolutionInputSocketIndex(1);
}
@@ -76,6 +76,6 @@ void ColorBalanceASCCDLOperation::executePixelSampled(float output[4],
void ColorBalanceASCCDLOperation::deinitExecution()
{
- this->m_inputValueOperation = NULL;
- this->m_inputColorOperation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColorOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
index 849540db1fc..df44e87a86a 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
@@ -41,8 +41,8 @@ ColorBalanceLGGOperation::ColorBalanceLGGOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueOperation = NULL;
- this->m_inputColorOperation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColorOperation = nullptr;
this->setResolutionInputSocketIndex(1);
}
@@ -81,6 +81,6 @@ void ColorBalanceLGGOperation::executePixelSampled(float output[4],
void ColorBalanceLGGOperation::deinitExecution()
{
- this->m_inputValueOperation = NULL;
- this->m_inputColorOperation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColorOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
index d99444344bd..60343c28662 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
@@ -26,8 +26,8 @@ ColorCorrectionOperation::ColorCorrectionOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputImage = NULL;
- this->m_inputMask = NULL;
+ this->m_inputImage = nullptr;
+ this->m_inputMask = nullptr;
this->m_redChannelEnabled = true;
this->m_greenChannelEnabled = true;
this->m_blueChannelEnabled = true;
@@ -157,6 +157,6 @@ void ColorCorrectionOperation::executePixelSampled(float output[4],
void ColorCorrectionOperation::deinitExecution()
{
- this->m_inputImage = NULL;
- this->m_inputMask = NULL;
+ this->m_inputImage = nullptr;
+ this->m_inputMask = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
index 8bdaa8ec28b..ed107a88953 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
@@ -30,10 +30,10 @@ ColorCurveOperation::ColorCurveOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputFacProgram = NULL;
- this->m_inputImageProgram = NULL;
- this->m_inputBlackProgram = NULL;
- this->m_inputWhiteProgram = NULL;
+ this->m_inputFacProgram = nullptr;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputBlackProgram = nullptr;
+ this->m_inputWhiteProgram = nullptr;
this->setResolutionInputSocketIndex(1);
}
@@ -90,10 +90,10 @@ void ColorCurveOperation::executePixelSampled(float output[4],
void ColorCurveOperation::deinitExecution()
{
CurveBaseOperation::deinitExecution();
- this->m_inputFacProgram = NULL;
- this->m_inputImageProgram = NULL;
- this->m_inputBlackProgram = NULL;
- this->m_inputWhiteProgram = NULL;
+ this->m_inputFacProgram = nullptr;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputBlackProgram = nullptr;
+ this->m_inputWhiteProgram = nullptr;
}
// Constant level curve mapping
@@ -104,8 +104,8 @@ ConstantLevelColorCurveOperation::ConstantLevelColorCurveOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputFacProgram = NULL;
- this->m_inputImageProgram = NULL;
+ this->m_inputFacProgram = nullptr;
+ this->m_inputImageProgram = nullptr;
this->setResolutionInputSocketIndex(1);
}
@@ -148,6 +148,6 @@ void ConstantLevelColorCurveOperation::executePixelSampled(float output[4],
void ConstantLevelColorCurveOperation::deinitExecution()
{
CurveBaseOperation::deinitExecution();
- this->m_inputFacProgram = NULL;
- this->m_inputImageProgram = NULL;
+ this->m_inputFacProgram = nullptr;
+ this->m_inputImageProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
index e3aa3aef5a4..b8749bec4b8 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
@@ -25,8 +25,8 @@ ColorMatteOperation::ColorMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void ColorMatteOperation::initExecution()
@@ -37,8 +37,8 @@ void ColorMatteOperation::initExecution()
void ColorMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void ColorMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.cpp b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
index e7f5ca1af5e..4d62a293b78 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
@@ -25,8 +25,8 @@ ColorRampOperation::ColorRampOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
- this->m_colorBand = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_colorBand = nullptr;
}
void ColorRampOperation::initExecution()
{
@@ -46,5 +46,5 @@ void ColorRampOperation::executePixelSampled(float output[4],
void ColorRampOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
index 4356eb4b745..050792d8dab 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
@@ -26,8 +26,8 @@ ColorSpillOperation::ColorSpillOperation()
addInputSocket(COM_DT_VALUE);
addOutputSocket(COM_DT_COLOR);
- this->m_inputImageReader = NULL;
- this->m_inputFacReader = NULL;
+ this->m_inputImageReader = nullptr;
+ this->m_inputFacReader = nullptr;
this->m_spillChannel = 1; // GREEN
this->m_spillMethod = 0;
}
@@ -77,8 +77,8 @@ void ColorSpillOperation::initExecution()
void ColorSpillOperation::deinitExecution()
{
- this->m_inputImageReader = NULL;
- this->m_inputFacReader = NULL;
+ this->m_inputImageReader = nullptr;
+ this->m_inputFacReader = nullptr;
}
void ColorSpillOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp
index 63e7817606f..3ec54b1c04d 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.cpp
+++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp
@@ -38,19 +38,19 @@ CompositorOperation::CompositorOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
- this->setRenderData(NULL);
- this->m_outputBuffer = NULL;
- this->m_depthBuffer = NULL;
- this->m_imageInput = NULL;
- this->m_alphaInput = NULL;
- this->m_depthInput = NULL;
+ this->setRenderData(nullptr);
+ this->m_outputBuffer = nullptr;
+ this->m_depthBuffer = nullptr;
+ this->m_imageInput = nullptr;
+ this->m_alphaInput = nullptr;
+ this->m_depthInput = nullptr;
this->m_useAlphaInput = false;
this->m_active = false;
- this->m_scene = NULL;
+ this->m_scene = nullptr;
this->m_sceneName[0] = '\0';
- this->m_viewName = NULL;
+ this->m_viewName = nullptr;
}
void CompositorOperation::initExecution()
@@ -67,7 +67,7 @@ void CompositorOperation::initExecution()
this->m_outputBuffer = (float *)MEM_callocN(
sizeof(float[4]) * this->getWidth() * this->getHeight(), "CompositorOperation");
}
- if (this->m_depthInput != NULL) {
+ if (this->m_depthInput != nullptr) {
this->m_depthBuffer = (float *)MEM_callocN(
sizeof(float) * this->getWidth() * this->getHeight(), "CompositorOperation");
}
@@ -86,11 +86,11 @@ void CompositorOperation::deinitExecution()
if (rr) {
RenderView *rv = RE_RenderViewGetByName(rr, this->m_viewName);
- if (rv->rectf != NULL) {
+ if (rv->rectf != nullptr) {
MEM_freeN(rv->rectf);
}
rv->rectf = this->m_outputBuffer;
- if (rv->rectz != NULL) {
+ if (rv->rectz != nullptr) {
MEM_freeN(rv->rectz);
}
rv->rectz = this->m_depthBuffer;
@@ -107,13 +107,13 @@ void CompositorOperation::deinitExecution()
if (re) {
RE_ReleaseResult(re);
- re = NULL;
+ re = nullptr;
}
BLI_thread_lock(LOCK_DRAW_IMAGE);
BKE_image_signal(G.main,
BKE_image_ensure_viewer(G.main, IMA_TYPE_R_RESULT, "Render Result"),
- NULL,
+ nullptr,
IMA_SIGNAL_FREE);
BLI_thread_unlock(LOCK_DRAW_IMAGE);
}
@@ -126,11 +126,11 @@ void CompositorOperation::deinitExecution()
}
}
- this->m_outputBuffer = NULL;
- this->m_depthBuffer = NULL;
- this->m_imageInput = NULL;
- this->m_alphaInput = NULL;
- this->m_depthInput = NULL;
+ this->m_outputBuffer = nullptr;
+ this->m_depthBuffer = nullptr;
+ this->m_imageInput = nullptr;
+ this->m_alphaInput = nullptr;
+ this->m_depthInput = nullptr;
}
void CompositorOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
index 39143aaf3b8..44468e04ae9 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
@@ -24,7 +24,7 @@ ConvertColorProfileOperation::ConvertColorProfileOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_predivided = false;
}
@@ -46,5 +46,5 @@ void ConvertColorProfileOperation::executePixelSampled(float output[4],
void ConvertColorProfileOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
index 56c4fb44d4f..fe395ecae9e 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
@@ -25,11 +25,11 @@ ConvertDepthToRadiusOperation::ConvertDepthToRadiusOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_fStop = 128.0f;
- this->m_cameraObject = NULL;
+ this->m_cameraObject = nullptr;
this->m_maxRadius = 32.0f;
- this->m_blurPostOperation = NULL;
+ this->m_blurPostOperation = nullptr;
}
float ConvertDepthToRadiusOperation::determineFocalDistance()
@@ -46,7 +46,7 @@ float ConvertDepthToRadiusOperation::determineFocalDistance()
void ConvertDepthToRadiusOperation::initExecution()
{
float cam_sensor = DEFAULT_SENSOR_WIDTH;
- Camera *camera = NULL;
+ Camera *camera = nullptr;
if (this->m_cameraObject && this->m_cameraObject->type == OB_CAMERA) {
camera = (Camera *)this->m_cameraObject->data;
@@ -111,5 +111,5 @@ void ConvertDepthToRadiusOperation::executePixelSampled(float output[4],
void ConvertDepthToRadiusOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp
index dae4a9f1bab..cccfd407752 100644
--- a/source/blender/compositor/operations/COM_ConvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertOperation.cpp
@@ -22,7 +22,7 @@
ConvertBaseOperation::ConvertBaseOperation()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void ConvertBaseOperation::initExecution()
@@ -32,7 +32,7 @@ void ConvertBaseOperation::initExecution()
void ConvertBaseOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
/* ******** Value to Color ******** */
@@ -401,7 +401,7 @@ SeparateChannelOperation::SeparateChannelOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void SeparateChannelOperation::initExecution()
{
@@ -410,7 +410,7 @@ void SeparateChannelOperation::initExecution()
void SeparateChannelOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void SeparateChannelOperation::executePixelSampled(float output[4],
@@ -433,10 +433,10 @@ CombineChannelsOperation::CombineChannelsOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputChannel1Operation = NULL;
- this->m_inputChannel2Operation = NULL;
- this->m_inputChannel3Operation = NULL;
- this->m_inputChannel4Operation = NULL;
+ this->m_inputChannel1Operation = nullptr;
+ this->m_inputChannel2Operation = nullptr;
+ this->m_inputChannel3Operation = nullptr;
+ this->m_inputChannel4Operation = nullptr;
}
void CombineChannelsOperation::initExecution()
@@ -449,10 +449,10 @@ void CombineChannelsOperation::initExecution()
void CombineChannelsOperation::deinitExecution()
{
- this->m_inputChannel1Operation = NULL;
- this->m_inputChannel2Operation = NULL;
- this->m_inputChannel3Operation = NULL;
- this->m_inputChannel4Operation = NULL;
+ this->m_inputChannel1Operation = nullptr;
+ this->m_inputChannel2Operation = nullptr;
+ this->m_inputChannel3Operation = nullptr;
+ this->m_inputChannel4Operation = nullptr;
}
void CombineChannelsOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
index 1932098fd30..1c2570cd251 100644
--- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
@@ -42,42 +42,42 @@ void ConvolutionEdgeFilterOperation::executePixel(float output[4], int x, int y,
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->m_inputValueOperation->read(value, x2, y2, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, nullptr);
float mval = 1.0f - value[0];
- this->m_inputOperation->read(in1, x1, y1, NULL);
+ this->m_inputOperation->read(in1, x1, y1, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[0]);
madd_v3_v3fl(res2, in1, this->m_filter[0]);
- this->m_inputOperation->read(in1, x2, y1, NULL);
+ this->m_inputOperation->read(in1, x2, y1, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[1]);
madd_v3_v3fl(res2, in1, this->m_filter[3]);
- this->m_inputOperation->read(in1, x3, y1, NULL);
+ this->m_inputOperation->read(in1, x3, y1, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[2]);
madd_v3_v3fl(res2, in1, this->m_filter[6]);
- this->m_inputOperation->read(in1, x1, y2, NULL);
+ this->m_inputOperation->read(in1, x1, y2, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[3]);
madd_v3_v3fl(res2, in1, this->m_filter[1]);
- this->m_inputOperation->read(in2, x2, y2, NULL);
+ this->m_inputOperation->read(in2, x2, y2, nullptr);
madd_v3_v3fl(res1, in2, this->m_filter[4]);
madd_v3_v3fl(res2, in2, this->m_filter[4]);
- this->m_inputOperation->read(in1, x3, y2, NULL);
+ this->m_inputOperation->read(in1, x3, y2, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[5]);
madd_v3_v3fl(res2, in1, this->m_filter[7]);
- this->m_inputOperation->read(in1, x1, y3, NULL);
+ this->m_inputOperation->read(in1, x1, y3, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[6]);
madd_v3_v3fl(res2, in1, this->m_filter[2]);
- this->m_inputOperation->read(in1, x2, y3, NULL);
+ this->m_inputOperation->read(in1, x2, y3, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[7]);
madd_v3_v3fl(res2, in1, this->m_filter[5]);
- this->m_inputOperation->read(in1, x3, y3, NULL);
+ this->m_inputOperation->read(in1, x3, y3, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[8]);
madd_v3_v3fl(res2, in1, this->m_filter[8]);
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
index fabde28d7a2..7e35f6fb4f6 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
@@ -28,7 +28,7 @@ ConvolutionFilterOperation::ConvolutionFilterOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->setComplex(true);
}
void ConvolutionFilterOperation::initExecution()
@@ -55,8 +55,8 @@ void ConvolutionFilterOperation::set3x3Filter(
void ConvolutionFilterOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputValueOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputValueOperation = nullptr;
}
void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, void * /*data*/)
@@ -76,27 +76,27 @@ void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, voi
CLAMP(y2, 0, getHeight() - 1);
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->m_inputValueOperation->read(value, x2, y2, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, nullptr);
const float mval = 1.0f - value[0];
zero_v4(output);
- this->m_inputOperation->read(in1, x1, y1, NULL);
+ this->m_inputOperation->read(in1, x1, y1, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[0]);
- this->m_inputOperation->read(in1, x2, y1, NULL);
+ this->m_inputOperation->read(in1, x2, y1, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[1]);
- this->m_inputOperation->read(in1, x3, y1, NULL);
+ this->m_inputOperation->read(in1, x3, y1, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[2]);
- this->m_inputOperation->read(in1, x1, y2, NULL);
+ this->m_inputOperation->read(in1, x1, y2, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[3]);
- this->m_inputOperation->read(in2, x2, y2, NULL);
+ this->m_inputOperation->read(in2, x2, y2, nullptr);
madd_v4_v4fl(output, in2, this->m_filter[4]);
- this->m_inputOperation->read(in1, x3, y2, NULL);
+ this->m_inputOperation->read(in1, x3, y2, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[5]);
- this->m_inputOperation->read(in1, x1, y3, NULL);
+ this->m_inputOperation->read(in1, x1, y3, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[6]);
- this->m_inputOperation->read(in1, x2, y3, NULL);
+ this->m_inputOperation->read(in1, x2, y3, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[7]);
- this->m_inputOperation->read(in1, x3, y3, NULL);
+ this->m_inputOperation->read(in1, x3, y3, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[8]);
output[0] = output[0] * value[0] + in2[0] * mval;
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp
index 3dda1a94989..408f588871e 100644
--- a/source/blender/compositor/operations/COM_CropOperation.cpp
+++ b/source/blender/compositor/operations/COM_CropOperation.cpp
@@ -23,8 +23,8 @@ CropBaseOperation::CropBaseOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
- this->m_settings = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_settings = nullptr;
}
void CropBaseOperation::updateArea()
@@ -75,7 +75,7 @@ void CropBaseOperation::initExecution()
void CropBaseOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
CropOperation::CropOperation() : CropBaseOperation()
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
index 5cfea97475a..b58efcf0cca 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
@@ -22,14 +22,14 @@
CurveBaseOperation::CurveBaseOperation()
{
- this->m_curveMapping = NULL;
+ this->m_curveMapping = nullptr;
}
CurveBaseOperation::~CurveBaseOperation()
{
if (this->m_curveMapping) {
BKE_curvemapping_free(this->m_curveMapping);
- this->m_curveMapping = NULL;
+ this->m_curveMapping = nullptr;
}
}
@@ -41,7 +41,7 @@ void CurveBaseOperation::deinitExecution()
{
if (this->m_curveMapping) {
BKE_curvemapping_free(this->m_curveMapping);
- this->m_curveMapping = NULL;
+ this->m_curveMapping = nullptr;
}
}
diff --git a/source/blender/compositor/operations/COM_DenoiseOperation.cpp b/source/blender/compositor/operations/COM_DenoiseOperation.cpp
index 97e2dba5e18..bc33e5f75c4 100644
--- a/source/blender/compositor/operations/COM_DenoiseOperation.cpp
+++ b/source/blender/compositor/operations/COM_DenoiseOperation.cpp
@@ -32,7 +32,7 @@ DenoiseOperation::DenoiseOperation()
this->addInputSocket(COM_DT_VECTOR);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_settings = NULL;
+ this->m_settings = nullptr;
}
void DenoiseOperation::initExecution()
{
@@ -44,9 +44,9 @@ void DenoiseOperation::initExecution()
void DenoiseOperation::deinitExecution()
{
- this->m_inputProgramColor = NULL;
- this->m_inputProgramNormal = NULL;
- this->m_inputProgramAlbedo = NULL;
+ this->m_inputProgramColor = nullptr;
+ this->m_inputProgramNormal = nullptr;
+ this->m_inputProgramAlbedo = nullptr;
SingleThreadedOperation::deinitExecution();
}
diff --git a/source/blender/compositor/operations/COM_DespeckleOperation.cpp b/source/blender/compositor/operations/COM_DespeckleOperation.cpp
index 5d8481562ab..901445c6875 100644
--- a/source/blender/compositor/operations/COM_DespeckleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DespeckleOperation.cpp
@@ -28,7 +28,7 @@ DespeckleOperation::DespeckleOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->setComplex(true);
}
void DespeckleOperation::initExecution()
@@ -39,8 +39,8 @@ void DespeckleOperation::initExecution()
void DespeckleOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputValueOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputValueOperation = nullptr;
}
BLI_INLINE int color_diff(const float a[3], const float b[3], const float threshold)
@@ -69,10 +69,10 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
CLAMP(y2, 0, getHeight() - 1);
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->m_inputValueOperation->read(value, x2, y2, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, nullptr);
// const float mval = 1.0f - value[0];
- this->m_inputOperation->read(color_org, x2, y2, NULL);
+ this->m_inputOperation->read(color_org, x2, y2, nullptr);
#define TOT_DIV_ONE 1.0f
#define TOT_DIV_CNR (float)M_SQRT1_2
@@ -91,13 +91,13 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
zero_v4(color_mid);
zero_v4(color_mid_ok);
- this->m_inputOperation->read(in1, x1, y1, NULL);
+ this->m_inputOperation->read(in1, x1, y1, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- this->m_inputOperation->read(in1, x2, y1, NULL);
+ this->m_inputOperation->read(in1, x2, y1, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- this->m_inputOperation->read(in1, x3, y1, NULL);
+ this->m_inputOperation->read(in1, x3, y1, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- this->m_inputOperation->read(in1, x1, y2, NULL);
+ this->m_inputOperation->read(in1, x1, y2, nullptr);
COLOR_ADD(TOT_DIV_ONE)
#if 0
@@ -105,13 +105,13 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
madd_v4_v4fl(color_mid, in2, this->m_filter[4]);
#endif
- this->m_inputOperation->read(in1, x3, y2, NULL);
+ this->m_inputOperation->read(in1, x3, y2, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- this->m_inputOperation->read(in1, x1, y3, NULL);
+ this->m_inputOperation->read(in1, x1, y3, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- this->m_inputOperation->read(in1, x2, y3, NULL);
+ this->m_inputOperation->read(in1, x2, y3, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- this->m_inputOperation->read(in1, x3, y3, NULL);
+ this->m_inputOperation->read(in1, x3, y3, nullptr);
COLOR_ADD(TOT_DIV_CNR)
mul_v4_fl(color_mid, 1.0f / (4.0f + (4.0f * (float)M_SQRT1_2)));
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
index 92a804ec3ec..cca99a42c0c 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -25,8 +25,8 @@ DifferenceMatteOperation::DifferenceMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImage1Program = NULL;
- this->m_inputImage2Program = NULL;
+ this->m_inputImage1Program = nullptr;
+ this->m_inputImage2Program = nullptr;
}
void DifferenceMatteOperation::initExecution()
@@ -36,8 +36,8 @@ void DifferenceMatteOperation::initExecution()
}
void DifferenceMatteOperation::deinitExecution()
{
- this->m_inputImage1Program = NULL;
- this->m_inputImage2Program = NULL;
+ this->m_inputImage1Program = nullptr;
+ this->m_inputImage2Program = nullptr;
}
void DifferenceMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index 0fbdb37081b..74f5fceacfb 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -28,7 +28,7 @@ DilateErodeThresholdOperation::DilateErodeThresholdOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_inset = 0.0f;
this->m__switch = 0.5f;
this->m_distance = 0.0f;
@@ -54,7 +54,7 @@ void DilateErodeThresholdOperation::initExecution()
void *DilateErodeThresholdOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = this->m_inputProgram->initializeTileData(NULL);
+ void *buffer = this->m_inputProgram->initializeTileData(nullptr);
return buffer;
}
@@ -142,7 +142,7 @@ void DilateErodeThresholdOperation::executePixel(float output[4], int x, int y,
void DilateErodeThresholdOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
bool DilateErodeThresholdOperation::determineDependingAreaOfInterest(
@@ -164,7 +164,7 @@ DilateDistanceOperation::DilateDistanceOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_distance = 0.0f;
this->setOpenCL(true);
}
@@ -179,7 +179,7 @@ void DilateDistanceOperation::initExecution()
void *DilateDistanceOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = this->m_inputProgram->initializeTileData(NULL);
+ void *buffer = this->m_inputProgram->initializeTileData(nullptr);
return buffer;
}
@@ -217,7 +217,7 @@ void DilateDistanceOperation::executePixel(float output[4], int x, int y, void *
void DilateDistanceOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
bool DilateDistanceOperation::determineDependingAreaOfInterest(rcti *input,
@@ -241,7 +241,7 @@ void DilateDistanceOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel dilateKernel = device->COM_clCreateKernel("dilateKernel", NULL);
+ cl_kernel dilateKernel = device->COM_clCreateKernel("dilateKernel", nullptr);
cl_int distanceSquared = this->m_distance * this->m_distance;
cl_int scope = this->m_scope;
@@ -301,7 +301,7 @@ void ErodeDistanceOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel erodeKernel = device->COM_clCreateKernel("erodeKernel", NULL);
+ cl_kernel erodeKernel = device->COM_clCreateKernel("erodeKernel", nullptr);
cl_int distanceSquared = this->m_distance * this->m_distance;
cl_int scope = this->m_scope;
@@ -322,7 +322,7 @@ DilateStepOperation::DilateStepOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void DilateStepOperation::initExecution()
{
@@ -351,7 +351,7 @@ static tile_info *create_cache(int xmin, int xmax, int ymin, int ymax)
void *DilateStepOperation::initializeTileData(rcti *rect)
{
- MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL);
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(nullptr);
int x, y, i;
int width = tile->getWidth();
int height = tile->getHeight();
@@ -448,7 +448,7 @@ void DilateStepOperation::executePixel(float output[4], int x, int y, void *data
void DilateStepOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void DilateStepOperation::deinitializeTileData(rcti * /*rect*/, void *data)
@@ -480,7 +480,7 @@ ErodeStepOperation::ErodeStepOperation() : DilateStepOperation()
void *ErodeStepOperation::initializeTileData(rcti *rect)
{
- MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL);
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(nullptr);
int x, y, i;
int width = tile->getWidth();
int height = tile->getHeight();
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
index efe40cc8b58..c0b9c9b6f1d 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
@@ -30,7 +30,7 @@ DirectionalBlurOperation::DirectionalBlurOperation()
this->setComplex(true);
this->setOpenCL(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void DirectionalBlurOperation::initExecution()
@@ -103,7 +103,7 @@ void DirectionalBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel directionalBlurKernel = device->COM_clCreateKernel("directionalBlurKernel", NULL);
+ cl_kernel directionalBlurKernel = device->COM_clCreateKernel("directionalBlurKernel", nullptr);
cl_int iterations = pow(2.0f, this->m_data->iter);
cl_float2 ltxy = {{this->m_tx, this->m_ty}};
@@ -128,7 +128,7 @@ void DirectionalBlurOperation::executeOpenCL(OpenCLDevice *device,
void DirectionalBlurOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
bool DirectionalBlurOperation::determineDependingAreaOfInterest(rcti * /*input*/,
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index 31b4d41320f..fcc8bc4670e 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -29,10 +29,10 @@ DisplaceOperation::DisplaceOperation()
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputColorProgram = NULL;
- this->m_inputVectorProgram = NULL;
- this->m_inputScaleXProgram = NULL;
- this->m_inputScaleYProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputVectorProgram = nullptr;
+ this->m_inputScaleXProgram = nullptr;
+ this->m_inputScaleYProgram = nullptr;
}
void DisplaceOperation::initExecution()
@@ -143,10 +143,10 @@ void DisplaceOperation::pixelTransform(const float xy[2], float r_uv[2], float r
void DisplaceOperation::deinitExecution()
{
- this->m_inputColorProgram = NULL;
- this->m_inputVectorProgram = NULL;
- this->m_inputScaleXProgram = NULL;
- this->m_inputScaleYProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputVectorProgram = nullptr;
+ this->m_inputScaleXProgram = nullptr;
+ this->m_inputScaleYProgram = nullptr;
}
bool DisplaceOperation::determineDependingAreaOfInterest(rcti *input,
@@ -155,7 +155,7 @@ bool DisplaceOperation::determineDependingAreaOfInterest(rcti *input,
{
rcti colorInput;
rcti vectorInput;
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
/* the vector buffer only needs a 2x2 buffer. The image needs whole buffer */
/* image */
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
index 10d274b6fc5..bbc4d63305b 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
@@ -28,10 +28,10 @@ DisplaceSimpleOperation::DisplaceSimpleOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputColorProgram = NULL;
- this->m_inputVectorProgram = NULL;
- this->m_inputScaleXProgram = NULL;
- this->m_inputScaleYProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputVectorProgram = nullptr;
+ this->m_inputScaleXProgram = nullptr;
+ this->m_inputScaleYProgram = nullptr;
}
void DisplaceSimpleOperation::initExecution()
@@ -86,10 +86,10 @@ void DisplaceSimpleOperation::executePixelSampled(float output[4],
void DisplaceSimpleOperation::deinitExecution()
{
- this->m_inputColorProgram = NULL;
- this->m_inputVectorProgram = NULL;
- this->m_inputScaleXProgram = NULL;
- this->m_inputScaleYProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputVectorProgram = nullptr;
+ this->m_inputScaleXProgram = nullptr;
+ this->m_inputScaleYProgram = nullptr;
}
bool DisplaceSimpleOperation::determineDependingAreaOfInterest(rcti *input,
@@ -97,7 +97,7 @@ bool DisplaceSimpleOperation::determineDependingAreaOfInterest(rcti *input,
rcti *output)
{
rcti colorInput;
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
/* the vector buffer only needs a 2x2 buffer. The image needs whole buffer */
/* image */
diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
index 23e133ad711..7d79dcc657d 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
@@ -25,8 +25,8 @@ DistanceRGBMatteOperation::DistanceRGBMatteOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void DistanceRGBMatteOperation::initExecution()
@@ -37,8 +37,8 @@ void DistanceRGBMatteOperation::initExecution()
void DistanceRGBMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
float DistanceRGBMatteOperation::calculateDistance(float key[4], float image[4])
diff --git a/source/blender/compositor/operations/COM_DotproductOperation.cpp b/source/blender/compositor/operations/COM_DotproductOperation.cpp
index 263a7060a49..750e4308d11 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.cpp
+++ b/source/blender/compositor/operations/COM_DotproductOperation.cpp
@@ -24,8 +24,8 @@ DotproductOperation::DotproductOperation()
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_VALUE);
this->setResolutionInputSocketIndex(0);
- this->m_input1Operation = NULL;
- this->m_input2Operation = NULL;
+ this->m_input1Operation = nullptr;
+ this->m_input2Operation = nullptr;
}
void DotproductOperation::initExecution()
{
@@ -35,8 +35,8 @@ void DotproductOperation::initExecution()
void DotproductOperation::deinitExecution()
{
- this->m_input1Operation = NULL;
- this->m_input2Operation = NULL;
+ this->m_input1Operation = nullptr;
+ this->m_input2Operation = nullptr;
}
/** \todo: current implementation is the inverse of a dotproduct. not 'logically' correct
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
index de60e53d3d0..7ef0d7b7606 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -1311,8 +1311,8 @@ DoubleEdgeMaskOperation::DoubleEdgeMaskOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputInnerMask = NULL;
- this->m_inputOuterMask = NULL;
+ this->m_inputInnerMask = nullptr;
+ this->m_inputOuterMask = nullptr;
this->m_adjecentOnly = false;
this->m_keepInside = false;
this->setComplex(true);
@@ -1322,7 +1322,7 @@ bool DoubleEdgeMaskOperation::determineDependingAreaOfInterest(rcti * /*input*/,
ReadBufferOperation *readOperation,
rcti *output)
{
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
rcti newInput;
newInput.xmax = this->getWidth();
newInput.xmin = 0;
@@ -1339,7 +1339,7 @@ void DoubleEdgeMaskOperation::initExecution()
this->m_inputInnerMask = this->getInputSocketReader(0);
this->m_inputOuterMask = this->getInputSocketReader(1);
initMutex();
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
}
void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect)
@@ -1349,7 +1349,7 @@ void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect)
}
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
MemoryBuffer *innerMask = (MemoryBuffer *)this->m_inputInnerMask->initializeTileData(rect);
MemoryBuffer *outerMask = (MemoryBuffer *)this->m_inputOuterMask->initializeTileData(rect);
float *data = (float *)MEM_mallocN(sizeof(float) * this->getWidth() * this->getHeight(),
@@ -1371,11 +1371,11 @@ void DoubleEdgeMaskOperation::executePixel(float output[4], int x, int y, void *
void DoubleEdgeMaskOperation::deinitExecution()
{
- this->m_inputInnerMask = NULL;
- this->m_inputOuterMask = NULL;
+ this->m_inputInnerMask = nullptr;
+ this->m_inputOuterMask = nullptr;
deinitMutex();
if (this->m_cachedInstance) {
MEM_freeN(this->m_cachedInstance);
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
}
}
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
index 1dc1b0e2be6..38541f91fc8 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -25,8 +25,8 @@ EllipseMaskOperation::EllipseMaskOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputMask = NULL;
- this->m_inputValue = NULL;
+ this->m_inputMask = nullptr;
+ this->m_inputValue = nullptr;
this->m_cosine = 0.0f;
this->m_sine = 0.0f;
}
@@ -114,6 +114,6 @@ void EllipseMaskOperation::executePixelSampled(float output[4],
void EllipseMaskOperation::deinitExecution()
{
- this->m_inputMask = NULL;
- this->m_inputValue = NULL;
+ this->m_inputMask = nullptr;
+ this->m_inputValue = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index 0387f495f0c..e87d40b4c86 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -24,7 +24,7 @@
FastGaussianBlurOperation::FastGaussianBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_iirgaus = NULL;
+ this->m_iirgaus = nullptr;
}
void FastGaussianBlurOperation::executePixel(float output[4], int x, int y, void *data)
@@ -70,7 +70,7 @@ void FastGaussianBlurOperation::deinitExecution()
{
if (this->m_iirgaus) {
delete this->m_iirgaus;
- this->m_iirgaus = NULL;
+ this->m_iirgaus = nullptr;
}
BlurBaseOperation::deinitMutex();
}
@@ -260,8 +260,8 @@ FastGaussianBlurValueOperation::FastGaussianBlurValueOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_iirgaus = NULL;
- this->m_inputprogram = NULL;
+ this->m_iirgaus = nullptr;
+ this->m_inputprogram = nullptr;
this->m_sigma = 1.0f;
this->m_overlay = 0;
setComplex(true);
@@ -300,7 +300,7 @@ void FastGaussianBlurValueOperation::deinitExecution()
{
if (this->m_iirgaus) {
delete this->m_iirgaus;
- this->m_iirgaus = NULL;
+ this->m_iirgaus = nullptr;
}
deinitMutex();
}
diff --git a/source/blender/compositor/operations/COM_FlipOperation.cpp b/source/blender/compositor/operations/COM_FlipOperation.cpp
index f248133d389..37eaf4868d3 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.cpp
+++ b/source/blender/compositor/operations/COM_FlipOperation.cpp
@@ -23,7 +23,7 @@ FlipOperation::FlipOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_flipX = true;
this->m_flipY = false;
}
@@ -34,7 +34,7 @@ void FlipOperation::initExecution()
void FlipOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void FlipOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
index a333ca18fc2..d67d67f8e57 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
@@ -23,7 +23,7 @@ GammaCorrectOperation::GammaCorrectOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void GammaCorrectOperation::initExecution()
{
@@ -58,14 +58,14 @@ void GammaCorrectOperation::executePixelSampled(float output[4],
void GammaCorrectOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
GammaUncorrectOperation::GammaUncorrectOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void GammaUncorrectOperation::initExecution()
{
@@ -100,5 +100,5 @@ void GammaUncorrectOperation::executePixelSampled(float output[4],
void GammaUncorrectOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp
index af483e612f0..6baa52a290c 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -24,8 +24,8 @@ GammaOperation::GammaOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
- this->m_inputGammaProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputGammaProgram = nullptr;
}
void GammaOperation::initExecution()
{
@@ -51,6 +51,6 @@ void GammaOperation::executePixelSampled(float output[4], float x, float y, Pixe
void GammaOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- this->m_inputGammaProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputGammaProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
index c028a2c0e4c..a7d8f030269 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
@@ -24,7 +24,7 @@
GaussianAlphaXBlurOperation::GaussianAlphaXBlurOperation() : BlurBaseOperation(COM_DT_VALUE)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
this->m_filtersize = 0;
this->m_falloff = -1; /* intentionally invalid, so we can detect uninitialized values */
}
@@ -35,7 +35,7 @@ void *GaussianAlphaXBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -57,7 +57,7 @@ void GaussianAlphaXBlurOperation::initExecution()
void GaussianAlphaXBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizex, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -65,7 +65,7 @@ void GaussianAlphaXBlurOperation::updateGauss()
m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize);
}
- if (this->m_distbuf_inv == NULL) {
+ if (this->m_distbuf_inv == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizex, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -143,12 +143,12 @@ void GaussianAlphaXBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
if (this->m_distbuf_inv) {
MEM_freeN(this->m_distbuf_inv);
- this->m_distbuf_inv = NULL;
+ this->m_distbuf_inv = nullptr;
}
deinitMutex();
@@ -172,7 +172,7 @@ bool GaussianAlphaXBlurOperation::determineDependingAreaOfInterest(
else
#endif
{
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmax = input->xmax + this->m_filtersize + 1;
newInput.xmin = input->xmin - this->m_filtersize - 1;
newInput.ymax = input->ymax;
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
index 35abe4cd47b..f1bc8751329 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
@@ -24,7 +24,7 @@
GaussianAlphaYBlurOperation::GaussianAlphaYBlurOperation() : BlurBaseOperation(COM_DT_VALUE)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
this->m_filtersize = 0;
this->m_falloff = -1; /* intentionally invalid, so we can detect uninitialized values */
}
@@ -35,7 +35,7 @@ void *GaussianAlphaYBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -57,7 +57,7 @@ void GaussianAlphaYBlurOperation::initExecution()
void GaussianAlphaYBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizey, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -65,7 +65,7 @@ void GaussianAlphaYBlurOperation::updateGauss()
m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize);
}
- if (this->m_distbuf_inv == NULL) {
+ if (this->m_distbuf_inv == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizey, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -143,12 +143,12 @@ void GaussianAlphaYBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
if (this->m_distbuf_inv) {
MEM_freeN(this->m_distbuf_inv);
- this->m_distbuf_inv = NULL;
+ this->m_distbuf_inv = nullptr;
}
deinitMutex();
@@ -172,7 +172,7 @@ bool GaussianAlphaYBlurOperation::determineDependingAreaOfInterest(
else
#endif
{
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmax = input->xmax;
newInput.xmin = input->xmin;
newInput.ymax = input->ymax + this->m_filtersize + 1;
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index dd479da864c..d489c64953e 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -24,7 +24,7 @@
GaussianBokehBlurOperation::GaussianBokehBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
void *GaussianBokehBlurOperation::initializeTileData(rcti * /*rect*/)
@@ -33,7 +33,7 @@ void *GaussianBokehBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -51,7 +51,7 @@ void GaussianBokehBlurOperation::initExecution()
void GaussianBokehBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
float radxf;
float radyf;
int n;
@@ -156,7 +156,7 @@ void GaussianBokehBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
deinitMutex();
@@ -177,7 +177,7 @@ bool GaussianBokehBlurOperation::determineDependingAreaOfInterest(
return true;
}
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmin = 0;
newInput.ymin = 0;
newInput.xmax = this->getWidth();
@@ -197,12 +197,12 @@ bool GaussianBokehBlurOperation::determineDependingAreaOfInterest(
// reference image
GaussianBlurReferenceOperation::GaussianBlurReferenceOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_maintabs = NULL;
+ this->m_maintabs = nullptr;
}
void *GaussianBlurReferenceOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
return buffer;
}
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
index 32ad0482791..e4401b2a91c 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
@@ -25,9 +25,9 @@
GaussianXBlurOperation::GaussianXBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
#ifdef __SSE2__
- this->m_gausstab_sse = NULL;
+ this->m_gausstab_sse = nullptr;
#endif
this->m_filtersize = 0;
}
@@ -38,7 +38,7 @@ void *GaussianXBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -63,7 +63,7 @@ void GaussianXBlurOperation::initExecution()
void GaussianXBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizex, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -125,14 +125,14 @@ void GaussianXBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
cl_kernel gaussianXBlurOperationKernel = device->COM_clCreateKernel(
- "gaussianXBlurOperationKernel", NULL);
+ "gaussianXBlurOperationKernel", nullptr);
cl_int filter_size = this->m_filtersize;
cl_mem gausstab = clCreateBuffer(device->getContext(),
CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR,
sizeof(float) * (this->m_filtersize * 2 + 1),
this->m_gausstab,
- NULL);
+ nullptr);
device->COM_clAttachMemoryBufferToKernelParameter(gaussianXBlurOperationKernel,
0,
@@ -159,12 +159,12 @@ void GaussianXBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
#ifdef __SSE2__
if (this->m_gausstab_sse) {
MEM_freeN(this->m_gausstab_sse);
- this->m_gausstab_sse = NULL;
+ this->m_gausstab_sse = nullptr;
}
#endif
@@ -189,7 +189,7 @@ bool GaussianXBlurOperation::determineDependingAreaOfInterest(rcti *input,
}
}
{
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmax = input->xmax + this->m_filtersize + 1;
newInput.xmin = input->xmin - this->m_filtersize - 1;
newInput.ymax = input->ymax;
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
index 3ffa797c0c1..230538ba5e6 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
@@ -25,9 +25,9 @@
GaussianYBlurOperation::GaussianYBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
#ifdef __SSE2__
- this->m_gausstab_sse = NULL;
+ this->m_gausstab_sse = nullptr;
#endif
this->m_filtersize = 0;
}
@@ -38,7 +38,7 @@ void *GaussianYBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -62,7 +62,7 @@ void GaussianYBlurOperation::initExecution()
void GaussianYBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizey, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -125,14 +125,14 @@ void GaussianYBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
cl_kernel gaussianYBlurOperationKernel = device->COM_clCreateKernel(
- "gaussianYBlurOperationKernel", NULL);
+ "gaussianYBlurOperationKernel", nullptr);
cl_int filter_size = this->m_filtersize;
cl_mem gausstab = clCreateBuffer(device->getContext(),
CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR,
sizeof(float) * (this->m_filtersize * 2 + 1),
this->m_gausstab,
- NULL);
+ nullptr);
device->COM_clAttachMemoryBufferToKernelParameter(gaussianYBlurOperationKernel,
0,
@@ -159,12 +159,12 @@ void GaussianYBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
#ifdef __SSE2__
if (this->m_gausstab_sse) {
MEM_freeN(this->m_gausstab_sse);
- this->m_gausstab_sse = NULL;
+ this->m_gausstab_sse = nullptr;
}
#endif
@@ -189,7 +189,7 @@ bool GaussianYBlurOperation::determineDependingAreaOfInterest(rcti *input,
}
}
{
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmax = input->xmax;
newInput.xmin = input->xmin;
newInput.ymax = input->ymax + this->m_filtersize + 1;
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
index 633b4821358..7b4d38fba3e 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
@@ -23,7 +23,7 @@ GlareBaseOperation::GlareBaseOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_settings = NULL;
+ this->m_settings = nullptr;
}
void GlareBaseOperation::initExecution()
{
@@ -33,7 +33,7 @@ void GlareBaseOperation::initExecution()
void GlareBaseOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
SingleThreadedOperation::deinitExecution();
}
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
index e61d4e8d8a7..1a1922f828c 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
@@ -25,7 +25,7 @@ GlareThresholdOperation::GlareThresholdOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_FIT);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void GlareThresholdOperation::determineResolution(unsigned int resolution[2],
@@ -65,5 +65,5 @@ void GlareThresholdOperation::executePixelSampled(float output[4],
void GlareThresholdOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
index 1d9c493d52b..df30e75cf27 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -27,7 +27,7 @@ HueSaturationValueCorrectOperation::HueSaturationValueCorrectOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void HueSaturationValueCorrectOperation::initExecution()
{
@@ -68,5 +68,5 @@ void HueSaturationValueCorrectOperation::executePixelSampled(float output[4],
void HueSaturationValueCorrectOperation::deinitExecution()
{
CurveBaseOperation::deinitExecution();
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index 73c560ca473..f8fe4eb883c 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -33,18 +33,18 @@
BaseImageOperation::BaseImageOperation()
{
- this->m_image = NULL;
- this->m_buffer = NULL;
- this->m_imageFloatBuffer = NULL;
- this->m_imageByteBuffer = NULL;
- this->m_imageUser = NULL;
+ this->m_image = nullptr;
+ this->m_buffer = nullptr;
+ this->m_imageFloatBuffer = nullptr;
+ this->m_imageByteBuffer = nullptr;
+ this->m_imageUser = nullptr;
this->m_imagewidth = 0;
this->m_imageheight = 0;
this->m_framenumber = 0;
- this->m_depthBuffer = NULL;
+ this->m_depthBuffer = nullptr;
this->m_numberOfChannels = 0;
- this->m_rd = NULL;
- this->m_viewName = NULL;
+ this->m_rd = nullptr;
+ this->m_viewName = nullptr;
}
ImageOperation::ImageOperation() : BaseImageOperation()
{
@@ -64,8 +64,8 @@ ImBuf *BaseImageOperation::getImBuf()
ImBuf *ibuf;
ImageUser iuser = *this->m_imageUser;
- if (this->m_image == NULL) {
- return NULL;
+ if (this->m_image == nullptr) {
+ return nullptr;
}
/* local changes to the original ImageUser */
@@ -73,10 +73,10 @@ ImBuf *BaseImageOperation::getImBuf()
iuser.multi_index = BKE_scene_multiview_view_id_get(this->m_rd, this->m_viewName);
}
- ibuf = BKE_image_acquire_ibuf(this->m_image, &iuser, NULL);
- if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) {
- BKE_image_release_ibuf(this->m_image, ibuf, NULL);
- return NULL;
+ ibuf = BKE_image_acquire_ibuf(this->m_image, &iuser, nullptr);
+ if (ibuf == nullptr || (ibuf->rect == nullptr && ibuf->rect_float == nullptr)) {
+ BKE_image_release_ibuf(this->m_image, ibuf, nullptr);
+ return nullptr;
}
return ibuf;
}
@@ -97,9 +97,9 @@ void BaseImageOperation::initExecution()
void BaseImageOperation::deinitExecution()
{
- this->m_imageFloatBuffer = NULL;
- this->m_imageByteBuffer = NULL;
- BKE_image_release_ibuf(this->m_image, this->m_buffer, NULL);
+ this->m_imageFloatBuffer = nullptr;
+ this->m_imageByteBuffer = nullptr;
+ BKE_image_release_ibuf(this->m_image, this->m_buffer, nullptr);
}
void BaseImageOperation::determineResolution(unsigned int resolution[2],
@@ -115,7 +115,7 @@ void BaseImageOperation::determineResolution(unsigned int resolution[2],
resolution[1] = stackbuf->y;
}
- BKE_image_release_ibuf(this->m_image, stackbuf, NULL);
+ BKE_image_release_ibuf(this->m_image, stackbuf, nullptr);
}
static void sampleImageAtLocation(
@@ -124,13 +124,13 @@ static void sampleImageAtLocation(
if (ibuf->rect_float) {
switch (sampler) {
case COM_PS_NEAREST:
- nearest_interpolation_color(ibuf, NULL, color, x, y);
+ nearest_interpolation_color(ibuf, nullptr, color, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(ibuf, NULL, color, x, y);
+ bilinear_interpolation_color(ibuf, nullptr, color, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(ibuf, NULL, color, x, y);
+ bicubic_interpolation_color(ibuf, nullptr, color, x, y);
break;
}
}
@@ -138,13 +138,13 @@ static void sampleImageAtLocation(
unsigned char byte_color[4];
switch (sampler) {
case COM_PS_NEAREST:
- nearest_interpolation_color(ibuf, byte_color, NULL, x, y);
+ nearest_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(ibuf, byte_color, NULL, x, y);
+ bilinear_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(ibuf, byte_color, NULL, x, y);
+ bicubic_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
}
rgba_uchar_to_float(color, byte_color);
@@ -157,7 +157,7 @@ static void sampleImageAtLocation(
void ImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
{
int ix = x, iy = y;
- if (this->m_imageFloatBuffer == NULL && this->m_imageByteBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr && this->m_imageByteBuffer == nullptr) {
zero_v4(output);
}
else if (ix < 0 || iy < 0 || ix >= this->m_buffer->x || iy >= this->m_buffer->y) {
@@ -175,7 +175,7 @@ void ImageAlphaOperation::executePixelSampled(float output[4],
{
float tempcolor[4];
- if (this->m_imageFloatBuffer == NULL && this->m_imageByteBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr && this->m_imageByteBuffer == nullptr) {
output[0] = 0.0f;
}
else {
@@ -190,7 +190,7 @@ void ImageDepthOperation::executePixelSampled(float output[4],
float y,
PixelSampler /*sampler*/)
{
- if (this->m_depthBuffer == NULL) {
+ if (this->m_depthBuffer == nullptr) {
output[0] = 0.0f;
}
else {
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index 335af3a8287..502b33d7e14 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -32,19 +32,19 @@ InpaintSimpleOperation::InpaintSimpleOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputImageProgram = NULL;
- this->m_pixelorder = NULL;
- this->m_manhattan_distance = NULL;
- this->m_cached_buffer = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_pixelorder = nullptr;
+ this->m_manhattan_distance = nullptr;
+ this->m_cached_buffer = nullptr;
this->m_cached_buffer_ready = false;
}
void InpaintSimpleOperation::initExecution()
{
this->m_inputImageProgram = this->getInputSocketReader(0);
- this->m_pixelorder = NULL;
- this->m_manhattan_distance = NULL;
- this->m_cached_buffer = NULL;
+ this->m_pixelorder = nullptr;
+ this->m_manhattan_distance = nullptr;
+ this->m_cached_buffer = nullptr;
this->m_cached_buffer_ready = false;
this->initMutex();
@@ -246,21 +246,21 @@ void InpaintSimpleOperation::executePixel(float output[4], int x, int y, void *
void InpaintSimpleOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
this->deinitMutex();
if (this->m_cached_buffer) {
MEM_freeN(this->m_cached_buffer);
- this->m_cached_buffer = NULL;
+ this->m_cached_buffer = nullptr;
}
if (this->m_pixelorder) {
MEM_freeN(this->m_pixelorder);
- this->m_pixelorder = NULL;
+ this->m_pixelorder = nullptr;
}
if (this->m_manhattan_distance) {
MEM_freeN(this->m_manhattan_distance);
- this->m_manhattan_distance = NULL;
+ this->m_manhattan_distance = nullptr;
}
this->m_cached_buffer_ready = false;
}
diff --git a/source/blender/compositor/operations/COM_InvertOperation.cpp b/source/blender/compositor/operations/COM_InvertOperation.cpp
index f0d677d3d2f..d9f436a3e28 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_InvertOperation.cpp
@@ -23,8 +23,8 @@ InvertOperation::InvertOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueProgram = NULL;
- this->m_inputColorProgram = NULL;
+ this->m_inputValueProgram = nullptr;
+ this->m_inputColorProgram = nullptr;
this->m_color = true;
this->m_alpha = false;
setResolutionInputSocketIndex(1);
@@ -64,6 +64,6 @@ void InvertOperation::executePixelSampled(float output[4], float x, float y, Pix
void InvertOperation::deinitExecution()
{
- this->m_inputValueProgram = NULL;
- this->m_inputColorProgram = NULL;
+ this->m_inputValueProgram = nullptr;
+ this->m_inputColorProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
index 97eea6267b0..b9bb316462d 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
@@ -32,8 +32,8 @@ KeyingDespillOperation::KeyingDespillOperation()
this->m_despillFactor = 0.5f;
this->m_colorBalance = 0.5f;
- this->m_pixelReader = NULL;
- this->m_screenReader = NULL;
+ this->m_pixelReader = nullptr;
+ this->m_screenReader = nullptr;
}
void KeyingDespillOperation::initExecution()
@@ -44,8 +44,8 @@ void KeyingDespillOperation::initExecution()
void KeyingDespillOperation::deinitExecution()
{
- this->m_pixelReader = NULL;
- this->m_screenReader = NULL;
+ this->m_pixelReader = nullptr;
+ this->m_screenReader = nullptr;
}
void KeyingDespillOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp
index dfc433dcfc6..9ef4217d300 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -47,8 +47,8 @@ KeyingOperation::KeyingOperation()
this->m_screenBalance = 0.5f;
- this->m_pixelReader = NULL;
- this->m_screenReader = NULL;
+ this->m_pixelReader = nullptr;
+ this->m_screenReader = nullptr;
}
void KeyingOperation::initExecution()
@@ -59,8 +59,8 @@ void KeyingOperation::initExecution()
void KeyingOperation::deinitExecution()
{
- this->m_pixelReader = NULL;
- this->m_screenReader = NULL;
+ this->m_pixelReader = nullptr;
+ this->m_screenReader = nullptr;
}
void KeyingOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
index 36093a931d0..463a6fe49c0 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
@@ -33,7 +33,7 @@
KeyingScreenOperation::KeyingScreenOperation()
{
this->addOutputSocket(COM_DT_COLOR);
- this->m_movieClip = NULL;
+ this->m_movieClip = nullptr;
this->m_framenumber = 0;
this->m_trackingObject[0] = 0;
setComplex(true);
@@ -42,7 +42,7 @@ KeyingScreenOperation::KeyingScreenOperation()
void KeyingScreenOperation::initExecution()
{
initMutex();
- this->m_cachedTriangulation = NULL;
+ this->m_cachedTriangulation = nullptr;
}
void KeyingScreenOperation::deinitExecution()
@@ -64,7 +64,7 @@ void KeyingScreenOperation::deinitExecution()
MEM_freeN(this->m_cachedTriangulation);
- this->m_cachedTriangulation = NULL;
+ this->m_cachedTriangulation = nullptr;
}
}
@@ -77,7 +77,7 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
VoronoiSite *sites, *site;
ImBuf *ibuf;
ListBase *tracksbase;
- ListBase edges = {NULL, NULL};
+ ListBase edges = {nullptr, nullptr};
int sites_total;
int i;
int width = this->getWidth();
@@ -88,7 +88,7 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
MovieTrackingObject *object = BKE_tracking_object_get_named(tracking, this->m_trackingObject);
if (!object) {
- return NULL;
+ return nullptr;
}
tracksbase = BKE_tracking_object_get_tracks(tracking, object);
@@ -117,14 +117,14 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
}
if (!sites_total) {
- return NULL;
+ return nullptr;
}
BKE_movieclip_user_set_frame(&user, clip_frame);
ibuf = BKE_movieclip_get_ibuf(this->m_movieClip, &user);
if (!ibuf) {
- return NULL;
+ return nullptr;
}
triangulation = (TriangulationData *)MEM_callocN(sizeof(TriangulationData),
@@ -232,13 +232,13 @@ void *KeyingScreenOperation::initializeTileData(rcti *rect)
int chunk_size = 20;
int i;
- if (this->m_movieClip == NULL) {
- return NULL;
+ if (this->m_movieClip == nullptr) {
+ return nullptr;
}
if (!this->m_cachedTriangulation) {
lockMutex();
- if (this->m_cachedTriangulation == NULL) {
+ if (this->m_cachedTriangulation == nullptr) {
this->m_cachedTriangulation = buildVoronoiTriangulation();
}
unlockMutex();
@@ -247,13 +247,13 @@ void *KeyingScreenOperation::initializeTileData(rcti *rect)
triangulation = this->m_cachedTriangulation;
if (!triangulation) {
- return NULL;
+ return nullptr;
}
tile_data = (TileData *)MEM_callocN(sizeof(TileData), "keying screen tile data");
for (i = 0; i < triangulation->triangles_total; i++) {
- if (BLI_rcti_isect(rect, &triangulation->triangles_AABB[i], NULL)) {
+ if (BLI_rcti_isect(rect, &triangulation->triangles_AABB[i], nullptr)) {
tile_data->triangles_total++;
if (tile_data->triangles_total > triangles_allocated) {
diff --git a/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp b/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp
index 8e501838d7b..47daef8d190 100644
--- a/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp
@@ -24,8 +24,8 @@ KeyingSetAlphaOperation::KeyingSetAlphaOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
}
void KeyingSetAlphaOperation::initExecution()
@@ -50,6 +50,6 @@ void KeyingSetAlphaOperation::executePixelSampled(float output[4],
void KeyingSetAlphaOperation::deinitExecution()
{
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
index 50de043b641..f7cc6e2d4de 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
@@ -26,7 +26,7 @@ LuminanceMatteOperation::LuminanceMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
}
void LuminanceMatteOperation::initExecution()
@@ -36,7 +36,7 @@ void LuminanceMatteOperation::initExecution()
void LuminanceMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
}
void LuminanceMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.cpp b/source/blender/compositor/operations/COM_MapRangeOperation.cpp
index e4fe6065164..95b3c27ac2f 100644
--- a/source/blender/compositor/operations/COM_MapRangeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapRangeOperation.cpp
@@ -26,7 +26,7 @@ MapRangeOperation::MapRangeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_useClamp = false;
}
@@ -95,9 +95,9 @@ void MapRangeOperation::executePixelSampled(float output[4],
void MapRangeOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_sourceMinOperation = NULL;
- this->m_sourceMaxOperation = NULL;
- this->m_destMinOperation = NULL;
- this->m_destMaxOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_sourceMinOperation = nullptr;
+ this->m_sourceMaxOperation = nullptr;
+ this->m_destMinOperation = nullptr;
+ this->m_destMaxOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index ed250bc28b6..32ab63ae028 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -28,8 +28,8 @@ MapUVOperation::MapUVOperation()
this->setComplex(true);
setResolutionInputSocketIndex(1);
- this->m_inputUVProgram = NULL;
- this->m_inputColorProgram = NULL;
+ this->m_inputUVProgram = nullptr;
+ this->m_inputColorProgram = nullptr;
}
void MapUVOperation::initExecution()
@@ -149,8 +149,8 @@ void MapUVOperation::pixelTransform(const float xy[2],
void MapUVOperation::deinitExecution()
{
- this->m_inputUVProgram = NULL;
- this->m_inputColorProgram = NULL;
+ this->m_inputUVProgram = nullptr;
+ this->m_inputColorProgram = nullptr;
}
bool MapUVOperation::determineDependingAreaOfInterest(rcti *input,
@@ -159,7 +159,7 @@ bool MapUVOperation::determineDependingAreaOfInterest(rcti *input,
{
rcti colorInput;
rcti uvInput;
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
/* the uv buffer only needs a 3x3 buffer. The image needs whole buffer */
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cpp b/source/blender/compositor/operations/COM_MapValueOperation.cpp
index 908ad7f1317..7f2044b9139 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp
@@ -22,7 +22,7 @@ MapValueOperation::MapValueOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void MapValueOperation::initExecution()
@@ -55,5 +55,5 @@ void MapValueOperation::executePixelSampled(float output[4],
void MapValueOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp
index 7c21ee5d757..ab908590c55 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_MaskOperation.cpp
@@ -29,7 +29,7 @@
MaskOperation::MaskOperation()
{
this->addOutputSocket(COM_DT_VALUE);
- this->m_mask = NULL;
+ this->m_mask = nullptr;
this->m_maskWidth = 0;
this->m_maskHeight = 0;
this->m_maskWidthInv = 0.0f;
@@ -42,7 +42,7 @@ MaskOperation::MaskOperation()
void MaskOperation::initExecution()
{
- if (this->m_mask && this->m_rasterMaskHandles[0] == NULL) {
+ if (this->m_mask && this->m_rasterMaskHandles[0] == nullptr) {
if (this->m_rasterMaskHandleTot == 1) {
this->m_rasterMaskHandles[0] = BKE_maskrasterize_handle_new();
@@ -61,7 +61,7 @@ void MaskOperation::initExecution()
float frame_iter = frame;
Mask *mask_temp = (Mask *)BKE_id_copy_ex(
- NULL, &this->m_mask->id, NULL, LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_NO_ANIMDATA);
+ nullptr, &this->m_mask->id, nullptr, LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_NO_ANIMDATA);
/* trick so we can get unkeyed edits to display */
{
@@ -92,7 +92,7 @@ void MaskOperation::initExecution()
frame_iter += frame_step;
}
- BKE_id_free(NULL, &mask_temp->id);
+ BKE_id_free(nullptr, &mask_temp->id);
}
}
}
@@ -102,7 +102,7 @@ void MaskOperation::deinitExecution()
for (unsigned int i = 0; i < this->m_rasterMaskHandleTot; i++) {
if (this->m_rasterMaskHandles[i]) {
BKE_maskrasterize_handle_free(this->m_rasterMaskHandles[i]);
- this->m_rasterMaskHandles[i] = NULL;
+ this->m_rasterMaskHandles[i] = nullptr;
}
}
}
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
index c37874c7c9b..edd5bb6d139 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
@@ -26,9 +26,9 @@ MathBaseOperation::MathBaseOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputValue1Operation = NULL;
- this->m_inputValue2Operation = NULL;
- this->m_inputValue3Operation = NULL;
+ this->m_inputValue1Operation = nullptr;
+ this->m_inputValue2Operation = nullptr;
+ this->m_inputValue3Operation = nullptr;
this->m_useClamp = false;
}
@@ -41,9 +41,9 @@ void MathBaseOperation::initExecution()
void MathBaseOperation::deinitExecution()
{
- this->m_inputValue1Operation = NULL;
- this->m_inputValue2Operation = NULL;
- this->m_inputValue3Operation = NULL;
+ this->m_inputValue1Operation = nullptr;
+ this->m_inputValue2Operation = nullptr;
+ this->m_inputValue3Operation = nullptr;
}
void MathBaseOperation::determineResolution(unsigned int resolution[2],
diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp
index 376e27b1f30..948e69bf8eb 100644
--- a/source/blender/compositor/operations/COM_MixOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixOperation.cpp
@@ -28,9 +28,9 @@ MixBaseOperation::MixBaseOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueOperation = NULL;
- this->m_inputColor1Operation = NULL;
- this->m_inputColor2Operation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColor1Operation = nullptr;
+ this->m_inputColor2Operation = nullptr;
this->setUseValueAlphaMultiply(false);
this->setUseClamp(false);
}
@@ -90,9 +90,9 @@ void MixBaseOperation::determineResolution(unsigned int resolution[2],
void MixBaseOperation::deinitExecution()
{
- this->m_inputValueOperation = NULL;
- this->m_inputColor1Operation = NULL;
- this->m_inputColor2Operation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColor1Operation = nullptr;
+ this->m_inputColor2Operation = nullptr;
}
/* ******** Mix Add Operation ******** */
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
index f4e860316b3..725aacc7d34 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
@@ -31,7 +31,7 @@ MovieClipAttributeOperation::MovieClipAttributeOperation()
void MovieClipAttributeOperation::initExecution()
{
- if (this->m_clip == NULL) {
+ if (this->m_clip == nullptr) {
return;
}
float loc[2], scale, angle;
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
index 9d1779b3573..4f819bf27af 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
@@ -28,9 +28,9 @@
MovieClipBaseOperation::MovieClipBaseOperation()
{
- this->m_movieClip = NULL;
- this->m_movieClipBuffer = NULL;
- this->m_movieClipUser = NULL;
+ this->m_movieClip = nullptr;
+ this->m_movieClipBuffer = nullptr;
+ this->m_movieClipUser = nullptr;
this->m_movieClipwidth = 0;
this->m_movieClipheight = 0;
this->m_framenumber = 0;
@@ -52,7 +52,7 @@ void MovieClipBaseOperation::initExecution()
if (ibuf) {
this->m_movieClipBuffer = ibuf;
- if (ibuf->rect_float == NULL || ibuf->userflags & IB_RECT_INVALID) {
+ if (ibuf->rect_float == nullptr || ibuf->userflags & IB_RECT_INVALID) {
IMB_float_from_rect(ibuf);
ibuf->userflags &= ~IB_RECT_INVALID;
}
@@ -65,7 +65,7 @@ void MovieClipBaseOperation::deinitExecution()
if (this->m_movieClipBuffer) {
IMB_freeImBuf(this->m_movieClipBuffer);
- this->m_movieClipBuffer = NULL;
+ this->m_movieClipBuffer = nullptr;
}
}
@@ -92,23 +92,23 @@ void MovieClipBaseOperation::executePixelSampled(float output[4],
{
ImBuf *ibuf = this->m_movieClipBuffer;
- if (ibuf == NULL) {
+ if (ibuf == nullptr) {
zero_v4(output);
}
- else if (ibuf->rect == NULL && ibuf->rect_float == NULL) {
+ else if (ibuf->rect == nullptr && ibuf->rect_float == nullptr) {
/* Happens for multilayer exr, i.e. */
zero_v4(output);
}
else {
switch (sampler) {
case COM_PS_NEAREST:
- nearest_interpolation_color(ibuf, NULL, output, x, y);
+ nearest_interpolation_color(ibuf, nullptr, output, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(ibuf, NULL, output, x, y);
+ bilinear_interpolation_color(ibuf, nullptr, output, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(ibuf, NULL, output, x, y);
+ bicubic_interpolation_color(ibuf, nullptr, output, x, y);
break;
}
}
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
index 5accf9a2dc3..5031d590720 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
@@ -28,8 +28,8 @@ MovieDistortionOperation::MovieDistortionOperation(bool distortion)
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
- this->m_movieClip = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_movieClip = nullptr;
this->m_apply = distortion;
}
@@ -66,15 +66,15 @@ void MovieDistortionOperation::initExecution()
}
else {
m_margin[0] = m_margin[1] = 0;
- this->m_distortion = NULL;
+ this->m_distortion = nullptr;
}
}
void MovieDistortionOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_movieClip = NULL;
- if (this->m_distortion != NULL) {
+ this->m_inputOperation = nullptr;
+ this->m_movieClip = nullptr;
+ if (this->m_distortion != nullptr) {
BKE_tracking_distortion_free(this->m_distortion);
}
}
@@ -84,7 +84,7 @@ void MovieDistortionOperation::executePixelSampled(float output[4],
float y,
PixelSampler /*sampler*/)
{
- if (this->m_distortion != NULL) {
+ if (this->m_distortion != nullptr) {
/* float overscan = 0.0f; */
const float pixel_aspect = this->m_pixel_aspect;
const float w = (float)this->m_width /* / (1 + overscan) */;
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
index 952225d5fb7..023538ee5b1 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
@@ -42,7 +42,7 @@ ImBuf *MultilayerBaseOperation::getImBuf()
}
this->m_imageUser->view = view;
- return NULL;
+ return nullptr;
}
void MultilayerColorOperation::executePixelSampled(float output[4],
@@ -50,20 +50,20 @@ void MultilayerColorOperation::executePixelSampled(float output[4],
float y,
PixelSampler sampler)
{
- if (this->m_imageFloatBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr) {
zero_v4(output);
}
else {
if (this->m_numberOfChannels == 4) {
switch (sampler) {
case COM_PS_NEAREST:
- nearest_interpolation_color(this->m_buffer, NULL, output, x, y);
+ nearest_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(this->m_buffer, NULL, output, x, y);
+ bilinear_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(this->m_buffer, NULL, output, x, y);
+ bicubic_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
}
}
@@ -87,7 +87,7 @@ void MultilayerValueOperation::executePixelSampled(float output[4],
float y,
PixelSampler /*sampler*/)
{
- if (this->m_imageFloatBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr) {
output[0] = 0.0f;
}
else {
@@ -109,7 +109,7 @@ void MultilayerVectorOperation::executePixelSampled(float output[4],
float y,
PixelSampler /*sampler*/)
{
- if (this->m_imageFloatBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr) {
output[0] = 0.0f;
}
else {
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.cpp b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
index 1e7986c6009..a8448685332 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.cpp
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
@@ -22,8 +22,8 @@ NormalizeOperation::NormalizeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_imageReader = NULL;
- this->m_cachedInstance = NULL;
+ this->m_imageReader = nullptr;
+ this->m_cachedInstance = nullptr;
this->setComplex(true);
}
void NormalizeOperation::initExecution()
@@ -37,7 +37,7 @@ void NormalizeOperation::executePixel(float output[4], int x, int y, void *data)
/* using generic two floats struct to store x: min y: mult */
NodeTwoFloats *minmult = (NodeTwoFloats *)data;
- this->m_imageReader->read(output, x, y, NULL);
+ this->m_imageReader->read(output, x, y, nullptr);
output[0] = (output[0] - minmult->x) * minmult->y;
@@ -52,7 +52,7 @@ void NormalizeOperation::executePixel(float output[4], int x, int y, void *data)
void NormalizeOperation::deinitExecution()
{
- this->m_imageReader = NULL;
+ this->m_imageReader = nullptr;
delete this->m_cachedInstance;
NodeOperation::deinitMutex();
}
@@ -85,7 +85,7 @@ bool NormalizeOperation::determineDependingAreaOfInterest(rcti * /*input*/,
void *NormalizeOperation::initializeTileData(rcti *rect)
{
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect);
/* using generic two floats struct to store x: min y: mult */
NodeTwoFloats *minmult = new NodeTwoFloats();
diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
index c0fe7237687..639da7c8ae6 100644
--- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
@@ -76,14 +76,14 @@ void *OutputOpenExrSingleLayerMultiViewOperation::get_handle(const char *filenam
}
IMB_exr_add_view(exrhandle, srv->name);
- add_exr_channels(exrhandle, NULL, this->m_datatype, srv->name, width, false, NULL);
+ add_exr_channels(exrhandle, nullptr, this->m_datatype, srv->name, width, false, nullptr);
}
BLI_make_existing_file(filename);
/* prepare the file with all the channels */
- if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_format->exr_codec, NULL) ==
+ if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_format->exr_codec, nullptr) ==
0) {
printf("Error Writing Singlelayer Multiview Openexr\n");
IMB_exr_close(exrhandle);
@@ -93,7 +93,7 @@ void *OutputOpenExrSingleLayerMultiViewOperation::get_handle(const char *filenam
return exrhandle;
}
}
- return NULL;
+ return nullptr;
}
void OutputOpenExrSingleLayerMultiViewOperation::deinitExecution()
@@ -112,11 +112,11 @@ void OutputOpenExrSingleLayerMultiViewOperation::deinitExecution()
R_IMF_IMTYPE_OPENEXR,
(this->m_rd->scemode & R_EXTENSION) != 0,
true,
- NULL);
+ nullptr);
exrhandle = this->get_handle(filename);
add_exr_channels(exrhandle,
- NULL,
+ nullptr,
this->m_datatype,
this->m_viewName,
width,
@@ -124,15 +124,15 @@ void OutputOpenExrSingleLayerMultiViewOperation::deinitExecution()
this->m_outputBuffer);
/* memory can only be freed after we write all views to the file */
- this->m_outputBuffer = NULL;
- this->m_imageInput = NULL;
+ this->m_outputBuffer = nullptr;
+ this->m_imageInput = nullptr;
/* ready to close the file */
if (BKE_scene_multiview_is_render_view_last(this->m_rd, this->m_viewName)) {
IMB_exr_write_channels(exrhandle);
/* free buffer memory for all the views */
- free_exr_channels(exrhandle, this->m_rd, NULL, this->m_datatype);
+ free_exr_channels(exrhandle, this->m_rd, nullptr, this->m_datatype);
/* remove exr handle and data */
IMB_exr_close(exrhandle);
@@ -188,14 +188,14 @@ void *OutputOpenExrMultiLayerMultiViewOperation::get_handle(const char *filename
srv->name,
width,
this->m_exr_half_float,
- NULL);
+ nullptr);
}
}
BLI_make_existing_file(filename);
/* prepare the file with all the channels for the header */
- if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, NULL) == 0) {
+ if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, nullptr) == 0) {
printf("Error Writing Multilayer Multiview Openexr\n");
IMB_exr_close(exrhandle);
}
@@ -204,7 +204,7 @@ void *OutputOpenExrMultiLayerMultiViewOperation::get_handle(const char *filename
return exrhandle;
}
}
- return NULL;
+ return nullptr;
}
void OutputOpenExrMultiLayerMultiViewOperation::deinitExecution()
@@ -223,7 +223,7 @@ void OutputOpenExrMultiLayerMultiViewOperation::deinitExecution()
R_IMF_IMTYPE_MULTILAYER,
(this->m_rd->scemode & R_EXTENSION) != 0,
true,
- NULL);
+ nullptr);
exrhandle = this->get_handle(filename);
@@ -239,8 +239,8 @@ void OutputOpenExrMultiLayerMultiViewOperation::deinitExecution()
for (unsigned int i = 0; i < this->m_layers.size(); i++) {
/* memory can only be freed after we write all views to the file */
- this->m_layers[i].outputBuffer = NULL;
- this->m_layers[i].imageInput = NULL;
+ this->m_layers[i].outputBuffer = nullptr;
+ this->m_layers[i].imageInput = nullptr;
}
/* ready to close the file */
@@ -300,7 +300,7 @@ void *OutputStereoOperation::get_handle(const char *filename)
return exrhandle;
}
- return NULL;
+ return nullptr;
}
void OutputStereoOperation::deinitExecution()
@@ -316,7 +316,7 @@ void OutputStereoOperation::deinitExecution()
/* populate single EXR channel with view data */
IMB_exr_add_channel(exrhandle,
- NULL,
+ nullptr,
this->m_name,
this->m_viewName,
1,
@@ -324,19 +324,19 @@ void OutputStereoOperation::deinitExecution()
buf,
this->m_format->depth == R_IMF_CHAN_DEPTH_16);
- this->m_imageInput = NULL;
- this->m_outputBuffer = NULL;
+ this->m_imageInput = nullptr;
+ this->m_outputBuffer = nullptr;
/* create stereo ibuf */
if (BKE_scene_multiview_is_render_view_last(this->m_rd, this->m_viewName)) {
- ImBuf *ibuf[3] = {NULL};
+ ImBuf *ibuf[3] = {nullptr};
const char *names[2] = {STEREO_LEFT_NAME, STEREO_RIGHT_NAME};
char filename[FILE_MAX];
int i;
/* get rectf from EXR */
for (i = 0; i < 2; i++) {
- float *rectf = IMB_exr_channel_rect(exrhandle, NULL, this->m_name, names[i]);
+ float *rectf = IMB_exr_channel_rect(exrhandle, nullptr, this->m_name, names[i]);
ibuf[i] = IMB_allocImBuf(width, height, this->m_format->planes, 0);
ibuf[i]->channels = this->m_channels;
@@ -360,7 +360,7 @@ void OutputStereoOperation::deinitExecution()
this->m_format,
(this->m_rd->scemode & R_EXTENSION) != 0,
true,
- NULL);
+ nullptr);
BKE_imbuf_write(ibuf[2], filename, this->m_format);
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
index 374189a5c50..9548b137d07 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -48,25 +48,25 @@ void add_exr_channels(void *exrhandle,
switch (datatype) {
case COM_DT_VALUE:
IMB_exr_add_channel(
- exrhandle, layerName, "V", viewName, 1, width, buf ? buf : NULL, use_half_float);
+ exrhandle, layerName, "V", viewName, 1, width, buf ? buf : nullptr, use_half_float);
break;
case COM_DT_VECTOR:
IMB_exr_add_channel(
- exrhandle, layerName, "X", viewName, 3, 3 * width, buf ? buf : NULL, use_half_float);
+ exrhandle, layerName, "X", viewName, 3, 3 * width, buf ? buf : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "Y", viewName, 3, 3 * width, buf ? buf + 1 : NULL, use_half_float);
+ exrhandle, layerName, "Y", viewName, 3, 3 * width, buf ? buf + 1 : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "Z", viewName, 3, 3 * width, buf ? buf + 2 : NULL, use_half_float);
+ exrhandle, layerName, "Z", viewName, 3, 3 * width, buf ? buf + 2 : nullptr, use_half_float);
break;
case COM_DT_COLOR:
IMB_exr_add_channel(
- exrhandle, layerName, "R", viewName, 4, 4 * width, buf ? buf : NULL, use_half_float);
+ exrhandle, layerName, "R", viewName, 4, 4 * width, buf ? buf : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "G", viewName, 4, 4 * width, buf ? buf + 1 : NULL, use_half_float);
+ exrhandle, layerName, "G", viewName, 4, 4 * width, buf ? buf + 1 : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "B", viewName, 4, 4 * width, buf ? buf + 2 : NULL, use_half_float);
+ exrhandle, layerName, "B", viewName, 4, 4 * width, buf ? buf + 2 : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "A", viewName, 4, 4 * width, buf ? buf + 3 : NULL, use_half_float);
+ exrhandle, layerName, "A", viewName, 4, 4 * width, buf ? buf + 3 : nullptr, use_half_float);
break;
default:
break;
@@ -82,7 +82,7 @@ void free_exr_channels(void *exrhandle,
/* check renderdata for amount of views */
for (srv = (SceneRenderView *)rd->views.first; srv; srv = srv->next) {
- float *rect = NULL;
+ float *rect = nullptr;
if (BKE_scene_multiview_is_render_view_active(rd, srv) == false) {
continue;
@@ -130,7 +130,7 @@ static float *init_buffer(unsigned int width, unsigned int height, DataType data
return (float *)MEM_callocN(width * height * size * sizeof(float), "OutputFile buffer");
}
- return NULL;
+ return nullptr;
}
static void write_buffer_rect(rcti *rect,
@@ -187,9 +187,9 @@ OutputSingleLayerOperation::OutputSingleLayerOperation(
this->addInputSocket(datatype);
- this->m_outputBuffer = NULL;
+ this->m_outputBuffer = nullptr;
this->m_datatype = datatype;
- this->m_imageInput = NULL;
+ this->m_imageInput = nullptr;
this->m_format = format;
BLI_strncpy(this->m_path, path, sizeof(this->m_path));
@@ -252,8 +252,8 @@ void OutputSingleLayerOperation::deinitExecution()
IMB_freeImBuf(ibuf);
}
- this->m_outputBuffer = NULL;
- this->m_imageInput = NULL;
+ this->m_outputBuffer = nullptr;
+ this->m_imageInput = nullptr;
}
/******************************* MultiLayer *******************************/
@@ -265,8 +265,8 @@ OutputOpenExrLayer::OutputOpenExrLayer(const char *name_, DataType datatype_, bo
this->use_layer = use_layer_;
/* these are created in initExecution */
- this->outputBuffer = 0;
- this->imageInput = 0;
+ this->outputBuffer = nullptr;
+ this->imageInput = nullptr;
}
OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation(const RenderData *rd,
@@ -356,7 +356,7 @@ void OutputOpenExrMultiLayerOperation::deinitExecution()
}
/* when the filename has no permissions, this can fail */
- if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, NULL)) {
+ if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, nullptr)) {
IMB_exr_write_channels(exrhandle);
}
else {
@@ -369,10 +369,10 @@ void OutputOpenExrMultiLayerOperation::deinitExecution()
for (unsigned int i = 0; i < this->m_layers.size(); i++) {
if (this->m_layers[i].outputBuffer) {
MEM_freeN(this->m_layers[i].outputBuffer);
- this->m_layers[i].outputBuffer = NULL;
+ this->m_layers[i].outputBuffer = nullptr;
}
- this->m_layers[i].imageInput = NULL;
+ this->m_layers[i].imageInput = nullptr;
}
}
}
diff --git a/source/blender/compositor/operations/COM_PixelateOperation.cpp b/source/blender/compositor/operations/COM_PixelateOperation.cpp
index 01cd7fcfd97..0d810c80ab4 100644
--- a/source/blender/compositor/operations/COM_PixelateOperation.cpp
+++ b/source/blender/compositor/operations/COM_PixelateOperation.cpp
@@ -23,7 +23,7 @@ PixelateOperation::PixelateOperation(DataType datatype)
this->addInputSocket(datatype);
this->addOutputSocket(datatype);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void PixelateOperation::initExecution()
@@ -33,7 +33,7 @@ void PixelateOperation::initExecution()
void PixelateOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void PixelateOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
index 0f6d5d0d4d7..c395f795a22 100644
--- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
@@ -48,7 +48,7 @@ PlaneDistortWarpImageOperation::PlaneDistortWarpImageOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_pixelReader = NULL;
+ this->m_pixelReader = nullptr;
this->m_motion_blur_samples = 1;
this->m_motion_blur_shutter = 0.5f;
this->setComplex(true);
@@ -87,7 +87,7 @@ void PlaneDistortWarpImageOperation::initExecution()
void PlaneDistortWarpImageOperation::deinitExecution()
{
- this->m_pixelReader = NULL;
+ this->m_pixelReader = nullptr;
}
void PlaneDistortWarpImageOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
index ed9a776d0a3..81a598e937b 100644
--- a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
@@ -33,7 +33,7 @@
PlaneTrackCommon::PlaneTrackCommon()
{
- this->m_movieClip = NULL;
+ this->m_movieClip = nullptr;
this->m_framenumber = 0;
this->m_trackingObjectName[0] = '\0';
this->m_planeTrackName[0] = '\0';
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp
index 46ac466fd19..063421f6525 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.cpp
+++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp
@@ -38,9 +38,9 @@ PreviewOperation::PreviewOperation(const ColorManagedViewSettings *viewSettings,
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
- this->m_preview = NULL;
- this->m_outputBuffer = NULL;
- this->m_input = NULL;
+ this->m_preview = nullptr;
+ this->m_outputBuffer = nullptr;
+ this->m_input = nullptr;
this->m_divider = 1.0f;
this->m_viewSettings = viewSettings;
this->m_displaySettings = displaySettings;
@@ -63,7 +63,7 @@ void PreviewOperation::initExecution()
this->m_outputBuffer = this->m_preview->rect;
}
- if (this->m_outputBuffer == NULL) {
+ if (this->m_outputBuffer == nullptr) {
this->m_outputBuffer = (unsigned char *)MEM_callocN(
sizeof(unsigned char) * 4 * getWidth() * getHeight(), "PreviewOperation");
if (this->m_preview->rect) {
@@ -77,8 +77,8 @@ void PreviewOperation::initExecution()
void PreviewOperation::deinitExecution()
{
- this->m_outputBuffer = NULL;
- this->m_input = NULL;
+ this->m_outputBuffer = nullptr;
+ this->m_input = nullptr;
}
void PreviewOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index 921b7ed474c..7d459b76cb9 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -26,7 +26,7 @@ ProjectorLensDistortionOperation::ProjectorLensDistortionOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_dispersionAvailable = false;
this->m_dispersion = 0.0f;
}
@@ -39,7 +39,7 @@ void ProjectorLensDistortionOperation::initExecution()
void *ProjectorLensDistortionOperation::initializeTileData(rcti * /*rect*/)
{
updateDispersion();
- void *buffer = this->m_inputProgram->initializeTileData(NULL);
+ void *buffer = this->m_inputProgram->initializeTileData(nullptr);
return buffer;
}
@@ -63,7 +63,7 @@ void ProjectorLensDistortionOperation::executePixel(float output[4], int x, int
void ProjectorLensDistortionOperation::deinitExecution()
{
this->deinitMutex();
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index 9139ac200c8..2977e6685d2 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -25,7 +25,7 @@ ReadBufferOperation::ReadBufferOperation(DataType datatype)
this->addOutputSocket(datatype);
this->m_single_value = false;
this->m_offset = 0;
- this->m_buffer = NULL;
+ this->m_buffer = nullptr;
}
void *ReadBufferOperation::initializeTileData(rcti * /*rect*/)
@@ -36,7 +36,7 @@ void *ReadBufferOperation::initializeTileData(rcti * /*rect*/)
void ReadBufferOperation::determineResolution(unsigned int resolution[2],
unsigned int preferredResolution[2])
{
- if (this->m_memoryProxy != NULL) {
+ if (this->m_memoryProxy != nullptr) {
WriteBufferOperation *operation = this->m_memoryProxy->getWriteBufferOperation();
operation->determineResolution(resolution, preferredResolution);
operation->setResolution(resolution);
@@ -120,7 +120,7 @@ bool ReadBufferOperation::determineDependingAreaOfInterest(rcti *input,
void ReadBufferOperation::readResolutionFromWriteBuffer()
{
- if (this->m_memoryProxy != NULL) {
+ if (this->m_memoryProxy != nullptr) {
WriteBufferOperation *operation = this->m_memoryProxy->getWriteBufferOperation();
this->setWidth(operation->getWidth());
this->setHeight(operation->getHeight());
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index b7b1da1bb89..40a68d4f9e2 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -31,10 +31,10 @@
RenderLayersProg::RenderLayersProg(const char *passName, DataType type, int elementsize)
: m_passName(passName)
{
- this->setScene(NULL);
- this->m_inputBuffer = NULL;
+ this->setScene(nullptr);
+ this->m_inputBuffer = nullptr;
this->m_elementsize = elementsize;
- this->m_rd = NULL;
+ this->m_rd = nullptr;
this->addOutputSocket(type);
}
@@ -42,8 +42,8 @@ RenderLayersProg::RenderLayersProg(const char *passName, DataType type, int elem
void RenderLayersProg::initExecution()
{
Scene *scene = this->getScene();
- Render *re = (scene) ? RE_GetSceneRender(scene) : NULL;
- RenderResult *rr = NULL;
+ Render *re = (scene) ? RE_GetSceneRender(scene) : nullptr;
+ RenderResult *rr = nullptr;
if (re) {
rr = RE_AcquireResultRead(re);
@@ -62,7 +62,7 @@ void RenderLayersProg::initExecution()
}
if (re) {
RE_ReleaseResult(re);
- re = NULL;
+ re = nullptr;
}
}
@@ -157,7 +157,7 @@ void RenderLayersProg::executePixelSampled(float output[4], float x, float y, Pi
}
#endif
- if (this->m_inputBuffer == NULL) {
+ if (this->m_inputBuffer == nullptr) {
int elemsize = this->m_elementsize;
if (elemsize == 1) {
output[0] = 0.0f;
@@ -177,15 +177,15 @@ void RenderLayersProg::executePixelSampled(float output[4], float x, float y, Pi
void RenderLayersProg::deinitExecution()
{
- this->m_inputBuffer = NULL;
+ this->m_inputBuffer = nullptr;
}
void RenderLayersProg::determineResolution(unsigned int resolution[2],
unsigned int /*preferredResolution*/[2])
{
Scene *sce = this->getScene();
- Render *re = (sce) ? RE_GetSceneRender(sce) : NULL;
- RenderResult *rr = NULL;
+ Render *re = (sce) ? RE_GetSceneRender(sce) : nullptr;
+ RenderResult *rr = nullptr;
resolution[0] = 0;
resolution[1] = 0;
@@ -217,7 +217,7 @@ void RenderLayersAOOperation::executePixelSampled(float output[4],
PixelSampler sampler)
{
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL) {
+ if (inputBuffer == nullptr) {
zero_v3(output);
}
else {
@@ -234,7 +234,7 @@ void RenderLayersAlphaProg::executePixelSampled(float output[4],
{
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL) {
+ if (inputBuffer == nullptr) {
output[0] = 0.0f;
}
else {
@@ -254,7 +254,7 @@ void RenderLayersDepthProg::executePixelSampled(float output[4],
int iy = y;
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() ||
+ if (inputBuffer == nullptr || ix < 0 || iy < 0 || ix >= (int)this->getWidth() ||
iy >= (int)this->getHeight()) {
output[0] = 10e10f;
}
diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp
index e25d5af1aed..7a21e960c13 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.cpp
+++ b/source/blender/compositor/operations/COM_RotateOperation.cpp
@@ -25,8 +25,8 @@ RotateOperation::RotateOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_imageSocket = NULL;
- this->m_degreeSocket = NULL;
+ this->m_imageSocket = nullptr;
+ this->m_degreeSocket = nullptr;
this->m_doDegree2RadConversion = false;
this->m_isDegreeSet = false;
}
@@ -40,8 +40,8 @@ void RotateOperation::initExecution()
void RotateOperation::deinitExecution()
{
- this->m_imageSocket = NULL;
- this->m_degreeSocket = NULL;
+ this->m_imageSocket = nullptr;
+ this->m_degreeSocket = nullptr;
}
inline void RotateOperation::ensureDegree()
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp
index 37ce832209c..9ec4e474ccd 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp
@@ -42,9 +42,9 @@ ScaleOperation::ScaleOperation() : BaseScaleOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void ScaleOperation::initExecution()
{
@@ -57,9 +57,9 @@ void ScaleOperation::initExecution()
void ScaleOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void ScaleOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
@@ -117,9 +117,9 @@ ScaleAbsoluteOperation::ScaleAbsoluteOperation() : BaseScaleOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void ScaleAbsoluteOperation::initExecution()
{
@@ -132,9 +132,9 @@ void ScaleAbsoluteOperation::initExecution()
void ScaleAbsoluteOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void ScaleAbsoluteOperation::executePixelSampled(float output[4],
@@ -206,7 +206,7 @@ ScaleFixedSizeOperation::ScaleFixedSizeOperation() : BaseScaleOperation()
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_is_offset = false;
}
void ScaleFixedSizeOperation::initExecution()
@@ -263,7 +263,7 @@ void ScaleFixedSizeOperation::initExecution()
void ScaleFixedSizeOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void ScaleFixedSizeOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index 4b92be65b3e..158ffd4a8c0 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -31,7 +31,7 @@ ScreenLensDistortionOperation::ScreenLensDistortionOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_distortion = 0.0f;
this->m_dispersion = 0.0f;
this->m_distortion_const = false;
@@ -72,7 +72,7 @@ void ScreenLensDistortionOperation::initExecution()
void *ScreenLensDistortionOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = this->m_inputProgram->initializeTileData(NULL);
+ void *buffer = this->m_inputProgram->initializeTileData(nullptr);
/* get distortion/dispersion values once, by reading inputs at (0,0)
* XXX this assumes invariable values (no image inputs),
@@ -202,7 +202,7 @@ void ScreenLensDistortionOperation::executePixel(float output[4], int x, int y,
void ScreenLensDistortionOperation::deinitExecution()
{
this->deinitMutex();
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
BLI_rng_free(this->m_rng);
}
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
index cc4e4a562db..bf8fbacbfe1 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
@@ -24,8 +24,8 @@ SetAlphaOperation::SetAlphaOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
}
void SetAlphaOperation::initExecution()
@@ -49,6 +49,6 @@ void SetAlphaOperation::executePixelSampled(float output[4],
void SetAlphaOperation::deinitExecution()
{
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
index 3c6a5104352..942d717d19c 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
@@ -30,7 +30,7 @@ void SetSamplerOperation::initExecution()
}
void SetSamplerOperation::deinitExecution()
{
- this->m_reader = NULL;
+ this->m_reader = nullptr;
}
void SetSamplerOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_SplitOperation.cpp b/source/blender/compositor/operations/COM_SplitOperation.cpp
index cace3b40b44..fb6214c7522 100644
--- a/source/blender/compositor/operations/COM_SplitOperation.cpp
+++ b/source/blender/compositor/operations/COM_SplitOperation.cpp
@@ -32,8 +32,8 @@ SplitOperation::SplitOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_image1Input = NULL;
- this->m_image2Input = NULL;
+ this->m_image1Input = nullptr;
+ this->m_image2Input = nullptr;
}
void SplitOperation::initExecution()
@@ -45,8 +45,8 @@ void SplitOperation::initExecution()
void SplitOperation::deinitExecution()
{
- this->m_image1Input = NULL;
- this->m_image2Input = NULL;
+ this->m_image1Input = nullptr;
+ this->m_image2Input = nullptr;
}
void SplitOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
index ef3c0700119..7cfa4de7a61 100644
--- a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
+++ b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
@@ -310,7 +310,7 @@ static void accumulate_line(MemoryBuffer *input,
void *SunBeamsOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
return buffer;
}
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp
index 5a8c40d8c8c..582decc6a1b 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cpp
+++ b/source/blender/compositor/operations/COM_TextureOperation.cpp
@@ -29,11 +29,11 @@ TextureBaseOperation::TextureBaseOperation()
{
this->addInputSocket(COM_DT_VECTOR); // offset
this->addInputSocket(COM_DT_VECTOR); // size
- this->m_texture = NULL;
- this->m_inputSize = NULL;
- this->m_inputOffset = NULL;
- this->m_rd = NULL;
- this->m_pool = NULL;
+ this->m_texture = nullptr;
+ this->m_inputSize = nullptr;
+ this->m_inputOffset = nullptr;
+ this->m_rd = nullptr;
+ this->m_pool = nullptr;
this->m_sceneColorManage = false;
setComplex(true);
}
@@ -51,19 +51,19 @@ void TextureBaseOperation::initExecution()
this->m_inputOffset = getInputSocketReader(0);
this->m_inputSize = getInputSocketReader(1);
this->m_pool = BKE_image_pool_new();
- if (this->m_texture != NULL && this->m_texture->nodetree != NULL && this->m_texture->use_nodes) {
+ if (this->m_texture != nullptr && this->m_texture->nodetree != nullptr && this->m_texture->use_nodes) {
ntreeTexBeginExecTree(this->m_texture->nodetree);
}
NodeOperation::initExecution();
}
void TextureBaseOperation::deinitExecution()
{
- this->m_inputSize = NULL;
- this->m_inputOffset = NULL;
+ this->m_inputSize = nullptr;
+ this->m_inputOffset = nullptr;
BKE_image_pool_free(this->m_pool);
- this->m_pool = NULL;
- if (this->m_texture != NULL && this->m_texture->use_nodes && this->m_texture->nodetree != NULL &&
- this->m_texture->nodetree->execdata != NULL) {
+ this->m_pool = nullptr;
+ if (this->m_texture != nullptr && this->m_texture->use_nodes && this->m_texture->nodetree != nullptr &&
+ this->m_texture->nodetree->execdata != nullptr) {
ntreeTexEndExecTree(this->m_texture->nodetree->execdata);
}
NodeOperation::deinitExecution();
@@ -99,7 +99,7 @@ void TextureBaseOperation::executePixelSampled(float output[4],
float y,
PixelSampler sampler)
{
- TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
+ TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, nullptr};
float textureSize[4];
float textureOffset[4];
float vec[3];
@@ -114,7 +114,7 @@ void TextureBaseOperation::executePixelSampled(float output[4],
* interpolation and (b) in such configuration multitex() simply floor's the value
* which often produces artifacts.
*/
- if (m_texture != NULL && (m_texture->imaflag & TEX_INTERPOL) == 0) {
+ if (m_texture != nullptr && (m_texture->imaflag & TEX_INTERPOL) == 0) {
u += 0.5f / cx;
v += 0.5f / cy;
}
@@ -128,7 +128,7 @@ void TextureBaseOperation::executePixelSampled(float output[4],
const int thread_id = WorkScheduler::current_thread_id();
retval = multitex_ext(
- this->m_texture, vec, NULL, NULL, 0, &texres, thread_id, m_pool, m_sceneColorManage, false);
+ this->m_texture, vec, nullptr, nullptr, 0, &texres, thread_id, m_pool, m_sceneColorManage, false);
if (texres.talpha) {
output[3] = texres.ta;
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp
index 2e330e287b2..cb0fc747dcb 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.cpp
+++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp
@@ -26,9 +26,9 @@ TonemapOperation::TonemapOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_imageReader = NULL;
- this->m_data = NULL;
- this->m_cachedInstance = NULL;
+ this->m_imageReader = nullptr;
+ this->m_data = nullptr;
+ this->m_cachedInstance = nullptr;
this->setComplex(true);
}
void TonemapOperation::initExecution()
@@ -41,7 +41,7 @@ void TonemapOperation::executePixel(float output[4], int x, int y, void *data)
{
AvgLogLum *avg = (AvgLogLum *)data;
- this->m_imageReader->read(output, x, y, NULL);
+ this->m_imageReader->read(output, x, y, nullptr);
mul_v3_fl(output, avg->al);
float dr = output[0] + this->m_data->offset;
float dg = output[1] + this->m_data->offset;
@@ -65,7 +65,7 @@ void PhotoreceptorTonemapOperation::executePixel(float output[4], int x, int y,
const float m = (ntm->m > 0.0f) ? ntm->m : (0.3f + 0.7f * powf(avg->auto_key, 1.4f));
const float ic = 1.0f - ntm->c, ia = 1.0f - ntm->a;
- this->m_imageReader->read(output, x, y, NULL);
+ this->m_imageReader->read(output, x, y, nullptr);
const float L = IMB_colormanagement_get_luminance(output);
float I_l = output[0] + ic * (L - output[0]);
@@ -84,7 +84,7 @@ void PhotoreceptorTonemapOperation::executePixel(float output[4], int x, int y,
void TonemapOperation::deinitExecution()
{
- this->m_imageReader = NULL;
+ this->m_imageReader = nullptr;
delete this->m_cachedInstance;
NodeOperation::deinitMutex();
}
@@ -109,7 +109,7 @@ bool TonemapOperation::determineDependingAreaOfInterest(rcti * /*input*/,
void *TonemapOperation::initializeTileData(rcti *rect)
{
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect);
AvgLogLum *data = new AvgLogLum();
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
index eca87a7b5a3..ddabfb7cf6c 100644
--- a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
@@ -31,7 +31,7 @@
TrackPositionOperation::TrackPositionOperation()
{
this->addOutputSocket(COM_DT_VALUE);
- this->m_movieClip = NULL;
+ this->m_movieClip = nullptr;
this->m_framenumber = 0;
this->m_trackingObjectName[0] = 0;
this->m_trackName[0] = 0;
@@ -43,7 +43,7 @@ TrackPositionOperation::TrackPositionOperation()
void TrackPositionOperation::initExecution()
{
- MovieTracking *tracking = NULL;
+ MovieTracking *tracking = nullptr;
MovieClipUser user = {0};
MovieTrackingObject *object;
@@ -79,7 +79,7 @@ void TrackPositionOperation::initExecution()
this->m_relativeFrame);
marker = BKE_tracking_marker_get_exact(track, relative_clip_framenr);
- if (marker != NULL && (marker->flag & MARKER_DISABLED) == 0) {
+ if (marker != nullptr && (marker->flag & MARKER_DISABLED) == 0) {
copy_v2_v2(this->m_relativePos, marker->pos);
}
else {
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp
index e92d1034e25..286004cd49b 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cpp
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp
@@ -25,9 +25,9 @@ TranslateOperation::TranslateOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
this->m_isDeltaSet = false;
this->m_factorX = 1.0f;
this->m_factorY = 1.0f;
@@ -41,9 +41,9 @@ void TranslateOperation::initExecution()
void TranslateOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void TranslateOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index afc318a0c5b..414b5bd980a 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -35,9 +35,9 @@ VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation()
this->setComplex(true);
this->setOpenCL(true);
- this->m_inputProgram = NULL;
- this->m_inputBokehProgram = NULL;
- this->m_inputSizeProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBokehProgram = nullptr;
+ this->m_inputSizeProgram = nullptr;
this->m_maxBlur = 32.0f;
this->m_threshold = 1.0f;
this->m_do_size_scale = false;
@@ -188,7 +188,7 @@ void VariableSizeBokehBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel defocusKernel = device->COM_clCreateKernel("defocusKernel", NULL);
+ cl_kernel defocusKernel = device->COM_clCreateKernel("defocusKernel", nullptr);
cl_int step = this->getStep();
cl_int maxBlur;
@@ -221,9 +221,9 @@ void VariableSizeBokehBlurOperation::executeOpenCL(OpenCLDevice *device,
void VariableSizeBokehBlurOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- this->m_inputBokehProgram = NULL;
- this->m_inputSizeProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBokehProgram = nullptr;
+ this->m_inputSizeProgram = nullptr;
#ifdef COM_DEFOCUS_SEARCH
this->m_inputSearchProgram = NULL;
#endif
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
index 0f3a3172f15..0776c97563e 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
@@ -49,11 +49,11 @@ VectorBlurOperation::VectorBlurOperation()
this->addInputSocket(COM_DT_VALUE); // ZBUF
this->addInputSocket(COM_DT_COLOR); // SPEED
this->addOutputSocket(COM_DT_COLOR);
- this->m_settings = NULL;
- this->m_cachedInstance = NULL;
- this->m_inputImageProgram = NULL;
- this->m_inputSpeedProgram = NULL;
- this->m_inputZProgram = NULL;
+ this->m_settings = nullptr;
+ this->m_cachedInstance = nullptr;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputSpeedProgram = nullptr;
+ this->m_inputZProgram = nullptr;
setComplex(true);
}
void VectorBlurOperation::initExecution()
@@ -62,7 +62,7 @@ void VectorBlurOperation::initExecution()
this->m_inputImageProgram = getInputSocketReader(0);
this->m_inputZProgram = getInputSocketReader(1);
this->m_inputSpeedProgram = getInputSocketReader(2);
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
@@ -76,12 +76,12 @@ void VectorBlurOperation::executePixel(float output[4], int x, int y, void *data
void VectorBlurOperation::deinitExecution()
{
deinitMutex();
- this->m_inputImageProgram = NULL;
- this->m_inputSpeedProgram = NULL;
- this->m_inputZProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputSpeedProgram = nullptr;
+ this->m_inputZProgram = nullptr;
if (this->m_cachedInstance) {
MEM_freeN(this->m_cachedInstance);
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
}
}
void *VectorBlurOperation::initializeTileData(rcti *rect)
@@ -91,7 +91,7 @@ void *VectorBlurOperation::initializeTileData(rcti *rect)
}
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_inputImageProgram->initializeTileData(rect);
MemoryBuffer *speed = (MemoryBuffer *)this->m_inputSpeedProgram->initializeTileData(rect);
MemoryBuffer *z = (MemoryBuffer *)this->m_inputZProgram->initializeTileData(rect);
@@ -107,7 +107,7 @@ bool VectorBlurOperation::determineDependingAreaOfInterest(rcti * /*input*/,
ReadBufferOperation *readOperation,
rcti *output)
{
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
rcti newInput;
newInput.xmax = this->getWidth();
newInput.xmin = 0;
@@ -183,7 +183,7 @@ void zbuf_free_span(ZSpan *zspan)
if (zspan->span2) {
MEM_freeN(zspan->span2);
}
- zspan->span1 = zspan->span2 = NULL;
+ zspan->span1 = zspan->span2 = nullptr;
}
}
@@ -192,7 +192,7 @@ static void zbuf_init_span(ZSpan *zspan)
{
zspan->miny1 = zspan->miny2 = zspan->recty + 1;
zspan->maxy1 = zspan->maxy2 = -1;
- zspan->minp1 = zspan->maxp1 = zspan->minp2 = zspan->maxp2 = NULL;
+ zspan->minp1 = zspan->maxp1 = zspan->minp2 = zspan->maxp2 = nullptr;
}
static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
@@ -243,7 +243,7 @@ static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
}
/* empty span */
- if (zspan->maxp1 == NULL) {
+ if (zspan->maxp1 == nullptr) {
span = zspan->span1;
}
else { /* does it complete left span? */
@@ -257,10 +257,10 @@ static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
if (span == zspan->span1) {
// printf("left span my0 %d my2 %d\n", my0, my2);
- if (zspan->minp1 == NULL || zspan->minp1[1] > minv[1]) {
+ if (zspan->minp1 == nullptr || zspan->minp1[1] > minv[1]) {
zspan->minp1 = minv;
}
- if (zspan->maxp1 == NULL || zspan->maxp1[1] < maxv[1]) {
+ if (zspan->maxp1 == nullptr || zspan->maxp1[1] < maxv[1]) {
zspan->maxp1 = maxv;
}
if (my0 < zspan->miny1) {
@@ -272,10 +272,10 @@ static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
}
else {
// printf("right span my0 %d my2 %d\n", my0, my2);
- if (zspan->minp2 == NULL || zspan->minp2[1] > minv[1]) {
+ if (zspan->minp2 == nullptr || zspan->minp2[1] > minv[1]) {
zspan->minp2 = minv;
}
- if (zspan->maxp2 == NULL || zspan->maxp2[1] < maxv[1]) {
+ if (zspan->maxp2 == nullptr || zspan->maxp2[1] < maxv[1]) {
zspan->maxp2 = maxv;
}
if (my0 < zspan->miny2) {
@@ -321,7 +321,7 @@ static void zbuf_fill_in_rgba(
zbuf_add_to_span(zspan, v4, v1);
/* clipped */
- if (zspan->minp2 == NULL || zspan->maxp2 == NULL) {
+ if (zspan->minp2 == nullptr || zspan->maxp2 == nullptr) {
return;
}
@@ -554,7 +554,7 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd,
float v1[3], v2[3], v3[3], v4[3], fx, fy;
const float *dimg, *dz, *ro;
float *rectvz, *dvz, *dvec1, *dvec2, *dz1, *dz2, *rectz;
- float *minvecbufrect = NULL, *rectweight, *rw, *rectmax, *rm;
+ float *minvecbufrect = nullptr, *rectweight, *rw, *rectmax, *rm;
float maxspeedsq = (float)nbd->maxspeed * nbd->maxspeed;
int y, x, step, maxspeed = nbd->maxspeed, samples = nbd->samples;
int tsktsk = 0;
@@ -765,7 +765,7 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd,
/* clear drawing buffer */
for (x = xsize * ysize - 1; x >= 0; x--) {
- rectdraw[x].colpoin = NULL;
+ rectdraw[x].colpoin = nullptr;
}
dimg = imgrect;
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
index a78a8c47ea3..a883237f870 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
@@ -25,7 +25,7 @@ VectorCurveOperation::VectorCurveOperation()
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_VECTOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void VectorCurveOperation::initExecution()
{
@@ -48,5 +48,5 @@ void VectorCurveOperation::executePixelSampled(float output[4],
void VectorCurveOperation::deinitExecution()
{
CurveBaseOperation::deinitExecution();
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp
index 254d6975bee..025dde8e866 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.cpp
+++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp
@@ -34,25 +34,25 @@
ViewerOperation::ViewerOperation()
{
- this->setImage(NULL);
- this->setImageUser(NULL);
- this->m_outputBuffer = NULL;
- this->m_depthBuffer = NULL;
+ this->setImage(nullptr);
+ this->setImageUser(nullptr);
+ this->m_outputBuffer = nullptr;
+ this->m_depthBuffer = nullptr;
this->m_active = false;
this->m_doDepthBuffer = false;
- this->m_viewSettings = NULL;
- this->m_displaySettings = NULL;
+ this->m_viewSettings = nullptr;
+ this->m_displaySettings = nullptr;
this->m_useAlphaInput = false;
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
- this->m_imageInput = NULL;
- this->m_alphaInput = NULL;
- this->m_depthInput = NULL;
- this->m_rd = NULL;
- this->m_viewName = NULL;
+ this->m_imageInput = nullptr;
+ this->m_alphaInput = nullptr;
+ this->m_depthInput = nullptr;
+ this->m_rd = nullptr;
+ this->m_viewName = nullptr;
}
void ViewerOperation::initExecution()
@@ -61,7 +61,7 @@ void ViewerOperation::initExecution()
this->m_imageInput = getInputSocketReader(0);
this->m_alphaInput = getInputSocketReader(1);
this->m_depthInput = getInputSocketReader(2);
- this->m_doDepthBuffer = (this->m_depthInput != NULL);
+ this->m_doDepthBuffer = (this->m_depthInput != nullptr);
if (isActiveViewerOutput()) {
initImage();
@@ -70,10 +70,10 @@ void ViewerOperation::initExecution()
void ViewerOperation::deinitExecution()
{
- this->m_imageInput = NULL;
- this->m_alphaInput = NULL;
- this->m_depthInput = NULL;
- this->m_outputBuffer = NULL;
+ this->m_imageInput = nullptr;
+ this->m_alphaInput = nullptr;
+ this->m_depthInput = nullptr;
+ this->m_outputBuffer = nullptr;
}
void ViewerOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
@@ -180,7 +180,7 @@ void ViewerOperation::updateImage(rcti *rect)
{
IMB_partial_display_buffer_update(this->m_ibuf,
this->m_outputBuffer,
- NULL,
+ nullptr,
getWidth(),
0,
0,
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 883dd48ccfe..574978e5a5f 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -26,13 +26,13 @@ WriteBufferOperation::WriteBufferOperation(DataType datatype)
this->addInputSocket(datatype);
this->m_memoryProxy = new MemoryProxy(datatype);
this->m_memoryProxy->setWriteBufferOperation(this);
- this->m_memoryProxy->setExecutor(NULL);
+ this->m_memoryProxy->setExecutor(nullptr);
}
WriteBufferOperation::~WriteBufferOperation()
{
if (this->m_memoryProxy) {
delete this->m_memoryProxy;
- this->m_memoryProxy = NULL;
+ this->m_memoryProxy = nullptr;
}
}
@@ -52,7 +52,7 @@ void WriteBufferOperation::initExecution()
void WriteBufferOperation::deinitExecution()
{
- this->m_input = NULL;
+ this->m_input = nullptr;
this->m_memoryProxy->free();
}
@@ -82,7 +82,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/
}
if (data) {
this->m_input->deinitializeTileData(rect, data);
- data = NULL;
+ data = nullptr;
}
}
else {
@@ -175,8 +175,8 @@ void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device,
0,
outputFloatBuffer,
0,
- NULL,
- NULL);
+ nullptr,
+ nullptr);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
index 935272e0dbe..22a37a4583e 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
@@ -27,10 +27,10 @@ ZCombineOperation::ZCombineOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_image1Reader = NULL;
- this->m_depth1Reader = NULL;
- this->m_image2Reader = NULL;
- this->m_depth2Reader = NULL;
+ this->m_image1Reader = nullptr;
+ this->m_depth1Reader = nullptr;
+ this->m_image2Reader = nullptr;
+ this->m_depth2Reader = nullptr;
}
void ZCombineOperation::initExecution()
@@ -88,10 +88,10 @@ void ZCombineAlphaOperation::executePixelSampled(float output[4],
void ZCombineOperation::deinitExecution()
{
- this->m_image1Reader = NULL;
- this->m_depth1Reader = NULL;
- this->m_image2Reader = NULL;
- this->m_depth2Reader = NULL;
+ this->m_image1Reader = nullptr;
+ this->m_depth1Reader = nullptr;
+ this->m_image2Reader = nullptr;
+ this->m_depth2Reader = nullptr;
}
// MASK combine
@@ -102,9 +102,9 @@ ZCombineMaskOperation::ZCombineMaskOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_maskReader = NULL;
- this->m_image1Reader = NULL;
- this->m_image2Reader = NULL;
+ this->m_maskReader = nullptr;
+ this->m_image1Reader = nullptr;
+ this->m_image2Reader = nullptr;
}
void ZCombineMaskOperation::initExecution()
@@ -154,7 +154,7 @@ void ZCombineMaskAlphaOperation::executePixelSampled(float output[4],
void ZCombineMaskOperation::deinitExecution()
{
- this->m_image1Reader = NULL;
- this->m_maskReader = NULL;
- this->m_image2Reader = NULL;
+ this->m_image1Reader = nullptr;
+ this->m_maskReader = nullptr;
+ this->m_image2Reader = nullptr;
}
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 8741622ac89..54b6b08ab81 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2204,7 +2204,7 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata)
/* Layer parenting need react to the parent object transformation. */
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
- if (gpl->parent != NULL) {
+ if (gpl->parent != nullptr) {
ComponentKey gpd_geom_key(&gpd->id, NodeType::GEOMETRY);
if (gpl->partype == PARBONE) {
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 99804a7cd7d..5ce7570124a 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -287,7 +287,7 @@ void DEG_graph_replace_owners(struct Depsgraph *depsgraph,
deg::Depsgraph *deg_graph = reinterpret_cast<deg::Depsgraph *>(depsgraph);
const bool do_update_register = deg_graph->bmain != bmain;
- if (do_update_register && deg_graph->bmain != NULL) {
+ if (do_update_register && deg_graph->bmain != nullptr) {
deg::unregister_graph(deg_graph);
}
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 8055e65595b..c73a3b2596a 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -617,7 +617,7 @@ void id_tag_update(Main *bmain, ID *id, int flag, eUpdateSource update_source)
/* Accumulate all tags for an ID between two undo steps, so they can be
* replayed for undo. */
- id->recalc_after_undo_push |= deg_recalc_flags_effective(NULL, flag);
+ id->recalc_after_undo_push |= deg_recalc_flags_effective(nullptr, flag);
}
void graph_id_tag_update(
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index 2c4b7f03db5..5b81a668a7a 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -71,7 +71,7 @@ void schedule_children(DepsgraphEvalState *state,
void schedule_node_to_pool(OperationNode *node, const int UNUSED(thread_id), TaskPool *pool)
{
- BLI_task_pool_push(pool, deg_task_run_func, node, false, NULL);
+ BLI_task_pool_push(pool, deg_task_run_func, node, false, nullptr);
}
/* Denotes which part of dependency graph is being evaluated. */
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 0a92cdb2e64..1119c16dc29 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -305,7 +305,7 @@ bool id_copy_inplace_no_main(const ID *id, ID *newid)
bool result = (BKE_id_copy_ex(nullptr,
(ID *)id_for_copy,
&newid,
- LIB_ID_COPY_LOCALIZE | LIB_ID_CREATE_NO_ALLOCATE) != NULL);
+ LIB_ID_COPY_LOCALIZE | LIB_ID_CREATE_NO_ALLOCATE) != nullptr);
#ifdef NESTED_ID_NASTY_WORKAROUND
if (result) {
@@ -334,7 +334,7 @@ bool scene_copy_inplace_no_main(const Scene *scene, Scene *new_scene)
bool result = (BKE_id_copy_ex(nullptr,
id_for_copy,
(ID **)&new_scene,
- LIB_ID_COPY_LOCALIZE | LIB_ID_CREATE_NO_ALLOCATE) != NULL);
+ LIB_ID_COPY_LOCALIZE | LIB_ID_CREATE_NO_ALLOCATE) != nullptr);
#ifdef NESTED_ID_NASTY_WORKAROUND
if (result) {
diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp
index 66e41222ee6..9187e0ebb05 100644
--- a/source/blender/freestyle/intern/application/AppCanvas.cpp
+++ b/source/blender/freestyle/intern/application/AppCanvas.cpp
@@ -33,7 +33,7 @@ namespace Freestyle {
AppCanvas::AppCanvas()
{
- _pViewer = 0;
+ _pViewer = nullptr;
_MapsPath = Config::Path::getInstance()->getMapsDir().c_str();
}
@@ -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..00c473f6d3b 100644
--- a/source/blender/freestyle/intern/application/AppConfig.cpp
+++ b/source/blender/freestyle/intern/application/AppConfig.cpp
@@ -32,12 +32,12 @@ namespace Freestyle {
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 +62,7 @@ void Path::setHomeDir(const string &iHomeDir)
Path::~Path()
{
- _pInstance = 0;
+ _pInstance = nullptr;
}
Path *Path::getInstance()
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index fce960c216b..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();
@@ -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;
}
@@ -1129,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 291a38d23df..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()
@@ -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);
@@ -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);
@@ -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 92df844d0b3..8aaffd4dde8 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -141,7 +141,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count)
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)
BlenderStrokeRenderer::~BlenderStrokeRenderer()
{
- BLI_ghash_free(_nodetree_hash, NULL, NULL);
+ BLI_ghash_free(_nodetree_hash, nullptr, nullptr);
DEG_graph_free(freestyle_depsgraph);
@@ -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 9f1a1ecaace..c5184a4ec8d 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -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,7 +111,7 @@ 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);
@@ -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/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/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/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/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp
index 17a0e53876e..c19f02cd562 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,42 @@ 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 */
+ nullptr, /* tp_print */
+ 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..83325ced601 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,49 +138,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)BinaryPredicate0D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)BinaryPredicate0D___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_BinaryPredicate0D_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)BinaryPredicate0D___init__, /* tp_init */
- 0, /* tp_alloc */
+ 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..7dcf7614874 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,48 +173,48 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)BinaryPredicate1D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)BinaryPredicate1D___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_BinaryPredicate1D_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)BinaryPredicate1D___init__, /* tp_init */
- 0, /* tp_alloc */
+ 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 29e90ee4ebc..818f9cab429 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,7 @@ 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 +429,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 +438,7 @@ 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 +448,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 +457,7 @@ 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 +469,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 +477,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 +485,7 @@ 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 +494,7 @@ 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;
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index 631bdc8bc28..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,15 +253,15 @@ 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);
@@ -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 bc994e7542c..cad9d6f0af8 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;
}
@@ -80,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;
@@ -456,45 +456,45 @@ 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;
+ const BPy_FrsMaterial *matA = nullptr, *matB = nullptr;
bool result = false;
if (!BPy_FrsMaterial_Check(objectA) || !BPy_FrsMaterial_Check(objectB)) {
@@ -517,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) {
@@ -534,42 +534,42 @@ static Py_hash_t FrsMaterial_hash(PyObject *self)
/*-----------------------BPy_FrsMaterial type definition ------------------------------*/
PyTypeObject FrsMaterial_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Material", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)FrsMaterial_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
(hashfunc)FrsMaterial_hash, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 0, /* tp_traverse */
- 0, /* tp_clear */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
(richcmpfunc)BPy_FrsMaterial_richcmpr, /* 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_FrsMaterial_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)FrsMaterial_init, /* tp_init */
- 0, /* tp_alloc */
+ 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..e15d3f49bf2 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,53 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ 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 8f61f7f3e14..2a1a04e8de6 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;
}
@@ -64,8 +64,8 @@ PyDoc_STRVAR(
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;
@@ -159,50 +159,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ 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..369bae7ea3b 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,43 @@ PyDoc_STRVAR(IntegrationType_doc,
" last of the values obtained for the 0D elements.");
PyTypeObject IntegrationType_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "IntegrationType", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&PyLong_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 */
- 0, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
@@ -210,7 +210,7 @@ int IntegrationType_Init(PyObject *module)
{
PyObject *m, *d, *f;
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -227,7 +227,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..129b15dbf1b 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,74 +269,74 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* 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 */
+ 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 */
- 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_Interface0D_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_Interface0D_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)Interface0D_init, /* tp_init */
- 0, /* tp_alloc */
+ 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..460514b791c 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,61 +318,61 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* 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 */
+ 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 */
- 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_Interface1D_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_Interface1D_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)Interface1D_init, /* tp_init */
- 0, /* tp_alloc */
+ 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..c431400710c 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,51 +215,51 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* 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 */
+ 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 */
- 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_Iterator_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_Iterator_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)Iterator_init, /* tp_init */
- 0, /* tp_alloc */
+ 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..7843be53c19 100644
--- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp
+++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp
@@ -41,43 +41,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&PyLong_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 */
- 0, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
/*-----------------------BPy_IntegrationType instance definitions -------------------------*/
@@ -96,7 +96,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..f90191d67b9 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,43 @@ PyDoc_STRVAR(Nature_doc,
/*-----------------------BPy_Nature type definition ------------------------------*/
PyTypeObject Nature_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Nature", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
+ nullptr, /* 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 */
+ 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 */
- 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 */
&PyLong_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 */
- 0, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ nullptr, /* tp_init */
+ nullptr, /* tp_alloc */
+ nullptr, /* tp_new */
};
/*-----------------------BPy_Nature instance definitions ----------------------------------*/
@@ -186,7 +186,7 @@ static PyLongObject _Nature_EDGE_MARK = {
//-------------------MODULE INITIALIZATION--------------------------------
int Nature_Init(PyObject *module)
{
- if (module == NULL) {
+ if (module == nullptr) {
return -1;
}
@@ -225,16 +225,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 +248,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 1235786d5d3..814f4b20831 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,23 +78,23 @@ 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;
}
@@ -123,8 +123,8 @@ PyDoc_STRVAR(Operators_chain_doc,
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,
@@ -136,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),
@@ -154,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),
@@ -169,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;
@@ -203,8 +203,8 @@ 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,
@@ -214,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 {
@@ -235,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;
@@ -283,9 +283,9 @@ 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,
@@ -301,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),
@@ -315,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(),
@@ -326,18 +326,18 @@ 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;
}
@@ -382,9 +382,9 @@ 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,
@@ -400,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),
@@ -414,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(),
@@ -434,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),
@@ -455,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;
}
@@ -476,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;
}
@@ -511,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,
@@ -522,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));
@@ -536,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) {
@@ -545,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);
}
@@ -553,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;
}
@@ -569,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;
}
@@ -596,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)));
}
@@ -623,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)));
}
@@ -650,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)));
}
@@ -760,48 +760,48 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ 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 */
- 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_Operators_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 */
- 0, /* tp_init */
- 0, /* tp_alloc */
+ 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 b1d5f8f4aac..c2309a1252f 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;
}
@@ -65,8 +65,8 @@ PyDoc_STRVAR(
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;
@@ -104,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;
@@ -125,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;
@@ -157,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 ----------------------------*/
@@ -266,53 +266,53 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ 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 3718fddcf20..8d7608383dc 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;
}
@@ -84,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(
@@ -166,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);
@@ -190,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);
@@ -214,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);
@@ -238,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));
}
@@ -262,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));
}
@@ -286,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));
}
@@ -311,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;
@@ -338,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;
@@ -371,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;
@@ -425,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 ----------------------------*/
@@ -651,64 +651,64 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* 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 */
+ 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 */
- 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_StrokeAttribute_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_StrokeAttribute_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)StrokeAttribute_init, /* tp_init */
- 0, /* tp_alloc */
+ 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..860a22a3369 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,49 +271,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* 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 */
+ 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 */
- 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_StrokeShader_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_StrokeShader_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)StrokeShader___init__, /* tp_init */
- 0, /* tp_alloc */
+ 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..d6442e784a4 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,49 +109,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* 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 */
+ 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 */
- 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_UnaryFunction0D_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 */
- 0, /* tp_init */
- 0, /* tp_alloc */
+ 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..23ed254c258 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,49 +103,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* 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 */
+ 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 */
- 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_UnaryFunction1D_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 */
- 0, /* tp_init */
- 0, /* tp_alloc */
+ 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..1704e1a5d7f 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,49 +152,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryPredicate0D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryPredicate0D___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryPredicate0D_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)UnaryPredicate0D___init__, /* tp_init */
- 0, /* tp_alloc */
+ 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..7ef3d8a2dd6 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,49 +210,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryPredicate1D___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryPredicate1D___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryPredicate1D_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)UnaryPredicate1D___init__, /* tp_init */
- 0, /* tp_alloc */
+ 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..3b982da54f4 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,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ 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 7d8b5ef6fa9..186f45e068e 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;
}
@@ -68,14 +68,14 @@ PyDoc_STRVAR(ViewShape_doc,
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));
@@ -86,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)");
@@ -100,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) {
@@ -124,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;
@@ -144,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;
@@ -165,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 ----------------------------*/
@@ -324,62 +324,62 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* 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 */
+ 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 */
- 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_ViewShape_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_ViewShape_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)ViewShape_init, /* tp_init */
- 0, /* tp_alloc */
+ 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..b6769435be3 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&BinaryPredicate1D_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)FalseBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..46f8d89b633 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&BinaryPredicate1D_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)Length2DBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..5b71c532294 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&BinaryPredicate1D_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)SameShapeIdBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..41bec8343c9 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&BinaryPredicate1D_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)TrueBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..408d3e5a1cb 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,43 @@ static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self,
/*-----------------------BPy_ViewMapGradientNormBP1D type definition ----------------------------*/
PyTypeObject ViewMapGradientNormBP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ViewMapGradientNormBP1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&BinaryPredicate1D_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)ViewMapGradientNormBP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 7b3571c479f..b8a6ac04fbd 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
@@ -69,10 +69,10 @@ PyDoc_STRVAR(CurvePoint_doc,
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)) {
@@ -107,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;
}
@@ -225,56 +225,56 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_CurvePoint_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)CurvePoint_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_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
index 63725c6b0e8..faa3783f7dd 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
@@ -54,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)) {
@@ -93,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;
@@ -119,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;
@@ -140,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 ----------------------------*/
@@ -423,63 +423,63 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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..a220f674cd4 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,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_ViewVertex_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_ViewVertex_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)ViewVertex_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 5c1a8f8482f..4a478ae7463 100644
--- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
@@ -70,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(
@@ -102,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;
}
@@ -116,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!",
@@ -335,65 +335,65 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_StrokeVertex_getseters, /* tp_getset */
&CurvePoint_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)StrokeVertex_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 ff53f5bfcbe..b9f5dd48efe 100644
--- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
@@ -50,8 +50,8 @@ PyDoc_STRVAR(
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;
@@ -99,49 +99,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_NonTVertex_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)NonTVertex_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..e687c2ef3c0 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,55 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 d337bf7f90e..32de9141753 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
@@ -62,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) {
@@ -114,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 ----------------------------*/
@@ -320,73 +320,73 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 78c0ee051d6..2dc43ef2265 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
@@ -54,9 +54,9 @@ PyDoc_STRVAR(FrsCurve_doc,
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) {
@@ -89,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)) {
@@ -104,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;
}
@@ -119,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)) {
@@ -134,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;
}
@@ -148,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 ----------------------------*/
@@ -174,55 +174,55 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 910f9cdfa07..b6f519f5031 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -56,8 +56,8 @@ PyDoc_STRVAR(Stroke_doc,
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;
@@ -91,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));
}
@@ -113,11 +113,11 @@ 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));
}
@@ -140,27 +140,27 @@ PyDoc_STRVAR(Stroke_resample_doc,
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;
}
@@ -180,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,
@@ -191,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. */
@@ -214,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;
}
@@ -268,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);
@@ -353,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 ----------------------------*/
@@ -465,75 +465,75 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 e9160d7a5c7..36ac0d1c58e 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
@@ -54,8 +54,8 @@ PyDoc_STRVAR(
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;
@@ -87,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 ----------------------------*/
@@ -333,88 +333,88 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_ViewEdge_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_ViewEdge_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)ViewEdge_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 028e36145b9..e1b1cdc3270 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -53,9 +53,9 @@ PyDoc_STRVAR(Chain_doc,
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) {
@@ -92,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);
@@ -118,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);
@@ -140,49 +140,49 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 018e0449552..ca19dbf5198 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
@@ -57,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) {
@@ -362,85 +362,85 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_FEdgeSharp_getseters, /* tp_getset */
&FEdge_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)FEdgeSharp_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_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
index 014f0411356..cb6671f2d1c 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
@@ -54,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)) {
@@ -227,61 +227,61 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_FEdgeSmooth_getseters, /* tp_getset */
&FEdge_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)FEdgeSmooth_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 dc32b73fda1..e69e56b52e1 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
@@ -60,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)) {
@@ -77,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!",
@@ -113,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;
@@ -122,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->();
@@ -140,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) {
@@ -160,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());
}
@@ -168,57 +168,57 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
(getiterfunc)AdjacencyIterator_iter, /* tp_iter */
(iternextfunc)AdjacencyIterator_iternext, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
BPy_AdjacencyIterator_getseters, /* tp_getset */
&Iterator_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)AdjacencyIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 9c534a3463c..cbf5ce58c8b 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
@@ -82,7 +82,7 @@ PyDoc_STRVAR(
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;
@@ -93,15 +93,15 @@ 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)) {
@@ -112,7 +112,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!",
@@ -133,7 +133,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);
@@ -162,43 +162,43 @@ static void ChainPredicateIterator_dealloc(BPy_ChainPredicateIterator *self)
/*-----------------------BPy_ChainPredicateIterator type definition ----------------------------*/
PyTypeObject ChainPredicateIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ChainPredicateIterator", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&ChainingIterator_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)ChainPredicateIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 9fa84d5f6b8..d949578780d 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
@@ -68,7 +68,7 @@ PyDoc_STRVAR(ChainSilhouetteIterator_doc,
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;
@@ -79,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!",
@@ -100,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);
}
@@ -117,43 +117,43 @@ static int ChainSilhouetteIterator_init(BPy_ChainSilhouetteIterator *self,
/*-----------------------BPy_ChainSilhouetteIterator type definition ----------------------------*/
PyTypeObject ChainSilhouetteIterator_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ChainSilhouetteIterator", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&ChainingIterator_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)ChainSilhouetteIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 d24e1dc527d..74c50de5969 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
@@ -69,7 +69,7 @@ PyDoc_STRVAR(
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;
@@ -78,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!",
@@ -103,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);
@@ -131,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;
@@ -155,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));
@@ -178,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 ----------------------------*/
@@ -192,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) {
@@ -232,62 +232,62 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_ChainingIterator_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_ChainingIterator_getseters, /* tp_getset */
&ViewEdgeIterator_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)ChainingIterator___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 8eac657316e..06fd877d183 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -54,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(
@@ -92,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*());
}
@@ -120,54 +120,54 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_CurvePointIterator_getseters, /* tp_getset */
&Iterator_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)CurvePointIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 f7afc7695ae..78ad2ab3833 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -65,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;
@@ -111,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();
@@ -150,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*());
}
@@ -190,59 +190,59 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
(getiterfunc)Interface0DIterator_iter, /* tp_iter */
(iternextfunc)Interface0DIterator_iternext, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
BPy_Interface0DIterator_getseters, /* tp_getset */
&Iterator_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)Interface0DIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 83c504081c1..87dfad50d75 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -62,9 +62,9 @@ PyDoc_STRVAR(
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(
@@ -115,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) {
@@ -145,52 +145,52 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_SVertexIterator_getseters, /* tp_getset */
&Iterator_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)SVertexIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 e1b24e768e3..f9e20dff696 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -60,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)) {
@@ -111,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();
}
@@ -119,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 */
@@ -130,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();
@@ -154,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();
@@ -173,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();
@@ -207,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 ----------------------------*/
@@ -222,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) {
@@ -265,59 +265,59 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ 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 */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_StrokeVertexIterator_getseters, /* tp_getset */
&Iterator_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)StrokeVertexIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 20134057864..ebbe96e13b1 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -57,7 +57,7 @@ PyDoc_STRVAR(ViewEdgeIterator_doc,
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;
@@ -66,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);
}
@@ -106,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 ----------------------------*/
@@ -120,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) {
@@ -212,67 +212,67 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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_ViewEdgeIterator_methods, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_members */
BPy_ViewEdgeIterator_getseters, /* tp_getset */
&Iterator_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)ViewEdgeIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 30b7b3ccde5..efed356cb17 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -51,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)) {
@@ -85,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;
@@ -101,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;
}
}
}
@@ -123,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*());
}
@@ -131,52 +131,52 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
+ nullptr, /* tp_traverse */
+ nullptr, /* tp_clear */
+ nullptr, /* tp_richcompare */
0, /* tp_weaklistoffset */
(getiterfunc)orientedViewEdgeIterator_iter, /* tp_iter */
(iternextfunc)orientedViewEdgeIterator_iternext, /* tp_iternext */
- 0, /* tp_methods */
- 0, /* tp_members */
+ nullptr, /* tp_methods */
+ nullptr, /* tp_members */
BPy_orientedViewEdgeIterator_getseters, /* tp_getset */
&Iterator_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)orientedViewEdgeIterator_init, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..e306e838bc0 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,43 @@ static int BackboneStretcherShader___init__(BPy_BackboneStretcherShader *self,
/*-----------------------BPy_BackboneStretcherShader type definition ----------------------------*/
PyTypeObject BackboneStretcherShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BackboneStretcherShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)BackboneStretcherShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..7bec25e9593 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,43 @@ static int BezierCurveShader___init__(BPy_BezierCurveShader *self, PyObject *arg
/*-----------------------BPy_BezierCurveShader type definition ------------------------------*/
PyTypeObject BezierCurveShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BezierCurveShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)BezierCurveShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..1eeb28bd16d 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,43 @@ static int BlenderTextureShader___init__(BPy_BlenderTextureShader *self,
/*-----------------------BPy_BlenderTextureShader type definition ------------------------------*/
PyTypeObject BlenderTextureShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "BlenderTextureShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)BlenderTextureShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..a79e7b414de 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
@@ -67,10 +67,10 @@ 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 +84,43 @@ static int CalligraphicShader___init__(BPy_CalligraphicShader *self,
/*-----------------------BPy_CalligraphicShader type definition ------------------------------*/
PyTypeObject CalligraphicShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "CalligraphicShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)CalligraphicShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..c03314c8cc4 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,43 @@ static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args,
/*-----------------------BPy_ColorNoiseShader type definition ------------------------------*/
PyTypeObject ColorNoiseShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ColorNoiseShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)ColorNoiseShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..c0d5d5bfc84 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,43 @@ static int ConstantColorShader___init__(BPy_ConstantColorShader *self,
/*-----------------------BPy_ConstantColorShader type definition ------------------------------*/
PyTypeObject ConstantColorShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ConstantColorShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)ConstantColorShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..8f533646fbf 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,43 @@ static int ConstantThicknessShader___init__(BPy_ConstantThicknessShader *self,
/*-----------------------BPy_ConstantThicknessShader type definition ----------------------------*/
PyTypeObject ConstantThicknessShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ConstantThicknessShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)ConstantThicknessShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..afcd0d7715c 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,43 @@ static int ConstrainedIncreasingThicknessShader___init__(
/*-----------------------BPy_ConstrainedIncreasingThicknessShader type definition ---------------*/
PyTypeObject ConstrainedIncreasingThicknessShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ConstrainedIncreasingThicknessShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)ConstrainedIncreasingThicknessShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..173b9b692db 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,43 @@ static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self,
/*-----------------------BPy_GuidingLinesShader type definition ------------------------------*/
PyTypeObject GuidingLinesShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GuidingLinesShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)GuidingLinesShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..487fd0e952e 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,43 @@ static int IncreasingColorShader___init__(BPy_IncreasingColorShader *self,
/*-----------------------BPy_IncreasingColorShader type definition ------------------------------*/
PyTypeObject IncreasingColorShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "IncreasingColorShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)IncreasingColorShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..6fc60c55da8 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,43 @@ static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader *sel
/*-----------------------BPy_IncreasingThicknessShader type definition --------------------------*/
PyTypeObject IncreasingThicknessShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "IncreasingThicknessShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)IncreasingThicknessShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..facb4d1ff7c 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,43 @@ static int PolygonalizationShader___init__(BPy_PolygonalizationShader *self,
/*-----------------------BPy_PolygonalizationShader type definition -----------------------------*/
PyTypeObject PolygonalizationShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "PolygonalizationShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)PolygonalizationShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..8fc8b27d5f4 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)SamplingShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..1001e52abdb 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)SmoothingShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..32993ea2da4 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
@@ -63,10 +63,10 @@ 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 +89,43 @@ static int SpatialNoiseShader___init__(BPy_SpatialNoiseShader *self,
/*-----------------------BPy_SpatialNoiseShader type definition ------------------------------*/
PyTypeObject SpatialNoiseShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "SpatialNoiseShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)SpatialNoiseShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..10b09ad4755 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,43 @@ static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self,
/*-----------------------BPy_StrokeTextureStepShader type definition ----------------------------*/
PyTypeObject StrokeTextureStepShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "StrokeTextureStepShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)StrokeTextureStepShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..da4ca4b8be6 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,43 @@ static int ThicknessNoiseShader___init__(BPy_ThicknessNoiseShader *self,
/*-----------------------BPy_ThicknessNoiseShader type definition ------------------------------*/
PyTypeObject ThicknessNoiseShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ThicknessNoiseShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)ThicknessNoiseShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..b8c18e57826 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,43 @@ static int TipRemoverShader___init__(BPy_TipRemoverShader *self, PyObject *args,
/*-----------------------BPy_TipRemoverShader type definition ------------------------------*/
PyTypeObject TipRemoverShader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "TipRemoverShader", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&StrokeShader_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)TipRemoverShader___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..d2a7c084f26 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,43 @@ static PyObject *UnaryFunction0DDouble___call__(BPy_UnaryFunction0DDouble *self,
/*-----------------------BPy_UnaryFunction0DDouble type definition ------------------------------*/
PyTypeObject UnaryFunction0DDouble_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DDouble", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DDouble___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DDouble___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DDouble___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..1444269bcac 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,43 @@ static PyObject *UnaryFunction0DEdgeNature___call__(BPy_UnaryFunction0DEdgeNatur
/*-----------------------BPy_UnaryFunction0DEdgeNature type definition --------------------------*/
PyTypeObject UnaryFunction0DEdgeNature_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DEdgeNature", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DEdgeNature___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DEdgeNature___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DEdgeNature___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..4c843c0db61 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,43 @@ static PyObject *UnaryFunction0DFloat___call__(BPy_UnaryFunction0DFloat *self,
/*-----------------------BPy_UnaryFunction0DFloat type definition ------------------------------*/
PyTypeObject UnaryFunction0DFloat_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DFloat", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DFloat___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DFloat___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DFloat___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..8c0301c0872 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,43 @@ static PyObject *UnaryFunction0DId___call__(BPy_UnaryFunction0DId *self,
/*-----------------------BPy_UnaryFunction0DId type definition ------------------------------*/
PyTypeObject UnaryFunction0DId_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DId", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DId___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DId___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DId___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..3f67189fe65 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,43 @@ static PyObject *UnaryFunction0DMaterial___call__(BPy_UnaryFunction0DMaterial *s
/*-----------------------BPy_UnaryFunction0DMaterial type definition ----------------------------*/
PyTypeObject UnaryFunction0DMaterial_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DMaterial", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DMaterial___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DMaterial___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DMaterial___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..a1919a9c922 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,43 @@ static PyObject *UnaryFunction0DUnsigned___call__(BPy_UnaryFunction0DUnsigned *s
/*-----------------------BPy_UnaryFunction0DUnsigned type definition ----------------------------*/
PyTypeObject UnaryFunction0DUnsigned_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DUnsigned", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DUnsigned___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DUnsigned___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DUnsigned___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..59b0fe4b115 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,43 @@ static PyObject *UnaryFunction0DVec2f___call__(BPy_UnaryFunction0DVec2f *self,
/*-----------------------BPy_UnaryFunction0DVec2f type definition ------------------------------*/
PyTypeObject UnaryFunction0DVec2f_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DVec2f", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DVec2f___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DVec2f___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DVec2f___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..a5b16642e77 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,43 @@ static PyObject *UnaryFunction0DVec3f___call__(BPy_UnaryFunction0DVec3f *self,
/*-----------------------BPy_UnaryFunction0DVec3f type definition ------------------------------*/
PyTypeObject UnaryFunction0DVec3f_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DVec3f", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DVec3f___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DVec3f___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DVec3f___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..983a680baa7 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,43 @@ static PyObject *UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVect
/*-----------------------BPy_UnaryFunction0DVectorViewShape type definition ---------------------*/
PyTypeObject UnaryFunction0DVectorViewShape_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DVectorViewShape", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DVectorViewShape___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..6b2267bfe28 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,43 @@ static PyObject *UnaryFunction0DViewShape___call__(BPy_UnaryFunction0DViewShape
/*-----------------------BPy_UnaryFunction0DViewShape type definition ---------------------------*/
PyTypeObject UnaryFunction0DViewShape_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction0DViewShape", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction0DViewShape___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction0DViewShape___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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 */
&UnaryFunction0D_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)UnaryFunction0DViewShape___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_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
index 6d4406b17a7..20822313657 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DId_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)ShapeIdF0D___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_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
index a9050c4594e..0f59a3e2102 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DMaterial_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)MaterialF0D___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_Nature_EdgeNature/BPy_CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
index 1173b2434d6..1e93aff8b2e 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DEdgeNature_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)CurveNatureF0D___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_Vec2f/BPy_Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
index 673522a055e..a98e9208342 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DVec2f_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)Normal2DF0D___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_Vec2f/BPy_VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
index 5ec616c90c1..5dd0e37fbad 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,43 @@ static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D *self,
/*-----------------------BPy_VertexOrientation2DF0D type definition -----------------------------*/
PyTypeObject VertexOrientation2DF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "VertexOrientation2DF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DVec2f_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)VertexOrientation2DF0D___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_Vec3f/BPy_VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
index 6db4c9317e2..050962cac58 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,43 @@ static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D *self,
/*-----------------------BPy_VertexOrientation3DF0D type definition -----------------------------*/
PyTypeObject VertexOrientation3DF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "VertexOrientation3DF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DVec3f_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)VertexOrientation3DF0D___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_ViewShape/BPy_GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
index 827c089aa1a..8a1ffd9b2be 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DViewShape_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)GetOccludeeF0D___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_ViewShape/BPy_GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
index 31b36dbf855..e2ad4af681e 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DViewShape_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)GetShapeF0D___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_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp
index 5f1d123c8d3..5d47b02938f 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,43 @@ static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D *self,
/*-----------------------BPy_Curvature2DAngleF0D type definition ------------------------------*/
PyTypeObject Curvature2DAngleF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Curvature2DAngleF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)Curvature2DAngleF0D___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_DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp
index 736afca7fae..8e487fc5a62 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)DensityF0D___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_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp
index d3cd14a1aba..85383e6d850 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,43 @@ static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedXF0D type definition ------------------------------*/
PyTypeObject GetProjectedXF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedXF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetProjectedXF0D___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_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp
index 92d5a1e4216..fe3dc69e55b 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,43 @@ static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedYF0D type definition ------------------------------*/
PyTypeObject GetProjectedYF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedYF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetProjectedYF0D___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_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp
index cb2a5e3a102..244a6201f55 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,43 @@ static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D *self, PyObject *args,
/*-----------------------BPy_GetProjectedZF0D type definition ------------------------------*/
PyTypeObject GetProjectedZF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedZF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetProjectedZF0D___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_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp
index dd75001f3bd..2b0d4f261e3 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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..62ba718426c 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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..12bec10ea2d 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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..9a6f47c4d35 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,43 @@ static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D *self,
/*-----------------------BPy_LocalAverageDepthF0D type definition ------------------------------*/
PyTypeObject LocalAverageDepthF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "LocalAverageDepthF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)LocalAverageDepthF0D___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_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
index 0d1b55f0a00..ec11516c253 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,43 @@ static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *arg
/*-----------------------BPy_ZDiscontinuityF0D type definition ------------------------------*/
PyTypeObject ZDiscontinuityF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ZDiscontinuityF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)ZDiscontinuityF0D___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_float/BPy_GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
index a00d4204d69..0299b3071fc 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,43 @@ static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D *sel
/*-----------------------BPy_GetCurvilinearAbscissaF0D type definition --------------------------*/
PyTypeObject GetCurvilinearAbscissaF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetCurvilinearAbscissaF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DFloat_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)GetCurvilinearAbscissaF0D___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_float/BPy_GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
index b4310685969..94848a968a8 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;
@@ -63,43 +63,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DFloat_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)GetParameterF0D___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_float/BPy_GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
index ad744918e00..82abe368a2f 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,43 @@ static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D *sel
/*-----------------------BPy_GetViewMapGradientNormF0D type definition --------------------------*/
PyTypeObject GetViewMapGradientNormF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetViewMapGradientNormF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DFloat_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)GetViewMapGradientNormF0D___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_float/BPy_ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
index 685701152f4..65bb0e51aa5 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,43 @@ static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D
/*-----------------------BPy_ReadCompleteViewMapPixelF0D type definition ------------------------*/
PyTypeObject ReadCompleteViewMapPixelF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ReadCompleteViewMapPixelF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DFloat_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)ReadCompleteViewMapPixelF0D___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_float/BPy_ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
index b74ee3b33c6..82387fc36c6 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DFloat_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)ReadMapPixelF0D___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_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
index a878db99e06..11142173824 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,43 @@ static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0
/*-----------------------BPy_ReadSteerableViewMapPixelF0D type definition -----------------------*/
PyTypeObject ReadSteerableViewMapPixelF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ReadSteerableViewMapPixelF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DFloat_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)ReadSteerableViewMapPixelF0D___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_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
index 57605e42186..e0cc09fbb37 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,43 @@ static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D
/*-----------------------BPy_QuantitativeInvisibilityF0D type definition ------------------------*/
PyTypeObject QuantitativeInvisibilityF0D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "QuantitativeInvisibilityF0D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DUnsigned_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)QuantitativeInvisibilityF0D___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_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
index e56460601e5..78935789a51 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction0DVectorViewShape_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)GetOccludersF0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 b59e27dcea9..30761d47b9b 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;
}
@@ -172,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)) {
@@ -207,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);
}
@@ -257,50 +257,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryFunction1DDouble_getseters, /* tp_getset */
&UnaryFunction1D_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)UnaryFunction1DDouble___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 2f5a59f9c7a..ab7be985e54 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;
}
@@ -77,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)) {
@@ -114,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);
}
@@ -164,50 +164,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryFunction1DEdgeNature_getseters, /* tp_getset */
&UnaryFunction1D_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)UnaryFunction1DEdgeNature___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 e11d21b6c8e..2e4891a96a4 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;
}
@@ -68,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)) {
@@ -103,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);
}
@@ -153,50 +153,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryFunction1DFloat_getseters, /* tp_getset */
&UnaryFunction1D_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)UnaryFunction1DFloat___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 e04a5b9d7f4..5fcc07bc384 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;
}
@@ -77,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)) {
@@ -114,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);
}
@@ -164,50 +164,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryFunction1DUnsigned_getseters, /* tp_getset */
&UnaryFunction1D_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)UnaryFunction1DUnsigned___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 f8d75640811..f7ff6192d0b 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;
}
@@ -83,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)) {
@@ -118,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);
}
@@ -168,50 +168,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryFunction1DVec2f_getseters, /* tp_getset */
&UnaryFunction1D_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)UnaryFunction1DVec2f___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 9f71fb3840b..363106c77f1 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;
}
@@ -76,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)) {
@@ -111,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);
}
@@ -161,50 +161,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryFunction1DVec3f_getseters, /* tp_getset */
&UnaryFunction1D_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)UnaryFunction1DVec3f___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 cb4982f4532..01458449de3 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;
}
@@ -92,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)) {
@@ -129,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();
@@ -189,50 +189,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */
&UnaryFunction1D_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)UnaryFunction1DVectorViewShape___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 46564cdaeca..1e8232158c5 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;
}
@@ -91,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)) {
@@ -126,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;
}
@@ -176,50 +176,50 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_print */
+ nullptr, /* tp_getattr */
+ nullptr, /* tp_setattr */
+ nullptr, /* tp_reserved */
(reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
+ nullptr, /* tp_as_number */
+ nullptr, /* tp_as_sequence */
+ nullptr, /* tp_as_mapping */
+ nullptr, /* tp_hash */
(ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
+ 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 */
- 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_UnaryFunction1DVoid_getseters, /* tp_getset */
&UnaryFunction1D_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)UnaryFunction1DVoid___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_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
index 2504a09016c..20cf258ff3b 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DEdgeNature_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)CurveNatureF1D___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_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
index f1cdd6a0cb8..d980669f43e 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVec2f_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)Normal2DF1D___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_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
index 27d6c509348..23e075255cb 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,43 @@ static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args,
/*-----------------------BPy_Orientation2DF1D type definition ------------------------------*/
PyTypeObject Orientation2DF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Orientation2DF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVec2f_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)Orientation2DF1D___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_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
index 1a2d9c5e745..febf11fbf6e 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,43 @@ static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args,
/*-----------------------BPy_Orientation3DF1D type definition ------------------------------*/
PyTypeObject Orientation3DF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Orientation3DF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVec3f_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)Orientation3DF1D___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_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
index 4d0e1a66f56..a10ef30355e 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,43 @@ static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self,
/*-----------------------BPy_Curvature2DAngleF1D type definition ------------------------------*/
PyTypeObject Curvature2DAngleF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "Curvature2DAngleF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)Curvature2DAngleF1D___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_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
index b96406de066..6d3cb55339b 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)DensityF1D___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_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
index 9f16f53e833..909bf045403 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,43 @@ static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1
/*-----------------------BPy_GetCompleteViewMapDensityF1D type definition -----------------------*/
PyTypeObject GetCompleteViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetCompleteViewMapDensityF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetCompleteViewMapDensityF1D___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_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
index 8cea26338df..3052482161e 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,43 @@ static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDen
/*-----------------------BPy_GetDirectionalViewMapDensityF1D type definition --------------------*/
PyTypeObject GetDirectionalViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetDirectionalViewMapDensityF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetDirectionalViewMapDensityF1D___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_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
index 5f47fb03f8b..6079c38fa39 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,43 @@ static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedXF1D type definition ------------------------------*/
PyTypeObject GetProjectedXF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedXF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetProjectedXF1D___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_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
index b6e1c2d336e..b479003575d 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,43 @@ static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedYF1D type definition ------------------------------*/
PyTypeObject GetProjectedYF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedYF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetProjectedYF1D___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_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
index dfe7cd82710..5afe4a83213 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,43 @@ static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args,
/*-----------------------BPy_GetProjectedZF1D type definition ------------------------------*/
PyTypeObject GetProjectedZF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedZF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetProjectedZF1D___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_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
index a1ed9d15d5e..1f600925292 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,43 @@ static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensity
/*-----------------------BPy_GetSteerableViewMapDensityF1D type definition ----------------------*/
PyTypeObject GetSteerableViewMapDensityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetSteerableViewMapDensityF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetSteerableViewMapDensityF1D___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_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
index 268d140749d..33cec3325b9 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,43 @@ static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *sel
/*-----------------------BPy_GetViewMapGradientNormF1D type definition --------------------------*/
PyTypeObject GetViewMapGradientNormF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "GetViewMapGradientNormF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)GetViewMapGradientNormF1D___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_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
index 5a0b7d6aa55..e0cb2a7b534 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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..7970d1ca552 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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..5f4790af9f6 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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..04051e87270 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,43 @@ static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self,
/*-----------------------BPy_LocalAverageDepthF1D type definition ------------------------------*/
PyTypeObject LocalAverageDepthF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "LocalAverageDepthF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)LocalAverageDepthF1D___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_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
index cf2162c30ad..2a6e3020f3a 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,43 @@ static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *arg
/*-----------------------BPy_ZDiscontinuityF1D type definition ------------------------------*/
PyTypeObject ZDiscontinuityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ZDiscontinuityF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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)ZDiscontinuityF1D___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_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
index f843ff52d06..5d6c5cfc505 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,43 @@ static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D
/*-----------------------BPy_QuantitativeInvisibilityF1D type definition ------------------------*/
PyTypeObject QuantitativeInvisibilityF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "QuantitativeInvisibilityF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DUnsigned_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)QuantitativeInvisibilityF1D___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_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
index f56d89c469a..998caadb2f1 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVectorViewShape_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)GetOccludeeF1D___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_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
index 3ff4d36bc19..678d78aa4e3 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVectorViewShape_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)GetOccludersF1D___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_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
index 08122b76385..005e40175b8 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVectorViewShape_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)GetShapeF1D___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_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp
index 4be8f239fd6..16aa239d645 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,43 @@ static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self,
/*-----------------------BPy_ChainingTimeStampF1D type definition ------------------------------*/
PyTypeObject ChainingTimeStampF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ChainingTimeStampF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVoid_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)ChainingTimeStampF1D___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_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp
index bca4ebb4236..aa3964f3711 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,43 @@ static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStamp
/*-----------------------BPy_IncrementChainingTimeStampF1D type definition ----------------------*/
PyTypeObject IncrementChainingTimeStampF1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "IncrementChainingTimeStampF1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVoid_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)IncrementChainingTimeStampF1D___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_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp
index e2d0c7d1308..2d193a149db 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryFunction1DVoid_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)TimeStampF1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..1fdcf2c4f48 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate0D_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)FalseUP0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..58e89e3f906 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate0D_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)TrueUP0D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..95f76c6490c 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)ContourUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..e7e7200fa48 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,43 @@ static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D *self,
/*-----------------------BPy_DensityLowerThanUP1D type definition ------------------------------*/
PyTypeObject DensityLowerThanUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "DensityLowerThanUP1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)DensityLowerThanUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..d0625f13ead 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,43 @@ static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1
/*-----------------------BPy_EqualToChainingTimeStampUP1D type definition -----------------------*/
PyTypeObject EqualToChainingTimeStampUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "EqualToChainingTimeStampUP1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)EqualToChainingTimeStampUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..04df8c5ce26 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,43 @@ static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D *self,
/*-----------------------BPy_EqualToTimeStampUP1D type definition ------------------------------*/
PyTypeObject EqualToTimeStampUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "EqualToTimeStampUP1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)EqualToTimeStampUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..fa6075a8823 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,43 @@ static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D *self,
/*-----------------------BPy_ExternalContourUP1D type definition ------------------------------*/
PyTypeObject ExternalContourUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "ExternalContourUP1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)ExternalContourUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..7b3bf2a26b1 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)FalseUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..60e82b65362 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,43 @@ static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1
/*-----------------------BPy_QuantitativeInvisibilityUP1D type definition -----------------------*/
PyTypeObject QuantitativeInvisibilityUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "QuantitativeInvisibilityUP1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)QuantitativeInvisibilityUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..98e8fdb3a53 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)ShapeUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..bb46dfb0f35 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,43 @@ 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 */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)TrueUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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..52ee58addfc 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,43 @@ static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self,
/*-----------------------BPy_TrueUP1D type definition ------------------------------*/
PyTypeObject WithinImageBoundaryUP1D_Type = {
- PyVarObject_HEAD_INIT(NULL, 0) "WithinImageBoundaryUP1D", /* tp_name */
+ PyVarObject_HEAD_INIT(nullptr, 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 */
+ nullptr, /* tp_dealloc */
+ nullptr, /* tp_print */
+ 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 */
- 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 */
&UnaryPredicate1D_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)WithinImageBoundaryUP1D___init__, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
+ 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 89c4bedd676..cc29bc77595 100644
--- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
+++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
@@ -25,25 +25,25 @@ namespace Freestyle {
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;
}
@@ -79,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) {
@@ -87,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));
@@ -112,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));
@@ -132,7 +132,7 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
_Normals = iNormals;
_MSize = iMSize;
- _FrsMaterials = 0;
+ _FrsMaterials = nullptr;
if (iMaterials) {
_FrsMaterials = iMaterials;
}
@@ -152,7 +152,7 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
_NIndices = iNIndices;
_MISize = iMISize;
- _MIndices = 0;
+ _MIndices = nullptr;
if (iMISize) {
_MIndices = iMIndices;
}
@@ -180,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));
@@ -214,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));
@@ -227,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/stroke/AdvancedFunctions1D.cpp b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
index ef151365fa0..c01d95211d8 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
@@ -43,7 +43,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 ???
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/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/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index 7129a35ffdb..95a6b2b3e57 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 307122833e4..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)
@@ -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();
@@ -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 {
@@ -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/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp
index 2e50465d5c0..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;
}
@@ -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;
@@ -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;
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/system/StringUtils.cpp b/source/blender/freestyle/intern/system/StringUtils.cpp
index 90210f33a25..fb156217306 100644
--- a/source/blender/freestyle/intern/system/StringUtils.cpp
+++ b/source/blender/freestyle/intern/system/StringUtils.cpp
@@ -46,7 +46,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()) {
diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.cpp b/source/blender/freestyle/intern/view_map/BoxGrid.cpp
index aea54afc0f5..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)) {
diff --git a/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp b/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
index b53771ad2c2..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,7 +187,7 @@ 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.
@@ -198,7 +198,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe
// 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]) {
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..5a9e1207784 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions0D.cpp
@@ -47,7 +47,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 +58,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 +77,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 +95,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 +124,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 +280,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 +294,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 +308,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 +337,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 +356,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;
diff --git a/source/blender/freestyle/intern/view_map/Functions1D.cpp b/source/blender/freestyle/intern/view_map/Functions1D.cpp
index a0a320a6e6d..6194e7b4eed 100644
--- a/source/blender/freestyle/intern/view_map/Functions1D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions1D.cpp
@@ -219,8 +219,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);
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/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 1399ac396b0..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)) {
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
index a5b3ce454de..d8a1e597a1d 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
@@ -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 8866ec2e267..f2e97aad382 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) {
@@ -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) {
@@ -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,7 @@ 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 +543,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 +562,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 +588,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 +600,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 +631,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 +649,7 @@ OWXEdge ViewEdgeXBuilder::FindPreviousWEdge(const OWXEdge &iEdge)
}
if (((WXVertex *)v)->isFeature()) {
- return 0;
+ return nullptr;
}
int faceMarks = retrieveFaceMarks(iEdge.e);
@@ -676,7 +676,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 +750,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 b4faee7946b..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;
}
}
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
index 91f3aeac184..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;
}
@@ -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;
}
@@ -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;
}
@@ -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);
@@ -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
@@ -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;
}
@@ -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..d71bc5758c9 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -228,8 +228,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 +1239,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);
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/WXEdge.cpp b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
index 57eca876913..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:
@@ -120,7 +120,7 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
// that means that we have exactly one of the 2 extremities of our silhouette edge is a vertex
// of the mesh
if (ELEM(_nPosDotP, 2, 0)) {
- _pSmoothEdge = NULL;
+ _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 0fefb15f887..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();
}
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc
index 511ddd210af..3bf1233c000 100644
--- a/source/blender/gpu/intern/gpu_batch.cc
+++ b/source/blender/gpu/intern/gpu_batch.cc
@@ -73,21 +73,21 @@ void GPU_batch_init_ex(GPUBatch *batch,
GPUIndexBuf *elem,
eGPUBatchFlag owns_flag)
{
- BLI_assert(verts != NULL);
+ BLI_assert(verts != nullptr);
/* Do not pass any other flag */
BLI_assert((owns_flag & ~(GPU_BATCH_OWNS_VBO | GPU_BATCH_OWNS_INDEX)) == 0);
batch->verts[0] = verts;
for (int v = 1; v < GPU_BATCH_VBO_MAX_LEN; v++) {
- batch->verts[v] = NULL;
+ batch->verts[v] = nullptr;
}
for (int v = 0; v < GPU_BATCH_INST_VBO_MAX_LEN; v++) {
- batch->inst[v] = NULL;
+ batch->inst[v] = nullptr;
}
batch->elem = elem;
batch->prim_type = prim_type;
batch->flag = owns_flag | GPU_BATCH_INIT | GPU_BATCH_DIRTY;
- batch->shader = NULL;
+ batch->shader = nullptr;
}
/* This will share the VBOs with the new batch. */
@@ -171,7 +171,7 @@ int GPU_batch_instbuf_add_ex(GPUBatch *batch, GPUVertBuf *insts, bool own_vbo)
batch->flag |= GPU_BATCH_DIRTY;
for (uint v = 0; v < GPU_BATCH_INST_VBO_MAX_LEN; v++) {
- if (batch->inst[v] == NULL) {
+ if (batch->inst[v] == nullptr) {
/* for now all VertexBuffers must have same vertex_len */
if (batch->inst[0]) {
/* Allow for different size of vertex buffer (will choose the smallest number of verts). */
@@ -195,9 +195,9 @@ int GPU_batch_vertbuf_add_ex(GPUBatch *batch, GPUVertBuf *verts, bool own_vbo)
batch->flag |= GPU_BATCH_DIRTY;
for (uint v = 0; v < GPU_BATCH_VBO_MAX_LEN; v++) {
- if (batch->verts[v] == NULL) {
+ if (batch->verts[v] == nullptr) {
/* for now all VertexBuffers must have same vertex_len */
- if (batch->verts[0] != NULL) {
+ if (batch->verts[0] != nullptr) {
/* This is an issue for the HACK inside DRW_vbo_request(). */
// BLI_assert(verts->vertex_len == batch->verts[0]->vertex_len);
}
@@ -246,7 +246,7 @@ void GPU_batch_draw_range(GPUBatch *batch, int v_first, int v_count)
/* Draw multiple instance of a batch without having any instance attributes. */
void GPU_batch_draw_instanced(GPUBatch *batch, int i_count)
{
- BLI_assert(batch->inst[0] == NULL);
+ BLI_assert(batch->inst[0] == nullptr);
GPU_shader_bind(batch->shader);
GPU_batch_draw_advanced(batch, 0, 0, 0, i_count);
@@ -255,7 +255,7 @@ void GPU_batch_draw_instanced(GPUBatch *batch, int i_count)
void GPU_batch_draw_advanced(
GPUBatch *gpu_batch, int v_first, int v_count, int i_first, int i_count)
{
- BLI_assert(Context::get()->shader != NULL);
+ BLI_assert(Context::get()->shader != nullptr);
Batch *batch = static_cast<Batch *>(gpu_batch);
if (v_count == 0) {
@@ -269,7 +269,7 @@ void GPU_batch_draw_advanced(
if (i_count == 0) {
i_count = (batch->inst[0]) ? batch->inst_(0)->vertex_len : 1;
/* Meh. This is to be able to use different numbers of verts in instance vbos. */
- if (batch->inst[1] != NULL) {
+ if (batch->inst[1] != nullptr) {
i_count = min_ii(i_count, batch->inst_(1)->vertex_len);
}
}
diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc
index 3ebfd80241d..a9d32dcf297 100644
--- a/source/blender/gpu/intern/gpu_context.cc
+++ b/source/blender/gpu/intern/gpu_context.cc
@@ -54,7 +54,7 @@
using namespace blender::gpu;
-static thread_local Context *active_ctx = NULL;
+static thread_local Context *active_ctx = nullptr;
/* -------------------------------------------------------------------- */
/** \name gpu::Context methods
@@ -98,7 +98,7 @@ Context *Context::get()
GPUContext *GPU_context_create(void *ghost_window)
{
- if (GPUBackend::get() == NULL) {
+ if (GPUBackend::get() == nullptr) {
/* TODO move where it make sense. */
GPU_backend_init(GPU_BACKEND_OPENGL);
}
@@ -114,7 +114,7 @@ void GPU_context_discard(GPUContext *ctx_)
{
Context *ctx = unwrap(ctx_);
delete ctx;
- active_ctx = NULL;
+ active_ctx = nullptr;
}
/* ctx can be NULL */
@@ -166,7 +166,7 @@ static GPUBackend *g_backend;
void GPU_backend_init(eGPUBackendType backend_type)
{
- BLI_assert(g_backend == NULL);
+ BLI_assert(g_backend == nullptr);
switch (backend_type) {
#if WITH_OPENGL_BACKEND
@@ -185,7 +185,7 @@ void GPU_backend_exit(void)
/* TODO assert no resource left. Currently UI textures are still not freed in their context
* correctly. */
delete g_backend;
- g_backend = NULL;
+ g_backend = nullptr;
}
GPUBackend *GPUBackend::get()
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc
index a16856e0dec..dca1b169307 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.cc
+++ b/source/blender/gpu/intern/gpu_framebuffer.cc
@@ -58,7 +58,7 @@ FrameBuffer::FrameBuffer(const char *name)
dirty_state_ = true;
for (int i = 0; i < ARRAY_SIZE(attachments_); i++) {
- attachments_[i].tex = NULL;
+ attachments_[i].tex = nullptr;
attachments_[i].mip = -1;
attachments_[i].layer = -1;
}
@@ -67,7 +67,7 @@ FrameBuffer::FrameBuffer(const char *name)
FrameBuffer::~FrameBuffer()
{
for (int i = 0; i < ARRAY_SIZE(attachments_); i++) {
- if (attachments_[i].tex != NULL) {
+ if (attachments_[i].tex != nullptr) {
reinterpret_cast<Texture *>(attachments_[i].tex)->detach_from(this);
}
}
@@ -150,7 +150,7 @@ void FrameBuffer::recursive_downsample(int max_lvl,
/* Replace attached mip-level for each attachment. */
for (int att = 0; att < ARRAY_SIZE(attachments_); att++) {
Texture *tex = reinterpret_cast<Texture *>(attachments_[att].tex);
- if (tex != NULL) {
+ if (tex != nullptr) {
/* Some Intel HDXXX have issue with rendering to a mipmap that is below
* the texture GL_TEXTURE_MAX_LEVEL. So even if it not correct, in this case
* we allow GL_TEXTURE_MAX_LEVEL to be one level lower. In practice it does work! */
@@ -169,7 +169,7 @@ void FrameBuffer::recursive_downsample(int max_lvl,
}
for (int att = 0; att < ARRAY_SIZE(attachments_); att++) {
- if (attachments_[att].tex != NULL) {
+ if (attachments_[att].tex != nullptr) {
/* Reset mipmap level range. */
reinterpret_cast<Texture *>(attachments_[att].tex)->mip_range_set(0, max_lvl);
/* Reset base level. NOTE: might not be the one bound at the start of this function. */
@@ -242,14 +242,14 @@ void GPU_framebuffer_restore(void)
GPUFrameBuffer *GPU_framebuffer_active_get(void)
{
Context *ctx = Context::get();
- return wrap(ctx ? ctx->active_fb : NULL);
+ return wrap(ctx ? ctx->active_fb : nullptr);
}
/* Returns the default frame-buffer. Will always exists even if it's just a dummy. */
GPUFrameBuffer *GPU_framebuffer_back_get(void)
{
Context *ctx = Context::get();
- return wrap(ctx ? ctx->back_left : NULL);
+ return wrap(ctx ? ctx->back_left : nullptr);
}
bool GPU_framebuffer_bound(GPUFrameBuffer *gpu_fb)
@@ -314,7 +314,7 @@ void GPU_framebuffer_config_array(GPUFrameBuffer *gpu_fb,
if (depth_attachment.mip == -1) {
/* GPU_ATTACHMENT_LEAVE */
}
- else if (depth_attachment.tex == NULL) {
+ else if (depth_attachment.tex == nullptr) {
/* GPU_ATTACHMENT_NONE: Need to clear both targets. */
fb->attachment_set(GPU_FB_DEPTH_STENCIL_ATTACHMENT, depth_attachment);
fb->attachment_set(GPU_FB_DEPTH_ATTACHMENT, depth_attachment);
@@ -487,7 +487,7 @@ void GPU_framebuffer_recursive_downsample(GPUFrameBuffer *gpu_fb,
static struct {
GPUFrameBuffer *framebuffers[FRAMEBUFFER_STACK_DEPTH];
uint top;
-} FrameBufferStack = {{0}};
+} FrameBufferStack = {{nullptr}};
static void gpuPushFrameBuffer(GPUFrameBuffer *fb)
{
@@ -526,7 +526,7 @@ static GPUFrameBuffer *gpu_offscreen_fb_get(GPUOffScreen *ofs)
BLI_assert(ctx);
for (int i = 0; i < MAX_CTX_FB_LEN; i++) {
- if (ofs->framebuffers[i].fb == NULL) {
+ if (ofs->framebuffers[i].fb == nullptr) {
ofs->framebuffers[i].ctx = ctx;
GPU_framebuffer_ensure_config(&ofs->framebuffers[i].fb,
{
@@ -552,7 +552,7 @@ static GPUFrameBuffer *gpu_offscreen_fb_get(GPUOffScreen *ofs)
for (int i = 0; i < MAX_CTX_FB_LEN; i++) {
GPU_framebuffer_free(ofs->framebuffers[i].fb);
- ofs->framebuffers[i].fb = NULL;
+ ofs->framebuffers[i].fb = nullptr;
}
return gpu_offscreen_fb_get(ofs);
@@ -569,16 +569,16 @@ GPUOffScreen *GPU_offscreen_create(
width = max_ii(1, width);
ofs->color = GPU_texture_create_2d(
- "ofs_color", width, height, 1, (high_bitdepth) ? GPU_RGBA16F : GPU_RGBA8, NULL);
+ "ofs_color", width, height, 1, (high_bitdepth) ? GPU_RGBA16F : GPU_RGBA8, nullptr);
if (depth) {
- ofs->depth = GPU_texture_create_2d("ofs_depth", width, height, 1, GPU_DEPTH24_STENCIL8, NULL);
+ ofs->depth = GPU_texture_create_2d("ofs_depth", width, height, 1, GPU_DEPTH24_STENCIL8, nullptr);
}
if ((depth && !ofs->depth) || !ofs->color) {
BLI_snprintf(err_out, 256, "GPUTexture: Texture allocation failed.");
GPU_offscreen_free(ofs);
- return NULL;
+ return nullptr;
}
GPUFrameBuffer *fb = gpu_offscreen_fb_get(ofs);
@@ -586,7 +586,7 @@ GPUOffScreen *GPU_offscreen_create(
/* check validity at the very end! */
if (!GPU_framebuffer_check_valid(fb, err_out)) {
GPU_offscreen_free(ofs);
- return NULL;
+ return nullptr;
}
GPU_framebuffer_restore();
return ofs;
@@ -620,7 +620,7 @@ void GPU_offscreen_bind(GPUOffScreen *ofs, bool save)
void GPU_offscreen_unbind(GPUOffScreen *UNUSED(ofs), bool restore)
{
- GPUFrameBuffer *fb = NULL;
+ GPUFrameBuffer *fb = nullptr;
if (restore) {
fb = gpuPopFrameBuffer();
}
diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc
index 9437f18cb14..110774640f1 100644
--- a/source/blender/gpu/intern/gpu_immediate.cc
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -39,7 +39,7 @@
using namespace blender::gpu;
-static thread_local Immediate *imm = NULL;
+static thread_local Immediate *imm = nullptr;
void immActivate()
{
@@ -48,7 +48,7 @@ void immActivate()
void immDeactivate()
{
- imm = NULL;
+ imm = nullptr;
}
GPUVertFormat *immVertexFormat()
@@ -59,7 +59,7 @@ GPUVertFormat *immVertexFormat()
void immBindShader(GPUShader *shader)
{
- BLI_assert(imm->shader == NULL);
+ BLI_assert(imm->shader == nullptr);
imm->shader = shader;
imm->builtin_shader_bound = GPU_SHADER_TEXT; /* Default value. */
@@ -83,10 +83,10 @@ void immBindBuiltinProgram(eGPUBuiltinShader shader_id)
void immUnbindProgram()
{
- BLI_assert(imm->shader != NULL);
+ BLI_assert(imm->shader != nullptr);
GPU_shader_unbind();
- imm->shader = NULL;
+ imm->shader = nullptr;
}
/* XXX do not use it. Special hack to use OCIO with batch API. */
@@ -193,7 +193,7 @@ static void wide_line_workaround_end()
immUnbindProgram();
immBindShader(imm->prev_shader);
- imm->prev_shader = NULL;
+ imm->prev_shader = nullptr;
}
}
@@ -236,7 +236,7 @@ GPUBatch *immBeginBatch(GPUPrimType prim_type, uint vertex_len)
imm->vertex_data = (uchar *)GPU_vertbuf_get_data(verts);
- imm->batch = GPU_batch_create_ex(prim_type, verts, NULL, GPU_BATCH_OWNS_VBO);
+ imm->batch = GPU_batch_create_ex(prim_type, verts, nullptr, GPU_BATCH_OWNS_VBO);
imm->batch->flag |= GPU_BATCH_BUILDING;
return imm->batch;
@@ -270,7 +270,7 @@ void immEnd()
}
GPU_batch_set_shader(imm->batch, imm->shader);
imm->batch->flag &= ~GPU_BATCH_BUILDING;
- imm->batch = NULL; /* don't free, batch belongs to caller */
+ imm->batch = nullptr; /* don't free, batch belongs to caller */
}
else {
imm->end();
@@ -279,7 +279,7 @@ void immEnd()
/* Prepare for next immBegin. */
imm->prim_type = GPU_PRIM_NONE;
imm->strict_vertex_len = true;
- imm->vertex_data = NULL;
+ imm->vertex_data = nullptr;
wide_line_workaround_end();
}
diff --git a/source/blender/gpu/intern/gpu_index_buffer.cc b/source/blender/gpu/intern/gpu_index_buffer.cc
index 36f18f2da49..65932d2dbf4 100644
--- a/source/blender/gpu/intern/gpu_index_buffer.cc
+++ b/source/blender/gpu/intern/gpu_index_buffer.cc
@@ -69,7 +69,7 @@ void GPU_indexbuf_init(GPUIndexBufBuilder *builder,
void GPU_indexbuf_add_generic_vert(GPUIndexBufBuilder *builder, uint v)
{
#if TRUST_NO_ONE
- assert(builder->data != NULL);
+ assert(builder->data != nullptr);
assert(builder->index_len < builder->max_index_len);
assert(v <= builder->max_allowed_index);
#endif
@@ -79,7 +79,7 @@ void GPU_indexbuf_add_generic_vert(GPUIndexBufBuilder *builder, uint v)
void GPU_indexbuf_add_primitive_restart(GPUIndexBufBuilder *builder)
{
#if TRUST_NO_ONE
- assert(builder->data != NULL);
+ assert(builder->data != nullptr);
assert(builder->index_len < builder->max_index_len);
#endif
builder->data[builder->index_len++] = RESTART_INDEX;
@@ -336,7 +336,7 @@ GPUIndexBuf *GPU_indexbuf_create_subrange(GPUIndexBuf *elem_src, uint start, uin
void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *builder, GPUIndexBuf *elem)
{
- BLI_assert(builder->data != NULL);
+ BLI_assert(builder->data != nullptr);
/* Transfer data ownership to GPUIndexBuf.
* It will be uploaded upon first use. */
unwrap(elem)->init(builder->index_len, builder->data);
diff --git a/source/blender/gpu/intern/gpu_matrix.cc b/source/blender/gpu/intern/gpu_matrix.cc
index 0274966d4b9..5fcf5994d1d 100644
--- a/source/blender/gpu/intern/gpu_matrix.cc
+++ b/source/blender/gpu/intern/gpu_matrix.cc
@@ -606,7 +606,7 @@ const float (*GPU_matrix_projection_get(float m[4][4]))[4]
const float (*GPU_matrix_model_view_projection_get(float m[4][4]))[4]
{
- if (m == NULL) {
+ if (m == nullptr) {
static Mat4 temp;
m = temp;
}
@@ -617,12 +617,12 @@ const float (*GPU_matrix_model_view_projection_get(float m[4][4]))[4]
const float (*GPU_matrix_normal_get(float m[3][3]))[3]
{
- if (m == NULL) {
+ if (m == nullptr) {
static Mat3 temp3;
m = temp3;
}
- copy_m3_m4(m, (const float(*)[4])GPU_matrix_model_view_get(NULL));
+ copy_m3_m4(m, (const float(*)[4])GPU_matrix_model_view_get(nullptr));
invert_m3(m);
transpose_m3(m);
@@ -632,7 +632,7 @@ const float (*GPU_matrix_normal_get(float m[3][3]))[3]
const float (*GPU_matrix_normal_inverse_get(float m[3][3]))[3]
{
- if (m == NULL) {
+ if (m == nullptr) {
static Mat3 temp3;
m = temp3;
}
@@ -658,17 +658,17 @@ void GPU_matrix_bind(GPUShader *shader)
int32_t P_inv = GPU_shader_get_builtin_uniform(shader, GPU_UNIFORM_PROJECTION_INV);
if (MV != -1) {
- GPU_shader_uniform_vector(shader, MV, 16, 1, (const float *)GPU_matrix_model_view_get(NULL));
+ GPU_shader_uniform_vector(shader, MV, 16, 1, (const float *)GPU_matrix_model_view_get(nullptr));
}
if (P != -1) {
- GPU_shader_uniform_vector(shader, P, 16, 1, (const float *)GPU_matrix_projection_get(NULL));
+ GPU_shader_uniform_vector(shader, P, 16, 1, (const float *)GPU_matrix_projection_get(nullptr));
}
if (MVP != -1) {
GPU_shader_uniform_vector(
- shader, MVP, 16, 1, (const float *)GPU_matrix_model_view_projection_get(NULL));
+ shader, MVP, 16, 1, (const float *)GPU_matrix_model_view_projection_get(nullptr));
}
if (N != -1) {
- GPU_shader_uniform_vector(shader, N, 9, 1, (const float *)GPU_matrix_normal_get(NULL));
+ GPU_shader_uniform_vector(shader, N, 9, 1, (const float *)GPU_matrix_normal_get(nullptr));
}
if (MV_inv != -1) {
Mat4 m;
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index c13321ed205..fef07371a56 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -291,7 +291,7 @@ GPUShader *GPU_shader_create_ex(const char *vertcode,
const char *shname)
{
/* At least a vertex shader and a fragment shader are required. */
- BLI_assert((fragcode != NULL) && (vertcode != NULL));
+ BLI_assert((fragcode != nullptr) && (vertcode != nullptr));
Shader *shader = GPUBackend::get()->shader_alloc(shname);
@@ -342,14 +342,14 @@ GPUShader *GPU_shader_create_ex(const char *vertcode,
shader->geometry_shader_from_glsl(sources);
}
- if (tf_names != NULL && tf_count > 0) {
+ if (tf_names != nullptr && tf_count > 0) {
BLI_assert(tf_type != GPU_SHADER_TFB_NONE);
shader->transform_feedback_names_set(Span<const char *>(tf_names, tf_count), tf_type);
}
if (!shader->finalize()) {
delete shader;
- return NULL;
+ return nullptr;
};
return wrap(shader);
@@ -374,7 +374,7 @@ GPUShader *GPU_shader_create(const char *vertcode,
const char *shname)
{
return GPU_shader_create_ex(
- vertcode, fragcode, geomcode, libcode, defines, GPU_SHADER_TFB_NONE, NULL, 0, shname);
+ vertcode, fragcode, geomcode, libcode, defines, GPU_SHADER_TFB_NONE, nullptr, 0, shname);
}
GPUShader *GPU_shader_create_from_python(const char *vertcode,
@@ -383,9 +383,9 @@ GPUShader *GPU_shader_create_from_python(const char *vertcode,
const char *libcode,
const char *defines)
{
- char *libcodecat = NULL;
+ char *libcodecat = nullptr;
- if (libcode == NULL) {
+ if (libcode == nullptr) {
libcode = datatoc_gpu_shader_colorspace_lib_glsl;
}
else {
@@ -393,7 +393,7 @@ GPUShader *GPU_shader_create_from_python(const char *vertcode,
}
GPUShader *sh = GPU_shader_create_ex(
- vertcode, fragcode, geomcode, libcode, defines, GPU_SHADER_TFB_NONE, NULL, 0, "pyGPUShader");
+ vertcode, fragcode, geomcode, libcode, defines, GPU_SHADER_TFB_NONE, nullptr, 0, "pyGPUShader");
MEM_SAFE_FREE(libcodecat);
return sh;
@@ -402,9 +402,9 @@ GPUShader *GPU_shader_create_from_python(const char *vertcode,
static const char *string_join_array_maybe_alloc(const char **str_arr, bool *r_is_alloc)
{
bool is_alloc = false;
- if (str_arr == NULL) {
+ if (str_arr == nullptr) {
*r_is_alloc = false;
- return NULL;
+ return nullptr;
}
/* Skip empty strings (avoid alloc if we can). */
while (str_arr[0] && str_arr[0][0] == '\0') {
@@ -450,7 +450,7 @@ struct GPUShader *GPU_shader_create_from_arrays_impl(
struct {
const char *str;
bool is_alloc;
- } str_dst[4] = {{0}};
+ } str_dst[4] = {{nullptr}};
const char **str_src[4] = {params->vert, params->frag, params->geom, params->defs};
for (int i = 0; i < ARRAY_SIZE(str_src); i++) {
@@ -461,7 +461,7 @@ struct GPUShader *GPU_shader_create_from_arrays_impl(
BLI_snprintf(name, sizeof(name), "%s_%d", func, line);
GPUShader *sh = GPU_shader_create(
- str_dst[0].str, str_dst[1].str, str_dst[2].str, NULL, str_dst[3].str, name);
+ str_dst[0].str, str_dst[1].str, str_dst[2].str, nullptr, str_dst[3].str, name);
for (int i = 0; i < ARRAY_SIZE(str_dst); i++) {
if (str_dst[i].is_alloc) {
@@ -502,7 +502,7 @@ void GPU_shader_unbind(void)
if (ctx->shader) {
ctx->shader->unbind();
}
- ctx->shader = NULL;
+ ctx->shader = nullptr;
#endif
}
diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc
index 99d286c3abd..d134d718cbe 100644
--- a/source/blender/gpu/intern/gpu_texture.cc
+++ b/source/blender/gpu/intern/gpu_texture.cc
@@ -49,14 +49,14 @@ Texture::Texture(const char *name)
}
for (int i = 0; i < ARRAY_SIZE(fb_); i++) {
- fb_[i] = NULL;
+ fb_[i] = nullptr;
}
}
Texture::~Texture()
{
for (int i = 0; i < ARRAY_SIZE(fb_); i++) {
- if (fb_[i] != NULL) {
+ if (fb_[i] != nullptr) {
fb_[i]->attachment_remove(fb_attachment_[i]);
}
}
@@ -142,7 +142,7 @@ bool Texture::init_buffer(GPUVertBuf *vbo, eGPUTextureFormat format)
void Texture::attach_to(FrameBuffer *fb, GPUAttachmentType type)
{
for (int i = 0; i < ARRAY_SIZE(fb_); i++) {
- if (fb_[i] == NULL) {
+ if (fb_[i] == nullptr) {
fb_attachment_[i] = type;
fb_[i] = fb;
return;
@@ -156,7 +156,7 @@ void Texture::detach_from(FrameBuffer *fb)
for (int i = 0; i < ARRAY_SIZE(fb_); i++) {
if (fb_[i] == fb) {
fb_[i]->attachment_remove(fb_attachment_[i]);
- fb_[i] = NULL;
+ fb_[i] = nullptr;
return;
}
}
@@ -226,7 +226,7 @@ static inline GPUTexture *gpu_texture_create(const char *name,
if (!success) {
delete tex;
- return NULL;
+ return nullptr;
}
if (pixels) {
tex->update(data_format, pixels);
@@ -295,7 +295,7 @@ GPUTexture *GPU_texture_create_compressed_2d(
if (!success) {
delete tex;
- return NULL;
+ return nullptr;
}
if (data) {
size_t ofs = 0;
@@ -320,7 +320,7 @@ GPUTexture *GPU_texture_create_from_vertbuf(const char *name, GPUVertBuf *vert)
bool success = tex->init_buffer(vert, tex_format);
if (!success) {
delete tex;
- return NULL;
+ return nullptr;
}
return reinterpret_cast<GPUTexture *>(tex);
}
@@ -383,7 +383,7 @@ void *GPU_texture_read(GPUTexture *tex_, eGPUDataFormat data_format, int miplvl)
*/
void GPU_texture_clear(GPUTexture *tex, eGPUDataFormat data_format, const void *data)
{
- BLI_assert(data != NULL); /* Do not accept NULL as parameter. */
+ BLI_assert(data != nullptr); /* Do not accept NULL as parameter. */
reinterpret_cast<Texture *>(tex)->clear(data_format, data);
}
diff --git a/source/blender/gpu/intern/gpu_uniform_buffer.cc b/source/blender/gpu/intern/gpu_uniform_buffer.cc
index 2dea98f03ca..89c70c47e4a 100644
--- a/source/blender/gpu/intern/gpu_uniform_buffer.cc
+++ b/source/blender/gpu/intern/gpu_uniform_buffer.cc
@@ -73,7 +73,7 @@ static eGPUType get_padded_gpu_type(LinkData *link)
GPUInput *input = (GPUInput *)link->data;
eGPUType gputype = input->type;
/* Unless the vec3 is followed by a float we need to treat it as a vec4. */
- if (gputype == GPU_VEC3 && (link->next != NULL) &&
+ if (gputype == GPU_VEC3 && (link->next != nullptr) &&
(((GPUInput *)link->next->data)->type != GPU_FLOAT)) {
gputype = GPU_VEC4;
}
@@ -106,7 +106,7 @@ static void buffer_from_list_inputs_sort(ListBase *inputs)
BLI_listbase_sort(inputs, inputs_cmp);
/* Creates a lookup table for the different types; */
- LinkData *inputs_lookup[MAX_UBO_GPU_TYPE + 1] = {NULL};
+ LinkData *inputs_lookup[MAX_UBO_GPU_TYPE + 1] = {nullptr};
eGPUType cur_type = static_cast<eGPUType>(MAX_UBO_GPU_TYPE + 1);
LISTBASE_FOREACH (LinkData *, link, inputs) {
@@ -131,21 +131,21 @@ static void buffer_from_list_inputs_sort(ListBase *inputs)
}
/* If there is no GPU_VEC3 there is no need for alignment. */
- if (inputs_lookup[GPU_VEC3] == NULL) {
+ if (inputs_lookup[GPU_VEC3] == nullptr) {
return;
}
LinkData *link = inputs_lookup[GPU_VEC3];
- while (link != NULL && ((GPUInput *)link->data)->type == GPU_VEC3) {
+ while (link != nullptr && ((GPUInput *)link->data)->type == GPU_VEC3) {
LinkData *link_next = link->next;
/* If GPU_VEC3 is followed by nothing or a GPU_FLOAT, no need for alignment. */
- if ((link_next == NULL) || ((GPUInput *)link_next->data)->type == GPU_FLOAT) {
+ if ((link_next == nullptr) || ((GPUInput *)link_next->data)->type == GPU_FLOAT) {
break;
}
/* If there is a float, move it next to current vec3. */
- if (inputs_lookup[GPU_FLOAT] != NULL) {
+ if (inputs_lookup[GPU_FLOAT] != nullptr) {
LinkData *float_input = inputs_lookup[GPU_FLOAT];
inputs_lookup[GPU_FLOAT] = float_input->next;
@@ -195,7 +195,7 @@ GPUUniformBuf *GPU_uniformbuf_create_ex(size_t size, const void *data, const cha
{
UniformBuf *ubo = GPUBackend::get()->uniformbuf_alloc(size, name);
/* Direct init. */
- if (data != NULL) {
+ if (data != nullptr) {
ubo->update(data);
}
return wrap(ubo);
@@ -211,7 +211,7 @@ GPUUniformBuf *GPU_uniformbuf_create_from_list(ListBase *inputs, const char *nam
{
/* There is no point on creating an UBO if there is no arguments. */
if (BLI_listbase_is_empty(inputs)) {
- return NULL;
+ return nullptr;
}
buffer_from_list_inputs_sort(inputs);
diff --git a/source/blender/gpu/intern/gpu_vertex_buffer.cc b/source/blender/gpu/intern/gpu_vertex_buffer.cc
index be66d91b025..09b9eba9f95 100644
--- a/source/blender/gpu/intern/gpu_vertex_buffer.cc
+++ b/source/blender/gpu/intern/gpu_vertex_buffer.cc
@@ -191,7 +191,7 @@ void GPU_vertbuf_data_resize(GPUVertBuf *verts, uint v_len)
void GPU_vertbuf_data_len_set(GPUVertBuf *verts_, uint v_len)
{
VertBuf *verts = unwrap(verts_);
- BLI_assert(verts->data != NULL); /* Only for dynamic data. */
+ BLI_assert(verts->data != nullptr); /* Only for dynamic data. */
BLI_assert(v_len <= verts->vertex_alloc);
verts->vertex_len = v_len;
}
@@ -203,7 +203,7 @@ void GPU_vertbuf_attr_set(GPUVertBuf *verts_, uint a_idx, uint v_idx, const void
const GPUVertAttr *a = &format->attrs[a_idx];
BLI_assert(v_idx < verts->vertex_alloc);
BLI_assert(a_idx < format->attr_len);
- BLI_assert(verts->data != NULL);
+ BLI_assert(verts->data != nullptr);
verts->flag |= GPU_VERTBUF_DATA_DIRTY;
memcpy(verts->data + a->offset + v_idx * format->stride, data, a->sz);
}
@@ -225,7 +225,7 @@ void GPU_vertbuf_vert_set(GPUVertBuf *verts_, uint v_idx, const void *data)
VertBuf *verts = unwrap(verts_);
const GPUVertFormat *format = &verts->format;
BLI_assert(v_idx < verts->vertex_alloc);
- BLI_assert(verts->data != NULL);
+ BLI_assert(verts->data != nullptr);
verts->flag |= GPU_VERTBUF_DATA_DIRTY;
memcpy(verts->data + v_idx * format->stride, data, format->stride);
}
@@ -236,7 +236,7 @@ void GPU_vertbuf_attr_fill_stride(GPUVertBuf *verts_, uint a_idx, uint stride, c
const GPUVertFormat *format = &verts->format;
const GPUVertAttr *a = &format->attrs[a_idx];
BLI_assert(a_idx < format->attr_len);
- BLI_assert(verts->data != NULL);
+ BLI_assert(verts->data != nullptr);
verts->flag |= GPU_VERTBUF_DATA_DIRTY;
const uint vertex_len = verts->vertex_len;
@@ -259,7 +259,7 @@ void GPU_vertbuf_attr_get_raw_data(GPUVertBuf *verts_, uint a_idx, GPUVertBufRaw
const GPUVertFormat *format = &verts->format;
const GPUVertAttr *a = &format->attrs[a_idx];
BLI_assert(a_idx < format->attr_len);
- BLI_assert(verts->data != NULL);
+ BLI_assert(verts->data != nullptr);
verts->flag |= GPU_VERTBUF_DATA_DIRTY;
verts->flag &= ~GPU_VERTBUF_DATA_UPLOADED;
diff --git a/source/blender/gpu/opengl/gl_batch.cc b/source/blender/gpu/opengl/gl_batch.cc
index b81c2d69122..89486b73b05 100644
--- a/source/blender/gpu/opengl/gl_batch.cc
+++ b/source/blender/gpu/opengl/gl_batch.cc
@@ -62,11 +62,11 @@ GLVaoCache::~GLVaoCache()
void GLVaoCache::init()
{
- context_ = NULL;
- interface_ = NULL;
+ context_ = nullptr;
+ interface_ = nullptr;
is_dynamic_vao_count = false;
for (int i = 0; i < GPU_VAO_STATIC_LEN; i++) {
- static_vaos.interfaces[i] = NULL;
+ static_vaos.interfaces[i] = nullptr;
static_vaos.vao_ids[i] = 0;
}
vao_base_instance_ = 0;
@@ -93,7 +93,7 @@ void GLVaoCache::insert(const GLShaderInterface *interface, GLuint vao)
else {
/* Erase previous entries, they will be added back if drawn again. */
for (int i = 0; i < GPU_VAO_STATIC_LEN; i++) {
- if (static_vaos.interfaces[i] != NULL) {
+ if (static_vaos.interfaces[i] != nullptr) {
const_cast<GLShaderInterface *>(static_vaos.interfaces[i])->ref_remove(this);
context_->vao_free(static_vaos.vao_ids[i]);
}
@@ -143,7 +143,7 @@ void GLVaoCache::remove(const GLShaderInterface *interface)
if (interfaces[i] == interface) {
context_->vao_free(vaos[i]);
vaos[i] = 0;
- interfaces[i] = NULL;
+ interfaces[i] = nullptr;
break; /* cannot have duplicates */
}
}
@@ -157,7 +157,7 @@ void GLVaoCache::clear()
const GLShaderInterface **interfaces = (is_dynamic_vao_count) ? dynamic_vaos.interfaces :
static_vaos.interfaces;
/* Early out, nothing to free. */
- if (context_ == NULL) {
+ if (context_ == nullptr) {
return;
}
@@ -174,7 +174,7 @@ void GLVaoCache::clear()
}
for (int i = 0; i < count; i++) {
- if (interfaces[i] != NULL) {
+ if (interfaces[i] != nullptr) {
const_cast<GLShaderInterface *>(interfaces[i])->ref_remove(this);
}
}
@@ -213,7 +213,7 @@ void GLVaoCache::context_check()
BLI_assert(ctx);
if (context_ != ctx) {
- if (context_ != NULL) {
+ if (context_ != nullptr) {
/* IMPORTANT: Trying to draw a batch in multiple different context will trash the VAO cache.
* This has major performance impact and should be avoided in most cases. */
context_->vao_cache_unregister(this);
@@ -307,7 +307,7 @@ void GLBatch::bind(int i_first)
#if GPU_TRACK_INDEX_RANGE
/* Can be removed if GL 4.3 is required. */
- if (!GLContext::fixed_restart_index_support && (elem != NULL)) {
+ if (!GLContext::fixed_restart_index_support && (elem != nullptr)) {
glPrimitiveRestartIndex(this->elem_()->restart_index());
}
#endif
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index 3737321ed90..4e45ff11fc7 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -152,8 +152,8 @@ void init_gl_callbacks()
SNPRINTF(msg, format, GLEW_VERSION_4_3 ? "OpenGL 4.3" : "KHR_debug extension");
glEnable(GL_DEBUG_OUTPUT);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
- glDebugMessageCallback((GLDEBUGPROC)debug_callback, NULL);
- glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
+ glDebugMessageCallback((GLDEBUGPROC)debug_callback, nullptr);
+ glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, GL_TRUE);
glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_MARKER,
0,
@@ -164,8 +164,8 @@ void init_gl_callbacks()
else if (GLEW_ARB_debug_output) {
SNPRINTF(msg, format, "ARB_debug_output");
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
- glDebugMessageCallbackARB((GLDEBUGPROCARB)debug_callback, NULL);
- glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
+ glDebugMessageCallbackARB((GLDEBUGPROCARB)debug_callback, nullptr);
+ glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, GL_TRUE);
glDebugMessageInsertARB(GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_OTHER_ARB,
0,
@@ -213,7 +213,7 @@ void check_gl_error(const char *info)
default:
char msg[256];
SNPRINTF(msg, "Unknown GL error: %x : %s", error, info);
- debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, NULL);
+ debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, nullptr);
break;
}
}
@@ -250,7 +250,7 @@ void check_gl_resources(const char *info)
const char *sh_name = ctx->shader->name_get();
char msg[256];
SNPRINTF(msg, "Missing UBO bind at slot %d : %s > %s : %s", i, sh_name, ubo_name, info);
- debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, NULL);
+ debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, nullptr);
}
}
@@ -262,7 +262,7 @@ void check_gl_resources(const char *info)
const char *sh_name = ctx->shader->name_get();
char msg[256];
SNPRINTF(msg, "Missing Texture bind at slot %d : %s > %s : %s", i, sh_name, tex_name, info);
- debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, NULL);
+ debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, nullptr);
}
}
@@ -274,14 +274,14 @@ void check_gl_resources(const char *info)
const char *sh_name = ctx->shader->name_get();
char msg[256];
SNPRINTF(msg, "Missing Image bind at slot %d : %s > %s : %s", i, sh_name, tex_name, info);
- debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, NULL);
+ debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, msg, nullptr);
}
}
}
void raise_gl_error(const char *info)
{
- debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, info, NULL);
+ debug_callback(0, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, 0, info, nullptr);
}
/** \} */
diff --git a/source/blender/gpu/opengl/gl_drawlist.cc b/source/blender/gpu/opengl/gl_drawlist.cc
index b0a8af5b482..aecadc4d14a 100644
--- a/source/blender/gpu/opengl/gl_drawlist.cc
+++ b/source/blender/gpu/opengl/gl_drawlist.cc
@@ -65,13 +65,13 @@ typedef struct GLDrawCommandIndexed {
GLDrawList::GLDrawList(int length)
{
BLI_assert(length > 0);
- batch_ = NULL;
+ batch_ = nullptr;
buffer_id_ = 0;
command_len_ = 0;
command_offset_ = 0;
data_offset_ = 0;
data_size_ = 0;
- data_ = NULL;
+ data_ = nullptr;
if (GLContext::multi_draw_indirect_support) {
/* Alloc the biggest possible command list, which is indexed. */
@@ -92,8 +92,8 @@ void GLDrawList::init()
{
BLI_assert(GLContext::get());
BLI_assert(MDI_ENABLED);
- BLI_assert(data_ == NULL);
- batch_ = NULL;
+ BLI_assert(data_ == nullptr);
+ batch_ = nullptr;
command_len_ = 0;
if (buffer_id_ == 0) {
@@ -105,7 +105,7 @@ void GLDrawList::init()
glBindBuffer(GL_DRAW_INDIRECT_BUFFER, buffer_id_);
/* If buffer is full, orphan buffer data and start fresh. */
// if (command_offset_ >= data_size_) {
- glBufferData(GL_DRAW_INDIRECT_BUFFER, buffer_size_, NULL, GL_DYNAMIC_DRAW);
+ glBufferData(GL_DRAW_INDIRECT_BUFFER, buffer_size_, nullptr, GL_DYNAMIC_DRAW);
data_offset_ = 0;
// }
/* Map the remaining range. */
@@ -123,7 +123,7 @@ void GLDrawList::append(GPUBatch *gpu_batch, int i_first, int i_count)
return;
}
- if (data_ == NULL) {
+ if (data_ == nullptr) {
this->init();
}
@@ -177,7 +177,7 @@ void GLDrawList::submit()
/* Something's wrong if we get here without MDI support. */
BLI_assert(MDI_ENABLED);
BLI_assert(data_);
- BLI_assert(GLContext::get()->shader != NULL);
+ BLI_assert(GLContext::get()->shader != nullptr);
/* Only do multi-draw indirect if doing more than 2 drawcall. This avoids the overhead of
* buffer mapping if scene is not very instance friendly. BUT we also need to take into
@@ -190,7 +190,7 @@ void GLDrawList::submit()
glBindBuffer(GL_DRAW_INDIRECT_BUFFER, buffer_id_);
glFlushMappedBufferRange(GL_DRAW_INDIRECT_BUFFER, 0, command_offset_);
glUnmapBuffer(GL_DRAW_INDIRECT_BUFFER);
- data_ = NULL; /* Unmapped */
+ data_ = nullptr; /* Unmapped */
data_offset_ += command_offset_;
batch_->bind(0);
@@ -227,7 +227,7 @@ void GLDrawList::submit()
/* Do not submit this buffer again. */
command_len_ = 0;
/* Avoid keeping reference to the batch. */
- batch_ = NULL;
+ batch_ = nullptr;
}
/** \} */
diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc
index 661b976771f..cbb332388dc 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.cc
+++ b/source/blender/gpu/opengl/gl_framebuffer.cc
@@ -72,7 +72,7 @@ GLFrameBuffer::GLFrameBuffer(
GLFrameBuffer::~GLFrameBuffer()
{
- if (context_ == NULL) {
+ if (context_ == nullptr) {
return;
}
@@ -176,7 +176,7 @@ void GLFrameBuffer::update_attachments()
first_attachment = (attach.tex) ? type : first_attachment;
}
- if (attach.tex == NULL) {
+ if (attach.tex == nullptr) {
glFramebufferTexture(GL_FRAMEBUFFER, gl_attachment, 0, 0);
continue;
}
@@ -208,7 +208,7 @@ void GLFrameBuffer::update_attachments()
for (int i = ARRAY_SIZE(gl_attachments_) - 1; i >= 0; --i) {
GPUAttachmentType type = GPU_FB_COLOR_ATTACHMENT0 + i;
GPUAttachment &attach = attachments_[type];
- if (attach.tex != NULL) {
+ if (attach.tex != nullptr) {
gl_tex = static_cast<GLTexture *>(unwrap(attach.tex))->tex_id_;
}
else if (gl_tex != 0) {
@@ -232,7 +232,7 @@ void GLFrameBuffer::update_attachments()
glDrawBuffers(ARRAY_SIZE(gl_attachments_), gl_attachments_);
if (G.debug & G_DEBUG_GPU) {
- BLI_assert(this->check(NULL));
+ BLI_assert(this->check(nullptr));
}
}
@@ -410,7 +410,7 @@ void GLFrameBuffer::clear_multi(const float (*clear_cols)[4])
* TODO(fclem): fix this insecurity? */
int type = GPU_FB_COLOR_ATTACHMENT0;
for (int i = 0; type < GPU_FB_MAX_ATTACHMENT; i++, type++) {
- if (attachments_[type].tex != NULL) {
+ if (attachments_[type].tex != nullptr) {
this->clear_attachment(GPU_FB_COLOR_ATTACHMENT0 + i, GPU_DATA_FLOAT, clear_cols[i]);
}
}
diff --git a/source/blender/gpu/opengl/gl_immediate.cc b/source/blender/gpu/opengl/gl_immediate.cc
index 4350902de73..63e3162944d 100644
--- a/source/blender/gpu/opengl/gl_immediate.cc
+++ b/source/blender/gpu/opengl/gl_immediate.cc
@@ -50,12 +50,12 @@ GLImmediate::GLImmediate()
buffer.buffer_size = DEFAULT_INTERNAL_BUFFER_SIZE;
glGenBuffers(1, &buffer.vbo_id);
glBindBuffer(GL_ARRAY_BUFFER, buffer.vbo_id);
- glBufferData(GL_ARRAY_BUFFER, buffer.buffer_size, NULL, GL_DYNAMIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, buffer.buffer_size, nullptr, GL_DYNAMIC_DRAW);
buffer_strict.buffer_size = DEFAULT_INTERNAL_BUFFER_SIZE;
glGenBuffers(1, &buffer_strict.vbo_id);
glBindBuffer(GL_ARRAY_BUFFER, buffer_strict.vbo_id);
- glBufferData(GL_ARRAY_BUFFER, buffer_strict.buffer_size, NULL, GL_DYNAMIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, buffer_strict.buffer_size, nullptr, GL_DYNAMIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
@@ -112,7 +112,7 @@ uchar *GLImmediate::begin()
}
else {
/* orphan this buffer & start with a fresh one */
- glBufferData(GL_ARRAY_BUFFER, buffer_size(), NULL, GL_DYNAMIC_DRAW);
+ glBufferData(GL_ARRAY_BUFFER, buffer_size(), nullptr, GL_DYNAMIC_DRAW);
buffer_offset() = 0;
}
@@ -129,7 +129,7 @@ uchar *GLImmediate::begin()
access |= GL_MAP_FLUSH_EXPLICIT_BIT;
}
void *data = glMapBufferRange(GL_ARRAY_BUFFER, buffer_offset(), bytes_needed, access);
- BLI_assert(data != NULL);
+ BLI_assert(data != nullptr);
bytes_mapped_ = bytes_needed;
return (uchar *)data;
diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc
index 57b9cac3f83..cc5f83228d6 100644
--- a/source/blender/gpu/opengl/gl_shader.cc
+++ b/source/blender/gpu/opengl/gl_shader.cc
@@ -123,14 +123,14 @@ GLuint GLShader::create_shader_stage(GLenum gl_stage, MutableSpan<const char *>
/* Patch the shader code using the first source slot. */
sources[0] = glsl_patch_get();
- glShaderSource(shader, sources.size(), sources.data(), NULL);
+ glShaderSource(shader, sources.size(), sources.data(), nullptr);
glCompileShader(shader);
GLint status;
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
if (!status || (G.debug & G_DEBUG_GPU)) {
char log[5000] = "";
- glGetShaderInfoLog(shader, sizeof(log), NULL, log);
+ glGetShaderInfoLog(shader, sizeof(log), nullptr, log);
if (log[0] != '\0') {
switch (gl_stage) {
case GL_VERTEX_SHADER:
@@ -184,7 +184,7 @@ bool GLShader::finalize()
glGetProgramiv(shader_program_, GL_LINK_STATUS, &status);
if (!status) {
char log[5000];
- glGetProgramInfoLog(shader_program_, sizeof(log), NULL, log);
+ glGetProgramInfoLog(shader_program_, sizeof(log), nullptr, log);
Span<const char *> sources;
this->print_log(sources, log, "Linking", true);
return false;
@@ -409,7 +409,7 @@ void GLShader::vertformat_from_shader(GPUVertFormat *format) const
char name[256];
GLenum gl_type;
GLint size;
- glGetActiveAttrib(shader_program_, i, sizeof(name), NULL, &size, &gl_type, name);
+ glGetActiveAttrib(shader_program_, i, sizeof(name), nullptr, &size, &gl_type, name);
/* Ignore OpenGL names like `gl_BaseInstanceARB`, `gl_InstanceID` and `gl_VertexID`. */
if (glGetAttribLocation(shader_program_, name) == -1) {
diff --git a/source/blender/gpu/opengl/gl_shader_interface.cc b/source/blender/gpu/opengl/gl_shader_interface.cc
index 2d55c222e9c..9533639b133 100644
--- a/source/blender/gpu/opengl/gl_shader_interface.cc
+++ b/source/blender/gpu/opengl/gl_shader_interface.cc
@@ -267,7 +267,7 @@ GLShaderInterface::GLShaderInterface(GLuint program)
for (int32_t u_int = 0; u_int < GPU_NUM_UNIFORM_BLOCKS; u_int++) {
GPUUniformBlockBuiltin u = static_cast<GPUUniformBlockBuiltin>(u_int);
const ShaderInput *block = this->ubo_get(builtin_uniform_block_name(u));
- builtin_blocks_[u] = (block != NULL) ? block->binding : -1;
+ builtin_blocks_[u] = (block != nullptr) ? block->binding : -1;
}
MEM_freeN(uniforms_from_blocks);
@@ -285,7 +285,7 @@ GLShaderInterface::GLShaderInterface(GLuint program)
GLShaderInterface::~GLShaderInterface()
{
for (auto *ref : refs_) {
- if (ref != NULL) {
+ if (ref != nullptr) {
ref->remove(this);
}
}
diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc
index 993bb56612c..021376aaea6 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -44,7 +44,7 @@ namespace blender::gpu {
GLTexture::GLTexture(const char *name) : Texture(name)
{
- BLI_assert(GLContext::get() != NULL);
+ BLI_assert(GLContext::get() != nullptr);
glGenTextures(1, &tex_id_);
}
@@ -55,7 +55,7 @@ GLTexture::~GLTexture()
GPU_framebuffer_free(framebuffer_);
}
GLContext *ctx = GLContext::get();
- if (ctx != NULL && is_bound_) {
+ if (ctx != nullptr && is_bound_) {
/* This avoid errors when the texture is still inside the bound texture array. */
ctx->state_manager->texture_unbind(this);
}
@@ -148,7 +148,7 @@ void GLTexture::ensure_mipmaps(int miplvl)
if (type_ == GPU_TEXTURE_CUBE) {
for (int i = 0; i < d; i++) {
GLenum target = GL_TEXTURE_CUBE_MAP_POSITIVE_X + i;
- glTexImage2D(target, mip, internal_format, w, h, 0, gl_format, gl_type, NULL);
+ glTexImage2D(target, mip, internal_format, w, h, 0, gl_format, gl_type, nullptr);
}
}
else if (format_flag_ & GPU_FORMAT_COMPRESSED) {
@@ -156,13 +156,13 @@ void GLTexture::ensure_mipmaps(int miplvl)
switch (dimensions) {
default:
case 1:
- glCompressedTexImage1D(target_, mip, internal_format, w, 0, size, NULL);
+ glCompressedTexImage1D(target_, mip, internal_format, w, 0, size, nullptr);
break;
case 2:
- glCompressedTexImage2D(target_, mip, internal_format, w, h, 0, size, NULL);
+ glCompressedTexImage2D(target_, mip, internal_format, w, h, 0, size, nullptr);
break;
case 3:
- glCompressedTexImage3D(target_, mip, internal_format, w, h, d, 0, size, NULL);
+ glCompressedTexImage3D(target_, mip, internal_format, w, h, d, 0, size, nullptr);
break;
}
}
@@ -170,13 +170,13 @@ void GLTexture::ensure_mipmaps(int miplvl)
switch (dimensions) {
default:
case 1:
- glTexImage1D(target_, mip, internal_format, w, 0, gl_format, gl_type, NULL);
+ glTexImage1D(target_, mip, internal_format, w, 0, gl_format, gl_type, nullptr);
break;
case 2:
- glTexImage2D(target_, mip, internal_format, w, h, 0, gl_format, gl_type, NULL);
+ glTexImage2D(target_, mip, internal_format, w, h, 0, gl_format, gl_type, nullptr);
break;
case 3:
- glTexImage3D(target_, mip, internal_format, w, h, d, 0, gl_format, gl_type, NULL);
+ glTexImage3D(target_, mip, internal_format, w, h, d, 0, gl_format, gl_type, nullptr);
break;
}
}
@@ -231,7 +231,7 @@ void GLTexture::update_sub(
int mip, int offset[3], int extent[3], eGPUDataFormat type, const void *data)
{
BLI_assert(validate_data_format(format_, type));
- BLI_assert(data != NULL);
+ BLI_assert(data != nullptr);
this->ensure_mipmaps(mip);
@@ -617,13 +617,13 @@ bool GLTexture::proxy_check(int mip)
switch (dimensions) {
default:
case 1:
- glCompressedTexImage1D(gl_proxy, mip, size[0], 0, gl_format, img_size, NULL);
+ glCompressedTexImage1D(gl_proxy, mip, size[0], 0, gl_format, img_size, nullptr);
break;
case 2:
- glCompressedTexImage2D(gl_proxy, mip, UNPACK2(size), 0, gl_format, img_size, NULL);
+ glCompressedTexImage2D(gl_proxy, mip, UNPACK2(size), 0, gl_format, img_size, nullptr);
break;
case 3:
- glCompressedTexImage3D(gl_proxy, mip, UNPACK3(size), 0, gl_format, img_size, NULL);
+ glCompressedTexImage3D(gl_proxy, mip, UNPACK3(size), 0, gl_format, img_size, nullptr);
break;
}
}
@@ -631,13 +631,13 @@ bool GLTexture::proxy_check(int mip)
switch (dimensions) {
default:
case 1:
- glTexImage1D(gl_proxy, mip, internal_format, size[0], 0, gl_format, gl_type, NULL);
+ glTexImage1D(gl_proxy, mip, internal_format, size[0], 0, gl_format, gl_type, nullptr);
break;
case 2:
- glTexImage2D(gl_proxy, mip, internal_format, UNPACK2(size), 0, gl_format, gl_type, NULL);
+ glTexImage2D(gl_proxy, mip, internal_format, UNPACK2(size), 0, gl_format, gl_type, nullptr);
break;
case 3:
- glTexImage3D(gl_proxy, mip, internal_format, UNPACK3(size), 0, gl_format, gl_type, NULL);
+ glTexImage3D(gl_proxy, mip, internal_format, UNPACK3(size), 0, gl_format, gl_type, nullptr);
break;
}
}
diff --git a/source/blender/gpu/opengl/gl_uniform_buffer.cc b/source/blender/gpu/opengl/gl_uniform_buffer.cc
index 7f404880092..ecb233f2e5a 100644
--- a/source/blender/gpu/opengl/gl_uniform_buffer.cc
+++ b/source/blender/gpu/opengl/gl_uniform_buffer.cc
@@ -61,7 +61,7 @@ void GLUniformBuf::init()
glGenBuffers(1, &ubo_id_);
glBindBuffer(GL_UNIFORM_BUFFER, ubo_id_);
- glBufferData(GL_UNIFORM_BUFFER, size_in_bytes_, NULL, GL_DYNAMIC_DRAW);
+ glBufferData(GL_UNIFORM_BUFFER, size_in_bytes_, nullptr, GL_DYNAMIC_DRAW);
debug::object_label(GL_UNIFORM_BUFFER, ubo_id_, name_);
}
@@ -97,7 +97,7 @@ void GLUniformBuf::bind(int slot)
this->init();
}
- if (data_ != NULL) {
+ if (data_ != nullptr) {
this->update(data_);
MEM_SAFE_FREE(data_);
}
diff --git a/source/blender/gpu/opengl/gl_vertex_array.cc b/source/blender/gpu/opengl/gl_vertex_array.cc
index 7585a327b3b..ea2770f099d 100644
--- a/source/blender/gpu/opengl/gl_vertex_array.cc
+++ b/source/blender/gpu/opengl/gl_vertex_array.cc
@@ -70,7 +70,7 @@ static uint16_t vbo_bind(const ShaderInterface *interface,
const char *name = GPU_vertformat_attr_name_get(format, a, n_idx);
const ShaderInput *input = interface->attr_get(name);
- if (input == NULL) {
+ if (input == nullptr) {
continue;
}
diff --git a/source/blender/gpu/opengl/gl_vertex_buffer.cc b/source/blender/gpu/opengl/gl_vertex_buffer.cc
index 74640162a0b..a56d5269fde 100644
--- a/source/blender/gpu/opengl/gl_vertex_buffer.cc
+++ b/source/blender/gpu/opengl/gl_vertex_buffer.cc
@@ -52,7 +52,7 @@ void GLVertBuf::release_data()
void GLVertBuf::duplicate_data(VertBuf *dst_)
{
- BLI_assert(GLContext::get() != NULL);
+ BLI_assert(GLContext::get() != nullptr);
GLVertBuf *src = this;
GLVertBuf *dst = static_cast<GLVertBuf *>(dst_);
@@ -61,7 +61,7 @@ void GLVertBuf::duplicate_data(VertBuf *dst_)
glGenBuffers(1, &dst->vbo_id_);
glBindBuffer(GL_COPY_WRITE_BUFFER, dst->vbo_id_);
- glBufferData(GL_COPY_WRITE_BUFFER, dst->vbo_size_, NULL, to_gl(dst->usage_));
+ glBufferData(GL_COPY_WRITE_BUFFER, dst->vbo_size_, nullptr, to_gl(dst->usage_));
glBindBuffer(GL_COPY_READ_BUFFER, src->vbo_id_);
@@ -82,7 +82,7 @@ void GLVertBuf::upload_data()
void GLVertBuf::bind()
{
- BLI_assert(GLContext::get() != NULL);
+ BLI_assert(GLContext::get() != nullptr);
if (vbo_id_ == 0) {
glGenBuffers(1, &vbo_id_);
@@ -93,7 +93,7 @@ void GLVertBuf::bind()
if (flag & GPU_VERTBUF_DATA_DIRTY) {
vbo_size_ = this->size_used_get();
/* Orphan the vbo to avoid sync then upload data. */
- glBufferData(GL_ARRAY_BUFFER, vbo_size_, NULL, to_gl(usage_));
+ glBufferData(GL_ARRAY_BUFFER, vbo_size_, nullptr, to_gl(usage_));
glBufferSubData(GL_ARRAY_BUFFER, 0, vbo_size_, data);
memory_usage += vbo_size_;
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
index fd671fabc1b..61f2153cf6c 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cpp
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -101,13 +101,13 @@ struct IK_Target {
IK_Target()
{
- bldepsgraph = NULL;
- blscene = NULL;
- target = NULL;
- constraint = NULL;
- blenderConstraint = NULL;
- rootChannel = NULL;
- owner = NULL;
+ bldepsgraph = nullptr;
+ blscene = nullptr;
+ target = nullptr;
+ constraint = nullptr;
+ blenderConstraint = nullptr;
+ rootChannel = nullptr;
+ owner = nullptr;
controlType = 0;
channel = 0;
ee = 0;
@@ -138,12 +138,12 @@ struct IK_Channel {
IK_Channel()
{
- pchan = NULL;
+ pchan = nullptr;
parent = -1;
jointType = 0;
ndof = 0;
jointValid = 0;
- owner = NULL;
+ owner = nullptr;
jointValue[0] = 0.0;
jointValue[1] = 0.0;
jointValue[2] = 0.0;
@@ -174,20 +174,20 @@ struct IK_Scene {
IK_Scene()
{
- bldepsgraph = NULL;
- blscene = NULL;
- next = NULL;
- channels = NULL;
- armature = NULL;
- cache = NULL;
- scene = NULL;
- base = NULL;
- solver = NULL;
+ bldepsgraph = nullptr;
+ blscene = nullptr;
+ next = nullptr;
+ channels = nullptr;
+ armature = nullptr;
+ cache = nullptr;
+ scene = nullptr;
+ base = nullptr;
+ solver = nullptr;
blScale = blInvScale = 1.0f;
- blArmature = NULL;
+ blArmature = nullptr;
numchan = 0;
numjoint = 0;
- polarConstraint = NULL;
+ polarConstraint = nullptr;
}
~IK_Scene()
@@ -228,7 +228,7 @@ enum IK_SegmentAxis {
static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *con)
{
- bPoseChannel *curchan, *pchan_root = NULL, *chanlist[256], **oldchan;
+ bPoseChannel *curchan, *pchan_root = nullptr, *chanlist[256], **oldchan;
PoseTree *tree;
PoseTarget *target;
bKinematicConstraint *data;
@@ -290,7 +290,7 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
* and each channel can be part of at most one tree. */
tree = (PoseTree *)pchan_root->iktree.first;
- if (tree == NULL) {
+ if (tree == nullptr) {
/* make new tree */
tree = (PoseTree *)MEM_callocN(sizeof(PoseTree), "posetree");
@@ -398,7 +398,7 @@ static bool constraint_valid(bConstraint *con)
}
if (is_cartesian_constraint(con)) {
/* cartesian space constraint */
- if (data->tar == NULL) {
+ if (data->tar == nullptr) {
return false;
}
if (data->tar->type == OB_ARMATURE && data->subtarget[0] == 0) {
@@ -1163,7 +1163,7 @@ static IK_Scene *convert_tree(
float start[3];
if (tree->totchannel == 0) {
- return NULL;
+ return nullptr;
}
ikscene = new IK_Scene;
@@ -1196,7 +1196,7 @@ static IK_Scene *convert_tree(
break;
default:
delete ikscene;
- return NULL;
+ return nullptr;
}
ikscene->blArmature = ob;
/* assume uniform scaling and take Y scale as general scale for the armature */
@@ -1438,10 +1438,10 @@ static IK_Scene *convert_tree(
}
if (!ret) {
delete ikscene;
- return NULL;
+ return nullptr;
}
/* for each target, we need to add an end effector in the armature */
- for (numtarget = 0, polarcon = NULL, ret = true, target = (PoseTarget *)tree->targets.first;
+ for (numtarget = 0, polarcon = nullptr, ret = true, target = (PoseTarget *)tree->targets.first;
target;
target = (PoseTarget *)target->next) {
condata = (bKinematicConstraint *)target->con->data;
@@ -1496,7 +1496,7 @@ static IK_Scene *convert_tree(
}
if (!ret) {
delete ikscene;
- return NULL;
+ return nullptr;
}
/* set the weight */
e_matrix &Wq = arm->getWq();
@@ -1638,7 +1638,7 @@ static IK_Scene *convert_tree(
if (!ret || !scene->addCache(ikscene->cache) || !scene->addSolver(ikscene->solver) ||
!scene->initialize()) {
delete ikscene;
- ikscene = NULL;
+ ikscene = nullptr;
}
return ikscene;
}
@@ -1688,7 +1688,7 @@ static int init_scene(Object *ob)
IK_Scene *scene;
if (ob->pose->ikdata) {
- for (scene = ((IK_Data *)ob->pose->ikdata)->first; scene != NULL; scene = scene->next) {
+ for (scene = ((IK_Data *)ob->pose->ikdata)->first; scene != nullptr; scene = scene->next) {
if (fabs(scene->blScale - scale) > KDL::epsilon) {
return 1;
}
@@ -1768,7 +1768,7 @@ static void execute_scene(struct Depsgraph *depsgraph,
if (ikscene->cache && !reiterate && simulation) {
iTaSC::CacheTS sts, cts;
sts = cts = (iTaSC::CacheTS)std::round(timestamp * 1000.0);
- if (ikscene->cache->getPreviousCacheItem(ikscene->armature, 0, &cts) == NULL || cts == 0) {
+ if (ikscene->cache->getPreviousCacheItem(ikscene->armature, 0, &cts) == nullptr || cts == 0) {
/* the cache is empty before this time, reiterate */
if (ikparam->flag & ITASC_INITIAL_REITERATION) {
reiterate = true;
@@ -1887,7 +1887,7 @@ void itasc_initialize_tree(struct Depsgraph *depsgraph,
bPoseChannel *pchan;
int count = 0;
- if (ob->pose->ikdata != NULL && !(ob->pose->flag & POSE_WAS_REBUILT)) {
+ if (ob->pose->ikdata != nullptr && !(ob->pose->flag & POSE_WAS_REBUILT)) {
if (!init_scene(ob)) {
return;
}
@@ -1950,7 +1950,7 @@ void itasc_clear_data(struct bPose *pose)
delete scene;
}
MEM_freeN(ikdata);
- pose->ikdata = NULL;
+ pose->ikdata = nullptr;
}
}
@@ -1961,7 +1961,7 @@ void itasc_clear_cache(struct bPose *pose)
for (IK_Scene *scene = ikdata->first; scene; scene = scene->next) {
if (scene->cache) {
/* clear all cache but leaving the timestamp 0 (=rest pose) */
- scene->cache->clearCacheFrom(NULL, 1);
+ scene->cache->clearCacheFrom(nullptr, 1);
}
}
}
@@ -2001,7 +2001,7 @@ void itasc_test_constraint(struct Object *ob, struct bConstraint *cons)
struct bKinematicConstraint *data = (struct bKinematicConstraint *)cons->data;
/* only for IK constraint */
- if (cons->type != CONSTRAINT_TYPE_KINEMATIC || data == NULL) {
+ if (cons->type != CONSTRAINT_TYPE_KINEMATIC || data == nullptr) {
return;
}
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
index 3e459934db7..37e30d30e2c 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
@@ -1130,7 +1130,7 @@ void *DirectDrawSurface::readData(uint &rsize)
if (stream.failed) {
free(data);
- data = NULL;
+ data = nullptr;
rsize = 0;
}
diff --git a/source/blender/imbuf/intern/dds/Image.cpp b/source/blender/imbuf/intern/dds/Image.cpp
index 4cfd7178f29..7958a586c7d 100644
--- a/source/blender/imbuf/intern/dds/Image.cpp
+++ b/source/blender/imbuf/intern/dds/Image.cpp
@@ -32,7 +32,7 @@
#include <stdio.h> /* printf */
-Image::Image() : m_width(0), m_height(0), m_format(Format_RGB), m_data(NULL)
+Image::Image() : m_width(0), m_height(0), m_format(Format_RGB), m_data(nullptr)
{
}
@@ -52,7 +52,7 @@ void Image::allocate(uint w, uint h)
void Image::free()
{
delete[] m_data;
- m_data = NULL;
+ m_data = nullptr;
}
uint Image::width() const
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp
index 1d29dd4a26b..e620c968f1c 100644
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
@@ -47,10 +47,10 @@ int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/)
return 0; /* todo: finish this function */
/* check image buffer */
- if (ibuf == 0) {
+ if (ibuf == nullptr) {
return 0;
}
- if (ibuf->rect == 0) {
+ if (ibuf->rect == nullptr) {
return 0;
}
@@ -91,7 +91,7 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
int flags,
char colorspace[IM_MAX_SPACE])
{
- struct ImBuf *ibuf = NULL;
+ struct ImBuf *ibuf = nullptr;
DirectDrawSurface dds((unsigned char *)mem, size); /* reads header */
unsigned char bits_per_pixel;
unsigned int *rect;
@@ -100,7 +100,7 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
int col;
unsigned char *cp = (unsigned char *)&col;
Color32 pixel;
- Color32 *pixels = 0;
+ Color32 *pixels = nullptr;
/* OCIO_TODO: never was able to save DDS, so can't test loading
* but profile used to be set to sRGB and can't see rect_float here, so
@@ -109,27 +109,27 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE);
if (!imb_is_a_dds(mem)) {
- return 0;
+ return nullptr;
}
/* check if DDS is valid and supported */
if (!dds.isValid()) {
/* no need to print error here, just testing if it is a DDS */
if (flags & IB_test) {
- return 0;
+ return nullptr;
}
printf("DDS: not valid; header follows\n");
dds.printInfo();
- return 0;
+ return nullptr;
}
if (!dds.isSupported()) {
printf("DDS: format not supported\n");
- return 0;
+ return nullptr;
}
if ((dds.width() > 65535) || (dds.height() > 65535)) {
printf("DDS: dimensions too large\n");
- return 0;
+ return nullptr;
}
/* convert DDS into ImBuf */
@@ -148,8 +148,8 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
}
}
ibuf = IMB_allocImBuf(dds.width(), dds.height(), bits_per_pixel, 0);
- if (ibuf == 0) {
- return 0; /* memory allocation failed */
+ if (ibuf == nullptr) {
+ return nullptr; /* memory allocation failed */
}
ibuf->ftype = IMB_FTYPE_DDS;
@@ -160,7 +160,7 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
if (!imb_addrectImBuf(ibuf)) {
return ibuf;
}
- if (ibuf->rect == 0) {
+ if (ibuf->rect == nullptr) {
return ibuf;
}
@@ -188,7 +188,7 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
}
}
else {
- ibuf->dds_data.data = NULL;
+ ibuf->dds_data.data = nullptr;
ibuf->dds_data.size = 0;
}
diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
index 71774b335d7..d62258fbd2f 100644
--- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp
+++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
@@ -101,7 +101,7 @@ static ImBuf *imb_oiio_load_image(
IMB_freeImBuf(ibuf);
}
- return NULL;
+ return nullptr;
}
}
catch (const std::exception &exc) {
@@ -110,7 +110,7 @@ static ImBuf *imb_oiio_load_image(
IMB_freeImBuf(ibuf);
}
- return NULL;
+ return nullptr;
}
/* ImBuf always needs 4 channels */
@@ -141,7 +141,7 @@ static ImBuf *imb_oiio_load_image_float(
IMB_freeImBuf(ibuf);
}
- return NULL;
+ return nullptr;
}
}
catch (const std::exception &exc) {
@@ -150,7 +150,7 @@ static ImBuf *imb_oiio_load_image_float(
IMB_freeImBuf(ibuf);
}
- return NULL;
+ return nullptr;
}
/* ImBuf always needs 4 channels */
@@ -169,7 +169,7 @@ int imb_is_a_photoshop(const char *filename)
".psd",
".pdd",
".psb",
- NULL,
+ nullptr,
};
return BLI_path_extension_check_array(filename, photoshop_extension);
@@ -190,7 +190,7 @@ int imb_save_photoshop(struct ImBuf *ibuf, const char * /*name*/, int flags)
struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspace[IM_MAX_SPACE])
{
- struct ImBuf *ibuf = NULL;
+ struct ImBuf *ibuf = nullptr;
int width, height, components;
bool is_float, is_alpha, is_half;
int basesize;
@@ -199,7 +199,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac
/* load image from file through OIIO */
if (imb_is_a_photoshop(filename) == 0) {
- return NULL;
+ return nullptr;
}
colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE);
@@ -208,7 +208,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac
if (!in) {
std::cerr << __func__ << ": ImageInput::create() failed:" << std::endl
<< OIIO_NAMESPACE::geterror() << std::endl;
- return NULL;
+ return nullptr;
}
ImageSpec spec, config;
@@ -217,7 +217,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac
if (!in->open(filename, spec, config)) {
std::cerr << __func__ << ": ImageInput::open() failed:" << std::endl
<< in->geterror() << std::endl;
- return NULL;
+ return nullptr;
}
if (!is_colorspace_manually_set) {
@@ -248,7 +248,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac
if (in) {
in->close();
}
- return NULL;
+ return nullptr;
}
if (is_float) {
@@ -263,7 +263,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac
}
if (!ibuf) {
- return NULL;
+ return nullptr;
}
/* ImBuf always needs 4 channels */
@@ -281,7 +281,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac
IMB_freeImBuf(ibuf);
}
- return NULL;
+ return nullptr;
}
}
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 89be0a051c0..70a0585347c 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -407,10 +407,10 @@ static bool imb_save_openexr_half(ImBuf *ibuf, const char *name, const int flags
{
const int channels = ibuf->channels;
const bool is_alpha = (channels >= 4) && (ibuf->planes == 32);
- const bool is_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != NULL; /* summarize */
+ const bool is_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != nullptr; /* summarize */
const int width = ibuf->x;
const int height = ibuf->y;
- OStream *file_stream = NULL;
+ OStream *file_stream = nullptr;
try {
Header header(width, height);
@@ -514,10 +514,10 @@ static bool imb_save_openexr_float(ImBuf *ibuf, const char *name, const int flag
{
const int channels = ibuf->channels;
const bool is_alpha = (channels >= 4) && (ibuf->planes == 32);
- const bool is_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != NULL; /* summarize */
+ const bool is_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != nullptr; /* summarize */
const int width = ibuf->x;
const int height = ibuf->y;
- OStream *file_stream = NULL;
+ OStream *file_stream = nullptr;
try {
Header header(width, height);
@@ -551,7 +551,7 @@ static bool imb_save_openexr_float(ImBuf *ibuf, const char *name, const int flag
int ystride = -xstride * width;
/* last scanline, stride negative */
- float *rect[4] = {NULL, NULL, NULL, NULL};
+ float *rect[4] = {nullptr, nullptr, nullptr, nullptr};
rect[0] = ibuf->rect_float + channels * (height - 1) * width;
rect[1] = (channels >= 2) ? rect[0] + 1 : rect[0];
rect[2] = (channels >= 3) ? rect[0] + 2 : rect[0];
@@ -598,7 +598,7 @@ int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags)
}
/* when no float rect, we save as half (16 bits is sufficient) */
- if (ibuf->rect_float == NULL) {
+ if (ibuf->rect_float == nullptr) {
return (int)imb_save_openexr_half(ibuf, name, flags);
}
@@ -614,7 +614,7 @@ int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags)
* - separated with a dot: the Layer name (like "Light1" or "Walls" or "Characters")
*/
-static ListBase exrhandles = {NULL, NULL};
+static ListBase exrhandles = {nullptr, nullptr};
typedef struct ExrHandle {
struct ExrHandle *next, *prev;
@@ -691,7 +691,7 @@ void *IMB_exr_get_handle_name(const char *name)
{
ExrHandle *data = (ExrHandle *)BLI_rfindstring(&exrhandles, name, offsetof(ExrHandle, name));
- if (data == NULL) {
+ if (data == nullptr) {
data = (ExrHandle *)IMB_exr_get_handle();
BLI_strncpy(data->name, name, strlen(name) + 1);
}
@@ -754,8 +754,8 @@ static void imb_exr_insert_view_name(char *name_full, const char *passname, cons
{
BLI_assert(!ELEM(name_full, passname, viewname));
- if (viewname == NULL || viewname[0] == '\0') {
- BLI_strncpy(name_full, passname, sizeof(((ExrChannel *)NULL)->name));
+ if (viewname == nullptr || viewname[0] == '\0') {
+ BLI_strncpy(name_full, passname, sizeof(((ExrChannel *)nullptr)->name));
return;
}
@@ -882,11 +882,11 @@ int IMB_exr_begin_write(void *handle,
delete data->ofile;
delete data->ofile_stream;
- data->ofile = NULL;
- data->ofile_stream = NULL;
+ data->ofile = nullptr;
+ data->ofile_stream = nullptr;
}
- return (data->ofile != NULL);
+ return (data->ofile != nullptr);
}
/* only used for writing temp. render results (not image files)
@@ -951,8 +951,8 @@ void IMB_exrtile_begin_write(
delete data->mpofile;
delete data->ofile_stream;
- data->mpofile = NULL;
- data->ofile_stream = NULL;
+ data->mpofile = nullptr;
+ data->ofile_stream = nullptr;
}
}
@@ -973,8 +973,8 @@ int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *heig
delete data->ifile;
delete data->ifile_stream;
- data->ifile = NULL;
- data->ifile_stream = NULL;
+ data->ifile = nullptr;
+ data->ifile_stream = nullptr;
}
if (data->ifile) {
@@ -989,7 +989,7 @@ int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *heig
for (size_t i = 0; i < channels.size(); i++) {
IMB_exr_add_channel(
- data, NULL, channels[i].name.c_str(), channels[i].view.c_str(), 0, 0, NULL, false);
+ data, nullptr, channels[i].name.c_str(), channels[i].view.c_str(), 0, 0, nullptr, false);
echan = (ExrChannel *)data->channels.last;
echan->m->name = channels[i].name;
@@ -1074,7 +1074,7 @@ float *IMB_exr_channel_rect(void *handle,
return echan->rect;
}
- return NULL;
+ return nullptr;
}
void IMB_exr_clear_channels(void *handle)
@@ -1097,7 +1097,7 @@ void IMB_exr_write_channels(void *handle)
if (data->channels.first) {
const size_t num_pixels = ((size_t)data->width) * data->height;
- half *rect_half = NULL, *current_rect_half = NULL;
+ half *rect_half = nullptr, *current_rect_half = nullptr;
/* We allocate teporary storage for half pixels for all the channels at once. */
if (data->num_half_channels != 0) {
@@ -1138,7 +1138,7 @@ void IMB_exr_write_channels(void *handle)
std::cerr << "OpenEXR-writePixels: ERROR: " << exc.what() << std::endl;
}
/* Free temporary buffers. */
- if (rect_half != NULL) {
+ if (rect_half != nullptr) {
MEM_freeN(rect_half);
}
}
@@ -1323,7 +1323,7 @@ void IMB_exr_multilayer_convert(void *handle,
pass->totchan,
pass->chan_id,
pass->view);
- pass->rect = NULL;
+ pass->rect = nullptr;
}
}
}
@@ -1343,11 +1343,11 @@ void IMB_exr_close(void *handle)
delete data->ofile_stream;
delete data->multiView;
- data->ifile = NULL;
- data->ifile_stream = NULL;
- data->ofile = NULL;
- data->mpofile = NULL;
- data->ofile_stream = NULL;
+ data->ifile = nullptr;
+ data->ifile_stream = nullptr;
+ data->ofile = nullptr;
+ data->mpofile = nullptr;
+ data->ofile_stream = nullptr;
for (chan = (ExrChannel *)data->channels.first; chan; chan = chan->next) {
delete chan->m;
@@ -1491,7 +1491,7 @@ static ExrLayer *imb_exr_get_layer(ListBase *lb, char *layname)
{
ExrLayer *lay = (ExrLayer *)BLI_findstring(lb, layname, offsetof(ExrLayer, name));
- if (lay == NULL) {
+ if (lay == nullptr) {
lay = (ExrLayer *)MEM_callocN(sizeof(ExrLayer), "exr layer");
BLI_addtail(lb, lay);
BLI_strncpy(lay->name, layname, EXR_LAY_MAXNAME);
@@ -1504,7 +1504,7 @@ static ExrPass *imb_exr_get_pass(ListBase *lb, char *passname)
{
ExrPass *pass = (ExrPass *)BLI_findstring(lb, passname, offsetof(ExrPass, name));
- if (pass == NULL) {
+ if (pass == nullptr) {
pass = (ExrPass *)MEM_callocN(sizeof(ExrPass), "exr pass");
if (STREQ(passname, "Combined")) {
@@ -1546,7 +1546,7 @@ static ExrHandle *imb_exr_begin_read_mem(IStream &file_stream,
for (size_t i = 0; i < channels.size(); i++) {
IMB_exr_add_channel(
- data, NULL, channels[i].name.c_str(), channels[i].view.c_str(), 0, 0, NULL, false);
+ data, nullptr, channels[i].name.c_str(), channels[i].view.c_str(), 0, 0, nullptr, false);
echan = (ExrChannel *)data->channels.last;
echan->m->name = channels[i].name;
@@ -1588,7 +1588,7 @@ static ExrHandle *imb_exr_begin_read_mem(IStream &file_stream,
if (echan) {
printf("error, too many channels in one pass: %s\n", echan->m->name.c_str());
IMB_exr_close(data);
- return NULL;
+ return nullptr;
}
/* with some heuristics, try to merge the channels in buffers */
@@ -1723,7 +1723,7 @@ static int exr_has_rgb(MultiPartInputFile &file, const char *rgb_channels[3])
{
/* Common names for RGB-like channels in order. */
static const char *channel_names[] = {
- "R", "Red", "G", "Green", "B", "Blue", "AR", "RA", "AG", "GA", "AB", "BA", NULL};
+ "R", "Red", "G", "Green", "B", "Blue", "AR", "RA", "AG", "GA", "AB", "BA", nullptr};
const Header &header = file.header(0);
int num_channels = 0;
@@ -1746,26 +1746,26 @@ static bool exr_has_luma(MultiPartInputFile &file)
* optionally it could be also channels for chromas called BY and RY.
*/
const Header &header = file.header(0);
- return header.channels().findChannel("Y") != NULL;
+ return header.channels().findChannel("Y") != nullptr;
}
static bool exr_has_chroma(MultiPartInputFile &file)
{
const Header &header = file.header(0);
- return header.channels().findChannel("BY") != NULL &&
- header.channels().findChannel("RY") != NULL;
+ return header.channels().findChannel("BY") != nullptr &&
+ header.channels().findChannel("RY") != nullptr;
}
static bool exr_has_zbuffer(MultiPartInputFile &file)
{
const Header &header = file.header(0);
- return !(header.channels().findChannel("Z") == NULL);
+ return !(header.channels().findChannel("Z") == nullptr);
}
static bool exr_has_alpha(MultiPartInputFile &file)
{
const Header &header = file.header(0);
- return !(header.channels().findChannel("A") == NULL);
+ return !(header.channels().findChannel("A") == nullptr);
}
static bool exr_is_half_float(MultiPartInputFile &file)
@@ -1895,12 +1895,12 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
int flags,
char colorspace[IM_MAX_SPACE])
{
- struct ImBuf *ibuf = NULL;
- IMemStream *membuf = NULL;
- MultiPartInputFile *file = NULL;
+ struct ImBuf *ibuf = nullptr;
+ IMemStream *membuf = nullptr;
+ MultiPartInputFile *file = nullptr;
if (imb_is_a_openexr(mem) == 0) {
- return NULL;
+ return nullptr;
}
colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_FLOAT);
@@ -2084,7 +2084,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
delete file;
delete membuf;
- return 0;
+ return nullptr;
}
}
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc
index 7663d1790b6..5b8998a0b1a 100644
--- a/source/blender/io/alembic/exporter/abc_export_capi.cc
+++ b/source/blender/io/alembic/exporter/abc_export_capi.cc
@@ -227,8 +227,8 @@ bool ABC_export(Scene *scene,
WM_jobs_timer(wm_job, 0.1, NC_SCENE | ND_FRAME, NC_SCENE | ND_FRAME);
WM_jobs_callbacks(wm_job,
blender::io::alembic::export_startjob,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
blender::io::alembic::export_endjob);
WM_jobs_start(CTX_wm_manager(C), wm_job);
diff --git a/source/blender/io/alembic/exporter/abc_writer_curves.cc b/source/blender/io/alembic/exporter/abc_writer_curves.cc
index b57af345a3c..5e01609f930 100644
--- a/source/blender/io/alembic/exporter/abc_writer_curves.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_curves.cc
@@ -135,7 +135,7 @@ void ABCCurveWriter::do_write(HierarchyContext &context)
}
}
- if (nurbs->knotsu != NULL) {
+ if (nurbs->knotsu != nullptr) {
const size_t num_knots = KNOTSU(nurbs);
/* Add an extra knot at the beginning and end of the array since most apps
@@ -189,7 +189,7 @@ ABCCurveMeshWriter::ABCCurveMeshWriter(const ABCWriterConstructorArgs &args)
Mesh *ABCCurveMeshWriter::get_export_mesh(Object *object_eval, bool &r_needsfree)
{
Mesh *mesh_eval = BKE_object_get_evaluated_mesh(object_eval);
- if (mesh_eval != NULL) {
+ if (mesh_eval != nullptr) {
/* Mesh_eval only exists when generative modifiers are in use. */
r_needsfree = false;
return mesh_eval;
diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.cc b/source/blender/io/alembic/exporter/abc_writer_hair.cc
index b70c835215d..7d0f9bf64f0 100644
--- a/source/blender/io/alembic/exporter/abc_writer_hair.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_hair.cc
@@ -163,7 +163,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
if (num < mesh->totface) {
/* TODO(Sybren): check whether the NULL check here and if(mface) are actually required */
- MFace *face = mface == NULL ? NULL : &mface[num];
+ MFace *face = mface == nullptr ? nullptr : &mface[num];
MTFace *tface = mtface + num;
if (mface) {
@@ -172,7 +172,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context,
psys_interpolate_uvs(tface, face->v4, pa->fuv, r_uv);
uv_values.emplace_back(r_uv[0], r_uv[1]);
- psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, normal, NULL, NULL, NULL);
+ psys_interpolate_face(mverts, face, tface, nullptr, mapfw, vec, normal, nullptr, nullptr, nullptr);
copy_yup_from_zup(tmp_nor.getValue(), normal);
norm_values.push_back(tmp_nor);
@@ -279,7 +279,7 @@ void ABCHairWriter::write_hair_child_sample(const HierarchyContext &context,
psys_interpolate_uvs(tface, face->v4, pc->fuv, r_uv);
uv_values.emplace_back(r_uv[0], r_uv[1]);
- psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, tmpnor, NULL, NULL, NULL);
+ psys_interpolate_face(mverts, face, tface, nullptr, mapfw, vec, tmpnor, nullptr, nullptr, nullptr);
/* Convert Z-up to Y-up. */
norm_values.emplace_back(tmpnor[0], tmpnor[2], -tmpnor[1]);
diff --git a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
index 7595a0eba63..ce451eb1428 100644
--- a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
@@ -93,7 +93,7 @@ bool ABCNurbsWriter::check_is_animated(const HierarchyContext &context) const
{
/* Check if object has shape keys. */
Curve *cu = static_cast<Curve *>(context.object->data);
- return (cu->key != NULL);
+ return (cu->key != nullptr);
}
bool ABCNurbsWriter::is_supported(const HierarchyContext *context) const
@@ -126,7 +126,7 @@ void ABCNurbsWriter::do_write(HierarchyContext &context)
Curve *curve = static_cast<Curve *>(context.object->data);
ListBase *nulb;
- if (context.object->runtime.curve_cache->deformed_nurbs.first != NULL) {
+ if (context.object->runtime.curve_cache->deformed_nurbs.first != nullptr) {
nulb = &context.object->runtime.curve_cache->deformed_nurbs;
}
else {
diff --git a/source/blender/io/alembic/exporter/abc_writer_points.cc b/source/blender/io/alembic/exporter/abc_writer_points.cc
index eb5e51b5674..70608fdbe92 100644
--- a/source/blender/io/alembic/exporter/abc_writer_points.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_points.cc
@@ -131,7 +131,7 @@ void ABCPointsWriter::do_write(HierarchyContext &context)
if (psys->lattice_deform_data) {
BKE_lattice_deform_data_destroy(psys->lattice_deform_data);
- psys->lattice_deform_data = NULL;
+ psys->lattice_deform_data = nullptr;
}
Alembic::Abc::P3fArraySample psample(points);
diff --git a/source/blender/io/alembic/exporter/abc_writer_transform.cc b/source/blender/io/alembic/exporter/abc_writer_transform.cc
index 7b1fa87de64..7fe9fd933c5 100644
--- a/source/blender/io/alembic/exporter/abc_writer_transform.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_transform.cc
@@ -112,7 +112,7 @@ OObject ABCTransformWriter::get_alembic_object() const
bool ABCTransformWriter::check_is_animated(const HierarchyContext &context) const
{
- if (context.duplicator != NULL) {
+ if (context.duplicator != nullptr) {
/* This object is being duplicated, so could be emitted by a particle system and thus
* influenced by forces. TODO(Sybren): Make this more strict. Probably better to get from the
* depsgraph whether this object instance has a time source. */
diff --git a/source/blender/io/alembic/intern/abc_reader_curves.cc b/source/blender/io/alembic/intern/abc_reader_curves.cc
index e29b6eda6fc..8d6605d6973 100644
--- a/source/blender/io/alembic/intern/abc_reader_curves.cc
+++ b/source/blender/io/alembic/intern/abc_reader_curves.cc
@@ -101,7 +101,7 @@ void AbcCurveReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSele
ICompoundProperty user_props = m_curves_schema.getUserProperties();
if (user_props) {
const PropertyHeader *header = user_props.getPropertyHeader(ABC_CURVE_RESOLUTION_U_PROPNAME);
- if (header != NULL && header->isScalar() && IInt16Property::matches(*header)) {
+ if (header != nullptr && header->isScalar() && IInt16Property::matches(*header)) {
IInt16Property resolu(user_props, header->getName());
cu->resolu = resolu.getValue(sample_sel);
}
@@ -218,10 +218,10 @@ void AbcCurveReader::read_curve_sample(Curve *cu,
nu->pntsu -= overlap;
}
- const bool do_weights = (weights != NULL) && (weights->size() > 1);
+ const bool do_weights = (weights != nullptr) && (weights->size() > 1);
float weight = 1.0f;
- const bool do_radius = (radiuses != NULL) && (radiuses->size() > 1);
+ const bool do_radius = (radiuses != nullptr) && (radiuses->size() > 1);
float radius = (radiuses && radiuses->size() == 1) ? (*radiuses)[0] : 1.0f;
nu->type = CU_NURBS;
diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc
index c3576ccf259..6b7633d19e8 100644
--- a/source/blender/io/alembic/intern/abc_reader_mesh.cc
+++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc
@@ -149,7 +149,7 @@ static void read_mverts(CDStreamConfig &config, const AbcMeshData &mesh_data)
const P3fArraySamplePtr &positions = mesh_data.positions;
if (config.use_vertex_interpolation && config.weight != 0.0f &&
- mesh_data.ceil_positions != NULL && mesh_data.ceil_positions->size() == positions->size()) {
+ mesh_data.ceil_positions != nullptr && mesh_data.ceil_positions->size() == positions->size()) {
read_mverts_interp(mverts, positions, mesh_data.ceil_positions, config.weight);
return;
}
@@ -383,19 +383,19 @@ static void *add_customdata_cb(Mesh *mesh, const char *name, int data_type)
/* unsupported custom data type -- don't do anything. */
if (!ELEM(cd_data_type, CD_MLOOPUV, CD_MLOOPCOL)) {
- return NULL;
+ return nullptr;
}
loopdata = &mesh->ldata;
cd_ptr = CustomData_get_layer_named(loopdata, cd_data_type, name);
- if (cd_ptr != NULL) {
+ if (cd_ptr != nullptr) {
/* layer already exists, so just return it. */
return cd_ptr;
}
/* Create a new layer. */
numloops = mesh->totloop;
- cd_ptr = CustomData_add_layer_named(loopdata, cd_data_type, CD_DEFAULT, NULL, numloops, name);
+ cd_ptr = CustomData_add_layer_named(loopdata, cd_data_type, CD_DEFAULT, nullptr, numloops, name);
return cd_ptr;
}
@@ -552,7 +552,7 @@ void AbcMeshReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelec
m_object = BKE_object_add_only_object(bmain, OB_MESH, m_object_name.c_str());
m_object->data = mesh;
- Mesh *read_mesh = this->read_mesh(mesh, sample_sel, MOD_MESHSEQ_READ_ALL, NULL);
+ Mesh *read_mesh = this->read_mesh(mesh, sample_sel, MOD_MESHSEQ_READ_ALL, nullptr);
if (read_mesh != mesh) {
/* XXX fixme after 2.80; mesh->flag isn't copied by BKE_mesh_nomain_to_mesh() */
/* read_mesh can be freed by BKE_mesh_nomain_to_mesh(), so get the flag before that happens. */
@@ -657,7 +657,7 @@ Mesh *AbcMeshReader::read_mesh(Mesh *existing_mesh,
return existing_mesh;
}
- Mesh *new_mesh = NULL;
+ Mesh *new_mesh = nullptr;
/* Only read point data when streaming meshes, unless we need to create new ones. */
ImportSettings settings;
@@ -777,7 +777,7 @@ BLI_INLINE MEdge *find_edge(MEdge *edges, int totedge, int v1, int v2)
}
}
- return NULL;
+ return nullptr;
}
static void read_subd_sample(const std::string &iobject_full_name,
@@ -867,7 +867,7 @@ void AbcSubDReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelec
m_object = BKE_object_add_only_object(bmain, OB_MESH, m_object_name.c_str());
m_object->data = mesh;
- Mesh *read_mesh = this->read_mesh(mesh, sample_sel, MOD_MESHSEQ_READ_ALL, NULL);
+ Mesh *read_mesh = this->read_mesh(mesh, sample_sel, MOD_MESHSEQ_READ_ALL, nullptr);
if (read_mesh != mesh) {
BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true);
}
@@ -903,7 +903,7 @@ void AbcSubDReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelec
}
MEdge *edge = find_edge(edges, totedge, v1, v2);
- if (edge == NULL) {
+ if (edge == nullptr) {
edge = find_edge(edges, totedge, v2, v1);
}
@@ -949,7 +949,7 @@ Mesh *AbcSubDReader::read_mesh(Mesh *existing_mesh,
const Alembic::Abc::Int32ArraySamplePtr &face_indices = sample.getFaceIndices();
const Alembic::Abc::Int32ArraySamplePtr &face_counts = sample.getFaceCounts();
- Mesh *new_mesh = NULL;
+ Mesh *new_mesh = nullptr;
ImportSettings settings;
settings.read_flag |= read_flag;
diff --git a/source/blender/io/alembic/intern/abc_reader_object.cc b/source/blender/io/alembic/intern/abc_reader_object.cc
index 707241ca17f..5ca7022bb36 100644
--- a/source/blender/io/alembic/intern/abc_reader_object.cc
+++ b/source/blender/io/alembic/intern/abc_reader_object.cc
@@ -44,13 +44,13 @@ using Alembic::AbcGeom::IXformSchema;
namespace blender::io::alembic {
AbcObjectReader::AbcObjectReader(const IObject &object, ImportSettings &settings)
- : m_object(NULL),
+ : m_object(nullptr),
m_iobject(object),
m_settings(&settings),
m_min_time(std::numeric_limits<chrono_t>::max()),
m_max_time(std::numeric_limits<chrono_t>::min()),
m_refcount(0),
- parent_reader(NULL)
+ parent_reader(nullptr)
{
m_name = object.getFullName();
std::vector<std::string> parts;
@@ -203,7 +203,7 @@ void AbcObjectReader::setupObjectTransform(const float time)
if (!is_constant) {
bConstraint *con = BKE_constraint_add_for_object(
- m_object, NULL, CONSTRAINT_TYPE_TRANSFORM_CACHE);
+ m_object, nullptr, CONSTRAINT_TYPE_TRANSFORM_CACHE);
bTransformCacheConstraint *data = static_cast<bTransformCacheConstraint *>(con->data);
BLI_strncpy(data->object_path, m_iobject.getFullName().c_str(), FILE_MAX);
diff --git a/source/blender/io/alembic/intern/abc_reader_points.cc b/source/blender/io/alembic/intern/abc_reader_points.cc
index 88b5088805f..f7dcba7a0de 100644
--- a/source/blender/io/alembic/intern/abc_reader_points.cc
+++ b/source/blender/io/alembic/intern/abc_reader_points.cc
@@ -82,7 +82,7 @@ bool AbcPointsReader::accepts_object_type(
void AbcPointsReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel)
{
Mesh *mesh = BKE_mesh_add(bmain, m_data_name.c_str());
- Mesh *read_mesh = this->read_mesh(mesh, sample_sel, 0, NULL);
+ Mesh *read_mesh = this->read_mesh(mesh, sample_sel, 0, nullptr);
if (read_mesh != mesh) {
BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true);
@@ -145,7 +145,7 @@ struct Mesh *AbcPointsReader::read_mesh(struct Mesh *existing_mesh,
const P3fArraySamplePtr &positions = sample.getPositions();
- Mesh *new_mesh = NULL;
+ Mesh *new_mesh = nullptr;
if (existing_mesh->totvert != positions->size()) {
new_mesh = BKE_mesh_new_nomain(positions->size(), 0, 0, 0, 0);
diff --git a/source/blender/io/alembic/intern/abc_reader_transform.cc b/source/blender/io/alembic/intern/abc_reader_transform.cc
index 3aab2f2d339..625cd255dba 100644
--- a/source/blender/io/alembic/intern/abc_reader_transform.cc
+++ b/source/blender/io/alembic/intern/abc_reader_transform.cc
@@ -72,7 +72,7 @@ bool AbcEmptyReader::accepts_object_type(
void AbcEmptyReader::readObjectData(Main *bmain, const ISampleSelector &UNUSED(sample_sel))
{
m_object = BKE_object_add_only_object(bmain, OB_EMPTY, m_object_name.c_str());
- m_object->data = NULL;
+ m_object->data = nullptr;
}
} // namespace blender::io::alembic
diff --git a/source/blender/io/alembic/intern/abc_util.cc b/source/blender/io/alembic/intern/abc_util.cc
index edb20da89a5..aa7beb37dc5 100644
--- a/source/blender/io/alembic/intern/abc_util.cc
+++ b/source/blender/io/alembic/intern/abc_util.cc
@@ -132,7 +132,7 @@ bool has_property(const Alembic::Abc::ICompoundProperty &prop, const std::string
return false;
}
- return prop.getPropertyHeader(name) != NULL;
+ return prop.getPropertyHeader(name) != nullptr;
}
typedef std::pair<Alembic::AbcCoreAbstract::index_t, float> index_time_pair_t;
@@ -173,7 +173,7 @@ float get_weight_and_index(float time,
AbcObjectReader *create_reader(const Alembic::AbcGeom::IObject &object, ImportSettings &settings)
{
- AbcObjectReader *reader = NULL;
+ AbcObjectReader *reader = nullptr;
const Alembic::AbcGeom::MetaData &md = object.getMetaData();
diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc
index 026a11ca25e..c9eefbf9039 100644
--- a/source/blender/io/alembic/intern/alembic_capi.cc
+++ b/source/blender/io/alembic/intern/alembic_capi.cc
@@ -167,7 +167,7 @@ AbcArchiveHandle *ABC_create_handle(struct Main *bmain,
if (!archive->valid()) {
delete archive;
- return NULL;
+ return nullptr;
}
if (object_paths) {
@@ -239,7 +239,7 @@ static std::pair<bool, AbcObjectReader *> visit_object(
if (!object.valid()) {
std::cerr << " - " << full_name << ": object is invalid, skipping it and all its children.\n";
- return std::make_pair(false, static_cast<AbcObjectReader *>(NULL));
+ return std::make_pair(false, static_cast<AbcObjectReader *>(nullptr));
}
/* The interpretation of data by the children determine the role of this
@@ -261,7 +261,7 @@ static std::pair<bool, AbcObjectReader *> visit_object(
bool child_claims_this_object = child_result.first;
AbcObjectReader *child_reader = child_result.second;
- if (child_reader == NULL) {
+ if (child_reader == nullptr) {
BLI_assert(!child_claims_this_object);
}
else {
@@ -277,7 +277,7 @@ static std::pair<bool, AbcObjectReader *> visit_object(
}
BLI_assert(children_claiming_this_object == claiming_child_readers.size());
- AbcObjectReader *reader = NULL;
+ AbcObjectReader *reader = nullptr;
const MetaData &md = object.getMetaData();
bool parent_is_part_of_this_object = false;
@@ -544,8 +544,8 @@ static void import_startjob(void *user_data, short *stop, short *do_update, floa
const AbcObjectReader *parent_reader = reader->parent_reader;
Object *ob = reader->object();
- if (parent_reader == NULL || !reader->inherits_xform()) {
- ob->parent = NULL;
+ if (parent_reader == nullptr || !reader->inherits_xform()) {
+ ob->parent = nullptr;
}
else {
ob->parent = parent_reader->object();
@@ -583,7 +583,7 @@ static void import_endjob(void *user_data)
/* It's possible that cancellation occurred between the creation of
* the reader and the creation of the Blender object. */
- if (ob == NULL) {
+ if (ob == nullptr) {
continue;
}
@@ -685,7 +685,7 @@ bool ABC_import(bContext *C,
job->settings.validate_meshes = validate_meshes;
job->error_code = ABC_NO_ERROR;
job->was_cancelled = false;
- job->archive = NULL;
+ job->archive = nullptr;
job->is_background_job = as_background_job;
G.is_break = false;
@@ -702,7 +702,7 @@ bool ABC_import(bContext *C,
/* setup job */
WM_jobs_customdata_set(wm_job, job, import_freejob);
WM_jobs_timer(wm_job, 0.1, NC_SCENE | ND_FRAME, NC_SCENE | ND_FRAME);
- WM_jobs_callbacks(wm_job, import_startjob, NULL, NULL, import_endjob);
+ WM_jobs_callbacks(wm_job, import_startjob, nullptr, nullptr, import_endjob);
WM_jobs_start(CTX_wm_manager(C), wm_job);
}
@@ -762,13 +762,13 @@ static AbcObjectReader *get_abc_reader(CacheReader *reader, Object *ob, const ch
if (!iobject.valid()) {
*err_str = "Invalid object: verify object path";
- return NULL;
+ return nullptr;
}
const ObjectHeader &header = iobject.getHeader();
if (!abc_reader->accepts_object_type(header, ob, err_str)) {
/* err_str is set by acceptsObjectType() */
- return NULL;
+ return nullptr;
}
return abc_reader;
@@ -789,8 +789,8 @@ Mesh *ABC_read_mesh(CacheReader *reader,
int read_flag)
{
AbcObjectReader *abc_reader = get_abc_reader(reader, ob, err_str);
- if (abc_reader == NULL) {
- return NULL;
+ if (abc_reader == nullptr) {
+ return nullptr;
}
ISampleSelector sample_sel = sample_selector_for_time(time);
@@ -801,7 +801,7 @@ bool ABC_mesh_topology_changed(
CacheReader *reader, Object *ob, Mesh *existing_mesh, const float time, const char **err_str)
{
AbcObjectReader *abc_reader = get_abc_reader(reader, ob, err_str);
- if (abc_reader == NULL) {
+ if (abc_reader == nullptr) {
return false;
}
@@ -851,9 +851,9 @@ CacheReader *CacheReader_open_alembic_object(AbcArchiveHandle *handle,
ImportSettings settings;
AbcObjectReader *abc_reader = create_reader(iobject, settings);
- if (abc_reader == NULL) {
+ if (abc_reader == nullptr) {
/* This object is not supported */
- return NULL;
+ return nullptr;
}
abc_reader->object(object);
abc_reader->incref();
diff --git a/source/blender/io/collada/AnimationExporter.cpp b/source/blender/io/collada/AnimationExporter.cpp
index 9ecb890b649..73952b06bc9 100644
--- a/source/blender/io/collada/AnimationExporter.cpp
+++ b/source/blender/io/collada/AnimationExporter.cpp
@@ -228,7 +228,7 @@ void AnimationExporter::export_matrix_animation(Object *ob, BCAnimationSampler &
if (keep_flat_curves || is_animated) {
bAction *action = bc_getSceneObjectAction(ob);
std::string name = encode_xml(id_name(ob));
- std::string action_name = (action == NULL) ? name + "-action" : id_name(action);
+ std::string action_name = (action == nullptr) ? name + "-action" : id_name(action);
std::string channel_type = "transform";
std::string axis;
std::string id = bc_get_action_id(action_name, name, channel_type, axis);
@@ -290,7 +290,7 @@ BCAnimationCurve *AnimationExporter::get_modified_export_curve(Object *ob,
BCAnimationCurveMap &curves)
{
std::string channel_type = curve.get_channel_type();
- BCAnimationCurve *mcurve = NULL;
+ BCAnimationCurve *mcurve = nullptr;
if (channel_type == "lens") {
/* Create an xfov curve */
@@ -302,7 +302,7 @@ BCAnimationCurve *AnimationExporter::get_modified_export_curve(Object *ob,
BCValueMap lens_values;
curve.get_value_map(lens_values);
- BCAnimationCurve *sensor_curve = NULL;
+ BCAnimationCurve *sensor_curve = nullptr;
BCCurveKey sensor_key(BC_ANIMATION_TYPE_CAMERA, "sensor_width", 0);
BCAnimationCurveMap::iterator cit = curves.find(sensor_key);
if (cit != curves.end()) {
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp
index df81e638c68..2e7977d89bb 100644
--- a/source/blender/io/collada/AnimationImporter.cpp
+++ b/source/blender/io/collada/AnimationImporter.cpp
@@ -228,7 +228,7 @@ void AnimationImporter::add_fcurves_to_object(Main *bmain,
}
if (ob->type == OB_ARMATURE) {
- bActionGroup *grp = NULL;
+ bActionGroup *grp = nullptr;
const char *bone_name = bc_get_joint_name(animated->node);
if (bone_name) {
@@ -236,7 +236,7 @@ void AnimationImporter::add_fcurves_to_object(Main *bmain,
grp = BKE_action_group_find_name(act, bone_name);
/* no matching groups, so add one */
- if (grp == NULL) {
+ if (grp == nullptr) {
/* Add a new group, and make it active */
grp = (bActionGroup *)MEM_callocN(sizeof(bActionGroup), "bActionGroup");
@@ -662,7 +662,7 @@ void AnimationImporter::Assign_color_animations(const COLLADAFW::UniqueId &listi
BLI_strncpy(rna_path, anim_type, sizeof(rna_path));
const COLLADAFW::AnimationList *animlist = animlist_map[listid];
- if (animlist == NULL) {
+ if (animlist == nullptr) {
fprintf(stderr,
"Collada: No animlist found for ID: %s of type %s\n",
listid.toAscii().c_str(),
@@ -818,7 +818,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob,
COLLADAFW::Transformation *tm)
{
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
- const char *bone_name = is_joint ? bc_get_joint_name(node) : NULL;
+ const char *bone_name = is_joint ? bc_get_joint_name(node) : nullptr;
char joint_path[200];
if (is_joint) {
armature_importer->get_rna_path_for_joint(node, joint_path, sizeof(joint_path));
@@ -847,7 +847,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob,
/* new curves to assign matrix transform animation */
FCurve *newcu[10]; /* if tm_type is matrix, then create 10 curves: 4 rot, 3 loc, 3 scale */
unsigned int totcu = 10;
- const char *tm_str = NULL;
+ const char *tm_str = nullptr;
char rna_path[200];
for (int i = 0; i < totcu; i++) {
@@ -910,7 +910,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob,
float temp[4][4], par[4][4];
/* calc M */
- calc_joint_parent_mat_rest(par, NULL, root, node);
+ calc_joint_parent_mat_rest(par, nullptr, root, node);
mul_m4_m4m4(temp, par, matfra);
#if 0
@@ -1218,7 +1218,7 @@ void AnimationImporter::translate_Animations(
for (unsigned int j = 0; j < matBinds.getCount(); j++) {
const COLLADAFW::UniqueId &matuid = matBinds[j].getReferencedMaterial();
const COLLADAFW::Effect *ef = (COLLADAFW::Effect *)(FW_object_map[matuid]);
- if (ef != NULL) { /* can be NULL T28909. */
+ if (ef != nullptr) { /* can be NULL T28909. */
Material *ma = uid_material_map[matuid];
if (!ma) {
fprintf(stderr,
@@ -1303,7 +1303,7 @@ void AnimationImporter::add_bone_animation_sampled(Object *ob,
/* new curves to assign matrix transform animation */
FCurve *newcu[10]; /* if tm_type is matrix, then create 10 curves: 4 rot, 3 loc, 3 scale. */
unsigned int totcu = 10;
- const char *tm_str = NULL;
+ const char *tm_str = nullptr;
char rna_path[200];
for (int i = 0; i < totcu; i++) {
@@ -1358,7 +1358,7 @@ void AnimationImporter::add_bone_animation_sampled(Object *ob,
Matrix temp, par;
/* calc M */
- calc_joint_parent_mat_rest(par, NULL, root, node);
+ calc_joint_parent_mat_rest(par, nullptr, root, node);
mul_m4_m4m4(temp, par, matfra);
/* evaluate_joint_world_transform_at_frame(temp, NULL, node, fra); */
@@ -1442,7 +1442,7 @@ AnimationImporter::AnimMix *AnimationImporter::get_animation_type(
for (unsigned int i = 0; i < nodeCameras.getCount(); i++) {
const COLLADAFW::Camera *camera = (COLLADAFW::Camera *)
FW_object_map[nodeCameras[i]->getInstanciatedObjectId()];
- if (camera == NULL) {
+ if (camera == nullptr) {
/* Can happen if the node refers to an unknown camera. */
continue;
}
@@ -1476,7 +1476,7 @@ AnimationImporter::AnimMix *AnimationImporter::get_animation_type(
for (unsigned int j = 0; j < matBinds.getCount(); j++) {
const COLLADAFW::UniqueId &matuid = matBinds[j].getReferencedMaterial();
const COLLADAFW::Effect *ef = (COLLADAFW::Effect *)(FW_object_map[matuid]);
- if (ef != NULL) { /* can be NULL T28909. */
+ if (ef != nullptr) { /* can be NULL T28909. */
const COLLADAFW::CommonEffectPointerArray &commonEffects = ef->getCommonEffects();
if (!commonEffects.empty()) {
COLLADAFW::EffectCommon *efc = commonEffects[0];
@@ -1597,10 +1597,10 @@ Object *AnimationImporter::translate_animation_OLD(
root_map[node->getUniqueId()];
Object *ob = is_joint ? armature_importer->get_armature_for_joint(node) :
object_map[node->getUniqueId()];
- const char *bone_name = is_joint ? bc_get_joint_name(node) : NULL;
+ const char *bone_name = is_joint ? bc_get_joint_name(node) : nullptr;
if (!ob) {
fprintf(stderr, "cannot find Object for Node with id=\"%s\"\n", node->getOriginalId().c_str());
- return NULL;
+ return nullptr;
}
/* frames at which to sample */
@@ -1620,7 +1620,7 @@ Object *AnimationImporter::translate_animation_OLD(
Bone *bone = BKE_armature_find_bone_name((bArmature *)ob->data, bone_name);
if (!bone) {
fprintf(stderr, "cannot find bone \"%s\"\n", bone_name);
- return NULL;
+ return nullptr;
}
unit_m4(rest);
@@ -1628,7 +1628,7 @@ Object *AnimationImporter::translate_animation_OLD(
invert_m4_m4(irest, rest);
}
- Object *job = NULL;
+ Object *job = nullptr;
#ifdef ARMATURE_TEST
FCurve *job_curves[10];
@@ -1641,7 +1641,7 @@ Object *AnimationImporter::translate_animation_OLD(
std::sort(frames.begin(), frames.end());
- const char *tm_str = NULL;
+ const char *tm_str = nullptr;
switch (tm_type) {
case COLLADAFW::Transformation::ROTATE:
tm_str = "rotation_quaternion";
@@ -1726,7 +1726,7 @@ Object *AnimationImporter::translate_animation_OLD(
float temp[4][4], par[4][4];
/* calc M */
- calc_joint_parent_mat_rest(par, NULL, root, node);
+ calc_joint_parent_mat_rest(par, nullptr, root, node);
mul_m4_m4m4(temp, par, matfra);
/* evaluate_joint_world_transform_at_frame(temp, NULL, node, fra); */
@@ -2071,8 +2071,8 @@ void AnimationImporter::get_joint_rest_mat(float mat[4][4],
if (!armature_importer->get_joint_bind_mat(mat, node)) {
float par[4][4], m[4][4];
- calc_joint_parent_mat_rest(par, NULL, root, node);
- get_node_mat(m, node, NULL, NULL);
+ calc_joint_parent_mat_rest(par, nullptr, root, node);
+ get_node_mat(m, node, nullptr, nullptr);
mul_m4_m4m4(mat, par, m);
}
}
@@ -2094,11 +2094,11 @@ bool AnimationImporter::calc_joint_parent_mat_rest(float mat[4][4],
if (!armature_importer->get_joint_bind_mat(m, node)) {
if (par) {
float temp[4][4];
- get_node_mat(temp, node, NULL, NULL);
+ get_node_mat(temp, node, nullptr, nullptr);
mul_m4_m4m4(m, par, temp);
}
else {
- get_node_mat(m, node, NULL, NULL);
+ get_node_mat(m, node, nullptr, nullptr);
}
}
@@ -2202,7 +2202,7 @@ void AnimationImporter::add_bone_fcurve(Object *ob, COLLADAFW::Node *node, FCurv
bActionGroup *grp = BKE_action_group_find_name(act, bone_name);
/* no matching groups, so add one */
- if (grp == NULL) {
+ if (grp == nullptr) {
/* Add a new group, and make it active */
grp = (bActionGroup *)MEM_callocN(sizeof(bActionGroup), "bActionGroup");
diff --git a/source/blender/io/collada/ArmatureExporter.cpp b/source/blender/io/collada/ArmatureExporter.cpp
index 6aeffd22bbd..9bf1a4ae830 100644
--- a/source/blender/io/collada/ArmatureExporter.cpp
+++ b/source/blender/io/collada/ArmatureExporter.cpp
@@ -50,7 +50,7 @@ void ArmatureExporter::add_armature_bones(Object *ob_arm,
/* write bone nodes */
bArmature *armature = (bArmature *)ob_arm->data;
- bool is_edited = armature->edbo != NULL;
+ bool is_edited = armature->edbo != nullptr;
if (!is_edited) {
ED_armature_to_edit(armature);
@@ -315,7 +315,7 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
BCMatrix::sanitize(mat, LIMITTED_PRECISION);
}
- TransformWriter::add_joint_transform(node, mat, NULL, this->export_settings, has_restmat);
+ TransformWriter::add_joint_transform(node, mat, nullptr, this->export_settings, has_restmat);
}
std::string ArmatureExporter::get_controller_id(Object *ob_arm, Object *ob)
diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp
index af6558da3b4..aa3b6615444 100644
--- a/source/blender/io/collada/ArmatureImporter.cpp
+++ b/source/blender/io/collada/ArmatureImporter.cpp
@@ -56,7 +56,7 @@ ArmatureImporter::ArmatureImporter(UnitConverter *conv,
view_layer(view_layer),
unit_converter(conv),
import_settings(import_settings),
- empty(NULL),
+ empty(nullptr),
mesh_importer(mesh)
{
}
@@ -139,7 +139,7 @@ int ArmatureImporter::create_bone(SkinInfo *skin,
/* create a bone even if there's no joint data for it (i.e. it has no influence) */
if (!bone_is_skinned) {
- get_node_mat(mat, node, NULL, NULL, parent_mat);
+ get_node_mat(mat, node, nullptr, nullptr, parent_mat);
}
if (parent) {
@@ -174,14 +174,14 @@ int ArmatureImporter::create_bone(SkinInfo *skin,
else {
float angle;
mat4_to_loc_rot_size(loc, rot, size, mat);
- mat3_to_vec_roll(rot, NULL, &angle);
+ mat3_to_vec_roll(rot, nullptr, &angle);
bone->roll = angle;
}
copy_v3_v3(bone->head, mat[3]);
if (bone_is_skinned && this->import_settings->keep_bind_info) {
float rest_mat[4][4];
- get_node_mat(rest_mat, node, NULL, NULL, NULL);
+ get_node_mat(rest_mat, node, nullptr, nullptr, nullptr);
bc_set_IDPropertyMatrix(bone, "bind_mat", joint_bind_mat);
bc_set_IDPropertyMatrix(bone, "rest_mat", rest_mat);
}
@@ -230,7 +230,7 @@ void ArmatureImporter::fix_leaf_bone_hierarchy(bArmature *armature,
Bone *bone,
bool fix_orientation)
{
- if (bone == NULL) {
+ if (bone == nullptr) {
return;
}
@@ -251,14 +251,14 @@ void ArmatureImporter::fix_leaf_bone(bArmature *armature,
BoneExtended *be,
bool fix_orientation)
{
- if (be == NULL || !be->has_tail()) {
+ if (be == nullptr || !be->has_tail()) {
/* Collada only knows Joints, Here we guess a reasonable leaf bone length */
float leaf_length = (leaf_bone_length == FLT_MAX) ? 1.0 : leaf_bone_length;
float vec[3];
- if (fix_orientation && ebone->parent != NULL) {
+ if (fix_orientation && ebone->parent != nullptr) {
EditBone *parent = ebone->parent;
sub_v3_v3v3(vec, ebone->head, parent->head);
if (len_squared_v3(vec) < MINIMUM_BONE_LENGTH) {
@@ -279,7 +279,7 @@ void ArmatureImporter::fix_leaf_bone(bArmature *armature,
void ArmatureImporter::fix_parent_connect(bArmature *armature, Bone *bone)
{
/* armature has no bones */
- if (bone == NULL) {
+ if (bone == nullptr) {
return;
}
@@ -297,18 +297,18 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature,
int max_chain_length)
{
BoneExtensionMap &extended_bones = bone_extension_manager.getExtensionMap(armature);
- BoneExtended *dominant_child = NULL;
+ BoneExtended *dominant_child = nullptr;
int maxlen = 0;
- if (parentbone == NULL) {
+ if (parentbone == nullptr) {
return;
}
Bone *child = (Bone *)parentbone->childbase.first;
- if (child && (import_settings->find_chains || child->next == NULL)) {
+ if (child && (import_settings->find_chains || child->next == nullptr)) {
for (; child; child = child->next) {
BoneExtended *be = extended_bones[child->name];
- if (be != NULL) {
+ if (be != nullptr) {
int chain_len = be->get_chain_length();
if (chain_len <= max_chain_length) {
if (chain_len > maxlen) {
@@ -316,7 +316,7 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature,
maxlen = chain_len;
}
else if (chain_len == maxlen) {
- dominant_child = NULL;
+ dominant_child = nullptr;
}
}
}
@@ -324,7 +324,7 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature,
}
BoneExtended *pbe = extended_bones[parentbone->name];
- if (dominant_child != NULL) {
+ if (dominant_child != nullptr) {
/* Found a valid chain. Now connect current bone with that chain.*/
EditBone *pebone = bc_get_edit_bone(armature, parentbone->name);
EditBone *cebone = bc_get_edit_bone(armature, dominant_child->get_name());
@@ -429,7 +429,7 @@ Object *ArmatureImporter::get_empty_for_leaves()
return empty;
}
- empty = bc_add_object(m_bmain, scene, view_layer, OB_EMPTY, NULL);
+ empty = bc_add_object(m_bmain, scene, view_layer, OB_EMPTY, nullptr);
empty->empty_drawtype = OB_EMPTY_SPHERE;
return empty;
@@ -480,7 +480,7 @@ void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *>
/* if there is an armature created for root_joint next root_joint */
for (ri = root_joints.begin(); ri != root_joints.end(); ri++) {
COLLADAFW::Node *node = *ri;
- if (get_armature_for_joint(node) != NULL) {
+ if (get_armature_for_joint(node) != nullptr) {
continue;
}
@@ -506,7 +506,7 @@ void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *>
ED_armature_to_edit(armature);
armature->layer = 0; /* layer is set according to imported bone set in create_bone() */
- create_bone(NULL, node, NULL, node->getChildNodes().getCount(), NULL, armature, layer_labels);
+ create_bone(nullptr, node, nullptr, node->getChildNodes().getCount(), nullptr, armature, layer_labels);
if (this->import_settings->find_chains) {
connect_bone_chains(armature, (Bone *)armature->bonebase.first, UNLIMITED_CHAIN_MAX);
}
@@ -543,7 +543,7 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin)
* - exit edit mode
* - set a sphere shape to leaf bones */
- Object *ob_arm = NULL;
+ Object *ob_arm = nullptr;
/*
* find if there's another skin sharing at least one bone with this skin
@@ -579,14 +579,14 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin)
*/
SkinInfo *a = &skin;
- Object *shared = NULL;
+ Object *shared = nullptr;
std::vector<COLLADAFW::Node *> skin_root_joints;
std::vector<std::string> layer_labels;
std::map<COLLADAFW::UniqueId, SkinInfo>::iterator it;
for (it = skin_by_data_uid.begin(); it != skin_by_data_uid.end(); it++) {
SkinInfo *b = &it->second;
- if (b == a || b->BKE_armature_from_object() == NULL) {
+ if (b == a || b->BKE_armature_from_object() == nullptr) {
continue;
}
@@ -603,7 +603,7 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin)
}
}
- if (shared != NULL) {
+ if (shared != nullptr) {
break;
}
}
@@ -651,7 +651,7 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin)
if (skin.uses_joint_or_descendant(node)) {
create_bone(
- &skin, node, NULL, node->getChildNodes().getCount(), NULL, armature, layer_labels);
+ &skin, node, nullptr, node->getChildNodes().getCount(), nullptr, armature, layer_labels);
if (joint_parent_map.find(node->getUniqueId()) != joint_parent_map.end() &&
!skin.get_parent()) {
@@ -707,7 +707,7 @@ void ArmatureImporter::set_pose(Object *ob_arm,
float obmat[4][4];
/* object-space */
- get_node_mat(obmat, root_node, NULL, NULL);
+ get_node_mat(obmat, root_node, nullptr, nullptr);
bool is_decomposed = node_is_decomposed(root_node);
// if (*edbone)
@@ -804,7 +804,7 @@ void ArmatureImporter::make_armatures(bContext *C, std::vector<Object *> &object
/* link armature with a mesh object */
const COLLADAFW::UniqueId &uid = skin.get_controller_uid();
const COLLADAFW::UniqueId *guid = get_geometry_uid(uid);
- if (guid != NULL) {
+ if (guid != nullptr) {
Object *ob = mesh_importer->get_object_by_geom_uid(*guid);
if (ob) {
skin.link_armature(C, ob, joint_by_uid, this);
@@ -1001,7 +1001,7 @@ void ArmatureImporter::make_shape_keys(bContext *C)
COLLADAFW::UniqueId *ArmatureImporter::get_geometry_uid(const COLLADAFW::UniqueId &controller_uid)
{
if (geom_uid_by_controller_uid.find(controller_uid) == geom_uid_by_controller_uid.end()) {
- return NULL;
+ return nullptr;
}
return &geom_uid_by_controller_uid[controller_uid];
@@ -1024,7 +1024,7 @@ Object *ArmatureImporter::get_armature_for_joint(COLLADAFW::Node *node)
return arm->second;
}
}
- return NULL;
+ return nullptr;
}
void ArmatureImporter::set_tags_map(TagsMap &tags_map)
@@ -1065,7 +1065,7 @@ BoneExtended &ArmatureImporter::add_bone_extended(EditBone *bone,
extended_bones[bone->name] = be;
TagsMap::iterator etit;
- ExtraTags *et = 0;
+ ExtraTags *et = nullptr;
etit = uid_tags_map.find(node->getUniqueId().toAscii());
bool has_connect = false;
diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp
index 46439bb3556..33eaf3376cd 100644
--- a/source/blender/io/collada/BCAnimationCurve.cpp
+++ b/source/blender/io/collada/BCAnimationCurve.cpp
@@ -22,7 +22,7 @@
BCAnimationCurve::BCAnimationCurve()
{
this->curve_key.set_object_type(BC_ANIMATION_TYPE_OBJECT);
- this->fcurve = NULL;
+ this->fcurve = nullptr;
this->curve_is_local_copy = false;
}
@@ -53,7 +53,7 @@ BCAnimationCurve::BCAnimationCurve(BCCurveKey key, Object *ob, FCurve *fcu)
BCAnimationCurve::BCAnimationCurve(const BCCurveKey &key, Object *ob)
{
this->curve_key = key;
- this->fcurve = NULL;
+ this->fcurve = nullptr;
this->curve_is_local_copy = false;
init_pointer_rna(ob);
}
@@ -120,7 +120,7 @@ BCAnimationCurve::~BCAnimationCurve()
if (curve_is_local_copy && fcurve) {
// fprintf(stderr, "removed fcurve %s\n", fcurve->rna_path);
delete_fcurve(fcurve);
- this->fcurve = NULL;
+ this->fcurve = nullptr;
}
}
@@ -169,7 +169,7 @@ std::string BCAnimationCurve::get_animation_name(Object *ob) const
} break;
case BC_ANIMATION_TYPE_BONE: {
- if (fcurve == NULL || fcurve->rna_path == NULL) {
+ if (fcurve == nullptr || fcurve->rna_path == nullptr) {
name = "";
}
else {
@@ -218,7 +218,7 @@ std::string BCAnimationCurve::get_rna_path() const
int BCAnimationCurve::sample_count() const
{
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
return 0;
}
return fcurve->totvert;
@@ -226,7 +226,7 @@ int BCAnimationCurve::sample_count() const
int BCAnimationCurve::closest_index_above(const float sample_frame, const int start_at) const
{
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
return -1;
}
@@ -240,7 +240,7 @@ int BCAnimationCurve::closest_index_above(const float sample_frame, const int st
int BCAnimationCurve::closest_index_below(const float sample_frame) const
{
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
return -1;
}
@@ -304,14 +304,14 @@ FCurve *BCAnimationCurve::get_edit_fcurve()
void BCAnimationCurve::clean_handles()
{
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
fcurve = get_edit_fcurve();
}
/* Keep old bezt data for copy)*/
BezTriple *old_bezts = fcurve->bezt;
int totvert = fcurve->totvert;
- fcurve->bezt = NULL;
+ fcurve->bezt = nullptr;
fcurve->totvert = 0;
for (int i = 0; i < totvert; i++) {
@@ -492,7 +492,7 @@ bool BCAnimationCurve::add_value_from_rna(const int frame_index)
void BCAnimationCurve::get_value_map(BCValueMap &value_map)
{
value_map.clear();
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
return;
}
@@ -533,7 +533,7 @@ bool BCAnimationCurve::is_animated()
bool BCAnimationCurve::is_keyframe(int frame)
{
- if (this->fcurve == NULL) {
+ if (this->fcurve == nullptr) {
return false;
}
diff --git a/source/blender/io/collada/BCAnimationSampler.cpp b/source/blender/io/collada/BCAnimationSampler.cpp
index 6bada9950b9..abc770ceef5 100644
--- a/source/blender/io/collada/BCAnimationSampler.cpp
+++ b/source/blender/io/collada/BCAnimationSampler.cpp
@@ -116,7 +116,7 @@ static bool is_object_keyframe(Object *ob, int frame_index)
static void add_keyframes_from(bAction *action, BCFrameSet &frameset)
{
if (action) {
- FCurve *fcu = NULL;
+ FCurve *fcu = nullptr;
for (fcu = (FCurve *)action->curves.first; fcu; fcu = fcu->next) {
BezTriple *bezt = fcu->bezt;
for (int i = 0; i < fcu->totvert; bezt++, i++) {
@@ -237,7 +237,7 @@ bool BCAnimationSampler::is_animated_by_constraint(Object *ob,
{
bConstraint *con;
for (con = (bConstraint *)conlist->first; con; con = con->next) {
- ListBase targets = {NULL, NULL};
+ ListBase targets = {nullptr, nullptr};
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
@@ -468,7 +468,7 @@ void BCAnimationSampler::initialize_curves(BCAnimationCurveMap &curves, Object *
}
/* Add curves on Object->data actions */
- action = NULL;
+ action = nullptr;
if (ob->type == OB_CAMERA) {
action = bc_getSceneCameraAction(ob);
object_type = BC_ANIMATION_TYPE_CAMERA;
@@ -520,7 +520,7 @@ const BCSample *BCSampleFrame::get_sample(Object *ob) const
{
BCSampleMap::const_iterator it = sampleMap.find(ob);
if (it == sampleMap.end()) {
- return NULL;
+ return nullptr;
}
return it->second;
}
@@ -529,7 +529,7 @@ const BCMatrix *BCSampleFrame::get_sample_matrix(Object *ob) const
{
BCSampleMap::const_iterator it = sampleMap.find(ob);
if (it == sampleMap.end()) {
- return NULL;
+ return nullptr;
}
BCSample *sample = it->second;
return &sample->get_matrix();
@@ -540,7 +540,7 @@ const BCMatrix *BCSampleFrame::get_sample_matrix(Object *ob, Bone *bone) const
{
BCSampleMap::const_iterator it = sampleMap.find(ob);
if (it == sampleMap.end()) {
- return NULL;
+ return nullptr;
}
BCSample *sample = it->second;
@@ -577,7 +577,7 @@ BCSample &BCSampleFrameContainer::add(Object *ob, int frame_index)
BCSampleFrame *BCSampleFrameContainer::get_frame(int frame_index)
{
BCSampleFrameMap::iterator it = sample_frames.find(frame_index);
- BCSampleFrame *frame = (it == sample_frames.end()) ? NULL : &it->second;
+ BCSampleFrame *frame = (it == sample_frames.end()) ? nullptr : &it->second;
return frame;
}
diff --git a/source/blender/io/collada/BCSampleData.cpp b/source/blender/io/collada/BCSampleData.cpp
index f099e250565..339dc829742 100644
--- a/source/blender/io/collada/BCSampleData.cpp
+++ b/source/blender/io/collada/BCSampleData.cpp
@@ -86,7 +86,7 @@ const BCMatrix *BCSample::get_matrix(Bone *bone) const
{
BCBoneMatrixMap::const_iterator it = bonemats.find(bone);
if (it == bonemats.end()) {
- return NULL;
+ return nullptr;
}
return it->second;
}
diff --git a/source/blender/io/collada/ControllerExporter.cpp b/source/blender/io/collada/ControllerExporter.cpp
index 1d8d0f2b389..52d4bbf122e 100644
--- a/source/blender/io/collada/ControllerExporter.cpp
+++ b/source/blender/io/collada/ControllerExporter.cpp
@@ -47,7 +47,7 @@
bool ControllerExporter::is_skinned_mesh(Object *ob)
{
- return bc_get_assigned_armature(ob) != NULL;
+ return bc_get_assigned_armature(ob) != nullptr;
}
void ControllerExporter::write_bone_URLs(COLLADASW::InstanceController &ins,
@@ -175,7 +175,7 @@ void ControllerExporter::export_skin_controller(Object *ob, Object *ob_arm)
bool use_instantiation = this->export_settings.get_use_object_instantiation();
Mesh *me;
- if (((Mesh *)ob->data)->dvert == NULL) {
+ if (((Mesh *)ob->data)->dvert == nullptr) {
return;
}
@@ -272,7 +272,7 @@ void ControllerExporter::export_skin_controller(Object *ob, Object *ob_arm)
add_joints_element(&ob->defbase, joints_source_id, inv_bind_mat_source_id);
add_vertex_weights_element(weights_source_id, joints_source_id, vcounts, joints);
- BKE_id_free(NULL, me);
+ BKE_id_free(nullptr, me);
closeSkin();
closeController();
@@ -312,7 +312,7 @@ void ControllerExporter::export_morph_controller(Object *ob, Key *key)
COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, morph_weights_id)));
targets.add();
- BKE_id_free(NULL, me);
+ BKE_id_free(nullptr, me);
/* support for animations
* can also try the base element and param alternative */
@@ -530,7 +530,7 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm,
float loc[3];
float rot[3] = {0, 0, 0};
float scale[3];
- bc_decompose(bind_mat, loc, NULL, NULL, scale);
+ bc_decompose(bind_mat, loc, nullptr, nullptr, scale);
/* Only translations, no rotation vs armature */
loc_eulO_size_to_mat4(bind_mat, loc, rot, scale, 6);
@@ -571,12 +571,12 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm,
Bone *ControllerExporter::get_bone_from_defgroup(Object *ob_arm, bDeformGroup *def)
{
bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, def->name);
- return pchan ? pchan->bone : NULL;
+ return pchan ? pchan->bone : nullptr;
}
bool ControllerExporter::is_bone_defgroup(Object *ob_arm, bDeformGroup *def)
{
- return get_bone_from_defgroup(ob_arm, def) != NULL;
+ return get_bone_from_defgroup(ob_arm, def) != nullptr;
}
std::string ControllerExporter::add_weights_source(Mesh *me,
diff --git a/source/blender/io/collada/DocumentExporter.cpp b/source/blender/io/collada/DocumentExporter.cpp
index 65c71b0edef..241afbd4034 100644
--- a/source/blender/io/collada/DocumentExporter.cpp
+++ b/source/blender/io/collada/DocumentExporter.cpp
@@ -127,7 +127,7 @@ char *bc_CustomData_get_layer_name(const struct CustomData *data, int type, int
{
int layer_index = CustomData_get_layer_index(data, type);
if (layer_index < 0) {
- return NULL;
+ return nullptr;
}
return data->layers[layer_index + n].name;
@@ -138,7 +138,7 @@ char *bc_CustomData_get_active_layer_name(const CustomData *data, int type)
/* get the layer index of the active layer of type */
int layer_index = CustomData_get_active_layer_index(data, type);
if (layer_index < 0) {
- return NULL;
+ return nullptr;
}
return data->layers[layer_index].name;
@@ -155,7 +155,7 @@ static COLLADABU::NativeString make_temp_filepath(const char *name, const char *
{
char tempfile[FILE_MAX];
- if (name == NULL) {
+ if (name == nullptr) {
name = "untitled";
}
@@ -184,7 +184,7 @@ int DocumentExporter::exportCurrentScene()
clear_global_id_map();
- COLLADABU::NativeString native_filename = make_temp_filepath(NULL, ".dae");
+ COLLADABU::NativeString native_filename = make_temp_filepath(nullptr, ".dae");
COLLADASW::StreamWriter *writer = new COLLADASW::StreamWriter(native_filename);
/* open <collada> */
diff --git a/source/blender/io/collada/DocumentImporter.cpp b/source/blender/io/collada/DocumentImporter.cpp
index f7f9bf3f2f9..b85a96d89de 100644
--- a/source/blender/io/collada/DocumentImporter.cpp
+++ b/source/blender/io/collada/DocumentImporter.cpp
@@ -224,7 +224,7 @@ void DocumentImporter::finish()
fprintf(stderr, "+-- Import Scene --------\n");
const COLLADAFW::NodePointerArray &roots = (*sit)->getRootNodes();
for (unsigned int i = 0; i < roots.getCount(); i++) {
- std::vector<Object *> *objects_done = write_node(roots[i], NULL, sce, NULL, false);
+ std::vector<Object *> *objects_done = write_node(roots[i], nullptr, sce, nullptr, false);
objects_to_scale->insert(
objects_to_scale->end(), objects_done->begin(), objects_done->end());
delete objects_done;
@@ -247,7 +247,7 @@ void DocumentImporter::finish()
const COLLADAFW::NodePointerArray &roots = (*vsit)->getRootNodes();
for (unsigned int i = 0; i < roots.getCount(); i++) {
- translate_anim_recursive(roots[i], NULL, NULL);
+ translate_anim_recursive(roots[i], nullptr, nullptr);
}
}
@@ -270,12 +270,12 @@ void DocumentImporter::finish()
/* update scene */
DEG_id_tag_update(&sce->id, ID_RECALC_COPY_ON_WRITE);
DEG_relations_tag_update(bmain);
- WM_event_add_notifier(mContext, NC_OBJECT | ND_TRANSFORM, NULL);
+ WM_event_add_notifier(mContext, NC_OBJECT | ND_TRANSFORM, nullptr);
}
void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node,
- COLLADAFW::Node *par = NULL,
- Object *parob = NULL)
+ COLLADAFW::Node *par = nullptr,
+ Object *parob = nullptr)
{
/* The split in T29246, rootmap must point at actual root when
* calculating bones in apply_curves_as_matrix. - actual root is the root node.
@@ -306,7 +306,7 @@ void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node,
#endif
unsigned int i;
- if (node->getType() == COLLADAFW::Node::JOINT && par == NULL) {
+ if (node->getType() == COLLADAFW::Node::JOINT && par == nullptr) {
/* For Skeletons without root node we have to simulate the
* root node here and recursively enter the same function
* XXX: maybe this can be made more elegant. */
@@ -317,7 +317,7 @@ void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node,
node, root_map, object_map, FW_object_map, uid_material_map);
COLLADAFW::NodePointerArray &children = node->getChildNodes();
for (i = 0; i < children.getCount(); i++) {
- translate_anim_recursive(children[i], node, NULL);
+ translate_anim_recursive(children[i], node, nullptr);
}
}
}
@@ -375,11 +375,11 @@ Object *DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera
const COLLADAFW::UniqueId &cam_uid = camera->getInstanciatedObjectId();
if (uid_camera_map.find(cam_uid) == uid_camera_map.end()) {
// fprintf(stderr, "Couldn't find camera by UID.\n");
- return NULL;
+ return nullptr;
}
Main *bmain = CTX_data_main(mContext);
- Object *ob = bc_add_object(bmain, sce, view_layer, OB_CAMERA, NULL);
+ Object *ob = bc_add_object(bmain, sce, view_layer, OB_CAMERA, nullptr);
Camera *cam = uid_camera_map[cam_uid];
Camera *old_cam = (Camera *)ob->data;
ob->data = cam;
@@ -392,11 +392,11 @@ Object *DocumentImporter::create_light_object(COLLADAFW::InstanceLight *lamp, Sc
const COLLADAFW::UniqueId &lamp_uid = lamp->getInstanciatedObjectId();
if (uid_light_map.find(lamp_uid) == uid_light_map.end()) {
fprintf(stderr, "Couldn't find light by UID.\n");
- return NULL;
+ return nullptr;
}
Main *bmain = CTX_data_main(mContext);
- Object *ob = bc_add_object(bmain, sce, view_layer, OB_LAMP, NULL);
+ Object *ob = bc_add_object(bmain, sce, view_layer, OB_LAMP, nullptr);
Light *la = uid_light_map[lamp_uid];
Light *old_light = (Light *)ob->data;
ob->data = la;
@@ -456,7 +456,7 @@ Object *DocumentImporter::create_instance_node(Object *source_ob,
continue;
}
COLLADAFW::InstanceNodePointerArray &inodes = child_node->getInstanceNodes();
- Object *new_child = NULL;
+ Object *new_child = nullptr;
if (inodes.getCount()) { /* \todo loop through instance nodes */
const COLLADAFW::UniqueId &id = inodes[0]->getInstanciatedObjectId();
fprintf(stderr, "Doing %d child nodes\n", (int)node_map.count(id));
@@ -465,7 +465,7 @@ Object *DocumentImporter::create_instance_node(Object *source_ob,
}
else {
new_child = create_instance_node(
- object_map.find(child_id)->second, child_node, NULL, sce, is_library_node);
+ object_map.find(child_id)->second, child_node, nullptr, sce, is_library_node);
}
bc_set_parent(new_child, obn, mContext, true);
@@ -509,7 +509,7 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
bool is_library_node)
{
Main *bmain = CTX_data_main(mContext);
- Object *ob = NULL;
+ Object *ob = nullptr;
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
bool read_transform = true;
std::string id = node->getOriginalId();
@@ -525,7 +525,7 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
stderr, "| %s id='%s', name='%s'\n", is_joint ? "JOINT" : "NODE ", id.c_str(), name.c_str());
if (is_joint) {
- if (parent_node == NULL && !is_library_node) {
+ if (parent_node == nullptr && !is_library_node) {
/* A Joint on root level is a skeleton without root node.
* Here we add the armature "on the fly": */
par = bc_add_object(bmain, sce, view_layer, OB_ARMATURE, std::string("Armature").c_str());
@@ -534,11 +534,11 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
object_map.insert(std::pair<COLLADAFW::UniqueId, Object *>(node->getUniqueId(), par));
node_map[node->getUniqueId()] = node;
}
- if (parent_node == NULL || parent_node->getType() != COLLADAFW::Node::JOINT) {
+ if (parent_node == nullptr || parent_node->getType() != COLLADAFW::Node::JOINT) {
armature_importer.add_root_joint(node, par);
}
- if (parent_node == NULL) {
+ if (parent_node == nullptr) {
/* for skeletons without root node all has been done above.
* Skeletons with root node are handled further down. */
goto finally;
@@ -561,12 +561,12 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
* sure... <instance_geometry> */
while (geom_done < geom.getCount()) {
ob = mesh_importer.create_mesh_object(node, geom[geom_done], false, uid_material_map);
- if (ob == NULL) {
+ if (ob == nullptr) {
report_unknown_reference(*node, "instance_mesh");
}
else {
objects_done->push_back(ob);
- if (parent_node == NULL) {
+ if (parent_node == nullptr) {
root_objects->push_back(ob);
}
}
@@ -574,12 +574,12 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
}
while (camera_done < camera.getCount()) {
ob = create_camera_object(camera[camera_done], sce);
- if (ob == NULL) {
+ if (ob == nullptr) {
report_unknown_reference(*node, "instance_camera");
}
else {
objects_done->push_back(ob);
- if (parent_node == NULL) {
+ if (parent_node == nullptr) {
root_objects->push_back(ob);
}
}
@@ -587,12 +587,12 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
}
while (lamp_done < lamp.getCount()) {
ob = create_light_object(lamp[lamp_done], sce);
- if (ob == NULL) {
+ if (ob == nullptr) {
report_unknown_reference(*node, "instance_light");
}
else {
objects_done->push_back(ob);
- if (parent_node == NULL) {
+ if (parent_node == nullptr) {
root_objects->push_back(ob);
}
}
@@ -602,12 +602,12 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
COLLADAFW::InstanceGeometry *geometry = (COLLADAFW::InstanceGeometry *)
controller[controller_done];
ob = mesh_importer.create_mesh_object(node, geometry, true, uid_material_map);
- if (ob == NULL) {
+ if (ob == nullptr) {
report_unknown_reference(*node, "instance_controller");
}
else {
objects_done->push_back(ob);
- if (parent_node == NULL) {
+ if (parent_node == nullptr) {
root_objects->push_back(ob);
}
}
@@ -620,7 +620,7 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
fprintf(stderr,
"Cannot find object for node referenced by <instance_node name=\"%s\">.\n",
inst_node[inst_done]->getName().c_str());
- ob = NULL;
+ ob = nullptr;
}
else {
std::pair<std::multimap<COLLADAFW::UniqueId, Object *>::iterator,
@@ -633,7 +633,7 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
COLLADAFW::Node *source_node = node_map[node_id];
ob = create_instance_node(source_ob, source_node, node, sce, is_library_node);
objects_done->push_back(ob);
- if (parent_node == NULL) {
+ if (parent_node == nullptr) {
root_objects->push_back(ob);
}
}
@@ -651,10 +651,10 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
ob = bc_add_object(bmain, sce, view_layer, OB_ARMATURE, name.c_str());
}
else {
- ob = bc_add_object(bmain, sce, view_layer, OB_EMPTY, NULL);
+ ob = bc_add_object(bmain, sce, view_layer, OB_EMPTY, nullptr);
}
objects_done->push_back(ob);
- if (parent_node == NULL) {
+ if (parent_node == nullptr) {
root_objects->push_back(ob);
}
}
@@ -701,7 +701,7 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
}
if (objects_done->empty()) {
- ob = NULL;
+ ob = nullptr;
}
else {
ob = *objects_done->begin();
@@ -763,7 +763,7 @@ bool DocumentImporter::writeLibraryNodes(const COLLADAFW::LibraryNodes *libraryN
fprintf(stderr, "+-- Read Library nodes ----------\n");
for (unsigned int i = 0; i < nodes.getCount(); i++) {
std::vector<Object *> *child_objects;
- child_objects = write_node(nodes[i], NULL, sce, NULL, true);
+ child_objects = write_node(nodes[i], nullptr, sce, nullptr, true);
delete child_objects;
}
return true;
@@ -876,7 +876,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
}
Main *bmain = CTX_data_main(mContext);
- Camera *cam = NULL;
+ Camera *cam = nullptr;
std::string cam_id, cam_name;
ExtraTags *et = getExtraTags(camera->getUniqueId());
@@ -1029,7 +1029,7 @@ bool DocumentImporter::writeLight(const COLLADAFW::Light *light)
}
Main *bmain = CTX_data_main(mContext);
- Light *lamp = NULL;
+ Light *lamp = nullptr;
std::string la_id, la_name;
ExtraTags *et = getExtraTags(light->getUniqueId());
@@ -1237,7 +1237,7 @@ bool DocumentImporter::writeKinematicsScene(const COLLADAFW::KinematicsScene *ki
ExtraTags *DocumentImporter::getExtraTags(const COLLADAFW::UniqueId &uid)
{
if (uid_tags_map.find(uid.toAscii()) == uid_tags_map.end()) {
- return NULL;
+ return nullptr;
}
return uid_tags_map[uid.toAscii()];
}
diff --git a/source/blender/io/collada/ExtraHandler.cpp b/source/blender/io/collada/ExtraHandler.cpp
index acfa74f34af..9bed200676f 100644
--- a/source/blender/io/collada/ExtraHandler.cpp
+++ b/source/blender/io/collada/ExtraHandler.cpp
@@ -23,7 +23,7 @@
#include "ExtraHandler.h"
-ExtraHandler::ExtraHandler(DocumentImporter *dimp, AnimationImporter *aimp) : currentExtraTags(0)
+ExtraHandler::ExtraHandler(DocumentImporter *dimp, AnimationImporter *aimp) : currentExtraTags(nullptr)
{
this->dimp = dimp;
this->aimp = aimp;
@@ -50,7 +50,7 @@ bool ExtraHandler::textData(const char *text, size_t textLength)
{
char buf[1024];
- if (currentElement.length() == 0 || currentExtraTags == 0) {
+ if (currentElement.length() == 0 || currentExtraTags == nullptr) {
return false;
}
@@ -64,7 +64,7 @@ bool ExtraHandler::parseElement(const char *profileName,
const COLLADAFW::UniqueId &uniqueId)
{
/* implement for backwards compatibility, new version added object parameter */
- return parseElement(profileName, elementHash, uniqueId, NULL);
+ return parseElement(profileName, elementHash, uniqueId, nullptr);
}
bool ExtraHandler::parseElement(const char *profileName,
diff --git a/source/blender/io/collada/GeometryExporter.cpp b/source/blender/io/collada/GeometryExporter.cpp
index 332390845c7..def7caabf32 100644
--- a/source/blender/io/collada/GeometryExporter.cpp
+++ b/source/blender/io/collada/GeometryExporter.cpp
@@ -140,7 +140,7 @@ void GeometryExporter::operator()(Object *ob)
}
}
- BKE_id_free(NULL, me);
+ BKE_id_free(nullptr, me);
}
void GeometryExporter::export_key_mesh(Object *ob, Mesh *me, KeyBlock *kb)
@@ -350,7 +350,7 @@ void GeometryExporter::create_mesh_primitive_list(short material_index,
return;
}
- Material *ma = ob->totcol ? BKE_object_material_get(ob, material_index + 1) : NULL;
+ Material *ma = ob->totcol ? BKE_object_material_get(ob, material_index + 1) : nullptr;
COLLADASW::PrimitivesBase *primitive_list = create_primitive_list(is_triangulated, mSW);
/* sets count attribute in <polylist> */
@@ -636,7 +636,7 @@ void GeometryExporter::create_normals(std::vector<Normal> &normals,
MVert *verts = me->mvert;
MLoop *mloops = me->mloop;
- float(*lnors)[3] = NULL;
+ float(*lnors)[3] = nullptr;
bool use_custom_normals = false;
BKE_mesh_calc_normals_split(me);
diff --git a/source/blender/io/collada/ImageExporter.cpp b/source/blender/io/collada/ImageExporter.cpp
index 51d753db03f..bb7b3bf0631 100644
--- a/source/blender/io/collada/ImageExporter.cpp
+++ b/source/blender/io/collada/ImageExporter.cpp
@@ -53,7 +53,7 @@ void ImagesExporter::export_UV_Image(Image *image, bool use_copies)
std::string name(id_name(image));
std::string translated_name(translate_id(name));
- ImBuf *imbuf = BKE_image_acquire_ibuf(image, NULL, NULL);
+ ImBuf *imbuf = BKE_image_acquire_ibuf(image, nullptr, nullptr);
if (!imbuf) {
fprintf(stderr, "Collada export: image does not exist:\n%s\n", image->filepath);
return;
@@ -106,7 +106,7 @@ void ImagesExporter::export_UV_Image(Image *image, bool use_copies)
/* make absolute source path */
BLI_strncpy(source_path, image->filepath, sizeof(source_path));
BLI_path_abs(source_path, ID_BLEND_PATH_FROM_GLOBAL(&image->id));
- BLI_path_normalize(NULL, source_path);
+ BLI_path_normalize(nullptr, source_path);
if (use_copies) {
@@ -145,7 +145,7 @@ void ImagesExporter::export_UV_Image(Image *image, bool use_copies)
img.add(mSW);
fprintf(stdout, "Collada export: Added image: %s\n", export_file);
- BKE_image_release_ibuf(image, imbuf, NULL);
+ BKE_image_release_ibuf(image, imbuf, nullptr);
}
void ImagesExporter::exportImages(Scene *sce)
diff --git a/source/blender/io/collada/Materials.cpp b/source/blender/io/collada/Materials.cpp
index a97b7dfcfd6..644ecc18e9b 100644
--- a/source/blender/io/collada/Materials.cpp
+++ b/source/blender/io/collada/Materials.cpp
@@ -96,10 +96,10 @@ bNodeTree *MaterialNode::prepare_material_nodetree()
{
if (material->nodetree) {
ntree = material->nodetree;
- return NULL;
+ return nullptr;
}
- material->nodetree = ntreeAddTree(NULL, "Shader Nodetree", "ShaderNodeTree");
+ material->nodetree = ntreeAddTree(nullptr, "Shader Nodetree", "ShaderNodeTree");
material->use_nodes = true;
ntree = material->nodetree;
return ntree;
@@ -225,7 +225,7 @@ void MaterialNode::set_diffuse(COLLADAFW::ColorOrTexture &cot)
}
else if (cot.isTexture()) {
bNode *texture_node = add_texture_node(cot, -300, locy, "Base Color");
- if (texture_node != NULL) {
+ if (texture_node != nullptr) {
add_link(texture_node, 0, shader_node, 0);
}
}
@@ -320,7 +320,7 @@ void MaterialNode::set_emission(COLLADAFW::ColorOrTexture &cot)
// texture
else if (cot.isTexture()) {
bNode *texture_node = add_texture_node(cot, -300, locy, "Emission");
- if (texture_node != NULL) {
+ if (texture_node != nullptr) {
add_link(texture_node, 0, shader_node, 0);
}
}
@@ -392,7 +392,7 @@ bNode *MaterialNode::add_texture_node(COLLADAFW::ColorOrTexture &cot,
if (image_map.find(ima_uid) == image_map.end()) {
fprintf(stderr, "Couldn't find an image by UID.\n");
- return NULL;
+ return nullptr;
}
Image *ima = image_map[ima_uid];
diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp
index 72a265db287..196dafc19cf 100644
--- a/source/blender/io/collada/MeshImporter.cpp
+++ b/source/blender/io/collada/MeshImporter.cpp
@@ -346,7 +346,7 @@ void MeshImporter::read_vertices(COLLADAFW::Mesh *mesh, Mesh *me)
}
me->totvert = pos.getFloatValues()->getCount() / stride;
- me->mvert = (MVert *)CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, me->totvert);
+ me->mvert = (MVert *)CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, nullptr, me->totvert);
MVert *mvert;
int i;
@@ -469,8 +469,8 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
if (total_poly_count > 0) {
me->totpoly = total_poly_count;
me->totloop = total_loop_count;
- me->mpoly = (MPoly *)CustomData_add_layer(&me->pdata, CD_MPOLY, CD_CALLOC, NULL, me->totpoly);
- me->mloop = (MLoop *)CustomData_add_layer(&me->ldata, CD_MLOOP, CD_CALLOC, NULL, me->totloop);
+ me->mpoly = (MPoly *)CustomData_add_layer(&me->pdata, CD_MPOLY, CD_CALLOC, nullptr, me->totpoly);
+ me->mloop = (MLoop *)CustomData_add_layer(&me->ldata, CD_MLOOP, CD_CALLOC, nullptr, me->totloop);
unsigned int totuvset = collada_mesh->getUVCoords().getInputInfosArray().getCount();
for (int i = 0; i < totuvset; i++) {
@@ -487,7 +487,7 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
COLLADAFW::String &uvname = info->mName;
/* Allocate space for UV_data */
CustomData_add_layer_named(
- &me->ldata, CD_MLOOPUV, CD_DEFAULT, NULL, me->totloop, uvname.c_str());
+ &me->ldata, CD_MLOOPUV, CD_DEFAULT, nullptr, me->totloop, uvname.c_str());
}
/* activate the first uv map */
me->mloopuv = (MLoopUV *)CustomData_get_layer_n(&me->ldata, CD_MLOOPUV, 0);
@@ -500,7 +500,7 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
collada_mesh->getColors().getInputInfosArray()[i];
COLLADAFW::String colname = extract_vcolname(info->mName);
CustomData_add_layer_named(
- &me->ldata, CD_MLOOPCOL, CD_DEFAULT, NULL, me->totloop, colname.c_str());
+ &me->ldata, CD_MLOOPCOL, CD_DEFAULT, nullptr, me->totloop, colname.c_str());
}
me->mloopcol = (MLoopCol *)CustomData_get_layer_n(&me->ldata, CD_MLOOPCOL, 0);
}
@@ -576,7 +576,7 @@ void MeshImporter::mesh_add_edges(Mesh *mesh, int len)
CustomData_copy_data(&mesh->edata, &edata, 0, 0, mesh->totedge);
if (!CustomData_has_layer(&edata, CD_MEDGE)) {
- CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
+ CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, nullptr, totedge);
}
CustomData_free(&mesh->edata, mesh->totedge);
@@ -744,7 +744,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
COLLADAFW::IndexList &index_list = *index_list_array_uvcoord[uvset_index];
MLoopUV *mloopuv = (MLoopUV *)CustomData_get_layer_named(
&me->ldata, CD_MLOOPUV, index_list.getName().c_str());
- if (mloopuv == NULL) {
+ if (mloopuv == nullptr) {
fprintf(stderr,
"Collada import: Mesh [%s] : Unknown reference to TEXCOORD [#%s].\n",
me->id.name,
@@ -774,7 +774,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
COLLADAFW::String colname = extract_vcolname(color_index_list.getName());
MLoopCol *mloopcol = (MLoopCol *)CustomData_get_layer_named(
&me->ldata, CD_MLOOPCOL, colname.c_str());
- if (mloopcol == NULL) {
+ if (mloopcol == nullptr) {
fprintf(stderr,
"Collada import: Mesh [%s] : Unknown reference to VCOLOR [#%s].\n",
me->id.name,
@@ -888,7 +888,7 @@ Object *MeshImporter::get_object_by_geom_uid(const COLLADAFW::UniqueId &geom_uid
if (uid_object_map.find(geom_uid) != uid_object_map.end()) {
return uid_object_map[geom_uid];
}
- return NULL;
+ return nullptr;
}
Mesh *MeshImporter::get_mesh_by_geom_uid(const COLLADAFW::UniqueId &geom_uid)
@@ -896,7 +896,7 @@ Mesh *MeshImporter::get_mesh_by_geom_uid(const COLLADAFW::UniqueId &geom_uid)
if (uid_mesh_map.find(geom_uid) != uid_mesh_map.end()) {
return uid_mesh_map[geom_uid];
}
- return NULL;
+ return nullptr;
}
std::string *MeshImporter::get_geometry_name(const std::string &mesh_name)
@@ -904,7 +904,7 @@ std::string *MeshImporter::get_geometry_name(const std::string &mesh_name)
if (this->mesh_geom_map.find(mesh_name) != this->mesh_geom_map.end()) {
return &this->mesh_geom_map[mesh_name];
}
- return NULL;
+ return nullptr;
}
/**
@@ -959,7 +959,7 @@ static void bc_remove_materials_from_object(Object *ob, Mesh *me)
{
for (int index = 0; index < ob->totcol; index++) {
ob->matbits[index] = 0;
- ob->mat[index] = NULL;
+ ob->mat[index] = nullptr;
}
}
@@ -1109,7 +1109,7 @@ Object *MeshImporter::create_mesh_object(
if (!geom_uid) {
fprintf(stderr, "Couldn't find a mesh UID by controller's UID.\n");
- return NULL;
+ return nullptr;
}
}
else {
@@ -1118,16 +1118,16 @@ Object *MeshImporter::create_mesh_object(
/* this could happen if a mesh was not created
* (e.g. if it contains unsupported geometry) */
fprintf(stderr, "Couldn't find a mesh by UID.\n");
- return NULL;
+ return nullptr;
}
}
if (!uid_mesh_map[*geom_uid]) {
- return NULL;
+ return nullptr;
}
/* name Object */
const std::string &id = node->getName().empty() ? node->getOriginalId() : node->getName();
- const char *name = (id.length()) ? id.c_str() : NULL;
+ const char *name = (id.length()) ? id.c_str() : nullptr;
/* add object */
Object *ob = bc_add_object(m_bmain, scene, view_layer, OB_MESH, name);
diff --git a/source/blender/io/collada/SceneExporter.cpp b/source/blender/io/collada/SceneExporter.cpp
index b8de5bbd91e..01c270518e9 100644
--- a/source/blender/io/collada/SceneExporter.cpp
+++ b/source/blender/io/collada/SceneExporter.cpp
@@ -107,7 +107,7 @@ void SceneExporter::writeNode(Object *ob)
bool armature_exported = false;
Object *ob_arm = bc_get_assigned_armature(ob);
- if (ob_arm != NULL) {
+ if (ob_arm != nullptr) {
armature_exported = bc_is_in_Export_set(
this->export_settings.get_export_set(), ob_arm, view_layer);
if (armature_exported && bc_is_marked(ob_arm)) {
@@ -207,7 +207,7 @@ void SceneExporter::writeNode(Object *ob)
* No real mapping in the .dae
* Need support for multiple target objects also. */
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
- ListBase targets = {NULL, NULL};
+ ListBase targets = {nullptr, nullptr};
if (cti && cti->get_constraint_targets) {
bConstraintTarget *ct;
diff --git a/source/blender/io/collada/SkinInfo.cpp b/source/blender/io/collada/SkinInfo.cpp
index 726127a1532..24ae1f0de11 100644
--- a/source/blender/io/collada/SkinInfo.cpp
+++ b/source/blender/io/collada/SkinInfo.cpp
@@ -75,7 +75,7 @@ SkinInfo::SkinInfo(const SkinInfo &skin)
transfer_int_array_data_const(skin.joint_indices, joint_indices);
}
-SkinInfo::SkinInfo(UnitConverter *conv) : unit_converter(conv), ob_arm(NULL), parent(NULL)
+SkinInfo::SkinInfo(UnitConverter *conv) : unit_converter(conv), ob_arm(nullptr), parent(nullptr)
{
}
@@ -157,7 +157,7 @@ void SkinInfo::set_controller(const COLLADAFW::SkinController *co)
/* called from write_controller */
Object *SkinInfo::create_armature(Main *bmain, Scene *scene, ViewLayer *view_layer)
{
- ob_arm = bc_add_object(bmain, scene, view_layer, OB_ARMATURE, NULL);
+ ob_arm = bc_add_object(bmain, scene, view_layer, OB_ARMATURE, nullptr);
return ob_arm;
}
@@ -228,7 +228,7 @@ void SkinInfo::link_armature(bContext *C,
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- ModifierData *md = ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Armature);
+ ModifierData *md = ED_object_modifier_add(nullptr, bmain, scene, ob, nullptr, eModifierType_Armature);
ArmatureModifierData *amd = (ArmatureModifierData *)md;
amd->object = ob_arm;
diff --git a/source/blender/io/collada/TransformReader.cpp b/source/blender/io/collada/TransformReader.cpp
index 393393be65b..81b0ffc340a 100644
--- a/source/blender/io/collada/TransformReader.cpp
+++ b/source/blender/io/collada/TransformReader.cpp
@@ -33,7 +33,7 @@ void TransformReader::get_node_mat(float mat[4][4],
std::map<COLLADAFW::UniqueId, Animation> *animation_map,
Object *ob)
{
- get_node_mat(mat, node, animation_map, ob, NULL);
+ get_node_mat(mat, node, animation_map, ob, nullptr);
}
void TransformReader::get_node_mat(float mat[4][4],
diff --git a/source/blender/io/collada/TransformWriter.cpp b/source/blender/io/collada/TransformWriter.cpp
index 7c9d26e4fde..c22631e7bd3 100644
--- a/source/blender/io/collada/TransformWriter.cpp
+++ b/source/blender/io/collada/TransformWriter.cpp
@@ -54,7 +54,7 @@ void TransformWriter::add_joint_transform(COLLADASW::Node &node,
}
else {
float loc[3], rot[3], scale[3];
- bc_decompose(local, loc, rot, NULL, scale);
+ bc_decompose(local, loc, rot, nullptr, scale);
add_transform(node, loc, rot, scale);
}
}
@@ -90,7 +90,7 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node &node,
}
case BC_TRANSFORMATION_TYPE_DECOMPOSED: {
float loc[3], rot[3], scale[3];
- bc_decompose(f_obmat, loc, rot, NULL, scale);
+ bc_decompose(f_obmat, loc, rot, nullptr, scale);
if (limit_precision) {
bc_sanitize_v3(loc, LIMITTED_PRECISION);
bc_sanitize_v3(rot, LIMITTED_PRECISION);
diff --git a/source/blender/io/collada/collada.cpp b/source/blender/io/collada/collada.cpp
index bf1ebbfa669..f3c69c7d3d0 100644
--- a/source/blender/io/collada/collada.cpp
+++ b/source/blender/io/collada/collada.cpp
@@ -109,7 +109,7 @@ int collada_export(bContext *C, ExportSettings *export_settings)
DocumentExporter exporter(blender_context, export_settings);
int status = exporter.exportCurrentScene();
- BLI_linklist_free(export_settings->export_set, NULL);
+ BLI_linklist_free(export_settings->export_set, nullptr);
return (status) ? -1 : export_count;
}
diff --git a/source/blender/io/collada/collada_utils.cpp b/source/blender/io/collada/collada_utils.cpp
index d050554d916..58b579f5ac0 100644
--- a/source/blender/io/collada/collada_utils.cpp
+++ b/source/blender/io/collada/collada_utils.cpp
@@ -97,7 +97,7 @@ int bc_test_parent_loop(Object *par, Object *ob)
{
/* test if 'ob' is a parent somewhere in par's parents */
- if (par == NULL) {
+ if (par == nullptr) {
return 0;
}
if (ob == par) {
@@ -112,7 +112,7 @@ bool bc_validateConstraints(bConstraint *con)
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
/* these we can skip completely (invalid constraints...) */
- if (cti == NULL) {
+ if (cti == nullptr) {
return false;
}
if (con->flag & (CONSTRAINT_DISABLE | CONSTRAINT_OFF)) {
@@ -120,7 +120,7 @@ bool bc_validateConstraints(bConstraint *con)
}
/* these constraints can't be evaluated anyway */
- if (cti->evaluate_constraint == NULL) {
+ if (cti->evaluate_constraint == nullptr) {
return false;
}
@@ -144,7 +144,7 @@ bool bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
mul_m4_m4m4(ob->obmat, par->obmat, ob->obmat);
}
- bool ok = ED_object_parent_set(NULL, C, scene, ob, par, partype, xmirror, keep_transform, NULL);
+ bool ok = ED_object_parent_set(nullptr, C, scene, ob, par, partype, xmirror, keep_transform, nullptr);
return ok;
}
@@ -222,7 +222,7 @@ Mesh *bc_get_mesh_copy(BlenderContext &blender_context,
bool triangulate)
{
CustomData_MeshMasks mask = CD_MASK_MESH;
- Mesh *tmpmesh = NULL;
+ Mesh *tmpmesh = nullptr;
if (apply_modifiers) {
#if 0 /* Not supported by new system currently... */
switch (export_mesh_type) {
@@ -246,7 +246,7 @@ Mesh *bc_get_mesh_copy(BlenderContext &blender_context,
tmpmesh = (Mesh *)ob->data;
}
- tmpmesh = (Mesh *)BKE_id_copy_ex(NULL, &tmpmesh->id, NULL, LIB_ID_COPY_LOCALIZE);
+ tmpmesh = (Mesh *)BKE_id_copy_ex(nullptr, &tmpmesh->id, nullptr, LIB_ID_COPY_LOCALIZE);
if (triangulate) {
bc_triangulate_mesh(tmpmesh);
@@ -257,7 +257,7 @@ Mesh *bc_get_mesh_copy(BlenderContext &blender_context,
Object *bc_get_assigned_armature(Object *ob)
{
- Object *ob_arm = NULL;
+ Object *ob_arm = nullptr;
if (ob->parent && ob->partype == PARSKEL && ob->parent->type == OB_ARMATURE) {
ob_arm = ob->parent;
@@ -319,7 +319,7 @@ void bc_bubble_sort_by_Object_name(LinkNode *export_set)
bool bc_is_root_bone(Bone *aBone, bool deform_bones_only)
{
if (deform_bones_only) {
- Bone *root = NULL;
+ Bone *root = nullptr;
Bone *bone = aBone;
while (bone) {
if (!(bone->flag & BONE_NO_DEFORM)) {
@@ -381,7 +381,7 @@ void bc_match_scale(std::vector<Object *> *objects_done,
for (std::vector<Object *>::iterator it = objects_done->begin(); it != objects_done->end();
++it) {
Object *ob = *it;
- if (ob->parent == NULL) {
+ if (ob->parent == nullptr) {
bc_match_scale(*it, bc_unit, scale_to_scene);
}
}
@@ -450,11 +450,11 @@ void bc_triangulate_mesh(Mesh *me)
BMeshFromMeshParams bm_from_me_params = {0};
bm_from_me_params.calc_face_normal = true;
BM_mesh_bm_from_me(bm, me, &bm_from_me_params);
- BM_mesh_triangulate(bm, quad_method, use_beauty, 4, tag_only, NULL, NULL, NULL);
+ BM_mesh_triangulate(bm, quad_method, use_beauty, 4, tag_only, nullptr, nullptr, nullptr);
BMeshToMeshParams bm_to_me_params = {0};
bm_to_me_params.calc_object_remap = false;
- BM_mesh_bm_to_me(NULL, bm, me, &bm_to_me_params);
+ BM_mesh_bm_to_me(nullptr, bm, me, &bm_to_me_params);
BM_mesh_free(bm);
}
@@ -481,7 +481,7 @@ EditBone *bc_get_edit_bone(bArmature *armature, char *name)
}
}
- return NULL;
+ return nullptr;
}
int bc_set_layer(int bitfield, int layer)
{
@@ -511,7 +511,7 @@ BoneExtensionMap &BoneExtensionManager::getExtensionMap(bArmature *armature)
{
std::string key = armature->id.name;
BoneExtensionMap *result = extended_bone_maps[key];
- if (result == NULL) {
+ if (result == nullptr) {
result = new BoneExtensionMap();
extended_bone_maps[key] = result;
}
@@ -706,7 +706,7 @@ int BoneExtended::get_use_connect()
void bc_set_IDPropertyMatrix(EditBone *ebone, const char *key, float mat[4][4])
{
IDProperty *idgroup = (IDProperty *)ebone->prop;
- if (idgroup == NULL) {
+ if (idgroup == nullptr) {
IDPropertyTemplate val = {0};
idgroup = IDP_New(IDP_GROUP, &val, "RNA_EditBone ID properties");
ebone->prop = idgroup;
@@ -754,7 +754,7 @@ static void bc_set_IDProperty(EditBone *ebone, const char *key, float value)
*/
IDProperty *bc_get_IDProperty(Bone *bone, std::string key)
{
- return (bone->prop == NULL) ? NULL : IDP_GetPropertyFromGroup(bone->prop, key.c_str());
+ return (bone->prop == nullptr) ? nullptr : IDP_GetPropertyFromGroup(bone->prop, key.c_str());
}
/**
@@ -895,7 +895,7 @@ bool bc_bone_matrix_local_get(Object *ob, Bone *bone, Matrix &mat, bool for_open
mul_m4_m4m4(mat, temp, mat);
}
}
- bc_enable_fcurves(action, NULL);
+ bc_enable_fcurves(action, nullptr);
return true;
}
@@ -908,11 +908,11 @@ bool bc_is_animated(BCMatrixSampleMap &values)
}
BCMatrixSampleMap::iterator it;
- const BCMatrix *refmat = NULL;
+ const BCMatrix *refmat = nullptr;
for (it = values.begin(); it != values.end(); ++it) {
const BCMatrix *matrix = it->second;
- if (refmat == NULL) {
+ if (refmat == nullptr) {
refmat = matrix;
continue;
}
@@ -1040,7 +1040,7 @@ void bc_create_restpose_mat(BCExportSettings &export_settings,
return;
}
- bc_decompose(from_mat, loc, rot, NULL, scale);
+ bc_decompose(from_mat, loc, rot, nullptr, scale);
loc_eulO_size_to_mat4(to_mat, loc, rot, scale, 6);
if (export_settings.get_keep_bind_info()) {
@@ -1192,8 +1192,8 @@ std::string bc_find_bonename_in_path(std::string path, std::string probe)
static bNodeTree *prepare_material_nodetree(Material *ma)
{
- if (ma->nodetree == NULL) {
- ma->nodetree = ntreeAddTree(NULL, "Shader Nodetree", "ShaderNodeTree");
+ if (ma->nodetree == nullptr) {
+ ma->nodetree = ntreeAddTree(nullptr, "Shader Nodetree", "ShaderNodeTree");
ma->use_nodes = true;
}
return ma->nodetree;
@@ -1450,7 +1450,7 @@ bNode *bc_get_master_shader(Material *ma)
}
}
}
- return NULL;
+ return nullptr;
}
COLLADASW::ColorOrTexture bc_get_cot(float r, float g, float b, float a)
diff --git a/source/blender/io/common/intern/hierarchy_context_order_test.cc b/source/blender/io/common/intern/hierarchy_context_order_test.cc
index f4e2b81b39b..3f2e348a8ee 100644
--- a/source/blender/io/common/intern/hierarchy_context_order_test.cc
+++ b/source/blender/io/common/intern/hierarchy_context_order_test.cc
@@ -38,11 +38,11 @@ class HierarchyContextOrderTest : public testing::Test {
TEST_F(HierarchyContextOrderTest, ObjectPointerTest)
{
- HierarchyContext ctx_a = {0};
+ HierarchyContext ctx_a = {nullptr};
ctx_a.object = fake_pointer(1);
ctx_a.duplicator = nullptr;
- HierarchyContext ctx_b = {0};
+ HierarchyContext ctx_b = {nullptr};
ctx_b.object = fake_pointer(2);
ctx_b.duplicator = nullptr;
@@ -53,12 +53,12 @@ TEST_F(HierarchyContextOrderTest, ObjectPointerTest)
TEST_F(HierarchyContextOrderTest, DuplicatorPointerTest)
{
- HierarchyContext ctx_a = {0};
+ HierarchyContext ctx_a = {nullptr};
ctx_a.object = fake_pointer(1);
ctx_a.duplicator = fake_pointer(1);
ctx_a.export_name = "A";
- HierarchyContext ctx_b = {0};
+ HierarchyContext ctx_b = {nullptr};
ctx_b.object = fake_pointer(1);
ctx_b.duplicator = fake_pointer(1);
ctx_b.export_name = "B";
@@ -70,11 +70,11 @@ TEST_F(HierarchyContextOrderTest, DuplicatorPointerTest)
TEST_F(HierarchyContextOrderTest, ExportParentTest)
{
- HierarchyContext ctx_a = {0};
+ HierarchyContext ctx_a = {nullptr};
ctx_a.object = fake_pointer(1);
ctx_a.export_parent = fake_pointer(1);
- HierarchyContext ctx_b = {0};
+ HierarchyContext ctx_b = {nullptr};
ctx_b.object = fake_pointer(1);
ctx_b.export_parent = fake_pointer(2);
@@ -85,25 +85,25 @@ TEST_F(HierarchyContextOrderTest, ExportParentTest)
TEST_F(HierarchyContextOrderTest, TransitiveTest)
{
- HierarchyContext ctx_a = {0};
+ HierarchyContext ctx_a = {nullptr};
ctx_a.object = fake_pointer(1);
ctx_a.export_parent = fake_pointer(1);
ctx_a.duplicator = nullptr;
ctx_a.export_name = "A";
- HierarchyContext ctx_b = {0};
+ HierarchyContext ctx_b = {nullptr};
ctx_b.object = fake_pointer(2);
ctx_b.export_parent = nullptr;
ctx_b.duplicator = fake_pointer(1);
ctx_b.export_name = "B";
- HierarchyContext ctx_c = {0};
+ HierarchyContext ctx_c = {nullptr};
ctx_c.object = fake_pointer(2);
ctx_c.export_parent = fake_pointer(2);
ctx_c.duplicator = fake_pointer(1);
ctx_c.export_name = "C";
- HierarchyContext ctx_d = {0};
+ HierarchyContext ctx_d = {nullptr};
ctx_d.object = fake_pointer(2);
ctx_d.export_parent = fake_pointer(3);
ctx_d.duplicator = nullptr;
diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc
index 78d44179ca1..92ee5a84df9 100644
--- a/source/blender/modifiers/intern/MOD_mask.cc
+++ b/source/blender/modifiers/intern/MOD_mask.cc
@@ -322,7 +322,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
/* Return empty or input mesh when there are no vertex groups. */
MDeformVert *dvert = (MDeformVert *)CustomData_get_layer(&mesh->vdata, CD_MDEFORMVERT);
- if (dvert == NULL) {
+ if (dvert == nullptr) {
return invert_mask ? mesh : BKE_mesh_new_nomain_from_template(mesh, 0, 0, 0, 0, 0);
}
@@ -418,13 +418,13 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
int mode = RNA_enum_get(ptr, "mode");
- uiItemR(layout, ptr, "mode", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "mode", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
uiLayoutSetPropSep(layout, true);
if (mode == MOD_MASK_MODE_ARM) {
row = uiLayoutRow(layout, true);
- uiItemR(row, ptr, "armature", 0, NULL, ICON_NONE);
+ uiItemR(row, ptr, "armature", 0, nullptr, ICON_NONE);
sub = uiLayoutRow(row, true);
uiLayoutSetPropDecorate(sub, false);
uiItemR(sub, ptr, "invert_vertex_group", 0, "", ICON_ARROW_LEFTRIGHT);
@@ -433,7 +433,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", nullptr);
}
- uiItemR(layout, ptr, "threshold", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "threshold", 0, nullptr, ICON_NONE);
modifier_panel_end(layout, ptr);
}
@@ -456,26 +456,26 @@ ModifierTypeInfo modifierType_Mask = {
/* copyData */ BKE_modifier_copydata_generic,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
+ /* deformVerts */ nullptr,
+ /* deformMatrices */ nullptr,
+ /* deformVertsEM */ nullptr,
+ /* deformMatricesEM */ nullptr,
/* modifyMesh */ modifyMesh,
- /* modifyHair */ NULL,
- /* modifyPointCloud */ NULL,
- /* modifyVolume */ NULL,
+ /* modifyHair */ nullptr,
+ /* modifyPointCloud */ nullptr,
+ /* modifyVolume */ nullptr,
/* initData */ initData,
/* requiredDataMask */ requiredDataMask,
- /* freeData */ NULL,
+ /* freeData */ nullptr,
/* isDisabled */ isDisabled,
/* updateDepsgraph */ updateDepsgraph,
- /* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* dependsOnTime */ nullptr,
+ /* dependsOnNormals */ nullptr,
/* foreachIDLink */ foreachIDLink,
- /* foreachTexLink */ NULL,
- /* freeRuntimeData */ NULL,
+ /* foreachTexLink */ nullptr,
+ /* freeRuntimeData */ nullptr,
/* panelRegister */ panelRegister,
- /* blendWrite */ NULL,
- /* blendRead */ NULL,
+ /* blendWrite */ nullptr,
+ /* blendRead */ nullptr,
};
diff --git a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
index 426bba05d76..61d556a64af 100644
--- a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
+++ b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc
@@ -107,7 +107,7 @@ class OpenVDBMeshAdapter {
static void initData(ModifierData *md)
{
MeshToVolumeModifierData *mvmd = reinterpret_cast<MeshToVolumeModifierData *>(md);
- mvmd->object = NULL;
+ mvmd->object = nullptr;
mvmd->resolution_mode = MESH_TO_VOLUME_RESOLUTION_MODE_VOXEL_AMOUNT;
mvmd->voxel_size = 0.1f;
mvmd->voxel_amount = 32;
@@ -139,32 +139,32 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
{
uiLayout *layout = panel->layout;
- PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
+ PointerRNA *ptr = modifier_panel_get_property_pointers(panel, nullptr);
MeshToVolumeModifierData *mvmd = static_cast<MeshToVolumeModifierData *>(ptr->data);
uiLayoutSetPropSep(layout, true);
uiLayoutSetPropDecorate(layout, false);
- uiItemR(layout, ptr, "object", 0, NULL, ICON_NONE);
- uiItemR(layout, ptr, "density", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "object", 0, nullptr, ICON_NONE);
+ uiItemR(layout, ptr, "density", 0, nullptr, ICON_NONE);
{
uiLayout *col = uiLayoutColumn(layout, false);
- uiItemR(col, ptr, "use_fill_volume", 0, NULL, ICON_NONE);
- uiItemR(col, ptr, "exterior_band_width", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "use_fill_volume", 0, nullptr, ICON_NONE);
+ uiItemR(col, ptr, "exterior_band_width", 0, nullptr, ICON_NONE);
uiLayout *subcol = uiLayoutColumn(col, false);
uiLayoutSetActive(subcol, !mvmd->fill_volume);
- uiItemR(subcol, ptr, "interior_band_width", 0, NULL, ICON_NONE);
+ uiItemR(subcol, ptr, "interior_band_width", 0, nullptr, ICON_NONE);
}
{
uiLayout *col = uiLayoutColumn(layout, false);
- uiItemR(col, ptr, "resolution_mode", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "resolution_mode", 0, nullptr, ICON_NONE);
if (mvmd->resolution_mode == MESH_TO_VOLUME_RESOLUTION_MODE_VOXEL_AMOUNT) {
- uiItemR(col, ptr, "voxel_amount", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "voxel_amount", 0, nullptr, ICON_NONE);
}
else {
- uiItemR(col, ptr, "voxel_size", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "voxel_size", 0, nullptr, ICON_NONE);
}
}
@@ -213,11 +213,11 @@ static Volume *modifyVolume(ModifierData *md, const ModifierEvalContext *ctx, Vo
MeshToVolumeModifierData *mvmd = reinterpret_cast<MeshToVolumeModifierData *>(md);
Object *object_to_convert = mvmd->object;
- if (object_to_convert == NULL) {
+ if (object_to_convert == nullptr) {
return input_volume;
}
Mesh *mesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(object_to_convert, false);
- if (mesh == NULL) {
+ if (mesh == nullptr) {
return input_volume;
}
BKE_mesh_wrapper_ensure_mdata(mesh);
@@ -290,26 +290,26 @@ ModifierTypeInfo modifierType_MeshToVolume = {
/* copyData */ BKE_modifier_copydata_generic,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* modifyMesh */ NULL,
- /* modifyHair */ NULL,
- /* modifyPointCloud */ NULL,
+ /* deformVerts */ nullptr,
+ /* deformMatrices */ nullptr,
+ /* deformVertsEM */ nullptr,
+ /* deformMatricesEM */ nullptr,
+ /* modifyMesh */ nullptr,
+ /* modifyHair */ nullptr,
+ /* modifyPointCloud */ nullptr,
/* modifyVolume */ modifyVolume,
/* initData */ initData,
- /* requiredDataMask */ NULL,
- /* freeData */ NULL,
- /* isDisabled */ NULL,
+ /* requiredDataMask */ nullptr,
+ /* freeData */ nullptr,
+ /* isDisabled */ nullptr,
/* updateDepsgraph */ updateDepsgraph,
- /* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* dependsOnTime */ nullptr,
+ /* dependsOnNormals */ nullptr,
/* foreachIDLink */ foreachIDLink,
- /* foreachTexLink */ NULL,
- /* freeRuntimeData */ NULL,
+ /* foreachTexLink */ nullptr,
+ /* freeRuntimeData */ nullptr,
/* panelRegister */ panelRegister,
- /* blendWrite */ NULL,
- /* blendRead */ NULL,
+ /* blendWrite */ nullptr,
+ /* blendRead */ nullptr,
};
diff --git a/source/blender/modifiers/intern/MOD_simulation.cc b/source/blender/modifiers/intern/MOD_simulation.cc
index 10a4b3f7cf9..0766c59cda6 100644
--- a/source/blender/modifiers/intern/MOD_simulation.cc
+++ b/source/blender/modifiers/intern/MOD_simulation.cc
@@ -169,25 +169,25 @@ ModifierTypeInfo modifierType_Simulation = {
/* copyData */ copyData,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* modifyMesh */ NULL,
- /* modifyHair */ NULL,
+ /* deformVerts */ nullptr,
+ /* deformMatrices */ nullptr,
+ /* deformVertsEM */ nullptr,
+ /* deformMatricesEM */ nullptr,
+ /* modifyMesh */ nullptr,
+ /* modifyHair */ nullptr,
/* modifyPointCloud */ modifyPointCloud,
- /* modifyVolume */ NULL,
+ /* modifyVolume */ nullptr,
/* initData */ initData,
- /* requiredDataMask */ NULL,
+ /* requiredDataMask */ nullptr,
/* freeData */ freeData,
/* isDisabled */ isDisabled,
/* updateDepsgraph */ updateDepsgraph,
- /* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* dependsOnTime */ nullptr,
+ /* dependsOnNormals */ nullptr,
/* foreachIDLink */ foreachIDLink,
- /* foreachTexLink */ NULL,
- /* freeRuntimeData */ NULL,
+ /* foreachTexLink */ nullptr,
+ /* freeRuntimeData */ nullptr,
/* panelRegister */ panelRegister,
/* blendWrite */ blendWrite,
/* blendRead */ blendRead,
diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
index 7293945312a..1b1d4187899 100644
--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
+++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
@@ -62,7 +62,7 @@
static void initData(ModifierData *md)
{
VolumeDisplaceModifierData *vdmd = reinterpret_cast<VolumeDisplaceModifierData *>(md);
- vdmd->texture = NULL;
+ vdmd->texture = nullptr;
vdmd->strength = 0.5f;
copy_v3_fl(vdmd->texture_mid_level, 0.5f);
vdmd->texture_sample_radius = 1.0f;
@@ -71,11 +71,11 @@ static void initData(ModifierData *md)
static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
{
VolumeDisplaceModifierData *vdmd = reinterpret_cast<VolumeDisplaceModifierData *>(md);
- if (vdmd->texture != NULL) {
+ if (vdmd->texture != nullptr) {
DEG_add_generic_id_relation(ctx->node, &vdmd->texture->id, "Volume Displace Modifier");
}
if (vdmd->texture_map_mode == MOD_VOLUME_DISPLACE_MAP_OBJECT) {
- if (vdmd->texture_map_object != NULL) {
+ if (vdmd->texture_map_object != nullptr) {
DEG_add_object_relation(
ctx->node, vdmd->texture_map_object, DEG_OB_COMP_TRANSFORM, "Volume Displace Modifier");
}
@@ -114,14 +114,14 @@ static void panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropSep(layout, true);
uiLayoutSetPropDecorate(layout, false);
- uiTemplateID(layout, C, ptr, "texture", "texture.new", NULL, NULL, 0, ICON_NONE, NULL);
+ uiTemplateID(layout, C, ptr, "texture", "texture.new", nullptr, nullptr, 0, ICON_NONE, nullptr);
uiItemR(layout, ptr, "texture_map_mode", 0, "Texture Mapping", ICON_NONE);
if (vdmd->texture_map_mode == MOD_VOLUME_DISPLACE_MAP_OBJECT) {
uiItemR(layout, ptr, "texture_map_object", 0, "Object", ICON_NONE);
}
- uiItemR(layout, ptr, "strength", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "strength", 0, nullptr, ICON_NONE);
uiItemR(layout, ptr, "texture_sample_radius", 0, "Sample Radius", ICON_NONE);
uiItemR(layout, ptr, "texture_mid_level", 0, "Mid Level", ICON_NONE);
@@ -166,7 +166,7 @@ template<typename GridType> struct DisplaceOp {
openvdb::Vec3d compute_displace_vector(const openvdb::Coord &coord) const
{
- if (this->texture != NULL) {
+ if (this->texture != nullptr) {
const openvdb::Vec3f texture_pos = coord.asVec3s() * this->index_to_texture;
const openvdb::Vec3d texture_value = this->evaluate_texture(texture_pos);
const openvdb::Vec3d displacement = (texture_value - this->texture_mid_level) *
@@ -180,7 +180,7 @@ template<typename GridType> struct DisplaceOp {
{
TexResult texture_result = {0};
BKE_texture_get_value(
- NULL, this->texture, const_cast<float *>(pos.asV()), &texture_result, false);
+ nullptr, this->texture, const_cast<float *>(pos.asV()), &texture_result, false);
return {texture_result.tr, texture_result.tg, texture_result.tb};
}
};
@@ -270,7 +270,7 @@ struct DisplaceGridOp {
return index_to_object * object_to_world;
}
case MOD_VOLUME_DISPLACE_MAP_OBJECT: {
- if (vdmd.texture_map_object == NULL) {
+ if (vdmd.texture_map_object == nullptr) {
return index_to_object;
}
const openvdb::Mat4s object_to_world = matrix_to_openvdb(ctx.object->obmat);
@@ -295,7 +295,7 @@ static Volume *modifyVolume(ModifierData *md, const ModifierEvalContext *ctx, Vo
const int grid_amount = BKE_volume_num_grids(volume);
for (int grid_index = 0; grid_index < grid_amount; grid_index++) {
VolumeGrid *volume_grid = BKE_volume_grid_get(volume, grid_index);
- BLI_assert(volume_grid != NULL);
+ BLI_assert(volume_grid != nullptr);
openvdb::GridBase::Ptr grid = BKE_volume_grid_openvdb_for_write(volume, volume_grid, false);
VolumeGridType grid_type = BKE_volume_grid_type(volume_grid);
@@ -323,26 +323,26 @@ ModifierTypeInfo modifierType_VolumeDisplace = {
/* copyData */ BKE_modifier_copydata_generic,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* modifyMesh */ NULL,
- /* modifyHair */ NULL,
- /* modifyPointCloud */ NULL,
+ /* deformVerts */ nullptr,
+ /* deformMatrices */ nullptr,
+ /* deformVertsEM */ nullptr,
+ /* deformMatricesEM */ nullptr,
+ /* modifyMesh */ nullptr,
+ /* modifyHair */ nullptr,
+ /* modifyPointCloud */ nullptr,
/* modifyVolume */ modifyVolume,
/* initData */ initData,
- /* requiredDataMask */ NULL,
- /* freeData */ NULL,
- /* isDisabled */ NULL,
+ /* requiredDataMask */ nullptr,
+ /* freeData */ nullptr,
+ /* isDisabled */ nullptr,
/* updateDepsgraph */ updateDepsgraph,
/* dependsOnTime */ dependsOnTime,
- /* dependsOnNormals */ NULL,
+ /* dependsOnNormals */ nullptr,
/* foreachIDLink */ foreachIDLink,
/* foreachTexLink */ foreachTexLink,
- /* freeRuntimeData */ NULL,
+ /* freeRuntimeData */ nullptr,
/* panelRegister */ panelRegister,
- /* blendWrite */ NULL,
- /* blendRead */ NULL,
+ /* blendWrite */ nullptr,
+ /* blendRead */ nullptr,
};
diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
index 8556271bf87..e008dc3f140 100644
--- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
+++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
@@ -59,7 +59,7 @@ using blender::Span;
static void initData(ModifierData *md)
{
VolumeToMeshModifierData *vmmd = reinterpret_cast<VolumeToMeshModifierData *>(md);
- vmmd->object = NULL;
+ vmmd->object = nullptr;
vmmd->threshold = 0.1f;
strncpy(vmmd->grid_name, "density", MAX_NAME);
vmmd->adaptivity = 0.0f;
@@ -91,7 +91,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
{
uiLayout *layout = panel->layout;
- PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
+ PointerRNA *ptr = modifier_panel_get_property_pointers(panel, nullptr);
VolumeToMeshModifierData *vmmd = static_cast<VolumeToMeshModifierData *>(ptr->data);
uiLayoutSetPropSep(layout, true);
@@ -99,26 +99,26 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
{
uiLayout *col = uiLayoutColumn(layout, false);
- uiItemR(col, ptr, "object", 0, NULL, ICON_NONE);
- uiItemR(col, ptr, "grid_name", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "object", 0, nullptr, ICON_NONE);
+ uiItemR(col, ptr, "grid_name", 0, nullptr, ICON_NONE);
}
{
uiLayout *col = uiLayoutColumn(layout, false);
- uiItemR(col, ptr, "resolution_mode", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "resolution_mode", 0, nullptr, ICON_NONE);
if (vmmd->resolution_mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT) {
- uiItemR(col, ptr, "voxel_amount", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "voxel_amount", 0, nullptr, ICON_NONE);
}
else if (vmmd->resolution_mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_SIZE) {
- uiItemR(col, ptr, "voxel_size", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "voxel_size", 0, nullptr, ICON_NONE);
}
}
{
uiLayout *col = uiLayoutColumn(layout, false);
- uiItemR(col, ptr, "threshold", 0, NULL, ICON_NONE);
- uiItemR(col, ptr, "adaptivity", 0, NULL, ICON_NONE);
- uiItemR(col, ptr, "use_smooth_shade", 0, NULL, ICON_NONE);
+ uiItemR(col, ptr, "threshold", 0, nullptr, ICON_NONE);
+ uiItemR(col, ptr, "adaptivity", 0, nullptr, ICON_NONE);
+ uiItemR(col, ptr, "use_smooth_shade", 0, nullptr, ICON_NONE);
}
modifier_panel_end(layout, ptr);
@@ -330,26 +330,26 @@ ModifierTypeInfo modifierType_VolumeToMesh = {
/* copyData */ BKE_modifier_copydata_generic,
- /* deformVerts */ NULL,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
+ /* deformVerts */ nullptr,
+ /* deformMatrices */ nullptr,
+ /* deformVertsEM */ nullptr,
+ /* deformMatricesEM */ nullptr,
/* modifyMesh */ modifyMesh,
- /* modifyHair */ NULL,
- /* modifyPointCloud */ NULL,
- /* modifyVolume */ NULL,
+ /* modifyHair */ nullptr,
+ /* modifyPointCloud */ nullptr,
+ /* modifyVolume */ nullptr,
/* initData */ initData,
- /* requiredDataMask */ NULL,
- /* freeData */ NULL,
- /* isDisabled */ NULL,
+ /* requiredDataMask */ nullptr,
+ /* freeData */ nullptr,
+ /* isDisabled */ nullptr,
/* updateDepsgraph */ updateDepsgraph,
- /* dependsOnTime */ NULL,
- /* dependsOnNormals */ NULL,
+ /* dependsOnTime */ nullptr,
+ /* dependsOnNormals */ nullptr,
/* foreachIDLink */ foreachIDLink,
- /* foreachTexLink */ NULL,
- /* freeRuntimeData */ NULL,
+ /* foreachTexLink */ nullptr,
+ /* freeRuntimeData */ nullptr,
/* panelRegister */ panelRegister,
- /* blendWrite */ NULL,
- /* blendRead */ NULL,
+ /* blendWrite */ nullptr,
+ /* blendRead */ nullptr,
};
diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc
index 16896470a6d..2c4d7057b4e 100644
--- a/source/blender/nodes/intern/node_socket.cc
+++ b/source/blender/nodes/intern/node_socket.cc
@@ -135,7 +135,7 @@ static void verify_socket_template_list(bNodeTree *ntree,
bNodeSocketTemplate *stemp;
/* no inputs anymore? */
- if (stemp_first == NULL) {
+ if (stemp_first == nullptr) {
for (sock = (bNodeSocket *)socklist->first; sock; sock = nextsock) {
nextsock = sock->next;
nodeRemoveSocket(ntree, node, sock);
@@ -266,7 +266,7 @@ void node_socket_init_default_value(bNodeSocket *sock)
case SOCK_OBJECT: {
bNodeSocketValueObject *dval = (bNodeSocketValueObject *)MEM_callocN(
sizeof(bNodeSocketValueObject), "node socket value object");
- dval->value = NULL;
+ dval->value = nullptr;
sock->default_value = dval;
break;
@@ -274,7 +274,7 @@ void node_socket_init_default_value(bNodeSocket *sock)
case SOCK_IMAGE: {
bNodeSocketValueImage *dval = (bNodeSocketValueImage *)MEM_callocN(
sizeof(bNodeSocketValueImage), "node socket value image");
- dval->value = NULL;
+ dval->value = nullptr;
sock->default_value = dval;
break;
@@ -490,13 +490,13 @@ static bNodeSocketType *make_standard_socket_type(int type, int subtype)
/* set the RNA type
* uses the exact same identifier as the socket type idname */
srna = stype->ext_socket.srna = RNA_struct_find(socket_idname);
- BLI_assert(srna != NULL);
+ BLI_assert(srna != nullptr);
/* associate the RNA type with the socket type */
RNA_struct_blender_type_set(srna, stype);
/* set the interface RNA type */
srna = stype->ext_interface.srna = RNA_struct_find(interface_idname);
- BLI_assert(srna != NULL);
+ BLI_assert(srna != nullptr);
/* associate the RNA type with the socket type */
RNA_struct_blender_type_set(srna, stype);
@@ -533,7 +533,7 @@ static bNodeSocketType *make_socket_type_virtual()
/* set the RNA type
* uses the exact same identifier as the socket type idname */
srna = stype->ext_socket.srna = RNA_struct_find(socket_idname);
- BLI_assert(srna != NULL);
+ BLI_assert(srna != nullptr);
/* associate the RNA type with the socket type */
RNA_struct_blender_type_set(srna, stype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc
index c1543f791f1..59b89c46fc7 100644
--- a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc
@@ -101,7 +101,7 @@ void register_node_type_sh_seprgb(void)
sh_fn_node_type_base(&ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, sh_node_seprgb_in, sh_node_seprgb_out);
- node_type_exec(&ntype, NULL, NULL, node_shader_exec_seprgb);
+ node_type_exec(&ntype, nullptr, nullptr, node_shader_exec_seprgb);
node_type_gpu(&ntype, gpu_shader_seprgb);
ntype.expand_in_mf_network = sh_node_seprgb_expand_in_mf_network;
@@ -159,7 +159,7 @@ void register_node_type_sh_combrgb(void)
sh_fn_node_type_base(&ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, sh_node_combrgb_in, sh_node_combrgb_out);
- node_type_exec(&ntype, NULL, NULL, node_shader_exec_combrgb);
+ node_type_exec(&ntype, nullptr, nullptr, node_shader_exec_combrgb);
node_type_gpu(&ntype, gpu_shader_combrgb);
ntype.expand_in_mf_network = sh_node_combrgb_expand_in_mf_network;
diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc b/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc
index becc4623e9a..a86a8bb8935 100644
--- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc
@@ -172,7 +172,7 @@ void register_node_type_sh_valtorgb(void)
node_type_init(&ntype, node_shader_init_valtorgb);
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
- node_type_exec(&ntype, NULL, NULL, node_shader_exec_valtorgb);
+ node_type_exec(&ntype, nullptr, nullptr, node_shader_exec_valtorgb);
node_type_gpu(&ntype, gpu_shader_valtorgb);
ntype.expand_in_mf_network = sh_node_valtorgb_expand_in_mf_network;
@@ -215,7 +215,7 @@ void register_node_type_sh_rgbtobw(void)
sh_node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, sh_node_rgbtobw_in, sh_node_rgbtobw_out);
- node_type_exec(&ntype, NULL, NULL, node_shader_exec_rgbtobw);
+ node_type_exec(&ntype, nullptr, nullptr, node_shader_exec_rgbtobw);
node_type_gpu(&ntype, gpu_shader_rgbtobw);
nodeRegisterType(&ntype);
diff --git a/source/blender/nodes/shader/nodes/node_shader_value.cc b/source/blender/nodes/shader/nodes/node_shader_value.cc
index 1a1382fa8af..5a8a1b847cc 100644
--- a/source/blender/nodes/shader/nodes/node_shader_value.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_value.cc
@@ -51,7 +51,7 @@ void register_node_type_sh_value(void)
static bNodeType ntype;
sh_fn_node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, 0);
- node_type_socket_templates(&ntype, NULL, sh_node_value_out);
+ node_type_socket_templates(&ntype, nullptr, sh_node_value_out);
node_type_gpu(&ntype, gpu_shader_value);
ntype.expand_in_mf_network = sh_node_value_expand_in_mf_network;
diff --git a/source/blender/nodes/simulation/nodes/node_sim_common.cc b/source/blender/nodes/simulation/nodes/node_sim_common.cc
index fbc03905d4f..fd26d450129 100644
--- a/source/blender/nodes/simulation/nodes/node_sim_common.cc
+++ b/source/blender/nodes/simulation/nodes/node_sim_common.cc
@@ -33,10 +33,10 @@ void register_node_type_sim_group(void)
ntype.insert_link = node_insert_link_default;
ntype.update_internal_links = node_update_internal_links_default;
ntype.rna_ext.srna = RNA_struct_find("SimulationNodeGroup");
- BLI_assert(ntype.rna_ext.srna != NULL);
+ BLI_assert(ntype.rna_ext.srna != nullptr);
RNA_struct_blender_type_set(ntype.rna_ext.srna, &ntype);
- node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_socket_templates(&ntype, nullptr, nullptr);
node_type_size(&ntype, 140, 60, 400);
node_type_label(&ntype, node_group_label);
node_type_group_update(&ntype, node_group_update);
diff --git a/source/blender/simulation/intern/SIM_mass_spring.cpp b/source/blender/simulation/intern/SIM_mass_spring.cpp
index 57276be469c..29b44da8fe9 100644
--- a/source/blender/simulation/intern/SIM_mass_spring.cpp
+++ b/source/blender/simulation/intern/SIM_mass_spring.cpp
@@ -219,7 +219,7 @@ void SIM_cloth_solver_free(ClothModifierData *clmd)
if (cloth->implicit) {
SIM_mass_spring_solver_free(cloth->implicit);
- cloth->implicit = NULL;
+ cloth->implicit = nullptr;
}
}
@@ -568,7 +568,7 @@ static void hair_get_boundbox(ClothModifierData *clmd, float gmin[3], float gmax
INIT_MINMAX(gmin, gmax);
for (i = 0; i < mvert_num; i++) {
float x[3];
- SIM_mass_spring_get_motion_state(data, i, x, NULL);
+ SIM_mass_spring_get_motion_state(data, i, x, nullptr);
DO_MINMAX(x, gmin, gmax);
}
}
@@ -624,7 +624,7 @@ static void cloth_calc_force(
SIM_mass_spring_force_drag(data, drag);
#endif
/* handle pressure forces (making sure that this never gets computed for hair). */
- if ((parms->flags & CLOTH_SIMSETTINGS_FLAG_PRESSURE) && (clmd->hairdata == NULL)) {
+ if ((parms->flags & CLOTH_SIMSETTINGS_FLAG_PRESSURE) && (clmd->hairdata == nullptr)) {
/* The difference in pressure between the inside and outside of the mesh.*/
float pressure_difference = 0.0f;
float volume_factor = 1.0f;
@@ -658,7 +658,7 @@ static void cloth_calc_force(
/* Compute the hydrostatic pressure gradient if enabled. */
float fluid_density = clmd->sim_parms->fluid_density * 1000; /* kg/l -> kg/m3 */
- float *hydrostatic_pressure = NULL;
+ float *hydrostatic_pressure = nullptr;
if (fabs(fluid_density) > 1e-6f) {
float hydrostatic_vector[3];
@@ -711,7 +711,7 @@ static void cloth_calc_force(
/* handle external forces like wind */
if (effectors) {
- bool is_not_hair = (clmd->hairdata == NULL) && (cloth->primitive_num > 0);
+ bool is_not_hair = (clmd->hairdata == nullptr) && (cloth->primitive_num > 0);
bool has_wind = false, has_force = false;
/* cache per-vertex forces to avoid redundant calculation */
@@ -726,12 +726,12 @@ static void cloth_calc_force(
SIM_mass_spring_get_motion_state(data, i, x, v);
pd_point_from_loc(scene, x, v, i, &epoint);
BKE_effectors_apply(effectors,
- NULL,
+ nullptr,
clmd->sim_parms->effector_weights,
&epoint,
forcevec[i],
winvec[i],
- NULL);
+ nullptr);
has_wind = has_wind || !is_zero_v3(winvec[i]);
has_force = has_force || !is_zero_v3(forcevec[i]);
@@ -823,7 +823,7 @@ BLI_INLINE LinkNode *hair_spring_next(LinkNode *spring_link)
return next;
}
}
- return NULL;
+ return nullptr;
}
/* XXX this is nasty: cloth meshes do not explicitly store
@@ -840,15 +840,15 @@ static LinkNode *cloth_continuum_add_hair_segments(HairGrid *grid,
LinkNode *spring_link)
{
Implicit_Data *data = cloth->implicit;
- LinkNode *next_spring_link = NULL; /* return value */
+ LinkNode *next_spring_link = nullptr; /* return value */
ClothSpring *spring1, *spring2, *spring3;
// ClothVertex *verts = cloth->verts;
// ClothVertex *vert3, *vert4;
float x1[3], v1[3], x2[3], v2[3], x3[3], v3[3], x4[3], v4[3];
float dir1[3], dir2[3], dir3[3];
- spring1 = NULL;
- spring2 = NULL;
+ spring1 = nullptr;
+ spring2 = nullptr;
spring3 = (ClothSpring *)spring_link->link;
zero_v3(x1);
@@ -894,7 +894,7 @@ static LinkNode *cloth_continuum_add_hair_segments(HairGrid *grid,
normalize_v3(dir3);
}
else {
- spring3 = NULL;
+ spring3 = nullptr;
// vert4 = NULL;
zero_v3(x4);
zero_v3(v4);
@@ -902,7 +902,7 @@ static LinkNode *cloth_continuum_add_hair_segments(HairGrid *grid,
}
SIM_hair_volume_add_segment(
- grid, x1, v1, x2, v2, x3, v3, x4, v4, spring1 ? dir1 : NULL, dir2, spring3 ? dir3 : NULL);
+ grid, x1, v1, x2, v2, x3, v3, x4, v4, spring1 ? dir1 : nullptr, dir2, spring3 ? dir3 : nullptr);
}
return next_spring_link;
@@ -929,7 +929,7 @@ static void cloth_continuum_fill_grid(HairGrid *grid, Cloth *cloth)
/* scale and offset for transforming vertex locations into grid space
* (cell size is 0..1, gmin becomes origin)
*/
- SIM_hair_volume_grid_geometry(grid, &cellsize, NULL, gmin, NULL);
+ SIM_hair_volume_grid_geometry(grid, &cellsize, nullptr, gmin, nullptr);
cell_scale = cellsize > 0.0f ? 1.0f / cellsize : 0.0f;
mul_v3_v3fl(cell_offset, gmin, cell_scale);
negate_v3(cell_offset);
@@ -1255,7 +1255,7 @@ int SIM_cloth_solve(
* Bad design, TODO
*/
Scene *scene = DEG_get_evaluated_scene(depsgraph);
- const bool is_hair = (clmd->hairdata != NULL);
+ const bool is_hair = (clmd->hairdata != nullptr);
unsigned int i = 0;
float step = 0.0f, tf = clmd->sim_parms->timescale;
@@ -1338,7 +1338,7 @@ int SIM_cloth_solve(
}
}
- SIM_mass_spring_get_motion_state(id, i, verts[i].txold, NULL);
+ SIM_mass_spring_get_motion_state(id, i, verts[i].txold, nullptr);
}
step += dt;
diff --git a/source/blender/simulation/intern/hair_volume.cpp b/source/blender/simulation/intern/hair_volume.cpp
index 49868296295..123b91edaac 100644
--- a/source/blender/simulation/intern/hair_volume.cpp
+++ b/source/blender/simulation/intern/hair_volume.cpp
@@ -224,7 +224,7 @@ void SIM_hair_volume_vertex_grid_forces(HairGrid *grid,
x,
&gdensity,
gvelocity,
- NULL,
+ nullptr,
ggrad,
gvelgrad);