diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 19:49:09 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 20:08:25 +0300 |
commit | 16732def37c5a66f3ea28dbe247b09cc6bca6677 (patch) | |
tree | 5d14f5c920a1411e336bd80b12becbb3f73de19a /source/blender/freestyle | |
parent | 88926375a0e4e45f72c87b9e487c060ddd3c9216 (diff) |
Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
Diffstat (limited to 'source/blender/freestyle')
192 files changed, 5545 insertions, 5545 deletions
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(); } |