From 4d544d6ae7211f8bdf086b14415a388e44116ee5 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 9 Nov 2020 14:50:33 +0100 Subject: Fix T80068: skin modifier not working with motion blur The skin modifier did not output consistent results, causing failure to find corresponding vertices across frames. Remove unnecessary use of GSet, all we need is an array. --- source/blender/bmesh/operators/bmo_hull.c | 51 ++++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c index 84938084aec..4876a12a923 100644 --- a/source/blender/bmesh/operators/bmo_hull.c +++ b/source/blender/bmesh/operators/bmo_hull.c @@ -60,12 +60,12 @@ typedef struct HullTriangle { /*************************** Hull Triangles ***************************/ static void hull_add_triangle( - BMesh *bm, GSet *hull_triangles, BLI_mempool *pool, BMVert *v1, BMVert *v2, BMVert *v3) + BMesh *bm, BLI_mempool *hull_triangles, BMVert *v1, BMVert *v2, BMVert *v3) { HullTriangle *t; int i; - t = BLI_mempool_calloc(pool); + t = BLI_mempool_calloc(hull_triangles); t->v[0] = v1; t->v[1] = v2; t->v[2] = v3; @@ -75,7 +75,6 @@ static void hull_add_triangle( BMO_vert_flag_disable(bm, t->v[i], HULL_FLAG_INTERIOR_ELE); } - BLI_gset_insert(hull_triangles, t); normal_tri_v3(t->no, v1->co, v2->co, v3->co); } @@ -94,12 +93,13 @@ static BMFace *hull_find_example_face(BMesh *bm, BMEdge *e) return NULL; } -static void hull_output_triangles(BMesh *bm, GSet *hull_triangles) +static void hull_output_triangles(BMesh *bm, BLI_mempool *hull_triangles) { - GSetIterator iter; + BLI_mempool_iter iter; + BLI_mempool_iternew(hull_triangles, &iter); + HullTriangle *t; - GSET_ITER (iter, hull_triangles) { - HullTriangle *t = BLI_gsetIterator_getKey(&iter); + while ((t = BLI_mempool_iterstep(&iter))) { int i; if (!t->skip) { @@ -198,18 +198,20 @@ static int hull_final_edges_lookup(HullFinalEdges *final_edges, BMVert *v1, BMVe } /* Used for checking whether a pre-existing edge lies on the hull */ -static HullFinalEdges *hull_final_edges(GSet *hull_triangles) +static HullFinalEdges *hull_final_edges(BLI_mempool *hull_triangles) { HullFinalEdges *final_edges; - GSetIterator iter; final_edges = MEM_callocN(sizeof(HullFinalEdges), "HullFinalEdges"); final_edges->edges = BLI_ghash_ptr_new("final edges ghash"); final_edges->base_pool = BLI_mempool_create(sizeof(ListBase), 0, 128, BLI_MEMPOOL_NOP); final_edges->link_pool = BLI_mempool_create(sizeof(LinkData), 0, 128, BLI_MEMPOOL_NOP); - GSET_ITER (iter, hull_triangles) { - HullTriangle *t = BLI_gsetIterator_getKey(&iter); + BLI_mempool_iter iter; + BLI_mempool_iternew(hull_triangles, &iter); + HullTriangle *t; + + while ((t = BLI_mempool_iterstep(&iter))) { LinkData *link; int i; @@ -250,12 +252,15 @@ static void hull_final_edges_free(HullFinalEdges *final_edges) /**************************** Final Output ****************************/ -static void hull_remove_overlapping(BMesh *bm, GSet *hull_triangles, HullFinalEdges *final_edges) +static void hull_remove_overlapping(BMesh *bm, + BLI_mempool *hull_triangles, + HullFinalEdges *final_edges) { - GSetIterator hull_iter; + BLI_mempool_iter iter; + BLI_mempool_iternew(hull_triangles, &iter); + HullTriangle *t; - GSET_ITER (hull_iter, hull_triangles) { - HullTriangle *t = BLI_gsetIterator_getKey(&hull_iter); + while ((t = BLI_mempool_iterstep(&iter))) { BMIter bm_iter1, bm_iter2; BMFace *f; bool f_on_hull; @@ -467,7 +472,7 @@ static BMVert **hull_verts_from_bullet(plConvexHull hull, return hull_verts; } -static void hull_from_bullet(BMesh *bm, BMOperator *op, GSet *hull_triangles, BLI_mempool *pool) +static void hull_from_bullet(BMesh *bm, BMOperator *op, BLI_mempool *hull_triangles) { int *fvi = NULL; BLI_array_declare(fvi); @@ -509,7 +514,7 @@ static void hull_from_bullet(BMesh *bm, BMOperator *op, GSet *hull_triangles, BL fv[1] = hull_verts[fvi[j - 1]]; fv[2] = hull_verts[fvi[j]]; - hull_add_triangle(bm, hull_triangles, pool, fv[0], fv[1], fv[2]); + hull_add_triangle(bm, hull_triangles, fv[0], fv[1], fv[2]); } } } @@ -543,10 +548,9 @@ static bool hull_num_input_verts_is_ok(BMOperator *op) void bmo_convex_hull_exec(BMesh *bm, BMOperator *op) { HullFinalEdges *final_edges; - BLI_mempool *hull_pool; + BLI_mempool *hull_triangles; BMElemF *ele; BMOIter oiter; - GSet *hull_triangles; /* Verify that at least three verts in the input */ if (!hull_num_input_verts_is_ok(op)) { @@ -569,10 +573,9 @@ void bmo_convex_hull_exec(BMesh *bm, BMOperator *op) } } - hull_pool = BLI_mempool_create(sizeof(HullTriangle), 0, 128, BLI_MEMPOOL_NOP); - hull_triangles = BLI_gset_ptr_new("hull_triangles"); + hull_triangles = BLI_mempool_create(sizeof(HullTriangle), 0, 128, BLI_MEMPOOL_ALLOW_ITER); - hull_from_bullet(bm, op, hull_triangles, hull_pool); + hull_from_bullet(bm, op, hull_triangles); final_edges = hull_final_edges(hull_triangles); @@ -590,9 +593,7 @@ void bmo_convex_hull_exec(BMesh *bm, BMOperator *op) /* Convert hull triangles to BMesh faces */ hull_output_triangles(bm, hull_triangles); - BLI_mempool_destroy(hull_pool); - - BLI_gset_free(hull_triangles, NULL); + BLI_mempool_destroy(hull_triangles); hull_tag_unused(bm, op); -- cgit v1.2.3 From dfe50ef2d84263c3470011eaba60ca45e4684b67 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 9 Nov 2020 14:34:21 +0100 Subject: Fluid: Fix strict compiler warning Proper way to check for DEBUG_PRINT is to do `if defined` check rather than `if`: this is because in non-debug builds the symbol is not defined. --- source/blender/blenkernel/intern/fluid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index d8573b9f032..d93b635d67d 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -3201,9 +3201,12 @@ static void update_effectors_task_cb(void *__restrict userdata, data->force_y[index] = retvel[1]; data->force_z[index] = retvel[2]; -# if DEBUG_PRINT +# ifdef DEBUG_PRINT /* Debugging: Print forces. */ - printf("setting force: [%f, %f, %f]\n", data->force_x[index], data->force_y[index], data->force_z[index]); + printf("setting force: [%f, %f, %f]\n", + data->force_x[index], + data->force_y[index], + data->force_z[index]); # endif } } -- cgit v1.2.3 From 94b44a5228c0e5013281215061c5b1a38d0d3ae5 Mon Sep 17 00:00:00 2001 From: Ankit Meel Date: Mon, 9 Nov 2020 20:42:36 +0530 Subject: Cleanup: Clang-tidy, modernize-use-nullptr. --- source/blender/blenkernel/intern/volume.cc | 4 ++-- source/blender/blenkernel/intern/volume_render.cc | 4 ++-- source/blender/imbuf/intern/openexr/openexr_stub.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index bcd71e39b21..11aa9597740 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -1142,7 +1142,7 @@ VolumeGrid *BKE_volume_grid_get(const Volume *volume, int grid_index) return nullptr; #else UNUSED_VARS(volume, grid_index); - return NULL; + return nullptr; #endif } @@ -1409,7 +1409,7 @@ VolumeGrid *BKE_volume_grid_add(Volume *volume, const char *name, VolumeGridType return &grids.back(); #else UNUSED_VARS(volume, name, type); - return NULL; + return nullptr; #endif } diff --git a/source/blender/blenkernel/intern/volume_render.cc b/source/blender/blenkernel/intern/volume_render.cc index 55e04911d42..5c71f1d7eca 100644 --- a/source/blender/blenkernel/intern/volume_render.cc +++ b/source/blender/blenkernel/intern/volume_render.cc @@ -386,7 +386,7 @@ void BKE_volume_grid_wireframe(const Volume *volume, #else UNUSED_VARS(volume, volume_grid); - cb(cb_userdata, NULL, NULL, 0, 0); + cb(cb_userdata, nullptr, nullptr, 0, 0); #endif } @@ -432,7 +432,7 @@ void BKE_volume_grid_selection_surface(const Volume *volume, cb(cb_userdata, (float(*)[3])verts.data(), (int(*)[3])tris.data(), verts.size(), tris.size()); #else UNUSED_VARS(volume, volume_grid); - cb(cb_userdata, NULL, NULL, 0, 0); + cb(cb_userdata, nullptr, nullptr, 0, 0); #endif } diff --git a/source/blender/imbuf/intern/openexr/openexr_stub.cpp b/source/blender/imbuf/intern/openexr/openexr_stub.cpp index bfc4291c7b1..51bc2094053 100644 --- a/source/blender/imbuf/intern/openexr/openexr_stub.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_stub.cpp @@ -26,11 +26,11 @@ void *IMB_exr_get_handle(void) { - return NULL; + return nullptr; } void *IMB_exr_get_handle_name(const char * /*name*/) { - return NULL; + return nullptr; } void IMB_exr_add_channel(void * /*handle*/, const char * /*layname*/, @@ -82,7 +82,7 @@ float *IMB_exr_channel_rect(void * /*handle*/, const char * /*passname*/, const char * /*view*/) { - return NULL; + return nullptr; } void IMB_exr_read_channels(void * /*handle*/) -- cgit v1.2.3 From bd2dda90b6a35da21446ccfb7db2de0cb972d3f5 Mon Sep 17 00:00:00 2001 From: Ankit Meel Date: Mon, 9 Nov 2020 21:26:15 +0530 Subject: Cleanup: Clang-tidy, inconsistent parameter name readability-inconsistent-declaration-parameter-name --- source/blender/bmesh/tools/bmesh_boolean.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/bmesh/tools/bmesh_boolean.cc b/source/blender/bmesh/tools/bmesh_boolean.cc index 929bc510672..39b425a41df 100644 --- a/source/blender/bmesh/tools/bmesh_boolean.cc +++ b/source/blender/bmesh/tools/bmesh_boolean.cc @@ -492,7 +492,7 @@ bool BM_mesh_boolean_knife(BMesh *UNUSED(bm), const int UNUSED(nshapes), const bool UNUSED(use_self), const bool UNUSED(use_separate_all), - const bool UNUSED(keep_boolean)) + const bool UNUSED(keep_hidden)) { UNUSED_VARS(looptris, test_fn); return false; -- cgit v1.2.3 From ec6a9322e8723b906089f02ff76b04a7bb7d136f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 9 Nov 2020 17:23:32 +0100 Subject: Fix T78956: banding artifacts of vertex colors in Cycles Byte colors must be encoded in sRGB and converted to linear on lookup, to avoid precision loss. --- intern/cycles/blender/blender_mesh.cpp | 9 +++++---- intern/cycles/kernel/geom/geom_patch.h | 3 ++- intern/cycles/kernel/geom/geom_subd_triangle.h | 19 ++++++++++--------- intern/cycles/kernel/geom/geom_triangle.h | 12 ++++++++---- 4 files changed, 25 insertions(+), 18 deletions(-) diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index e40e1f5f001..b78a2c30b5e 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -346,7 +346,7 @@ static void attr_create_vertex_color(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, for (int i = 0; i < n; i++) { float4 color = get_float4(l->data[p->loop_start() + i].color()); /* Compress/encode vertex color using the sRGB curve. */ - *(cdata++) = color_float4_to_uchar4(color_srgb_to_linear_v4(color)); + *(cdata++) = color_float4_to_uchar4(color); } } } @@ -368,9 +368,10 @@ static void attr_create_vertex_color(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, float4 c3 = get_float4(l->data[li[2]].color()); /* Compress/encode vertex color using the sRGB curve. */ - cdata[0] = color_float4_to_uchar4(color_srgb_to_linear_v4(c1)); - cdata[1] = color_float4_to_uchar4(color_srgb_to_linear_v4(c2)); - cdata[2] = color_float4_to_uchar4(color_srgb_to_linear_v4(c3)); + cdata[0] = color_float4_to_uchar4(c1); + cdata[1] = color_float4_to_uchar4(c2); + cdata[2] = color_float4_to_uchar4(c3); + cdata += 3; } } diff --git a/intern/cycles/kernel/geom/geom_patch.h b/intern/cycles/kernel/geom/geom_patch.h index 8b4b91b96c8..b996294c51f 100644 --- a/intern/cycles/kernel/geom/geom_patch.h +++ b/intern/cycles/kernel/geom/geom_patch.h @@ -405,7 +405,8 @@ ccl_device float4 patch_eval_uchar4(KernelGlobals *kg, *dv = make_float4(0.0f, 0.0f, 0.0f, 0.0f); for (int i = 0; i < num_control; i++) { - float4 v = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, offset + indices[i])); + float4 v = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, offset + indices[i]))); val += v * weights[i]; if (du) diff --git a/intern/cycles/kernel/geom/geom_subd_triangle.h b/intern/cycles/kernel/geom/geom_subd_triangle.h index 3eef9857ae3..317f3984a9a 100644 --- a/intern/cycles/kernel/geom/geom_subd_triangle.h +++ b/intern/cycles/kernel/geom/geom_subd_triangle.h @@ -581,14 +581,14 @@ ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals *kg, int corners[4]; subd_triangle_patch_corners(kg, patch, corners); - float4 f0 = color_uchar4_to_float4( - kernel_tex_fetch(__attributes_uchar4, corners[0] + desc.offset)); - float4 f1 = color_uchar4_to_float4( - kernel_tex_fetch(__attributes_uchar4, corners[1] + desc.offset)); - float4 f2 = color_uchar4_to_float4( - kernel_tex_fetch(__attributes_uchar4, corners[2] + desc.offset)); - float4 f3 = color_uchar4_to_float4( - kernel_tex_fetch(__attributes_uchar4, corners[3] + desc.offset)); + float4 f0 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[0] + desc.offset))); + float4 f1 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[1] + desc.offset))); + float4 f2 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[2] + desc.offset))); + float4 f3 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[3] + desc.offset))); if (subd_triangle_patch_num_corners(kg, patch) != 4) { f1 = (f1 + f0) * 0.5f; @@ -614,7 +614,8 @@ ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals *kg, if (dy) *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); - return color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, desc.offset)); + return color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, desc.offset))); } else { if (dx) diff --git a/intern/cycles/kernel/geom/geom_triangle.h b/intern/cycles/kernel/geom/geom_triangle.h index 0278f3ade8e..5ecc2566815 100644 --- a/intern/cycles/kernel/geom/geom_triangle.h +++ b/intern/cycles/kernel/geom/geom_triangle.h @@ -317,9 +317,12 @@ ccl_device float4 triangle_attribute_float4(KernelGlobals *kg, if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { int tri = desc.offset + sd->prim * 3; - f0 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, tri + 0)); - f1 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, tri + 1)); - f2 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, tri + 2)); + f0 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, tri + 0))); + f1 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, tri + 1))); + f2 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, tri + 2))); } else { uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, sd->prim); @@ -343,7 +346,8 @@ ccl_device float4 triangle_attribute_float4(KernelGlobals *kg, if (dy) *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); - return color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, desc.offset)); + return color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, desc.offset))); } else { if (dx) -- cgit v1.2.3 From cc5294bd91c5ac8a84feaea6553d5c7299b47ff8 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 9 Nov 2020 18:37:29 +0100 Subject: Fix potential crash closing Blender with persistent data option enabled Found by address sanitizer. --- source/blender/makesrna/intern/rna_render.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 05b3b0b0c70..1aa5f0ca675 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -298,6 +298,7 @@ static void rna_RenderEngine_unregister(Main *bmain, StructRNA *type) return; } + RE_FreeAllPersistentData(); RNA_struct_free_extension(type, &et->rna_ext); RNA_struct_free(&BLENDER_RNA, type); BLI_freelinkN(&R_engines, et); -- cgit v1.2.3 From 60c4d0b5fb76a8bf2e53b760f92f3d9febecf62d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 9 Nov 2020 18:13:03 +0100 Subject: Fix T78028: crash with grease pencil and save buffers Perform grease pencil rendering delayed in this case, as there are no render buffers available for compositing. This keeps memory usage lower, but does involve multiple depsgraph evaluation. This seems in line with the intent of the save buffers feature, to use minimal memory. --- source/blender/draw/intern/draw_manager.c | 9 +- source/blender/render/extern/include/RE_engine.h | 1 + .../blender/render/intern/source/external_engine.c | 121 ++++++++++++++------- 3 files changed, 87 insertions(+), 44 deletions(-) diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index f995582149a..a3c8a4a669f 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1735,11 +1735,10 @@ static void DRW_render_gpencil_to_image(RenderEngine *engine, void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph) { - /* Early out if there are no grease pencil objects, especially important - * to avoid failing in in background renders without OpenGL context. */ - if (!DRW_render_check_grease_pencil(depsgraph)) { - return; - } + /* This function should only be called if there are are grease pencil objects, + * especially important to avoid failing in in background renders without OpenGL + * context. */ + BLI_assert(DRW_render_check_grease_pencil(depsgraph)); Scene *scene = DEG_get_evaluated_scene(depsgraph); ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph); diff --git a/source/blender/render/extern/include/RE_engine.h b/source/blender/render/extern/include/RE_engine.h index e53f33eacff..a153c622af8 100644 --- a/source/blender/render/extern/include/RE_engine.h +++ b/source/blender/render/extern/include/RE_engine.h @@ -149,6 +149,7 @@ typedef struct RenderEngine { /* Depsgraph */ struct Depsgraph *depsgraph; + bool has_grease_pencil; /* callback for render pass query */ ThreadMutex update_render_passes_mutex; diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index 440c54f5eeb..31b20008b52 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -617,6 +617,8 @@ static void engine_depsgraph_init(RenderEngine *engine, ViewLayer *view_layer) else { BKE_scene_graph_update_for_newframe(engine->depsgraph); } + + engine->has_grease_pencil = DRW_render_check_grease_pencil(engine->depsgraph); } static void engine_depsgraph_free(RenderEngine *engine) @@ -749,10 +751,63 @@ bool RE_bake_engine(Render *re, /* Render */ +static void engine_render_view_layer(Render *re, + RenderEngine *engine, + ViewLayer *view_layer_iter, + const bool use_engine, + const bool use_grease_pencil) +{ + /* Lock UI so scene can't be edited while we read from it in this render thread. */ + if (re->draw_lock) { + re->draw_lock(re->dlh, 1); + } + + /* Create depsgraph with scene evaluated at render resolution. */ + ViewLayer *view_layer = BLI_findstring( + &re->scene->view_layers, view_layer_iter->name, offsetof(ViewLayer, name)); + engine_depsgraph_init(engine, view_layer); + + /* Sync data to engine, within draw lock so scene data can be accessed safely. */ + if (use_engine) { + if (engine->type->update) { + engine->type->update(engine, re->main, engine->depsgraph); + } + } + + if (re->draw_lock) { + re->draw_lock(re->dlh, 0); + } + + /* Perform render with engine. */ + if (use_engine) { + if (engine->type->flag & RE_USE_GPU_CONTEXT) { + DRW_render_context_enable(engine->re); + } + + engine->type->render(engine, engine->depsgraph); + + if (engine->type->flag & RE_USE_GPU_CONTEXT) { + DRW_render_context_disable(engine->re); + } + } + + /* Optionally composite grease pencil over render result. */ + if (engine->has_grease_pencil && use_grease_pencil && !re->result->do_exr_tile) { + /* NOTE: External engine might have been requested to free its + * dependency graph, which is only allowed if there is no grease + * pencil (pipeline is taking care of that). */ + if (!RE_engine_test_break(engine) && engine->depsgraph != NULL) { + DRW_render_gpencil(engine, engine->depsgraph); + } + } + + /* Free dependency graph, if engine has not done it already. */ + engine_depsgraph_free(engine); +} + int RE_engine_render(Render *re, int do_all) { RenderEngineType *type = RE_engines_find(re->r.engine); - RenderEngine *engine; bool persistent_data = (re->r.mode & R_PERSISTENT_DATA) != 0; /* verify if we can render */ @@ -815,7 +870,7 @@ int RE_engine_render(Render *re, int do_all) re->i.totface = re->i.totvert = re->i.totlamp = 0; /* render */ - engine = re->engine; + RenderEngine *engine = re->engine; if (!engine) { engine = RE_engine_create(type); @@ -853,45 +908,16 @@ int RE_engine_render(Render *re, int do_all) re->draw_lock(re->dlh, 0); } + /* Render view layers. */ + bool delay_grease_pencil = false; + if (type->render) { FOREACH_VIEW_LAYER_TO_RENDER_BEGIN (re, view_layer_iter) { - if (re->draw_lock) { - re->draw_lock(re->dlh, 1); - } - - ViewLayer *view_layer = BLI_findstring( - &re->scene->view_layers, view_layer_iter->name, offsetof(ViewLayer, name)); - engine_depsgraph_init(engine, view_layer); - - if (type->update) { - type->update(engine, re->main, engine->depsgraph); - } - - if (re->draw_lock) { - re->draw_lock(re->dlh, 0); - } - - if (engine->type->flag & RE_USE_GPU_CONTEXT) { - DRW_render_context_enable(engine->re); - } - - type->render(engine, engine->depsgraph); - - if (engine->type->flag & RE_USE_GPU_CONTEXT) { - DRW_render_context_disable(engine->re); - } + engine_render_view_layer(re, engine, view_layer_iter, true, true); - /* Grease pencil render over previous render result. - * - * NOTE: External engine might have been requested to free its - * dependency graph, which is only allowed if there is no grease - * pencil (pipeline is taking care of that). - */ - if (!RE_engine_test_break(engine) && engine->depsgraph != NULL) { - DRW_render_gpencil(engine, engine->depsgraph); - } - - engine_depsgraph_free(engine); + /* With save buffers there is no render buffer in memory for compositing, delay + * grease pencil in that case. */ + delay_grease_pencil = engine->has_grease_pencil && re->result->do_exr_tile; if (RE_engine_test_break(engine)) { break; @@ -900,6 +926,7 @@ int RE_engine_render(Render *re, int do_all) FOREACH_VIEW_LAYER_TO_RENDER_END; } + /* Clear tile data */ engine->tile_x = 0; engine->tile_y = 0; engine->flag &= ~RE_ENGINE_RENDERING; @@ -908,10 +935,26 @@ int RE_engine_render(Render *re, int do_all) BLI_rw_mutex_lock(&re->partsmutex, THREAD_LOCK_WRITE); + /* For save buffers, read back from disk. */ if (re->result->do_exr_tile) { render_result_exr_file_end(re, engine); } + /* Perform delayed grease pencil rendering. */ + if (delay_grease_pencil) { + BLI_rw_mutex_unlock(&re->partsmutex); + + FOREACH_VIEW_LAYER_TO_RENDER_BEGIN (re, view_layer_iter) { + engine_render_view_layer(re, engine, view_layer_iter, false, true); + if (RE_engine_test_break(engine)) { + break; + } + } + FOREACH_VIEW_LAYER_TO_RENDER_END; + + BLI_rw_mutex_lock(&re->partsmutex, THREAD_LOCK_WRITE); + } + /* re->engine becomes zero if user changed active render engine during render */ if (!persistent_data || !re->engine) { RE_engine_free(engine); @@ -983,7 +1026,7 @@ void RE_engine_free_blender_memory(RenderEngine *engine) * * TODO(sergey): Find better solution for this. */ - if (DRW_render_check_grease_pencil(engine->depsgraph)) { + if (engine->has_grease_pencil) { return; } DEG_graph_free(engine->depsgraph); -- cgit v1.2.3 From cdb1da6bf6c2a237135d6a0eef03568dd0033ee4 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 5 Nov 2020 11:15:24 +0100 Subject: Install_deps: update URLS for OpenVDB repo/sources. --- build_files/build_environment/install_deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index c2114eba53a..69a3c69bfe8 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1029,8 +1029,8 @@ OSD_SOURCE=( "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${OSD OPENVDB_USE_REPO=false OPENVDB_BLOSC_SOURCE=( "https://github.com/Blosc/c-blosc/archive/v${OPENVDB_BLOSC_VERSION}.tar.gz" ) -OPENVDB_SOURCE=( "https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz" ) -#~ OPENVDB_SOURCE_REPO=( "https:///dreamworksanimation/openvdb.git" ) +OPENVDB_SOURCE=( "https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz" ) +#~ OPENVDB_SOURCE_REPO=( "https://github.com/AcademySoftwareFoundation/openvdb.git" ) #~ OPENVDB_SOURCE_REPO_UID="404659fffa659da075d1c9416e4fc939139a84ee" #~ OPENVDB_SOURCE_REPO_BRANCH="dev" -- cgit v1.2.3 From 716b7a60df36e002e62a65099590daf28e44dd9f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 9 Nov 2020 19:06:47 +0100 Subject: install_deps: add support for NanoVDB. re T81454. --- build_files/build_environment/install_deps.sh | 183 +++++++++++++++++++++++--- 1 file changed, 163 insertions(+), 20 deletions(-) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 69a3c69bfe8..f235615f64c 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -51,7 +51,7 @@ ARGS=$( \ getopt \ -o s:i:t:h \ --long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\ -with-all,with-opencollada,with-jack,with-embree,with-oidn,\ +with-all,with-opencollada,with-jack,with-embree,with-oidn,with-nanovdb,\ ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,\ force-all,force-python,force-numpy,force-boost,force-tbb,\ force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\ @@ -151,6 +151,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS: --with-oidn Build and install the OpenImageDenoise libraries. + --with-nanovdb + Build and install the NanoVDB branch of OpenVDB (instead of official release of OpenVDB). + --with-jack Install the jack libraries. @@ -676,6 +679,10 @@ while true; do --with-oidn) WITH_OIDN=true; shift; continue ;; + --with-nanvdb) + WITH_NANOVDB=true; + shift; continue + ;; --with-jack) WITH_JACK=true; shift; continue; ;; @@ -957,6 +964,11 @@ if [ "$WITH_ALL" = true -a "$OIDN_SKIP" = false ]; then fi if [ "$WITH_ALL" = true ]; then WITH_JACK=true + WITH_NANOVDB=true +fi + +if [ "$WITH_NANOVDB" = true ]; then + OPENVDB_FORCE_BUILD=true fi @@ -1034,6 +1046,10 @@ OPENVDB_SOURCE=( "https://github.com/AcademySoftwareFoundation/openvdb/archive/v #~ OPENVDB_SOURCE_REPO_UID="404659fffa659da075d1c9416e4fc939139a84ee" #~ OPENVDB_SOURCE_REPO_BRANCH="dev" +NANOVDB_USE_REPO=false +NANOVDB_SOURCE_REPO_UID="e62f7a0bf1e27397223c61ddeaaf57edf111b77f" +NANOVDB_SOURCE=( "https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_SOURCE_REPO_UID}.tar.gz" ) + ALEMBIC_USE_REPO=false ALEMBIC_SOURCE=( "https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz" ) # ALEMBIC_SOURCE_REPO=( "https://github.com/alembic/alembic.git" ) @@ -2594,11 +2610,115 @@ compile_BLOSC() { # ---------------------------------------------------------------------------- # Build OpenVDB +_init_nanovdb() { + _src=$SRC/openvdb-$OPENVDB_VERSION/nanovdb + _inst=$INST/nanovdb-$OPENVDB_VERSION_SHORT + _inst_shortcut=$INST/nanovdb +} + +_update_deps_nanovdb() { + : +} + +clean_nanovdb() { + _init_nanovdb + if [ -d $_inst ]; then + _update_deps_nanovdb + fi + _git=true # Mere trick to prevent clean from removing $_src... + _clean +} + +install_NanoVDB() { + # To be changed each time we make edits that would modify the compiled results! + nanovdb_magic=1 + _init_nanovdb + + # Clean install if needed! + magic_compile_check nanovdb-$OPENVDB_VERSION $nanovdb_magic + if [ $? -eq 1 ]; then + clean_nanovdb + fi + + if [ ! -d $_inst ]; then + INFO "Installing NanoVDB v$OPENVDB_VERSION" + _is_building=true + + # Rebuild dependencies as well! + _update_deps_nanovdb + + prepare_inst + + if [ ! -d $_src ]; then + ERROR "NanoVDB not found in openvdb-$OPENVDB_VERSION ($_src), exiting" + exit 1 + fi + + # Always refresh the whole build! + if [ -d build ]; then + rm -rf build + fi + mkdir build + cd build + + cmake_d="-D CMAKE_BUILD_TYPE=Release" + cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst" + + # NanoVDB is header-only, so only need the install target + cmake_d="$cmake_d -D NANOVDB_BUILD_UNITTESTS=OFF" + cmake_d="$cmake_d -D NANOVDB_BUILD_EXAMPLES=OFF" + cmake_d="$cmake_d -D NANOVDB_BUILD_BENCHMARK=OFF" + cmake_d="$cmake_d -D NANOVDB_BUILD_DOCS=OFF" + cmake_d="$cmake_d -D NANOVDB_BUILD_TOOLS=OFF" + cmake_d="$cmake_d -D NANOVDB_CUDA_KEEP_PTX=OFF" + + # Do not need to include any of the dependencies because of this + cmake_d="$cmake_d -D NANOVDB_USE_OPENVDB=OFF" + cmake_d="$cmake_d -D NANOVDB_USE_OPENGL=OFF" + cmake_d="$cmake_d -D NANOVDB_USE_OPENCL=OFF" + cmake_d="$cmake_d -D NANOVDB_USE_CUDA=OFF" + cmake_d="$cmake_d -D NANOVDB_USE_TBB=OFF" + cmake_d="$cmake_d -D NANOVDB_USE_BLOSC=OFF" + cmake_d="$cmake_d -D NANOVDB_USE_ZLIB=OFF" + cmake_d="$cmake_d -D NANOVDB_USE_OPTIX=OFF" + cmake_d="$cmake_d -D NANOVDB_ALLOW_FETCHCONTENT=OFF" + + cmake $cmake_d $_src + + make -j$THREADS install + make clean + + #~ mkdir -p $_inst + #~ cp -r $_src/include $_inst/include + + if [ -d $_inst ]; then + _create_inst_shortcut + else + ERROR "NanoVDB-v$OPENVDB_VERSION failed to install, exiting" + exit 1 + fi + + magic_compile_set nanovdb-$OPENVDB_VERSION $nanovdb_magic + + cd $CWD + INFO "Done compiling NanoVDB-v$OPENVDB_VERSION!" + _is_building=false + else + INFO "Own NanoVDB-v$OPENVDB_VERSION is up to date, nothing to do!" + fi +} + + _init_openvdb() { _src=$SRC/openvdb-$OPENVDB_VERSION _git=false _inst=$INST/openvdb-$OPENVDB_VERSION_SHORT _inst_shortcut=$INST/openvdb + + _openvdb_source=$OPENVDB_SOURCE + if [ "$WITH_NANOVDB" = true ]; then + _openvdb_source=$NANOVDB_SOURCE + fi } _update_deps_openvdb() { @@ -2623,7 +2743,7 @@ compile_OPENVDB() { PRINT "" # To be changed each time we make edits that would modify the compiled result! - openvdb_magic=1 + openvdb_magic=2 _init_openvdb # Clean install if needed! @@ -2633,7 +2753,7 @@ compile_OPENVDB() { fi if [ ! -d $_inst ]; then - INFO "Building OpenVDB-$OPENVDB_VERSION" + INFO "Building OpenVDB-$OPENVDB_VERSION (with NanoVDB: $WITH_NANOVDB)" _is_building=true # Rebuild dependencies as well! @@ -2641,12 +2761,17 @@ compile_OPENVDB() { prepare_inst - if [ ! -d $_src -o true ]; then + if [ ! -d $_src ]; then mkdir -p $SRC - download OPENVDB_SOURCE[@] "$_src.tar.gz" + download _openvdb_source[@] "$_src.tar.gz" INFO "Unpacking OpenVDB-$OPENVDB_VERSION" - tar -C $SRC -xf $_src.tar.gz + if [ "$WITH_NANOVDB" = true ]; then + tar -C $SRC --transform "s,(.*/?)openvdb-$NANOVDB_SOURCE_REPO_UID[^/]*(.*),\1openvdb-$OPENVDB_VERSION\2,x" \ + -xf $_src.tar.gz + else + tar -C $SRC -xf $_src.tar.gz + fi fi cd $_src @@ -2660,33 +2785,40 @@ compile_OPENVDB() { #~ git reset --hard #~ fi - # Source builds here - cd openvdb + # Always refresh the whole build! + if [ -d build ]; then + rm -rf build + fi + mkdir build + cd build - make_d="DESTDIR=$_inst" - make_d="$make_d HDSO=/usr" + cmake_d="-D CMAKE_BUILD_TYPE=Release" + cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst" + cmake_d="$cmake_d -D USE_STATIC_DEPENDENCIES=OFF" + cmake_d="$cmake_d -D OPENVDB_BUILD_BINARIES=OFF" if [ -d $INST/boost ]; then - make_d="$make_d BOOST_INCL_DIR=$INST/boost/include BOOST_LIB_DIR=$INST/boost/lib" + cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost" + cmake_d="$cmake_d -D Boost_USE_MULTITHREADED=ON" + cmake_d="$cmake_d -D Boost_NO_SYSTEM_PATHS=ON" + cmake_d="$cmake_d -D Boost_NO_BOOST_CMAKE=ON" fi if [ -d $INST/tbb ]; then - make_d="$make_d TBB_ROOT=$INST/tbb TBB_USE_STATIC_LIBS=OFF" + cmake_d="$cmake_d -D TBB_ROOT=$INST/tbb" fi if [ "$_with_built_openexr" = true ]; then - make_d="$make_d ILMBASE_INCL_DIR=$INST/openexr/include ILMBASE_LIB_DIR=$INST/openexr/lib" - make_d="$make_d EXR_INCL_DIR=$INST/openexr/include EXR_LIB_DIR=$INST/openexr/lib" - INFO "ILMBASE_HOME=$INST/openexr" + cmake_d="$cmake_d -D IlmBase_ROOT=$INST/openexr" + cmake_d="$cmake_d -D OpenEXR_ROOT=$INST/openexr" fi if [ -d $INST/blosc ]; then - make_d="$make_d BLOSC_INCL_DIR=$INST/blosc/include BLOSC_LIB_DIR=$INST/blosc/lib" + cmake_d="$cmake_d -D Blosc_ROOT=$INST/blosc" fi + + cmake $cmake_d .. - # Build without log4cplus, glfw, python module & docs - make_d="$make_d LOG4CPLUS_INCL_DIR= GLFW_INCL_DIR= PYTHON_VERSION= DOXYGEN=" - - make -j$THREADS lib $make_d install + make -j$THREADS install make clean if [ -d $_inst ]; then @@ -2707,6 +2839,10 @@ compile_OPENVDB() { fi run_ldconfig "openvdb" + + if [ "$WITH_NANOVDB" = true ]; then + install_NanoVDB + fi } # ---------------------------------------------------------------------------- @@ -5691,6 +5827,13 @@ print_info() { PRINT " $_1" _buildargs="$_buildargs $_1" fi + if [ -d $INST/nanovdb ]; then + _1="-D WITH_NANOVDB=ON" + _2="-D NANOVDB_ROOT_DIR=$INST/nanovdb" + PRINT " $_1" + PRINT " $_2" + _buildargs="$_buildargs $_1 $_2" + fi fi if [ "$WITH_OPENCOLLADA" = true ]; then -- cgit v1.2.3 From 850f9452a477dda876bafbb54cea9a3a9f39cd54 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Fri, 6 Nov 2020 02:15:36 +0100 Subject: Fix wrong DNA flag for hide face sets It was using the same flag as SCULPT_DYNTOPO_DETAIL_MANUAL Reviewed By: sergey Differential Revision: https://developer.blender.org/D9484 --- source/blender/makesdna/DNA_scene_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 2449608be4c..af499b0684b 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -2203,7 +2203,7 @@ typedef enum eSculptFlags { SCULPT_HIDE_MASK = (1 << 15), /* Don't display face sets in viewport. */ - SCULPT_HIDE_FACE_SETS = (1 << 16), + SCULPT_HIDE_FACE_SETS = (1 << 17), } eSculptFlags; /* ImagePaintSettings.mode */ -- cgit v1.2.3 From f923b6faa9f44ba94aee33dfc656b8341ca548c1 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 2 Nov 2020 23:02:02 +0100 Subject: Fix assert in the sculpt pen tilt code Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D9422 --- source/blender/editors/sculpt_paint/sculpt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 875f24837c1..8c03d147768 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2819,9 +2819,12 @@ void SCULPT_tilt_apply_to_normal(float r_normal[3], StrokeCache *cache, const fl } const float rot_max = M_PI_2 * tilt_strength * SCULPT_TILT_SENSITIVITY; mul_v3_mat3_m4v3(r_normal, cache->vc->obact->obmat, r_normal); - rotate_v3_v3v3fl(r_normal, r_normal, cache->vc->rv3d->viewinv[0], cache->y_tilt * rot_max); - rotate_v3_v3v3fl(r_normal, r_normal, cache->vc->rv3d->viewinv[1], cache->x_tilt * rot_max); - mul_v3_mat3_m4v3(r_normal, cache->vc->obact->imat, r_normal); + float normal_tilt_y[3]; + rotate_v3_v3v3fl(normal_tilt_y, r_normal, cache->vc->rv3d->viewinv[0], cache->y_tilt * rot_max); + float normal_tilt_xy[3]; + rotate_v3_v3v3fl( + normal_tilt_xy, normal_tilt_y, cache->vc->rv3d->viewinv[1], cache->x_tilt * rot_max); + mul_v3_mat3_m4v3(r_normal, cache->vc->obact->imat, normal_tilt_xy); normalize_v3(r_normal); } -- cgit v1.2.3 From 3a764c3e6d8a282b2814aa7f362247cba99b425c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Nov 2020 09:24:47 +1100 Subject: Cleanup: suppress clang-tidy warnings without FFMPEG/AVI/AUDASPACE --- source/blender/blenkernel/intern/sound.c | 5 ++++- source/blender/imbuf/intern/indexer.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 07532d525bd..8b66b1fc628 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -1323,7 +1323,10 @@ int BKE_sound_scene_playing(Scene *UNUSED(scene)) { return -1; } -void BKE_sound_read_waveform(Main *bmain, bSound *sound, short *stop) +void BKE_sound_read_waveform(Main *bmain, + bSound *sound, + /* NOLINTNEXTLINE: readability-non-const-parameter. */ + short *stop) { UNUSED_VARS(sound, stop, bmain); } diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 76717bef537..b5b8cd4a580 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -1218,8 +1218,11 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, } void IMB_anim_index_rebuild(struct IndexBuildContext *context, + /* NOLINTNEXTLINE: readability-non-const-parameter. */ short *stop, + /* NOLINTNEXTLINE: readability-non-const-parameter. */ short *do_update, + /* NOLINTNEXTLINE: readability-non-const-parameter. */ float *progress) { switch (context->anim_type) { -- cgit v1.2.3 From efd71aad4f22ec0073d80b8dd296015d3f395aa8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Nov 2020 09:39:42 +1100 Subject: Cleanup: clang-tidy suppress warnings for PyTypeObject.tp_print Clang-tidy behavior changes from Python 3.7 to 3.8+ so it's simplest to suppress the warning in this instance. --- source/blender/freestyle/intern/python/BPy_BBox.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_FrsNoise.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_Id.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_IntegrationType.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_Interface0D.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_Interface1D.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_Iterator.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_MediumType.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_Nature.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_Operators.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_SShape.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_StrokeShader.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_ViewMap.cpp | 2 ++ source/blender/freestyle/intern/python/BPy_ViewShape.cpp | 2 ++ .../blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp | 2 ++ .../freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp | 2 ++ .../freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp | 2 ++ .../blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp | 2 ++ .../intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp | 2 ++ source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp | 2 ++ source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp | 2 ++ source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp | 2 ++ .../freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp | 2 ++ .../freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp | 2 ++ .../freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp | 2 ++ source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp | 2 ++ source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp | 2 ++ source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp | 2 ++ source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp | 2 ++ source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp | 2 ++ .../freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp | 2 ++ .../freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 2 ++ .../blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp | 2 ++ .../freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp | 2 ++ .../freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp | 2 ++ .../blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp | 2 ++ .../blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp | 2 ++ .../freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp | 2 ++ source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp | 2 ++ .../freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp | 2 ++ .../blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp | 2 ++ .../freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp | 2 ++ .../intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp | 2 ++ .../intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp | 2 ++ .../python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp | 2 ++ .../intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp | 2 ++ .../blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp | 2 ++ .../intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp | 2 ++ .../freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp | 2 ++ .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp | 2 ++ .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp | 2 ++ .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp | 2 ++ .../freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp | 2 ++ .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp | 2 ++ .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp | 2 ++ .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp | 2 ++ .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp | 2 ++ .../python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp | 2 ++ .../intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp | 2 ++ .../intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp | 2 ++ .../python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp | 2 ++ .../UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp | 2 ++ .../python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp | 2 ++ .../UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp | 2 ++ .../UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp | 2 ++ .../python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp | 2 ++ .../python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp | 2 ++ .../python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp | 2 ++ .../python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp | 2 ++ .../UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp | 2 ++ .../UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp | 2 ++ .../UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp | 2 ++ .../UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp | 2 ++ .../UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp | 2 ++ .../UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp | 2 ++ .../UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp | 2 ++ .../intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp | 2 ++ .../intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp | 2 ++ .../intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp | 2 ++ .../intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp | 2 ++ .../intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp | 2 ++ .../intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp | 2 ++ .../python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp | 2 ++ .../freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp | 2 ++ .../UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp | 2 ++ .../python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp | 2 ++ .../python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp | 2 ++ .../UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp | 2 ++ .../UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp | 2 ++ .../UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp | 2 ++ .../UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp | 2 ++ .../python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp | 2 ++ .../python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp | 2 ++ .../python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp | 2 ++ .../UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp | 2 ++ .../UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp | 2 ++ .../UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp | 2 ++ .../UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp | 2 ++ .../UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp | 2 ++ .../UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp | 2 ++ .../python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp | 2 ++ .../blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp | 2 ++ .../blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp | 2 ++ .../freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp | 2 ++ .../intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp | 2 ++ .../intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp | 2 ++ .../intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp | 2 ++ .../intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp | 2 ++ .../blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp | 2 ++ .../intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp | 2 ++ .../blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp | 2 ++ .../blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp | 2 ++ .../intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp | 2 ++ 149 files changed, 298 insertions(+) diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp index e61ab2fe8c4..4e0da4e87cf 100644 --- a/source/blender/freestyle/intern/python/BPy_BBox.cpp +++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp @@ -80,6 +80,8 @@ PyTypeObject BBox_Type = { sizeof(BPy_BBox), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BBox_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index a24a0308017..0aef437d270 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -153,6 +153,8 @@ PyTypeObject BinaryPredicate0D_Type = { sizeof(BPy_BinaryPredicate0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 0120f325f7b..ef9c1dcdfab 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -187,6 +187,8 @@ PyTypeObject BinaryPredicate1D_Type = { sizeof(BPy_BinaryPredicate1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index 4df4031e7ce..fc851f2085c 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -538,6 +538,8 @@ PyTypeObject FrsMaterial_Type = { sizeof(BPy_FrsMaterial), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)FrsMaterial_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp index a62b5896164..865a0957cba 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp @@ -330,6 +330,8 @@ PyTypeObject FrsNoise_Type = { sizeof(BPy_FrsNoise), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)FrsNoise_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp index a9baef10383..10b8feb7d3d 100644 --- a/source/blender/freestyle/intern/python/BPy_Id.cpp +++ b/source/blender/freestyle/intern/python/BPy_Id.cpp @@ -171,6 +171,8 @@ PyTypeObject Id_Type = { sizeof(BPy_Id), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Id_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp index ea3be83ba8d..380ea5e7d77 100644 --- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp @@ -153,6 +153,8 @@ PyTypeObject IntegrationType_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index 3f55795ad75..877f376fc37 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -313,6 +313,8 @@ PyTypeObject Interface0D_Type = { sizeof(BPy_Interface0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Interface0D_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index d34468d4e25..8bfc17f83ae 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -341,6 +341,8 @@ PyTypeObject Interface1D_Type = { sizeof(BPy_Interface1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Interface1D_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index e0645a19e61..b1a577df8cf 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -228,6 +228,8 @@ PyTypeObject Iterator_Type = { sizeof(BPy_Iterator), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Iterator_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp index b00cbecb4b4..a6d1d0e8476 100644 --- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp +++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp @@ -45,6 +45,8 @@ PyTypeObject MediumType_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp index af4d26586b4..56dbc5e6f9a 100644 --- a/source/blender/freestyle/intern/python/BPy_Nature.cpp +++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp @@ -107,6 +107,8 @@ PyTypeObject Nature_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 2106842c0e9..23009f66dfd 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -770,6 +770,8 @@ PyTypeObject Operators_Type = { sizeof(BPy_Operators), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Operators_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index a4517ce5669..45769396529 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -281,6 +281,8 @@ PyTypeObject SShape_Type = { sizeof(BPy_SShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SShape_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index cba9c778f34..6b07ea4c142 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -677,6 +677,8 @@ PyTypeObject StrokeAttribute_Type = { sizeof(BPy_StrokeAttribute), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)StrokeAttribute_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index 4da327f32e4..8b3c601bf9e 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -282,6 +282,8 @@ PyTypeObject StrokeShader_Type = { sizeof(BPy_StrokeShader), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)StrokeShader___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index 2d0c6f14452..53a4ba8b3b8 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -124,6 +124,8 @@ PyTypeObject UnaryFunction0D_Type = { sizeof(BPy_UnaryFunction0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index 9fe12559f23..5f44b3468cb 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -118,6 +118,8 @@ PyTypeObject UnaryFunction1D_Type = { sizeof(BPy_UnaryFunction1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index 63dbaa68095..adc6d7fae12 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -167,6 +167,8 @@ PyTypeObject UnaryPredicate0D_Type = { sizeof(BPy_UnaryPredicate0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index cdc14cbaa86..5b4c35eb7e1 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -225,6 +225,8 @@ PyTypeObject UnaryPredicate1D_Type = { sizeof(BPy_UnaryPredicate1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp index f4a980bd095..1de9769d572 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp @@ -184,6 +184,8 @@ PyTypeObject ViewMap_Type = { sizeof(BPy_ViewMap), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ViewMap_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp index 7eae62117be..f5662eab9f1 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -352,6 +352,8 @@ PyTypeObject ViewShape_Type = { sizeof(BPy_ViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ViewShape_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp index 0c01f4c7349..9eddc19d99c 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp @@ -59,6 +59,8 @@ PyTypeObject FalseBP1D_Type = { sizeof(BPy_FalseBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp index 661470d1956..30fe7b18f06 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp @@ -61,6 +61,8 @@ PyTypeObject Length2DBP1D_Type = { sizeof(BPy_Length2DBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp index a1477f4ca49..f2b9a3a19c5 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp @@ -60,6 +60,8 @@ PyTypeObject SameShapeIdBP1D_Type = { sizeof(BPy_SameShapeIdBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp index 089d72c11f8..dcefac1f414 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp @@ -60,6 +60,8 @@ PyTypeObject TrueBP1D_Type = { sizeof(BPy_TrueBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index 21b9fcc2ef6..4536eebe801 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -90,6 +90,8 @@ PyTypeObject ViewMapGradientNormBP1D_Type = { sizeof(BPy_ViewMapGradientNormBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index 8ae5bbb14fe..85dcb91d1dd 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -242,6 +242,8 @@ PyTypeObject CurvePoint_Type = { sizeof(BPy_CurvePoint), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index 1931889df4c..c91e55a807f 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -455,6 +455,8 @@ PyTypeObject SVertex_Type = { sizeof(BPy_SVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index c273cb6446a..7ea8979ca57 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -164,6 +164,8 @@ PyTypeObject ViewVertex_Type = { sizeof(BPy_ViewVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 805b6a933fa..fce952e68bc 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -361,6 +361,8 @@ PyTypeObject StrokeVertex_Type = { sizeof(BPy_StrokeVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 6713106d323..941f42da92f 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp @@ -109,6 +109,8 @@ PyTypeObject NonTVertex_Type = { sizeof(BPy_NonTVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 cc413b26fcd..aa86284aa22 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp @@ -219,6 +219,8 @@ PyTypeObject TVertex_Type = { sizeof(BPy_TVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index 9d16e88f305..a0d4f5fe05d 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -358,6 +358,8 @@ PyTypeObject FEdge_Type = { sizeof(BPy_FEdge), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp index 4fedbcf1513..e41e16c7b8d 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp @@ -190,6 +190,8 @@ PyTypeObject FrsCurve_Type = { sizeof(BPy_FrsCurve), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 87d0899746e..1a0bbb54d17 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -501,6 +501,8 @@ PyTypeObject Stroke_Type = { sizeof(BPy_Stroke), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp index fbc65fb67b8..f0aba5001c5 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -386,6 +386,8 @@ PyTypeObject ViewEdge_Type = { sizeof(BPy_ViewEdge), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 f932b13a232..550d928aa74 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp @@ -150,6 +150,8 @@ PyTypeObject Chain_Type = { sizeof(BPy_Chain), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 df270da2791..2fad50075c0 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -408,6 +408,8 @@ PyTypeObject FEdgeSharp_Type = { sizeof(BPy_FEdgeSharp), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 f9144e3f15e..f7641632534 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -253,6 +253,8 @@ PyTypeObject FEdgeSmooth_Type = { sizeof(BPy_FEdgeSmooth), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index 778129653fb..921122ae63a 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -186,6 +186,8 @@ PyTypeObject AdjacencyIterator_Type = { sizeof(BPy_AdjacencyIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index 18124567f7d..2b2b4befcf5 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -167,6 +167,8 @@ PyTypeObject ChainPredicateIterator_Type = { sizeof(BPy_ChainPredicateIterator), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ChainPredicateIterator_dealloc, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index 8f7d6a6221d..71a38808d74 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -121,6 +121,8 @@ PyTypeObject ChainSilhouetteIterator_Type = { sizeof(BPy_ChainSilhouetteIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index 25cde7da48c..2560759c352 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -255,6 +255,8 @@ PyTypeObject ChainingIterator_Type = { sizeof(BPy_ChainingIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index 0f27b7f0a62..0ce4c99dc47 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -135,6 +135,8 @@ PyTypeObject CurvePointIterator_Type = { sizeof(BPy_CurvePointIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index d16f06bbbbb..8e7cec63f2d 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -210,6 +210,8 @@ PyTypeObject Interface0DIterator_Type = { sizeof(BPy_Interface0DIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp index 00dcafcbcbf..38bec5982f4 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -162,6 +162,8 @@ PyTypeObject SVertexIterator_Type = { sizeof(BPy_SVertexIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 8bc95394725..3dd801a10b8 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -293,6 +293,8 @@ PyTypeObject StrokeVertexIterator_Type = { sizeof(BPy_StrokeVertexIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index e24314594a4..9061353203e 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -240,6 +240,8 @@ PyTypeObject ViewEdgeIterator_Type = { sizeof(BPy_ViewEdgeIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index 70bea8a0d44..dc28b490d9d 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -144,6 +144,8 @@ PyTypeObject orientedViewEdgeIterator_Type = { sizeof(BPy_orientedViewEdgeIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp index 55dcafb187e..575fcd3bea5 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp @@ -71,6 +71,8 @@ PyTypeObject BackboneStretcherShader_Type = { sizeof(BPy_BackboneStretcherShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp index 94b7a32b6f2..60861e602e8 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp @@ -71,6 +71,8 @@ PyTypeObject BezierCurveShader_Type = { sizeof(BPy_BezierCurveShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp index 525681d16ea..59b5b2fdce3 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp @@ -91,6 +91,8 @@ PyTypeObject BlenderTextureShader_Type = { sizeof(BPy_BlenderTextureShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp index 79084843443..148fb830157 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp @@ -89,6 +89,8 @@ PyTypeObject CalligraphicShader_Type = { sizeof(BPy_CalligraphicShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp index 50af76a06b9..c29d81d1300 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp @@ -70,6 +70,8 @@ PyTypeObject ColorNoiseShader_Type = { sizeof(BPy_ColorNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp index 7c6c4da80ec..e64064ba655 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp @@ -76,6 +76,8 @@ PyTypeObject ConstantColorShader_Type = { sizeof(BPy_ConstantColorShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp index 2db898f2e36..31d9d005e6e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp @@ -70,6 +70,8 @@ PyTypeObject ConstantThicknessShader_Type = { sizeof(BPy_ConstantThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp index 8a6ccc61a1a..3d42d1a3ff0 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp @@ -76,6 +76,8 @@ PyTypeObject ConstrainedIncreasingThicknessShader_Type = { sizeof(BPy_ConstrainedIncreasingThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp index 0a5486aeb75..90c48961c9b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp @@ -78,6 +78,8 @@ PyTypeObject GuidingLinesShader_Type = { sizeof(BPy_GuidingLinesShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp index 9f9dfd8c633..57fe31cba95 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp @@ -98,6 +98,8 @@ PyTypeObject IncreasingColorShader_Type = { sizeof(BPy_IncreasingColorShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp index a807fd821bc..3736113eb9c 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp @@ -76,6 +76,8 @@ PyTypeObject IncreasingThicknessShader_Type = { sizeof(BPy_IncreasingThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp index 6e0b3614114..ec884d34db0 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp @@ -77,6 +77,8 @@ PyTypeObject PolygonalizationShader_Type = { sizeof(BPy_PolygonalizationShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp index 3b976450464..fe753a06038 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp @@ -68,6 +68,8 @@ PyTypeObject SamplingShader_Type = { sizeof(BPy_SamplingShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp index 968abb9d75e..a6396396673 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp @@ -100,6 +100,8 @@ PyTypeObject SmoothingShader_Type = { sizeof(BPy_SmoothingShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp index bdff11f347c..c64cfb72a0b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp @@ -94,6 +94,8 @@ PyTypeObject SpatialNoiseShader_Type = { sizeof(BPy_SpatialNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp index 8f8ef76dc69..dd674c0864f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp @@ -70,6 +70,8 @@ PyTypeObject StrokeTextureStepShader_Type = { sizeof(BPy_StrokeTextureStepShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp index e601028a1e2..0f317799eb8 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp @@ -72,6 +72,8 @@ PyTypeObject ThicknessNoiseShader_Type = { sizeof(BPy_ThicknessNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp index be563b641d7..e17423c9e36 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp @@ -69,6 +69,8 @@ PyTypeObject TipRemoverShader_Type = { sizeof(BPy_TipRemoverShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index 8507b525cfb..b6bad17f2bd 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -187,6 +187,8 @@ PyTypeObject UnaryFunction0DDouble_Type = { sizeof(BPy_UnaryFunction0DDouble), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index f48bc871855..df6005c1990 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -126,6 +126,8 @@ PyTypeObject UnaryFunction0DEdgeNature_Type = { sizeof(BPy_UnaryFunction0DEdgeNature), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index 6bf545d217d..309a97da0b8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -163,6 +163,8 @@ PyTypeObject UnaryFunction0DFloat_Type = { sizeof(BPy_UnaryFunction0DFloat), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index 39c73e2545c..44ec2f0c141 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -122,6 +122,8 @@ PyTypeObject UnaryFunction0DId_Type = { sizeof(BPy_UnaryFunction0DId), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index dcebed1ec9f..c8fd5eb6551 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -125,6 +125,8 @@ PyTypeObject UnaryFunction0DMaterial_Type = { sizeof(BPy_UnaryFunction0DMaterial), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index f93eeb0fc88..7536f8990a7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -126,6 +126,8 @@ PyTypeObject UnaryFunction0DUnsigned_Type = { sizeof(BPy_UnaryFunction0DUnsigned), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index 6ba95a3f080..432c5acad12 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -131,6 +131,8 @@ PyTypeObject UnaryFunction0DVec2f_Type = { sizeof(BPy_UnaryFunction0DVec2f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index f6e4f281f34..ff139898c37 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -124,6 +124,8 @@ PyTypeObject UnaryFunction0DVec3f_Type = { sizeof(BPy_UnaryFunction0DVec3f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 53a838e8d42..634f02bc084 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -135,6 +135,8 @@ PyTypeObject UnaryFunction0DVectorViewShape_Type = { sizeof(BPy_UnaryFunction0DVectorViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index 9ad621da7c5..0837329981e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -133,6 +133,8 @@ PyTypeObject UnaryFunction0DViewShape_Type = { sizeof(BPy_UnaryFunction0DViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 066ce2a8da4..7ba834d497f 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 @@ -74,6 +74,8 @@ PyTypeObject ShapeIdF0D_Type = { sizeof(BPy_ShapeIdF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 a9a4a897b29..7f969bc8b2c 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 @@ -77,6 +77,8 @@ PyTypeObject MaterialF0D_Type = { sizeof(BPy_MaterialF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 bf57da163e8..9721817e22f 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 @@ -68,6 +68,8 @@ PyTypeObject CurveNatureF0D_Type = { sizeof(BPy_CurveNatureF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 eadf190c6ea..b0a841d209b 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 @@ -70,6 +70,8 @@ PyTypeObject Normal2DF0D_Type = { sizeof(BPy_Normal2DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 54621c3b5d8..c40a6b48d40 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 @@ -72,6 +72,8 @@ PyTypeObject VertexOrientation2DF0D_Type = { sizeof(BPy_VertexOrientation2DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 1a1143a561f..84d1cb521bd 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 @@ -72,6 +72,8 @@ PyTypeObject VertexOrientation3DF0D_Type = { sizeof(BPy_VertexOrientation3DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 6220ac22a59..ef9cb5d0c62 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 @@ -67,6 +67,8 @@ PyTypeObject GetOccludeeF0D_Type = { sizeof(BPy_GetOccludeeF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 98c5bc1936f..c0b73d1822d 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 @@ -67,6 +67,8 @@ PyTypeObject GetShapeF0D_Type = { sizeof(BPy_GetShapeF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 fd14c6475e1..31082a02f55 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 @@ -72,6 +72,8 @@ PyTypeObject Curvature2DAngleF0D_Type = { sizeof(BPy_Curvature2DAngleF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 8a77e417ab9..8d728bfff02 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 @@ -77,6 +77,8 @@ PyTypeObject DensityF0D_Type = { sizeof(BPy_DensityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 8d981cabe0d..02ebabd6ed5 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 @@ -67,6 +67,8 @@ PyTypeObject GetProjectedXF0D_Type = { sizeof(BPy_GetProjectedXF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 4bbb9c0a547..090f4e6ce3f 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 @@ -67,6 +67,8 @@ PyTypeObject GetProjectedYF0D_Type = { sizeof(BPy_GetProjectedYF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 9b1182f3b94..00be2cd7cec 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 @@ -67,6 +67,8 @@ PyTypeObject GetProjectedZF0D_Type = { sizeof(BPy_GetProjectedZF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 ec9bc953786..a98d703618e 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 @@ -67,6 +67,8 @@ PyTypeObject GetXF0D_Type = { sizeof(BPy_GetXF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 3d194d5465a..7d390690dd6 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 @@ -67,6 +67,8 @@ PyTypeObject GetYF0D_Type = { sizeof(BPy_GetYF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 3b72e1beb39..2f6a6ee791f 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 @@ -67,6 +67,8 @@ PyTypeObject GetZF0D_Type = { sizeof(BPy_GetZF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 df2bf54354e..683a29283bf 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 @@ -75,6 +75,8 @@ PyTypeObject LocalAverageDepthF0D_Type = { sizeof(BPy_LocalAverageDepthF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 f4c95cdc765..91e0c4f0bd4 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 @@ -72,6 +72,8 @@ PyTypeObject ZDiscontinuityF0D_Type = { sizeof(BPy_ZDiscontinuityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 71353f8772e..a1c7cd47a4c 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 @@ -70,6 +70,8 @@ PyTypeObject GetCurvilinearAbscissaF0D_Type = { sizeof(BPy_GetCurvilinearAbscissaF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 d8bb89a3d1c..bef814f9bb1 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 @@ -66,6 +66,8 @@ PyTypeObject GetParameterF0D_Type = { sizeof(BPy_GetParameterF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 c08cdd544f8..fc279a097dc 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 @@ -75,6 +75,8 @@ PyTypeObject GetViewMapGradientNormF0D_Type = { sizeof(BPy_GetViewMapGradientNormF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 fa4a7f997fd..6fa0572f9c9 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 @@ -73,6 +73,8 @@ PyTypeObject ReadCompleteViewMapPixelF0D_Type = { sizeof(BPy_ReadCompleteViewMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 4a7617a2f4e..1f10b699e0c 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 @@ -74,6 +74,8 @@ PyTypeObject ReadMapPixelF0D_Type = { sizeof(BPy_ReadMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 980d5d20d69..203227d2731 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 @@ -77,6 +77,8 @@ PyTypeObject ReadSteerableViewMapPixelF0D_Type = { sizeof(BPy_ReadSteerableViewMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 4741bdaa1ad..f824acdc86e 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 @@ -75,6 +75,8 @@ PyTypeObject QuantitativeInvisibilityF0D_Type = { sizeof(BPy_QuantitativeInvisibilityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 7f07b70fc1b..c485ede5a1e 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 @@ -68,6 +68,8 @@ PyTypeObject GetOccludersF0D_Type = { sizeof(BPy_GetOccludersF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index eb7e36ba42c..1e8e9bd0793 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -268,6 +268,8 @@ PyTypeObject UnaryFunction1DDouble_Type = { sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index 7f9285f0a96..769e8ca40b1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -175,6 +175,8 @@ PyTypeObject UnaryFunction1DEdgeNature_Type = { sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index e547aec8922..20dd48f442f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -164,6 +164,8 @@ PyTypeObject UnaryFunction1DFloat_Type = { sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index 911659bbd5c..df56b6f7e7e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -175,6 +175,8 @@ PyTypeObject UnaryFunction1DUnsigned_Type = { sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index 11139df39d1..e5d243bf547 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -179,6 +179,8 @@ PyTypeObject UnaryFunction1DVec2f_Type = { sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index 7ae93b8301f..96e7fd823e3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -172,6 +172,8 @@ PyTypeObject UnaryFunction1DVec3f_Type = { sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index 4d7fe673066..f72fa77ccc8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -200,6 +200,8 @@ PyTypeObject UnaryFunction1DVectorViewShape_Type = { sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index 6c16226881a..b182c87202b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -187,6 +187,8 @@ PyTypeObject UnaryFunction1DVoid_Type = { sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 483dbc09ff7..b2be5b92376 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 @@ -80,6 +80,8 @@ PyTypeObject CurveNatureF1D_Type = { sizeof(BPy_CurveNatureF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 1f4a7c9b143..2ece9640340 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 @@ -74,6 +74,8 @@ PyTypeObject Normal2DF1D_Type = { sizeof(BPy_Normal2DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 43f2aee965b..479104f0915 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 @@ -74,6 +74,8 @@ PyTypeObject Orientation2DF1D_Type = { sizeof(BPy_Orientation2DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 439b1eeb230..2364630cb2b 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 @@ -74,6 +74,8 @@ PyTypeObject Orientation3DF1D_Type = { sizeof(BPy_Orientation3DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 8c5cdb83fa5..ccdeef40c93 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 @@ -75,6 +75,8 @@ PyTypeObject Curvature2DAngleF1D_Type = { sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 5b428c7f70d..2b470848c03 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 @@ -88,6 +88,8 @@ PyTypeObject DensityF1D_Type = { sizeof(BPy_DensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 b9fb654b582..897778eb0d4 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 @@ -92,6 +92,8 @@ PyTypeObject GetCompleteViewMapDensityF1D_Type = { sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 287015da8b8..13f8792f13c 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 @@ -99,6 +99,8 @@ PyTypeObject GetDirectionalViewMapDensityF1D_Type = { sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 8183c73ddde..d8a2a684597 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 @@ -74,6 +74,8 @@ PyTypeObject GetProjectedXF1D_Type = { sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 41b72616140..2d536903581 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 @@ -74,6 +74,8 @@ PyTypeObject GetProjectedYF1D_Type = { sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 cc1a4f82a18..219f89930c3 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 @@ -74,6 +74,8 @@ PyTypeObject GetProjectedZF1D_Type = { sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 ee258bc5a88..29c825adaee 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 @@ -89,6 +89,8 @@ PyTypeObject GetSteerableViewMapDensityF1D_Type = { sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 2c2b07ef45b..912290a3136 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 @@ -89,6 +89,8 @@ PyTypeObject GetViewMapGradientNormF1D_Type = { sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 3e7ead21171..74cbd785625 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 @@ -74,6 +74,8 @@ PyTypeObject GetXF1D_Type = { sizeof(BPy_GetXF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 26192555156..17f761b208d 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 @@ -73,6 +73,8 @@ PyTypeObject GetYF1D_Type = { sizeof(BPy_GetYF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 8426a067dff..3a47190f199 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 @@ -74,6 +74,8 @@ PyTypeObject GetZF1D_Type = { sizeof(BPy_GetZF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 6e31d2828f5..16dbe4b0864 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 @@ -84,6 +84,8 @@ PyTypeObject LocalAverageDepthF1D_Type = { sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 f30641f1134..5e3709203f6 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 @@ -78,6 +78,8 @@ PyTypeObject ZDiscontinuityF1D_Type = { sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 ae079b7a955..3bb83b76f17 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 @@ -80,6 +80,8 @@ PyTypeObject QuantitativeInvisibilityF1D_Type = { sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 af7b658db5a..b7a7f4a19e5 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 @@ -67,6 +67,8 @@ PyTypeObject GetOccludeeF1D_Type = { sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 2f38dda2533..8e2fef70fcc 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 @@ -67,6 +67,8 @@ PyTypeObject GetOccludersF1D_Type = { sizeof(BPy_GetOccludersF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 8d53edbb6cc..ea6f39eecc7 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 @@ -67,6 +67,8 @@ PyTypeObject GetShapeF1D_Type = { sizeof(BPy_GetShapeF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 43f20a66841..2ef38f473e3 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 @@ -67,6 +67,8 @@ PyTypeObject ChainingTimeStampF1D_Type = { sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 e607166d7f7..b710d8ccb38 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 @@ -67,6 +67,8 @@ PyTypeObject IncrementChainingTimeStampF1D_Type = { sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ 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 6ec5de9f6b1..f571e1cd0cf 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 @@ -65,6 +65,8 @@ PyTypeObject TimeStampF1D_Type = { sizeof(BPy_TimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp index eef09cdf0c7..061cc61e4e8 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp @@ -58,6 +58,8 @@ PyTypeObject FalseUP0D_Type = { sizeof(BPy_FalseUP0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp index c1db96b4ecf..838f7141f74 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp @@ -58,6 +58,8 @@ PyTypeObject TrueUP0D_Type = { sizeof(BPy_TrueUP0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp index 6552a165a1c..3b6af927008 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp @@ -59,6 +59,8 @@ PyTypeObject ContourUP1D_Type = { sizeof(BPy_ContourUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp index b76c3c670ed..2a57eb2f333 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp @@ -75,6 +75,8 @@ PyTypeObject DensityLowerThanUP1D_Type = { sizeof(BPy_DensityLowerThanUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp index 0200c52b70c..e7c29670680 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp @@ -70,6 +70,8 @@ PyTypeObject EqualToChainingTimeStampUP1D_Type = { sizeof(BPy_EqualToChainingTimeStampUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp index b7d0f0d8221..e3dd726452b 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp @@ -69,6 +69,8 @@ PyTypeObject EqualToTimeStampUP1D_Type = { sizeof(BPy_EqualToTimeStampUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp index d5d79fefe7c..e537b26ef9c 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp @@ -63,6 +63,8 @@ PyTypeObject ExternalContourUP1D_Type = { sizeof(BPy_ExternalContourUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp index 11dafb7bd0f..eed961c9cc9 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp @@ -58,6 +58,8 @@ PyTypeObject FalseUP1D_Type = { sizeof(BPy_FalseUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp index 335df44ff5f..e165563daf4 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp @@ -74,6 +74,8 @@ PyTypeObject QuantitativeInvisibilityUP1D_Type = { sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp index 13ffba9924b..7c028263986 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp @@ -70,6 +70,8 @@ PyTypeObject ShapeUP1D_Type = { sizeof(BPy_ShapeUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp index 9388edf4d74..02951ba612f 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp @@ -58,6 +58,8 @@ PyTypeObject TrueUP1D_Type = { sizeof(BPy_TrueUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp index 84da1f2e280..2a5d362e279 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp @@ -71,6 +71,8 @@ PyTypeObject WithinImageBoundaryUP1D_Type = { sizeof(BPy_WithinImageBoundaryUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ + /* Incompatible with Python3.8+ (deprecated function). + * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ -- cgit v1.2.3 From b5d310b569e07a937798a2d38539cfd290149f1c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Nov 2020 09:42:03 +1100 Subject: Cleanup: clang-format --- intern/ghost/intern/GHOST_SystemCocoa.mm | 10 +--- .../intern/python/BPy_BinaryPredicate0D.cpp | 66 +++++++++++----------- .../intern/python/BPy_BinaryPredicate1D.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_FrsMaterial.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_FrsNoise.cpp | 66 +++++++++++----------- source/blender/freestyle/intern/python/BPy_Id.cpp | 8 +-- .../intern/python/BPy_IntegrationType.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_Interface0D.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_Interface1D.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_Iterator.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_MediumType.cpp | 66 +++++++++++----------- .../blender/freestyle/intern/python/BPy_Nature.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_Operators.cpp | 66 +++++++++++----------- .../blender/freestyle/intern/python/BPy_SShape.cpp | 66 +++++++++++----------- .../intern/python/BPy_StrokeAttribute.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_StrokeShader.cpp | 66 +++++++++++----------- .../intern/python/BPy_UnaryFunction0D.cpp | 66 +++++++++++----------- .../intern/python/BPy_UnaryFunction1D.cpp | 66 +++++++++++----------- .../intern/python/BPy_UnaryPredicate0D.cpp | 66 +++++++++++----------- .../intern/python/BPy_UnaryPredicate1D.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_ViewMap.cpp | 66 +++++++++++----------- .../freestyle/intern/python/BPy_ViewShape.cpp | 66 +++++++++++----------- .../python/BinaryPredicate1D/BPy_FalseBP1D.cpp | 66 +++++++++++----------- .../python/BinaryPredicate1D/BPy_Length2DBP1D.cpp | 66 +++++++++++----------- .../BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp | 66 +++++++++++----------- .../python/BinaryPredicate1D/BPy_TrueBP1D.cpp | 66 +++++++++++----------- .../BPy_ViewMapGradientNormBP1D.cpp | 66 +++++++++++----------- .../intern/python/Interface0D/BPy_CurvePoint.cpp | 66 +++++++++++----------- .../intern/python/Interface0D/BPy_SVertex.cpp | 66 +++++++++++----------- .../intern/python/Interface0D/BPy_ViewVertex.cpp | 66 +++++++++++----------- .../Interface0D/CurvePoint/BPy_StrokeVertex.cpp | 66 +++++++++++----------- .../Interface0D/ViewVertex/BPy_NonTVertex.cpp | 66 +++++++++++----------- .../python/Interface0D/ViewVertex/BPy_TVertex.cpp | 66 +++++++++++----------- .../intern/python/Interface1D/BPy_FEdge.cpp | 66 +++++++++++----------- .../intern/python/Interface1D/BPy_FrsCurve.cpp | 66 +++++++++++----------- .../intern/python/Interface1D/BPy_Stroke.cpp | 66 +++++++++++----------- .../intern/python/Interface1D/BPy_ViewEdge.cpp | 66 +++++++++++----------- .../intern/python/Interface1D/Curve/BPy_Chain.cpp | 66 +++++++++++----------- .../python/Interface1D/FEdge/BPy_FEdgeSharp.cpp | 66 +++++++++++----------- .../python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 66 +++++++++++----------- .../python/Iterator/BPy_AdjacencyIterator.cpp | 66 +++++++++++----------- .../python/Iterator/BPy_ChainPredicateIterator.cpp | 66 +++++++++++----------- .../Iterator/BPy_ChainSilhouetteIterator.cpp | 66 +++++++++++----------- .../python/Iterator/BPy_ChainingIterator.cpp | 66 +++++++++++----------- .../python/Iterator/BPy_CurvePointIterator.cpp | 66 +++++++++++----------- .../python/Iterator/BPy_Interface0DIterator.cpp | 66 +++++++++++----------- .../intern/python/Iterator/BPy_SVertexIterator.cpp | 66 +++++++++++----------- .../python/Iterator/BPy_StrokeVertexIterator.cpp | 66 +++++++++++----------- .../python/Iterator/BPy_ViewEdgeIterator.cpp | 66 +++++++++++----------- .../Iterator/BPy_orientedViewEdgeIterator.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_BackboneStretcherShader.cpp | 66 +++++++++++----------- .../python/StrokeShader/BPy_BezierCurveShader.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_BlenderTextureShader.cpp | 66 +++++++++++----------- .../python/StrokeShader/BPy_CalligraphicShader.cpp | 66 +++++++++++----------- .../python/StrokeShader/BPy_ColorNoiseShader.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_ConstantColorShader.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_ConstantThicknessShader.cpp | 66 +++++++++++----------- .../BPy_ConstrainedIncreasingThicknessShader.cpp | 38 ++++++------- .../python/StrokeShader/BPy_GuidingLinesShader.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_IncreasingColorShader.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_IncreasingThicknessShader.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_PolygonalizationShader.cpp | 66 +++++++++++----------- .../python/StrokeShader/BPy_SamplingShader.cpp | 66 +++++++++++----------- .../python/StrokeShader/BPy_SmoothingShader.cpp | 66 +++++++++++----------- .../python/StrokeShader/BPy_SpatialNoiseShader.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_StrokeTextureStepShader.cpp | 66 +++++++++++----------- .../StrokeShader/BPy_ThicknessNoiseShader.cpp | 66 +++++++++++----------- .../python/StrokeShader/BPy_TipRemoverShader.cpp | 66 +++++++++++----------- .../UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp | 66 +++++++++++----------- .../BPy_UnaryFunction0DEdgeNature.cpp | 66 +++++++++++----------- .../UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp | 66 +++++++++++----------- .../UnaryFunction0D/BPy_UnaryFunction0DId.cpp | 66 +++++++++++----------- .../BPy_UnaryFunction0DMaterial.cpp | 66 +++++++++++----------- .../BPy_UnaryFunction0DUnsigned.cpp | 66 +++++++++++----------- .../UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp | 66 +++++++++++----------- .../UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp | 66 +++++++++++----------- .../BPy_UnaryFunction0DVectorViewShape.cpp | 66 +++++++++++----------- .../BPy_UnaryFunction0DViewShape.cpp | 66 +++++++++++----------- .../UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_Material/BPy_MaterialF0D.cpp | 66 +++++++++++----------- .../BPy_CurveNatureF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp | 66 +++++++++++----------- .../BPy_VertexOrientation2DF0D.cpp | 66 +++++++++++----------- .../BPy_VertexOrientation3DF0D.cpp | 66 +++++++++++----------- .../BPy_GetOccludeeF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp | 66 +++++++++++----------- .../BPy_Curvature2DAngleF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_double/BPy_DensityF0D.cpp | 66 +++++++++++----------- .../BPy_GetProjectedXF0D.cpp | 66 +++++++++++----------- .../BPy_GetProjectedYF0D.cpp | 66 +++++++++++----------- .../BPy_GetProjectedZF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_double/BPy_GetXF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_double/BPy_GetYF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_double/BPy_GetZF0D.cpp | 66 +++++++++++----------- .../BPy_LocalAverageDepthF0D.cpp | 66 +++++++++++----------- .../BPy_ZDiscontinuityF0D.cpp | 66 +++++++++++----------- .../BPy_GetCurvilinearAbscissaF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_float/BPy_GetParameterF0D.cpp | 66 +++++++++++----------- .../BPy_GetViewMapGradientNormF0D.cpp | 66 +++++++++++----------- .../BPy_ReadCompleteViewMapPixelF0D.cpp | 66 +++++++++++----------- .../UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp | 66 +++++++++++----------- .../BPy_ReadSteerableViewMapPixelF0D.cpp | 66 +++++++++++----------- .../BPy_QuantitativeInvisibilityF0D.cpp | 66 +++++++++++----------- .../BPy_GetOccludersF0D.cpp | 66 +++++++++++----------- .../UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp | 66 +++++++++++----------- .../BPy_UnaryFunction1DEdgeNature.cpp | 66 +++++++++++----------- .../UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp | 66 +++++++++++----------- .../BPy_UnaryFunction1DUnsigned.cpp | 66 +++++++++++----------- .../UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp | 66 +++++++++++----------- .../UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp | 66 +++++++++++----------- .../BPy_UnaryFunction1DVectorViewShape.cpp | 66 +++++++++++----------- .../UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp | 66 +++++++++++----------- .../BPy_CurveNatureF1D.cpp | 66 +++++++++++----------- .../UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp | 66 +++++++++++----------- .../UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp | 66 +++++++++++----------- .../UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp | 66 +++++++++++----------- .../BPy_Curvature2DAngleF1D.cpp | 66 +++++++++++----------- .../UnaryFunction1D_double/BPy_DensityF1D.cpp | 66 +++++++++++----------- .../BPy_GetCompleteViewMapDensityF1D.cpp | 66 +++++++++++----------- .../BPy_GetDirectionalViewMapDensityF1D.cpp | 66 +++++++++++----------- .../BPy_GetProjectedXF1D.cpp | 66 +++++++++++----------- .../BPy_GetProjectedYF1D.cpp | 66 +++++++++++----------- .../BPy_GetProjectedZF1D.cpp | 66 +++++++++++----------- .../BPy_GetSteerableViewMapDensityF1D.cpp | 66 +++++++++++----------- .../BPy_GetViewMapGradientNormF1D.cpp | 66 +++++++++++----------- .../UnaryFunction1D_double/BPy_GetXF1D.cpp | 66 +++++++++++----------- .../UnaryFunction1D_double/BPy_GetYF1D.cpp | 66 +++++++++++----------- .../UnaryFunction1D_double/BPy_GetZF1D.cpp | 66 +++++++++++----------- .../BPy_LocalAverageDepthF1D.cpp | 66 +++++++++++----------- .../BPy_ZDiscontinuityF1D.cpp | 66 +++++++++++----------- .../BPy_QuantitativeInvisibilityF1D.cpp | 66 +++++++++++----------- .../BPy_GetOccludeeF1D.cpp | 66 +++++++++++----------- .../BPy_GetOccludersF1D.cpp | 66 +++++++++++----------- .../BPy_GetShapeF1D.cpp | 66 +++++++++++----------- .../BPy_ChainingTimeStampF1D.cpp | 66 +++++++++++----------- .../BPy_IncrementChainingTimeStampF1D.cpp | 66 +++++++++++----------- .../UnaryFunction1D_void/BPy_TimeStampF1D.cpp | 66 +++++++++++----------- .../python/UnaryPredicate0D/BPy_FalseUP0D.cpp | 66 +++++++++++----------- .../python/UnaryPredicate0D/BPy_TrueUP0D.cpp | 66 +++++++++++----------- .../python/UnaryPredicate1D/BPy_ContourUP1D.cpp | 66 +++++++++++----------- .../UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp | 66 +++++++++++----------- .../BPy_EqualToChainingTimeStampUP1D.cpp | 66 +++++++++++----------- .../UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp | 66 +++++++++++----------- .../UnaryPredicate1D/BPy_ExternalContourUP1D.cpp | 66 +++++++++++----------- .../python/UnaryPredicate1D/BPy_FalseUP1D.cpp | 66 +++++++++++----------- .../BPy_QuantitativeInvisibilityUP1D.cpp | 66 +++++++++++----------- .../python/UnaryPredicate1D/BPy_ShapeUP1D.cpp | 66 +++++++++++----------- .../python/UnaryPredicate1D/BPy_TrueUP1D.cpp | 66 +++++++++++----------- .../BPy_WithinImageBoundaryUP1D.cpp | 66 +++++++++++----------- 149 files changed, 4843 insertions(+), 4849 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index c1c1070d346..c12c09f1053 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1745,14 +1745,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr) NSPoint mousePos = [event locationInWindow]; GHOST_TInt32 x, y; window->clientToScreenIntern(mousePos.x, mousePos.y, x, y); - pushEvent(new GHOST_EventTrackpad([event timestamp] * 1000, - window, - GHOST_kTrackpadEventSmartMagnify, - x, - y, - 0, - 0, - false)); + pushEvent(new GHOST_EventTrackpad( + [event timestamp] * 1000, window, GHOST_kTrackpadEventSmartMagnify, x, y, 0, 0, false)); } break; case NSEventTypeRotate: { diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index 0aef437d270..8f4718e774f 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -155,39 +155,39 @@ PyTypeObject BinaryPredicate0D_Type = { (destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)BinaryPredicate0D___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)BinaryPredicate0D___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - BinaryPredicate0D___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_BinaryPredicate0D_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)BinaryPredicate0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)BinaryPredicate0D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)BinaryPredicate0D___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + BinaryPredicate0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_BinaryPredicate0D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BinaryPredicate0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index ef9c1dcdfab..31500186ab4 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -189,39 +189,39 @@ PyTypeObject BinaryPredicate1D_Type = { (destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)BinaryPredicate1D___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)BinaryPredicate1D___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - BinaryPredicate1D___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_BinaryPredicate1D_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)BinaryPredicate1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)BinaryPredicate1D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)BinaryPredicate1D___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + BinaryPredicate1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_BinaryPredicate1D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BinaryPredicate1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index fc851f2085c..bb0dbb02049 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -540,39 +540,39 @@ PyTypeObject FrsMaterial_Type = { (destructor)FrsMaterial_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)FrsMaterial_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - (hashfunc)FrsMaterial_hash, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - FrsMaterial_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - (richcmpfunc)BPy_FrsMaterial_richcmpr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_FrsMaterial_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FrsMaterial_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)FrsMaterial_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + (hashfunc)FrsMaterial_hash, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FrsMaterial_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + (richcmpfunc)BPy_FrsMaterial_richcmpr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_FrsMaterial_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FrsMaterial_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp index 865a0957cba..ebea140b9b5 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp @@ -332,39 +332,39 @@ PyTypeObject FrsNoise_Type = { (destructor)FrsNoise_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)FrsNoise_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - FrsNoise_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_FrsNoise_methods, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FrsNoise_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)FrsNoise_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FrsNoise_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_FrsNoise_methods, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FrsNoise_init, /* tp_init */ + 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 10b8feb7d3d..515f6525648 100644 --- a/source/blender/freestyle/intern/python/BPy_Id.cpp +++ b/source/blender/freestyle/intern/python/BPy_Id.cpp @@ -167,10 +167,10 @@ static PyGetSetDef BPy_Id_getseters[] = { /*-----------------------BPy_Id type definition ------------------------------*/ PyTypeObject Id_Type = { - PyVarObject_HEAD_INIT(nullptr, 0) "Id", /* tp_name */ - sizeof(BPy_Id), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)Id_dealloc, /* tp_dealloc */ + PyVarObject_HEAD_INIT(nullptr, 0) "Id", /* tp_name */ + sizeof(BPy_Id), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)Id_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ 0, /* tp_print */ diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp index 380ea5e7d77..2cceedbbb28 100644 --- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp @@ -155,39 +155,39 @@ PyTypeObject IntegrationType_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &PyLong_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - nullptr, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &PyLong_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /*-----------------------BPy_IntegrationType instance definitions -------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index 877f376fc37..5a7d38055f1 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -315,39 +315,39 @@ PyTypeObject Interface0D_Type = { (destructor)Interface0D_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)Interface0D_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - Interface0D_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_Interface0D_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_Interface0D_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Interface0D_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)Interface0D_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Interface0D_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Interface0D_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Interface0D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Interface0D_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 8bfc17f83ae..8225076397c 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -343,39 +343,39 @@ PyTypeObject Interface1D_Type = { (destructor)Interface1D_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)Interface1D_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - Interface1D_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_Interface1D_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_Interface1D_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Interface1D_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)Interface1D_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Interface1D_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Interface1D_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Interface1D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Interface1D_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index b1a577df8cf..4a6f56f8f8c 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -230,39 +230,39 @@ PyTypeObject Iterator_Type = { (destructor)Iterator_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)Iterator_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - Iterator_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_Iterator_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_Iterator_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Iterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)Iterator_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Iterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Iterator_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Iterator_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Iterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp index a6d1d0e8476..1a568913d74 100644 --- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp +++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp @@ -47,39 +47,39 @@ PyTypeObject MediumType_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &PyLong_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - nullptr, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &PyLong_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /*-----------------------BPy_IntegrationType instance definitions -------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp index 56dbc5e6f9a..c9e03459126 100644 --- a/source/blender/freestyle/intern/python/BPy_Nature.cpp +++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp @@ -109,39 +109,39 @@ PyTypeObject Nature_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - nullptr, /* tp_repr */ - &nature_as_number, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - Nature_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &PyLong_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - nullptr, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + &nature_as_number, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + Nature_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &PyLong_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /*-----------------------BPy_Nature instance definitions ----------------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 23009f66dfd..a4ee0db7093 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -772,39 +772,39 @@ PyTypeObject Operators_Type = { (destructor)Operators_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_Operators_methods, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - nullptr, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Operators_methods, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index 45769396529..b25178de0c9 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -283,39 +283,39 @@ PyTypeObject SShape_Type = { (destructor)SShape_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)SShape_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - SShape_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_SShape_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_SShape_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)SShape_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)SShape_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SShape_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_SShape_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_SShape_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SShape_init, /* tp_init */ + 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 6b07ea4c142..247e78542d5 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -679,39 +679,39 @@ PyTypeObject StrokeAttribute_Type = { (destructor)StrokeAttribute_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)StrokeAttribute_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - StrokeAttribute_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_StrokeAttribute_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_StrokeAttribute_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)StrokeAttribute_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)StrokeAttribute_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + StrokeAttribute_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_StrokeAttribute_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_StrokeAttribute_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeAttribute_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index 8b3c601bf9e..597eccda1f9 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -284,39 +284,39 @@ PyTypeObject StrokeShader_Type = { (destructor)StrokeShader___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)StrokeShader___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - StrokeShader___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_StrokeShader_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_StrokeShader_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)StrokeShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)StrokeShader___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + StrokeShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_StrokeShader_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_StrokeShader_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index 53a4ba8b3b8..47742e39c5c 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -126,39 +126,39 @@ PyTypeObject UnaryFunction0D_Type = { (destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0D___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0D___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction0D_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - nullptr, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction0D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index 5f44b3468cb..9793f25fc07 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -120,39 +120,39 @@ PyTypeObject UnaryFunction1D_Type = { (destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1D___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1D___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1D_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - nullptr, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index adc6d7fae12..848ae19b4a4 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -169,39 +169,39 @@ PyTypeObject UnaryPredicate0D_Type = { (destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryPredicate0D___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryPredicate0D___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryPredicate0D___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryPredicate0D_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryPredicate0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryPredicate0D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryPredicate0D___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryPredicate0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryPredicate0D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryPredicate0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index 5b4c35eb7e1..969226ebd8a 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -227,39 +227,39 @@ PyTypeObject UnaryPredicate1D_Type = { (destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryPredicate1D___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryPredicate1D___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryPredicate1D___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryPredicate1D_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryPredicate1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryPredicate1D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryPredicate1D___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryPredicate1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryPredicate1D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryPredicate1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp index 1de9769d572..382064ffc7a 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp @@ -186,39 +186,39 @@ PyTypeObject ViewMap_Type = { (destructor)ViewMap_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)ViewMap_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - ViewMap_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_ViewMap_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_ViewMap_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ViewMap_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)ViewMap_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ViewMap_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewMap_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewMap_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewMap_init, /* tp_init */ + 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 f5662eab9f1..84a18c2203e 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -354,39 +354,39 @@ PyTypeObject ViewShape_Type = { (destructor)ViewShape_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)ViewShape_repr, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - nullptr, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - ViewShape_doc, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_ViewShape_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_ViewShape_getseters, /* tp_getset */ - nullptr, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ViewShape_init, /* tp_init */ - nullptr, /* tp_alloc */ - PyType_GenericNew, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)ViewShape_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ViewShape_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewShape_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewShape_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewShape_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp index 9eddc19d99c..19062cd0048 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp @@ -61,39 +61,39 @@ PyTypeObject FalseBP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &BinaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FalseBP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FalseBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp index 30fe7b18f06..59b25a037dc 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp @@ -63,39 +63,39 @@ PyTypeObject Length2DBP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &BinaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Length2DBP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Length2DBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp index f2b9a3a19c5..f422e37776f 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp @@ -62,39 +62,39 @@ PyTypeObject SameShapeIdBP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &BinaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)SameShapeIdBP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SameShapeIdBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp index dcefac1f414..a3fe6945b71 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp @@ -62,39 +62,39 @@ PyTypeObject TrueBP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &BinaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)TrueBP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TrueBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index 4536eebe801..9fc66e571a7 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -92,39 +92,39 @@ PyTypeObject ViewMapGradientNormBP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &BinaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ViewMapGradientNormBP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewMapGradientNormBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index 85dcb91d1dd..a3229667cb7 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -244,39 +244,39 @@ PyTypeObject CurvePoint_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_CurvePoint_getseters, /* tp_getset */ - &Interface0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)CurvePoint_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_CurvePoint_getseters, /* tp_getset */ + &Interface0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CurvePoint_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index c91e55a807f..e1f9a588e62 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -457,39 +457,39 @@ PyTypeObject SVertex_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_SVertex_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_SVertex_getseters, /* tp_getset */ - &Interface0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)SVertex_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_SVertex_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_SVertex_getseters, /* tp_getset */ + &Interface0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SVertex_init, /* tp_init */ + 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 7ea8979ca57..e565575dee1 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -166,39 +166,39 @@ PyTypeObject ViewVertex_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_ViewVertex_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_ViewVertex_getseters, /* tp_getset */ - &Interface0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ViewVertex_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewVertex_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewVertex_getseters, /* tp_getset */ + &Interface0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewVertex_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index fce952e68bc..827dc22231e 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -363,39 +363,39 @@ PyTypeObject StrokeVertex_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_StrokeVertex_getseters, /* tp_getset */ - &CurvePoint_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)StrokeVertex_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_StrokeVertex_getseters, /* tp_getset */ + &CurvePoint_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeVertex_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp index 941f42da92f..c0b8dfafba8 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp @@ -111,39 +111,39 @@ PyTypeObject NonTVertex_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_NonTVertex_getseters, /* tp_getset */ - &ViewVertex_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)NonTVertex_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_NonTVertex_getseters, /* tp_getset */ + &ViewVertex_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)NonTVertex_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp index aa86284aa22..ec23c8f46fe 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp @@ -221,39 +221,39 @@ PyTypeObject TVertex_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_TVertex_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_TVertex_getseters, /* tp_getset */ - &ViewVertex_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)TVertex_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_TVertex_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_TVertex_getseters, /* tp_getset */ + &ViewVertex_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TVertex_init, /* tp_init */ + 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 a0d4f5fe05d..f5c2c91da6c 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -360,39 +360,39 @@ PyTypeObject FEdge_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_FEdge_getseters, /* tp_getset */ - &Interface1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FEdge_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_FEdge_getseters, /* tp_getset */ + &Interface1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FEdge_init, /* tp_init */ + 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 e41e16c7b8d..4420ce02ced 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp @@ -192,39 +192,39 @@ PyTypeObject FrsCurve_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_FrsCurve_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_FrsCurve_getseters, /* tp_getset */ - &Interface1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FrsCurve_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_FrsCurve_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_FrsCurve_getseters, /* tp_getset */ + &Interface1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FrsCurve_init, /* tp_init */ + 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 1a0bbb54d17..49d6896c2da 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -503,39 +503,39 @@ PyTypeObject Stroke_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)Stroke_iter, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_Stroke_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_Stroke_getseters, /* tp_getset */ - &Interface1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Stroke_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)Stroke_iter, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Stroke_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Stroke_getseters, /* tp_getset */ + &Interface1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Stroke_init, /* tp_init */ + 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 f0aba5001c5..a8102add2c1 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -388,39 +388,39 @@ PyTypeObject ViewEdge_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_ViewEdge_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_ViewEdge_getseters, /* tp_getset */ - &Interface1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ViewEdge_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewEdge_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewEdge_getseters, /* tp_getset */ + &Interface1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewEdge_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp index 550d928aa74..951df52f03a 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp @@ -152,39 +152,39 @@ PyTypeObject Chain_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_Chain_methods, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &FrsCurve_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Chain_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Chain_methods, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &FrsCurve_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Chain_init, /* tp_init */ + 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 2fad50075c0..e430edadd5f 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -410,39 +410,39 @@ PyTypeObject FEdgeSharp_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_FEdgeSharp_getseters, /* tp_getset */ - &FEdge_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FEdgeSharp_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_FEdgeSharp_getseters, /* tp_getset */ + &FEdge_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FEdgeSharp_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index f7641632534..962dd95b866 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -255,39 +255,39 @@ PyTypeObject FEdgeSmooth_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_FEdgeSmooth_getseters, /* tp_getset */ - &FEdge_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FEdgeSmooth_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_FEdgeSmooth_getseters, /* tp_getset */ + &FEdge_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FEdgeSmooth_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index 921122ae63a..b3bdcabcfb0 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -188,39 +188,39 @@ PyTypeObject AdjacencyIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)AdjacencyIterator_iter, /* tp_iter */ - (iternextfunc)AdjacencyIterator_iternext, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_AdjacencyIterator_getseters, /* tp_getset */ - &Iterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)AdjacencyIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)AdjacencyIterator_iter, /* tp_iter */ + (iternextfunc)AdjacencyIterator_iternext, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_AdjacencyIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)AdjacencyIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index 2b2b4befcf5..ef6d2fd8944 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -169,39 +169,39 @@ PyTypeObject ChainPredicateIterator_Type = { (destructor)ChainPredicateIterator_dealloc, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &ChainingIterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ChainPredicateIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &ChainingIterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ChainPredicateIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index 71a38808d74..6f442eb0c10 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -123,39 +123,39 @@ PyTypeObject ChainSilhouetteIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &ChainingIterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ChainSilhouetteIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &ChainingIterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ChainSilhouetteIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index 2560759c352..f2a485964a0 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -257,39 +257,39 @@ PyTypeObject ChainingIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_ChainingIterator_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_ChainingIterator_getseters, /* tp_getset */ - &ViewEdgeIterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ChainingIterator___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ChainingIterator_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ChainingIterator_getseters, /* tp_getset */ + &ViewEdgeIterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ChainingIterator___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index 0ce4c99dc47..e50d60002a9 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -137,39 +137,39 @@ PyTypeObject CurvePointIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_CurvePointIterator_getseters, /* tp_getset */ - &Iterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)CurvePointIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_CurvePointIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CurvePointIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index 8e7cec63f2d..557436935d0 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -212,39 +212,39 @@ PyTypeObject Interface0DIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)Interface0DIterator_iter, /* tp_iter */ - (iternextfunc)Interface0DIterator_iternext, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_Interface0DIterator_getseters, /* tp_getset */ - &Iterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Interface0DIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)Interface0DIterator_iter, /* tp_iter */ + (iternextfunc)Interface0DIterator_iternext, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Interface0DIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Interface0DIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp index 38bec5982f4..95def64989c 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -164,39 +164,39 @@ PyTypeObject SVertexIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_SVertexIterator_getseters, /* tp_getset */ - &Iterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)SVertexIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_SVertexIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SVertexIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 3dd801a10b8..8549e81a9b8 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -295,39 +295,39 @@ PyTypeObject StrokeVertexIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)StrokeVertexIterator_iter, /* tp_iter */ - (iternextfunc)StrokeVertexIterator_iternext, /* tp_iternext */ - BPy_StrokeVertexIterator_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_StrokeVertexIterator_getseters, /* tp_getset */ - &Iterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)StrokeVertexIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)StrokeVertexIterator_iter, /* tp_iter */ + (iternextfunc)StrokeVertexIterator_iternext, /* tp_iternext */ + BPy_StrokeVertexIterator_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_StrokeVertexIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeVertexIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index 9061353203e..b515d3b9564 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -242,39 +242,39 @@ PyTypeObject ViewEdgeIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - BPy_ViewEdgeIterator_methods, /* tp_methods */ - nullptr, /* tp_members */ - BPy_ViewEdgeIterator_getseters, /* tp_getset */ - &Iterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ViewEdgeIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewEdgeIterator_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewEdgeIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewEdgeIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index dc28b490d9d..3cc73820177 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -146,39 +146,39 @@ PyTypeObject orientedViewEdgeIterator_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)orientedViewEdgeIterator_iter, /* tp_iter */ - (iternextfunc)orientedViewEdgeIterator_iternext, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_orientedViewEdgeIterator_getseters, /* tp_getset */ - &Iterator_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)orientedViewEdgeIterator_init, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)orientedViewEdgeIterator_iter, /* tp_iter */ + (iternextfunc)orientedViewEdgeIterator_iternext, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_orientedViewEdgeIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)orientedViewEdgeIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp index 575fcd3bea5..842981446b9 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp @@ -73,39 +73,39 @@ PyTypeObject BackboneStretcherShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)BackboneStretcherShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BackboneStretcherShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp index 60861e602e8..a04d8f4f3e1 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp @@ -73,39 +73,39 @@ PyTypeObject BezierCurveShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)BezierCurveShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BezierCurveShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp index 59b5b2fdce3..38ecfb64f4f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp @@ -93,39 +93,39 @@ PyTypeObject BlenderTextureShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)BlenderTextureShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BlenderTextureShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp index 148fb830157..db60c5b9db9 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp @@ -91,39 +91,39 @@ PyTypeObject CalligraphicShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)CalligraphicShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CalligraphicShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp index c29d81d1300..d05c11db5e6 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp @@ -72,39 +72,39 @@ PyTypeObject ColorNoiseShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ColorNoiseShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ColorNoiseShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp index e64064ba655..7b13441380f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp @@ -78,39 +78,39 @@ PyTypeObject ConstantColorShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ConstantColorShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ConstantColorShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp index 31d9d005e6e..fe00b621d74 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp @@ -72,39 +72,39 @@ PyTypeObject ConstantThicknessShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ConstantThicknessShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ConstantThicknessShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp index 3d42d1a3ff0..3a0f02ea9a3 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp @@ -78,25 +78,25 @@ PyTypeObject ConstrainedIncreasingThicknessShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ 0, /* tp_weaklistoffset */ nullptr, /* tp_iter */ nullptr, /* tp_iternext */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp index 90c48961c9b..b266aee1fe8 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp @@ -80,39 +80,39 @@ PyTypeObject GuidingLinesShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GuidingLinesShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GuidingLinesShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp index 57fe31cba95..b400c9b5414 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp @@ -100,39 +100,39 @@ PyTypeObject IncreasingColorShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)IncreasingColorShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)IncreasingColorShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp index 3736113eb9c..14014dbc394 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp @@ -78,39 +78,39 @@ PyTypeObject IncreasingThicknessShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)IncreasingThicknessShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)IncreasingThicknessShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp index ec884d34db0..838622ad624 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp @@ -79,39 +79,39 @@ PyTypeObject PolygonalizationShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)PolygonalizationShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)PolygonalizationShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp index fe753a06038..27ab73a6b65 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp @@ -70,39 +70,39 @@ PyTypeObject SamplingShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)SamplingShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SamplingShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp index a6396396673..3545a29f337 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp @@ -102,39 +102,39 @@ PyTypeObject SmoothingShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)SmoothingShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SmoothingShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp index c64cfb72a0b..129ad9cb735 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp @@ -96,39 +96,39 @@ PyTypeObject SpatialNoiseShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)SpatialNoiseShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SpatialNoiseShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp index dd674c0864f..26683a57ea1 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp @@ -72,39 +72,39 @@ PyTypeObject StrokeTextureStepShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)StrokeTextureStepShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeTextureStepShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp index 0f317799eb8..8b02ea4322a 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp @@ -74,39 +74,39 @@ PyTypeObject ThicknessNoiseShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ThicknessNoiseShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ThicknessNoiseShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp index e17423c9e36..b433a75f2e4 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp @@ -71,39 +71,39 @@ PyTypeObject TipRemoverShader_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &StrokeShader_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)TipRemoverShader___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TipRemoverShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index b6bad17f2bd..61a6e68c59f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -189,39 +189,39 @@ PyTypeObject UnaryFunction0DDouble_Type = { (destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DDouble___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DDouble___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DDouble___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DDouble___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DDouble___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DDouble___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DDouble___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DDouble___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index df6005c1990..a1304e0f7b2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -128,39 +128,39 @@ PyTypeObject UnaryFunction0DEdgeNature_Type = { (destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DEdgeNature___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DEdgeNature___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DEdgeNature___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DEdgeNature___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DEdgeNature___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DEdgeNature___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DEdgeNature___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DEdgeNature___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index 309a97da0b8..2cef1302d94 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -165,39 +165,39 @@ PyTypeObject UnaryFunction0DFloat_Type = { (destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DFloat___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DFloat___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DFloat___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DFloat___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DFloat___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DFloat___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DFloat___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DFloat___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index 44ec2f0c141..c34c9beded6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -124,39 +124,39 @@ PyTypeObject UnaryFunction0DId_Type = { (destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DId___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DId___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DId___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DId___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DId___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DId___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DId___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DId___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index c8fd5eb6551..68170329238 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -127,39 +127,39 @@ PyTypeObject UnaryFunction0DMaterial_Type = { (destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DMaterial___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DMaterial___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DMaterial___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DMaterial___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DMaterial___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DMaterial___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DMaterial___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DMaterial___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index 7536f8990a7..7ecb40592a9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -128,39 +128,39 @@ PyTypeObject UnaryFunction0DUnsigned_Type = { (destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DUnsigned___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DUnsigned___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DUnsigned___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DUnsigned___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DUnsigned___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DUnsigned___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DUnsigned___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DUnsigned___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index 432c5acad12..2d4e5fe566e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -133,39 +133,39 @@ PyTypeObject UnaryFunction0DVec2f_Type = { (destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DVec2f___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DVec2f___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DVec2f___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DVec2f___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DVec2f___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DVec2f___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DVec2f___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DVec2f___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index ff139898c37..9e591b03703 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -126,39 +126,39 @@ PyTypeObject UnaryFunction0DVec3f_Type = { (destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DVec3f___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DVec3f___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DVec3f___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DVec3f___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DVec3f___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DVec3f___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DVec3f___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DVec3f___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 634f02bc084..3a6c6f0117f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -137,39 +137,39 @@ PyTypeObject UnaryFunction0DVectorViewShape_Type = { (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DVectorViewShape___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DVectorViewShape___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DVectorViewShape___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DVectorViewShape___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index 0837329981e..1cf47960cdb 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -135,39 +135,39 @@ PyTypeObject UnaryFunction0DViewShape_Type = { (destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DViewShape___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DViewShape___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DViewShape___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DViewShape___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DViewShape___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DViewShape___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DViewShape___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DViewShape___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp index 7ba834d497f..379b909e382 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 @@ -76,39 +76,39 @@ PyTypeObject ShapeIdF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DId_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ShapeIdF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DId_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ShapeIdF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp index 7f969bc8b2c..75c497aa1a7 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 @@ -79,39 +79,39 @@ PyTypeObject MaterialF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DMaterial_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)MaterialF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DMaterial_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)MaterialF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp index 9721817e22f..802087438d7 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 @@ -70,39 +70,39 @@ PyTypeObject CurveNatureF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DEdgeNature_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)CurveNatureF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DEdgeNature_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CurveNatureF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp index b0a841d209b..c2338510b2f 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 @@ -72,39 +72,39 @@ PyTypeObject Normal2DF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DVec2f_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Normal2DF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DVec2f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Normal2DF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp index c40a6b48d40..a30e3472742 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 @@ -74,39 +74,39 @@ PyTypeObject VertexOrientation2DF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DVec2f_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)VertexOrientation2DF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DVec2f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)VertexOrientation2DF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp index 84d1cb521bd..f28f8b0dd02 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 @@ -74,39 +74,39 @@ PyTypeObject VertexOrientation3DF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DVec3f_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)VertexOrientation3DF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DVec3f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)VertexOrientation3DF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp index ef9cb5d0c62..91c5eb6d17d 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 @@ -69,39 +69,39 @@ PyTypeObject GetOccludeeF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DViewShape_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetOccludeeF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetOccludeeF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp index c0b73d1822d..e362a6be0d3 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 @@ -69,39 +69,39 @@ PyTypeObject GetShapeF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DViewShape_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetShapeF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetShapeF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp index 31082a02f55..2e837d7e601 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 @@ -74,39 +74,39 @@ PyTypeObject Curvature2DAngleF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Curvature2DAngleF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Curvature2DAngleF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp index 8d728bfff02..e4d3f88e261 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 @@ -79,39 +79,39 @@ PyTypeObject DensityF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)DensityF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)DensityF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp index 02ebabd6ed5..09ae5751e5b 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 @@ -69,39 +69,39 @@ PyTypeObject GetProjectedXF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetProjectedXF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedXF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp index 090f4e6ce3f..b54ea8e3495 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 @@ -69,39 +69,39 @@ PyTypeObject GetProjectedYF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetProjectedYF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedYF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp index 00be2cd7cec..cb7640c3a15 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 @@ -69,39 +69,39 @@ PyTypeObject GetProjectedZF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetProjectedZF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedZF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp index a98d703618e..914af1847f6 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 @@ -69,39 +69,39 @@ PyTypeObject GetXF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetXF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetXF0D___init__, /* tp_init */ + 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 7d390690dd6..d7c8ca7d9c9 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 @@ -69,39 +69,39 @@ PyTypeObject GetYF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetYF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetYF0D___init__, /* tp_init */ + 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 2f6a6ee791f..b59929ec87a 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 @@ -69,39 +69,39 @@ PyTypeObject GetZF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetZF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetZF0D___init__, /* tp_init */ + 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 683a29283bf..8643f6f26c7 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 @@ -77,39 +77,39 @@ PyTypeObject LocalAverageDepthF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)LocalAverageDepthF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)LocalAverageDepthF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp index 91e0c4f0bd4..d5fd9295566 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 @@ -74,39 +74,39 @@ PyTypeObject ZDiscontinuityF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ZDiscontinuityF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ZDiscontinuityF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp index a1c7cd47a4c..2696a7f4186 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 @@ -72,39 +72,39 @@ PyTypeObject GetCurvilinearAbscissaF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DFloat_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetCurvilinearAbscissaF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetCurvilinearAbscissaF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp index bef814f9bb1..ba5d7e641e7 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 @@ -68,39 +68,39 @@ PyTypeObject GetParameterF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DFloat_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetParameterF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetParameterF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp index fc279a097dc..9dae36028cb 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 @@ -77,39 +77,39 @@ PyTypeObject GetViewMapGradientNormF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DFloat_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetViewMapGradientNormF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetViewMapGradientNormF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp index 6fa0572f9c9..3ed7f969de9 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 @@ -75,39 +75,39 @@ PyTypeObject ReadCompleteViewMapPixelF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DFloat_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ReadCompleteViewMapPixelF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ReadCompleteViewMapPixelF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp index 1f10b699e0c..1507ed30eb1 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 @@ -76,39 +76,39 @@ PyTypeObject ReadMapPixelF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DFloat_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ReadMapPixelF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ReadMapPixelF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp index 203227d2731..39e84fcade3 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 @@ -79,39 +79,39 @@ PyTypeObject ReadSteerableViewMapPixelF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DFloat_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ReadSteerableViewMapPixelF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ReadSteerableViewMapPixelF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp index f824acdc86e..ae1971bf9b9 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 @@ -77,39 +77,39 @@ PyTypeObject QuantitativeInvisibilityF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DUnsigned_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)QuantitativeInvisibilityF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DUnsigned_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)QuantitativeInvisibilityF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp index c485ede5a1e..96390bc8058 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 @@ -70,39 +70,39 @@ PyTypeObject GetOccludersF0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0DVectorViewShape_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetOccludersF0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DVectorViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetOccludersF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index 1e8e9bd0793..75631c0b44f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -270,39 +270,39 @@ PyTypeObject UnaryFunction1DDouble_Type = { (destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1DDouble___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1DDouble_getseters, /* tp_getset */ - &UnaryFunction1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction1DDouble___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DDouble___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DDouble_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DDouble___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index 769e8ca40b1..f4a3b1cddf0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -177,39 +177,39 @@ PyTypeObject UnaryFunction1DEdgeNature_Type = { (destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1DEdgeNature___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1DEdgeNature_getseters, /* tp_getset */ - &UnaryFunction1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction1DEdgeNature___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DEdgeNature___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DEdgeNature_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DEdgeNature___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index 20dd48f442f..faac4170d4c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -166,39 +166,39 @@ PyTypeObject UnaryFunction1DFloat_Type = { (destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1DFloat___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1DFloat_getseters, /* tp_getset */ - &UnaryFunction1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction1DFloat___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DFloat___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DFloat_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DFloat___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index df56b6f7e7e..f82af0f76a1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -177,39 +177,39 @@ PyTypeObject UnaryFunction1DUnsigned_Type = { (destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1DUnsigned___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1DUnsigned_getseters, /* tp_getset */ - &UnaryFunction1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction1DUnsigned___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DUnsigned___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DUnsigned_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DUnsigned___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index e5d243bf547..4efc7edd00a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -181,39 +181,39 @@ PyTypeObject UnaryFunction1DVec2f_Type = { (destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1DVec2f___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1DVec2f_getseters, /* tp_getset */ - &UnaryFunction1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction1DVec2f___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DVec2f___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DVec2f_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DVec2f___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index 96e7fd823e3..af8ceb10126 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -174,39 +174,39 @@ PyTypeObject UnaryFunction1DVec3f_Type = { (destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1DVec3f___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1DVec3f_getseters, /* tp_getset */ - &UnaryFunction1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction1DVec3f___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DVec3f___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DVec3f_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DVec3f___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index f72fa77ccc8..0fd455ca2fe 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -202,39 +202,39 @@ PyTypeObject UnaryFunction1DVectorViewShape_Type = { (destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1DVectorViewShape___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */ - &UnaryFunction1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction1DVectorViewShape___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DVectorViewShape___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DVectorViewShape___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index b182c87202b..9cf47f7ccd3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -189,39 +189,39 @@ PyTypeObject UnaryFunction1DVoid_Type = { (destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction1DVoid___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - BPy_UnaryFunction1DVoid_getseters, /* tp_getset */ - &UnaryFunction1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction1DVoid___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* tp_print */ + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DVoid___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DVoid_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DVoid___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp index b2be5b92376..f9118f2d8bd 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 @@ -82,39 +82,39 @@ PyTypeObject CurveNatureF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DEdgeNature_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)CurveNatureF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DEdgeNature_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CurveNatureF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp index 2ece9640340..0155dff0428 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 @@ -76,39 +76,39 @@ PyTypeObject Normal2DF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVec2f_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Normal2DF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVec2f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Normal2DF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp index 479104f0915..0e3fead3cea 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 @@ -76,39 +76,39 @@ PyTypeObject Orientation2DF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVec2f_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Orientation2DF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVec2f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Orientation2DF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp index 2364630cb2b..f479b9bac37 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 @@ -76,39 +76,39 @@ PyTypeObject Orientation3DF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVec3f_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Orientation3DF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVec3f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Orientation3DF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp index ccdeef40c93..754265f1614 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 @@ -77,39 +77,39 @@ PyTypeObject Curvature2DAngleF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Curvature2DAngleF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Curvature2DAngleF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp index 2b470848c03..46b73ab6411 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 @@ -90,39 +90,39 @@ PyTypeObject DensityF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)DensityF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)DensityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp index 897778eb0d4..67439056723 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 @@ -94,39 +94,39 @@ PyTypeObject GetCompleteViewMapDensityF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp index 13f8792f13c..53df6f56911 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 @@ -101,39 +101,39 @@ PyTypeObject GetDirectionalViewMapDensityF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetDirectionalViewMapDensityF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetDirectionalViewMapDensityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp index d8a2a684597..5f24bc78840 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 @@ -76,39 +76,39 @@ PyTypeObject GetProjectedXF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetProjectedXF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedXF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp index 2d536903581..6243d07ab4b 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 @@ -76,39 +76,39 @@ PyTypeObject GetProjectedYF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetProjectedYF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedYF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp index 219f89930c3..1800d5a98c6 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 @@ -76,39 +76,39 @@ PyTypeObject GetProjectedZF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetProjectedZF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedZF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp index 29c825adaee..2d26001b236 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 @@ -91,39 +91,39 @@ PyTypeObject GetSteerableViewMapDensityF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetSteerableViewMapDensityF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetSteerableViewMapDensityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp index 912290a3136..076e67fe171 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 @@ -91,39 +91,39 @@ PyTypeObject GetViewMapGradientNormF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetViewMapGradientNormF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetViewMapGradientNormF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp index 74cbd785625..13f16d08993 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 @@ -76,39 +76,39 @@ PyTypeObject GetXF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetXF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetXF1D___init__, /* tp_init */ + 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 17f761b208d..66bba03695d 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 @@ -75,39 +75,39 @@ PyTypeObject GetYF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetYF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetYF1D___init__, /* tp_init */ + 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 3a47190f199..d2366005ed4 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 @@ -76,39 +76,39 @@ PyTypeObject GetZF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetZF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetZF1D___init__, /* tp_init */ + 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 16dbe4b0864..f101bce35b7 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 @@ -86,39 +86,39 @@ PyTypeObject LocalAverageDepthF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)LocalAverageDepthF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)LocalAverageDepthF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp index 5e3709203f6..bed44e430c2 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 @@ -80,39 +80,39 @@ PyTypeObject ZDiscontinuityF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DDouble_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ZDiscontinuityF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ZDiscontinuityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp index 3bb83b76f17..c82a6df7a34 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 @@ -82,39 +82,39 @@ PyTypeObject QuantitativeInvisibilityF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DUnsigned_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)QuantitativeInvisibilityF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DUnsigned_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)QuantitativeInvisibilityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp index b7a7f4a19e5..0c958f29b6f 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 @@ -69,39 +69,39 @@ PyTypeObject GetOccludeeF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVectorViewShape_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetOccludeeF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVectorViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetOccludeeF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp index 8e2fef70fcc..307c74e5547 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 @@ -69,39 +69,39 @@ PyTypeObject GetOccludersF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVectorViewShape_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetOccludersF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVectorViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetOccludersF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp index ea6f39eecc7..a0232826fed 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 @@ -69,39 +69,39 @@ PyTypeObject GetShapeF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVectorViewShape_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)GetShapeF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVectorViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetShapeF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp index 2ef38f473e3..0a9acf068e0 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 @@ -69,39 +69,39 @@ PyTypeObject ChainingTimeStampF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVoid_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ChainingTimeStampF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVoid_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ChainingTimeStampF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp index b710d8ccb38..976a9c4f972 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 @@ -69,39 +69,39 @@ PyTypeObject IncrementChainingTimeStampF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVoid_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)IncrementChainingTimeStampF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVoid_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)IncrementChainingTimeStampF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp index f571e1cd0cf..99a40cc154a 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 @@ -67,39 +67,39 @@ PyTypeObject TimeStampF1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction1DVoid_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)TimeStampF1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVoid_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TimeStampF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp index 061cc61e4e8..8f649f48e41 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp @@ -60,39 +60,39 @@ PyTypeObject FalseUP0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FalseUP0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FalseUP0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp index 838f7141f74..1d068055dd5 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp @@ -60,39 +60,39 @@ PyTypeObject TrueUP0D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)TrueUP0D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TrueUP0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp index 3b6af927008..658c12ecae5 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp @@ -61,39 +61,39 @@ PyTypeObject ContourUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ContourUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ContourUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp index 2a57eb2f333..3683159a183 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp @@ -77,39 +77,39 @@ PyTypeObject DensityLowerThanUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)DensityLowerThanUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)DensityLowerThanUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp index e7c29670680..a9f3812382b 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp @@ -72,39 +72,39 @@ PyTypeObject EqualToChainingTimeStampUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)EqualToChainingTimeStampUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)EqualToChainingTimeStampUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp index e3dd726452b..9e2bde8f6c7 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp @@ -71,39 +71,39 @@ PyTypeObject EqualToTimeStampUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)EqualToTimeStampUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)EqualToTimeStampUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp index e537b26ef9c..ba9a9af429f 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp @@ -65,39 +65,39 @@ PyTypeObject ExternalContourUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ExternalContourUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ExternalContourUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp index eed961c9cc9..c3c73b77c1c 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp @@ -60,39 +60,39 @@ PyTypeObject FalseUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)FalseUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FalseUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp index e165563daf4..c16edfff96b 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp @@ -76,39 +76,39 @@ PyTypeObject QuantitativeInvisibilityUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)QuantitativeInvisibilityUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)QuantitativeInvisibilityUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp index 7c028263986..54075f4b444 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp @@ -72,39 +72,39 @@ PyTypeObject ShapeUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)ShapeUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ShapeUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp index 02951ba612f..b1b97b10282 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp @@ -60,39 +60,39 @@ PyTypeObject TrueUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)TrueUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TrueUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp index 2a5d362e279..cbeb728de07 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp @@ -73,39 +73,39 @@ PyTypeObject WithinImageBoundaryUP1D_Type = { nullptr, /* tp_dealloc */ /* Incompatible with Python3.8+ (deprecated function). * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* 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 */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryPredicate1D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)WithinImageBoundaryUP1D___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + 0, /* 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 */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)WithinImageBoundaryUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From bff1707aaef367822f4fbb38dbc2477b74e643a4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Nov 2020 11:57:56 +1100 Subject: Cleanup: remove hard coded file format check in IMB_ispic_type This is already being checked in the 'is_a' callback. --- source/blender/imbuf/intern/util.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 64b03f332a8..7be58a9ca14 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -152,11 +152,6 @@ int IMB_ispic_type(const char *name) close(fp); - /* XXX move this exception */ - if ((BIG_LONG(((int *)buf)[0]) & 0xfffffff0) == 0xffd8ffe0) { - return IMB_FTYPE_JPG; - } - for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { if (type->is_a) { if (type->is_a(buf)) { -- cgit v1.2.3 From b902edae75c7087d08339fdf03d132341df1f277 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Nov 2020 16:22:35 +1100 Subject: Fix T65585: Knife fails when cursor away from the object Zeroed mouse coordinates were being used making projection fail. --- source/blender/editors/mesh/editmesh_knife.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 0ab1c926189..f45f48e0e32 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1903,8 +1903,15 @@ static BMFace *knife_find_closest_face(KnifeTool_OpData *kcd, if (!f) { if (kcd->is_interactive) { - /* Try to use back-buffer selection method if ray casting failed. */ - f = EDBM_face_find_nearest(&kcd->vc, &dist); + /* Try to use back-buffer selection method if ray casting failed. + * + * Apply the mouse coordinates to a copy of the view-context + * since we don't want to rely on this being set elsewhere. */ + ViewContext vc = kcd->vc; + vc.mval[0] = (int)kcd->curr.mval[0]; + vc.mval[1] = (int)kcd->curr.mval[1]; + + f = EDBM_face_find_nearest(&vc, &dist); /* cheat for now; just put in the origin instead * of a true coordinate on the face. -- cgit v1.2.3 From 476a0d2311d530d9590cae807ee07fb98b11c6dd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Nov 2020 17:38:26 +1100 Subject: Fix T82555: Crash using copied object from Python Also clear `gpd_eval` as this wasn't being copied either. --- source/blender/blenkernel/intern/object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 398860b6796..971f79e296f 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -4249,8 +4249,10 @@ void BKE_object_runtime_reset_on_copy(Object *object, const int UNUSED(flag)) { Object_Runtime *runtime = &object->runtime; runtime->data_eval = NULL; + runtime->gpd_eval = NULL; runtime->mesh_deform_eval = NULL; runtime->curve_cache = NULL; + runtime->object_as_temp_mesh = NULL; } /** -- cgit v1.2.3 From 05a2382c08402b250d6b5c4105b449f4474f6cf2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Nov 2020 19:05:07 +1100 Subject: Fix T82540: Smart UV project ignores seams Functionality was lost in the Python to C conversion from 850234c1b10a828678f1b91001f2731db807f7e2 --- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index cfcef0ebcb9..a50386a64e2 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -149,6 +149,8 @@ static bool ED_uvedit_ensure_uvs(Object *obedit) typedef struct UnwrapOptions { /** Connectivity based on UV coordinates instead of seams. */ bool topology_from_uvs; + /** Also use seams as well as UV coordinates (only valid when `topology_from_uvs` is enabled). */ + bool topology_from_uvs_use_seams; /** Only affect selected faces. */ bool only_selected_faces; /** @@ -331,7 +333,7 @@ static ParamHandle *construct_param_handle(const Scene *scene, construct_param_handle_face_add(handle, scene, efa, i, cd_loop_uv_offset); } - if (!options->topology_from_uvs) { + if (!options->topology_from_uvs || options->topology_from_uvs_use_seams) { BM_ITER_MESH (eed, &iter, bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(eed, BM_ELEM_SEAM)) { ParamKey vkeys[2]; @@ -416,7 +418,7 @@ static ParamHandle *construct_param_handle_multi(const Scene *scene, construct_param_handle_face_add(handle, scene, efa, i + offset, cd_loop_uv_offset); } - if (!options->topology_from_uvs) { + if (!options->topology_from_uvs || options->topology_from_uvs_use_seams) { BM_ITER_MESH (eed, &iter, bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(eed, BM_ELEM_SEAM)) { ParamKey vkeys[2]; @@ -2149,6 +2151,10 @@ static int smart_project_exec(bContext *C, wmOperator *op) scene->toolsettings->uvcalc_margin = island_margin; const UnwrapOptions options = { .topology_from_uvs = true, + /* Even though the islands are defined by UV's, + * split them by seams so users have control over the islands. */ + .topology_from_uvs_use_seams = true, + .only_selected_faces = true, .only_selected_uvs = false, .fill_holes = true, -- cgit v1.2.3 From 23c71a5fab42e22266196a45f1f2ac77e815bcd3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Nov 2020 22:16:29 +1100 Subject: ImBuf: support detecting the file format from in-memory images Add `IMB_ispic_type_from_memory` so we can detect the file format of in-memory images. This removes `is_a_filepath` callback and uses a magic check for photo-shop files that's compatible with OIIO. Even though OIIO doesn't support packed images, we can still use the file magic for detecting the format. This change allows D9500 (a fix for unpacking images), to be implemented without a significant performance penalty, although the actual performance cost would depend heavily on the blend file. Reviewed By: dfelinto, sergey Ref D9517 --- source/blender/imbuf/IMB_imbuf.h | 2 + source/blender/imbuf/intern/IMB_filetype.h | 1 - source/blender/imbuf/intern/filetype.c | 17 +----- .../blender/imbuf/intern/oiio/openimageio_api.cpp | 14 ++--- source/blender/imbuf/intern/oiio/openimageio_api.h | 2 +- source/blender/imbuf/intern/util.c | 62 +++++++++++++++++----- 6 files changed, 58 insertions(+), 40 deletions(-) diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 2f848b5be08..0f9aa7055e7 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -474,6 +474,8 @@ bool IMB_prepare_write_ImBuf(const bool isfloat, struct ImBuf *ibuf); * \attention Defined in util.c */ bool IMB_ispic(const char *name); +bool IMB_ispic_type_matches(const char *name, int filetype); +int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size); int IMB_ispic_type(const char *name); /** diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index 53d9a1a2919..b7763976853 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -33,7 +33,6 @@ typedef struct ImFileType { void (*exit)(void); int (*is_a)(const unsigned char *buf); - int (*is_a_filepath)(const char *filepath); int (*ftype)(const struct ImFileType *type, const struct ImBuf *ibuf); struct ImBuf *(*load)(const unsigned char *mem, size_t size, diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c index 667027ebfeb..1746be85131 100644 --- a/source/blender/imbuf/intern/filetype.c +++ b/source/blender/imbuf/intern/filetype.c @@ -54,7 +54,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_jpeg, - NULL, imb_ftype_default, imb_load_jpeg, NULL, @@ -66,7 +65,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_png, - NULL, imb_ftype_default, imb_loadpng, NULL, @@ -78,7 +76,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_bmp, - NULL, imb_ftype_default, imb_bmp_decode, NULL, @@ -90,7 +87,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_targa, - NULL, imb_ftype_default, imb_loadtarga, NULL, @@ -102,7 +98,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_iris, - NULL, imb_ftype_iris, imb_loadiris, NULL, @@ -115,7 +110,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_dpx, - NULL, imb_ftype_default, imb_load_dpx, NULL, @@ -127,7 +121,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_cineon, - NULL, imb_ftype_default, imb_load_cineon, NULL, @@ -141,7 +134,6 @@ const ImFileType IMB_FILE_TYPES[] = { {imb_inittiff, NULL, imb_is_a_tiff, - NULL, imb_ftype_default, imb_loadtiff, NULL, @@ -155,7 +147,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_hdr, - NULL, imb_ftype_default, imb_loadhdr, NULL, @@ -169,7 +160,6 @@ const ImFileType IMB_FILE_TYPES[] = { {imb_initopenexr, imb_exitopenexr, imb_is_a_openexr, - NULL, imb_ftype_default, imb_load_openexr, NULL, @@ -183,7 +173,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_jp2, - NULL, imb_ftype_default, imb_load_jp2, NULL, @@ -197,7 +186,6 @@ const ImFileType IMB_FILE_TYPES[] = { {NULL, NULL, imb_is_a_dds, - NULL, imb_ftype_default, imb_load_dds, NULL, @@ -210,8 +198,7 @@ const ImFileType IMB_FILE_TYPES[] = { #ifdef WITH_OPENIMAGEIO {NULL, NULL, - NULL, - imb_is_a_filepath_photoshop, + imb_is_a_photoshop, imb_ftype_default, NULL, imb_load_photoshop, @@ -221,7 +208,7 @@ const ImFileType IMB_FILE_TYPES[] = { IMB_FTYPE_PSD, COLOR_ROLE_DEFAULT_FLOAT}, #endif - {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0}, + {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0}, }; const ImFileType *IMB_FILE_TYPES_LAST = &IMB_FILE_TYPES[ARRAY_SIZE(IMB_FILE_TYPES) - 1]; diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp index 9d8c5d50a89..0b787a7842f 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp +++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp @@ -163,16 +163,10 @@ static ImBuf *imb_oiio_load_image_float( extern "C" { -int imb_is_a_filepath_photoshop(const char *filename) +int imb_is_a_photoshop(const unsigned char *mem) { - const char *photoshop_extension[] = { - ".psd", - ".pdd", - ".psb", - nullptr, - }; - - return BLI_path_extension_check_array(filename, photoshop_extension); + const unsigned char magic[4] = {'8', 'B', 'P', 'S'}; + return memcmp(magic, mem, sizeof(magic)) == 0; } int imb_save_photoshop(struct ImBuf *ibuf, const char * /*name*/, int flags) @@ -198,7 +192,7 @@ struct ImBuf *imb_load_photoshop(const char *filename, int flags, char colorspac const bool is_colorspace_manually_set = (colorspace[0] != '\0'); /* load image from file through OIIO */ - if (imb_is_a_filepath_photoshop(filename) == 0) { + if (IMB_ispic_type_matches(filename, IMB_FTYPE_PSD) == 0) { return nullptr; } diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.h b/source/blender/imbuf/intern/oiio/openimageio_api.h index 135e3521f71..0ac6e560cfa 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.h +++ b/source/blender/imbuf/intern/oiio/openimageio_api.h @@ -31,7 +31,7 @@ extern "C" { struct ImBuf; -int imb_is_a_filepath_photoshop(const char *name); +int imb_is_a_photoshop(const unsigned char *mem); int imb_save_photoshop(struct ImBuf *ibuf, const char *name, int flags); diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 7be58a9ca14..37a1afb5dd7 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -117,13 +117,11 @@ const char *imb_ext_audio[] = { NULL, }; -int IMB_ispic_type(const char *name) -{ - /* increased from 32 to 64 because of the bitmaps header size */ +/* Increased from 32 to 64 because of the bitmaps header size. */ #define HEADER_SIZE 64 - unsigned char buf[HEADER_SIZE]; - const ImFileType *type; +static bool imb_ispic_read_header_from_filename(const char *name, unsigned char buf[HEADER_SIZE]) +{ BLI_stat_t st; int fp; @@ -144,32 +142,70 @@ int IMB_ispic_type(const char *name) return false; } - memset(buf, 0, sizeof(buf)); + memset(buf, 0, HEADER_SIZE); if (read(fp, buf, HEADER_SIZE) <= 0) { close(fp); return false; } close(fp); + return true; +} - for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { +int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size) +{ + unsigned char buf_static[HEADER_SIZE]; + const unsigned char *buf; + + if (mem_size >= HEADER_SIZE) { + buf = buf_static; + } + else { + memset(buf_static, 0, HEADER_SIZE); + memcpy(buf_static, mem, mem_size); + buf = buf_static; + } + + for (const ImFileType *type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { if (type->is_a) { if (type->is_a(buf)) { return type->filetype; } } - else if (type->is_a_filepath) { - if (type->is_a_filepath(name)) { - return type->filetype; - } - } } return 0; +} -#undef HEADER_SIZE +int IMB_ispic_type(const char *name) +{ + unsigned char buf[HEADER_SIZE]; + if (!imb_ispic_read_header_from_filename(name, buf)) { + return false; + } + return IMB_ispic_type_from_memory(buf, HEADER_SIZE); } +bool IMB_ispic_type_matches(const char *name, int filetype) +{ + unsigned char buf[HEADER_SIZE]; + if (!imb_ispic_read_header_from_filename(name, buf)) { + return false; + } + + for (const ImFileType *type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { + if (type->filetype == filetype) { + /* Requesting to load a type that can't check it's own header doesn't make sense. + * Keep the check for developers. */ + BLI_assert(type->is_a != NULL); + return type->is_a ? type->is_a(buf) : false; + } + } + return false; +} + +#undef HEADER_SIZE + bool IMB_ispic(const char *name) { return (IMB_ispic_type(name) != 0); -- cgit v1.2.3 From 4960780d76bf5a157404cfa5b126cd8ab87caec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 10 Nov 2020 13:44:47 +0100 Subject: Animation: More explicit boundary checks when setting active keyframe Fix unit test failing in debug mode by having more explicit boundary checks when setting an FCurve's active keyframe. No functional changes. --- source/blender/blenkernel/intern/fcurve.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index dcf4c78dfd8..003e926e0ae 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -841,11 +841,23 @@ bool BKE_fcurve_calc_range( */ void BKE_fcurve_active_keyframe_set(FCurve *fcu, const BezTriple *active_bezt) { + if (active_bezt == NULL) { + fcu->active_keyframe_index = FCURVE_ACTIVE_KEYFRAME_NONE; + return; + } + + /* Gracefully handle out-of-bounds pointers. Ideally this would do a BLI_assert() as well, but + * then the unit tests would break in debug mode. */ + ptrdiff_t offset = active_bezt - fcu->bezt; + if (offset < 0 || offset >= fcu->totvert) { + fcu->active_keyframe_index = FCURVE_ACTIVE_KEYFRAME_NONE; + return; + } + /* The active keyframe should always be selected. */ - BLI_assert((active_bezt == NULL) || - ((active_bezt->f1 | active_bezt->f2 | active_bezt->f3) & SELECT)); - fcu->active_keyframe_index = (active_bezt == NULL) ? FCURVE_ACTIVE_KEYFRAME_NONE : - active_bezt - fcu->bezt; + BLI_assert(BEZT_ISSEL_ANY(active_bezt)); + + fcu->active_keyframe_index = (int)offset; } /** -- cgit v1.2.3 From 01c7a94cdd328da1e94fd7a04b13ed3e410aff82 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 10 Nov 2020 14:11:13 +0100 Subject: install_deps: fix a typo in argument handling of new nanovdb option. Spotted by Patrick Mours (@pmoursnv), thanks! --- build_files/build_environment/install_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index f235615f64c..a951f3b4da5 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -679,7 +679,7 @@ while true; do --with-oidn) WITH_OIDN=true; shift; continue ;; - --with-nanvdb) + --with-nanovdb) WITH_NANOVDB=true; shift; continue ;; -- cgit v1.2.3 From 11c19c24bd67e5adf14dc34f18e4b27141878fb2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 10 Nov 2020 15:30:36 +0100 Subject: Cleanup/Update comments in liboverride code. --- source/blender/blenkernel/intern/lib_override.c | 118 ++++++++++++------------ 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index aa5e28b35bf..c9776b1a6a5 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -129,8 +129,8 @@ void BKE_lib_override_library_copy(ID *dst_id, const ID *src_id, const bool do_f BKE_lib_override_library_init(dst_id, NULL); } - /* Source is already overriding data, we copy it but reuse its reference for dest ID. - * otherwise, source is only an override template, it then becomes reference of dest ID. */ + /* If source is already overriding data, we copy it but reuse its reference for dest ID. + * Otherwise, source is only an override template, it then becomes reference of dest ID. */ dst_id->override_library->reference = src_id->override_library->reference ? src_id->override_library->reference : (ID *)src_id; @@ -232,7 +232,7 @@ ID *BKE_lib_override_library_create_from_id(Main *bmain, FOREACH_MAIN_ID_BEGIN (bmain, other_id) { if ((other_id->tag & LIB_TAG_DOIT) != 0 && other_id->lib == NULL) { /* Note that using ID_REMAP_SKIP_INDIRECT_USAGE below is superfluous, as we only remap - * local IDs usages anyway... */ + * local IDs usages anyway. */ BKE_libblock_relink_ex(bmain, other_id, reference_id, @@ -256,7 +256,7 @@ ID *BKE_lib_override_library_create_from_id(Main *bmain, /** * Create overridden local copies of all tagged data-blocks in given Main. * - * \note Set id->newid of overridden libs with newly created overrides, + * \note Set `id->newid` of overridden libs with newly created overrides, * caller is responsible to clean those pointers before/after usage as needed. * * \note By default, it will only remap newly created local overriding data-blocks between @@ -289,13 +289,14 @@ bool BKE_lib_override_library_create_from_tag(Main *bmain) for (todo_id_iter = todo_ids.first; todo_id_iter != NULL; todo_id_iter = todo_id_iter->next) { reference_id = todo_id_iter->data; if (reference_id->newid == NULL) { - /* If newid is already set, assume it has been handled by calling code. + /* If `newid` is already set, assume it has been handled by calling code. * Only current use case: re-using proxy ID when converting to liboverride. */ if ((reference_id->newid = lib_override_library_create_from(bmain, reference_id)) == NULL) { success = false; break; } - } /* We also tag the new IDs so that in next step we can remap their pointers too. */ + } + /* We also tag the new IDs so that in next step we can remap their pointers too. */ reference_id->newid->tag |= LIB_TAG_DOIT; Key *reference_key; @@ -333,7 +334,7 @@ bool BKE_lib_override_library_create_from_tag(Main *bmain) FOREACH_MAIN_ID_BEGIN (bmain, other_id) { if ((other_id->tag & LIB_TAG_DOIT) != 0 && other_id->lib == NULL) { /* Note that using ID_REMAP_SKIP_INDIRECT_USAGE below is superfluous, as we only remap - * local IDs usages anyway... */ + * local IDs usages anyway. */ BKE_libblock_relink_ex(bmain, other_id, reference_id, @@ -381,7 +382,7 @@ static bool lib_override_hierarchy_recursive_tag(Main *bmain, id->tag |= tag; } - /* This way we won't process again that ID should we encounter it again through another + /* This way we won't process again that ID, should we encounter it again through another * relationship hierarchy. * Note that this does not free any memory from relations, so we can still use the entries. */ @@ -436,7 +437,7 @@ void BKE_lib_override_library_dependencies_tag(Main *bmain, /** * Tag all IDs in given \a bmain that are part of the same \a id_root liboverride ID group. - * That is, all other liboverrides IDs (in)directly used by \a is_root one, sharing the same + * That is, all other liboverride IDs (in)directly used by \a is_root one, and sharing the same * library for their reference IDs. * * \param id_root: The root of the hierarchy of liboverride dependencies to be tagged. @@ -481,8 +482,7 @@ static int lib_override_library_make_tag_ids_cb(LibraryIDLinkCallbackData *cb_da BLI_assert(id_owner->lib == library_root); if (id->tag & LIB_TAG_DOIT) { - /* Already processed, but maybe not with the same chain of dependency, so we need to check that - * one nonetheless. */ + /* Already processed and tagged, nothing else to do here. */ return IDWALK_RET_STOP_RECURSION; } @@ -492,7 +492,7 @@ static int lib_override_library_make_tag_ids_cb(LibraryIDLinkCallbackData *cb_da } /* We tag all collections and objects for override. And we also tag all other data-blocks which - * would user one of those. */ + * would use one of those. */ if (ELEM(GS(id->name), ID_OB, ID_GR)) { id->tag |= LIB_TAG_DOIT; } @@ -502,12 +502,12 @@ static int lib_override_library_make_tag_ids_cb(LibraryIDLinkCallbackData *cb_da static bool lib_override_library_create_do(Main *bmain, ID *id_root) { - /* Tag all collections and objects, as well as other IDs using them. */ id_root->tag |= LIB_TAG_DOIT; BKE_main_relations_create(bmain, 0); if (ELEM(GS(id_root->name), ID_OB, ID_GR)) { + /* Tag all collections and objects. */ BKE_library_foreach_ID_link(bmain, id_root, lib_override_library_make_tag_ids_cb, @@ -515,7 +515,7 @@ static bool lib_override_library_create_do(Main *bmain, ID *id_root) IDWALK_READONLY | IDWALK_RECURSE); /* Then, we remove (untag) bone shape objects, you shall never want to override those - * (hopefully)... */ + * (hopefully). */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { if (ob->type == OB_ARMATURE && ob->pose != NULL && (ob->id.tag & LIB_TAG_DOIT)) { for (bPoseChannel *pchan = ob->pose->chanbase.first; pchan != NULL; pchan = pchan->next) { @@ -527,6 +527,10 @@ static bool lib_override_library_create_do(Main *bmain, ID *id_root) } } + /* Now tag all non-object/collection IDs 'in-between' two tagged ones, as those are part of an + * override chain and therefore alos need to be overridden. + * One very common cases are e.g. drivers on geometry or materials of an overridden object, that + * are using another overridden object as parameter. */ /* Note that this call will also free the main relations data we created above. */ BKE_lib_override_library_dependencies_tag(bmain, id_root, LIB_TAG_DOIT, false); @@ -636,16 +640,13 @@ static void lib_override_library_create_post_process( * \note Currently it only does special things if given \a id_root is an object of collection, more * specific behaviors may be added in the future for other ID types. * - * \note It will overrides all IDs tagged with \a LIB_TAG_DOIT, and it does not clear that tag at + * \note It will override all IDs tagged with \a LIB_TAG_DOIT, and it does not clear that tag at * its beginning, so caller code can add extra data-blocks to be overridden as well. * - * \note In the future that same function may be extended to support 'refresh' of overrides - * (rebuilding overrides from linked data, trying to preserve local overrides already defined). - * * \param id_root: The root ID to create an override from. * \param id_reference: Some reference ID used to do some post-processing after overrides have been - * created, may be NULL. Typically, the Empty object instantiating the linked - * collection we override, currently. + * created, may be NULL. Typically, the Empty object instantiating the linked collection we + * override, currently. * \return true if override was successfully created. */ bool BKE_lib_override_library_create( @@ -667,10 +668,10 @@ bool BKE_lib_override_library_create( } /** - * Converts a given proxy object into a library override. + * Convert a given proxy object into a library override. * - * \note This is actually a thin wrapper around \a BKE_lib_override_library_create, only extra work - * is to actually convert the proxy itself into an override first. + * \note This is a thin wrapper around \a BKE_lib_override_library_create, only extra work is to + * actually convert the proxy itself into an override first. * * \return true if override was successfully created. */ @@ -679,7 +680,7 @@ bool BKE_lib_override_library_proxy_convert(Main *bmain, ViewLayer *view_layer, Object *ob_proxy) { - /* proxy_group, if defined, is the empty instantiating the collection from which the proxy is + /* `proxy_group`, if defined, is the empty instantiating the collection from which the proxy is * coming. */ Object *ob_proxy_group = ob_proxy->proxy_group; const bool is_override_instancing_object = ob_proxy_group != NULL; @@ -688,7 +689,8 @@ bool BKE_lib_override_library_proxy_convert(Main *bmain, ID *id_reference = is_override_instancing_object ? &ob_proxy_group->id : &ob_proxy->id; /* We manually convert the proxy object into a library override, further override handling will - * then be handled by BKE_lib_override_library_create() just as for a regular override creation. + * then be handled by `BKE_lib_override_library_create()` just as for a regular override + * creation. */ ob_proxy->proxy->id.tag |= LIB_TAG_DOIT; ob_proxy->proxy->id.newid = &ob_proxy->id; @@ -728,7 +730,7 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ if (id->tag & LIB_TAG_DOIT && ID_IS_OVERRIDE_LIBRARY_REAL(id)) { /* While this should not happen in typical cases (and won't be properly supported here), user * is free to do all kind of very bad things, including having different local overrides of a - * same linked ID in a same hierarchy... */ + * same linked ID in a same hierarchy. */ if (!BLI_ghash_haskey(linkedref_to_old_override, id->override_library->reference)) { BLI_ghash_insert(linkedref_to_old_override, id->override_library->reference, id); id->override_library->reference->tag |= LIB_TAG_DOIT; @@ -738,7 +740,7 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ FOREACH_MAIN_ID_END; /* Make new override from linked data. */ - /* Note that this call also remap all pointers of tagged IDs from old override IDs to new + /* Note that this call also remaps all pointers of tagged IDs from old override IDs to new * override IDs (including within the old overrides themselves, since those are tagged too * above). */ const bool success = lib_override_library_create_do(bmain, id_root_reference); @@ -755,12 +757,12 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ ID *id_override_old = BLI_ghash_lookup(linkedref_to_old_override, id); if (id_override_old != NULL) { - /* Swap the names between old override ID and new one. */ + /* Swap the names between old override ID and new one. */ char id_name_buf[MAX_ID_NAME]; memcpy(id_name_buf, id_override_old->name, sizeof(id_name_buf)); memcpy(id_override_old->name, id_override_new->name, sizeof(id_override_old->name)); memcpy(id_override_new->name, id_name_buf, sizeof(id_override_new->name)); - /* Note that this is very efficient way to keep BMain IDs ordered as expected after + /* Note that this is a very efficient way to keep BMain IDs ordered as expected after * swapping their names. * However, one has to be very careful with this when iterating over the listbase at the * same time. Here it works because we only execute this code when we are in the linked @@ -816,7 +818,7 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ * This improves performances anyway, so everything is fine. */ FOREACH_MAIN_ID_BEGIN (bmain, id) { if (id->tag & LIB_TAG_DOIT) { - /* Note that this work because linked IDs are always after local ones (including overrides), + /* Note that this works because linked IDs are always after local ones (including overrides), * so we will only ever tag an old override ID after we have already checked it in this loop, * hence we cannot untag it later. */ if (id->newid != NULL && ID_IS_LINKED(id)) { @@ -833,7 +835,8 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ FOREACH_MAIN_ID_END; BKE_id_multi_tagged_delete(bmain); - /* At this point, id_root has very likely been deleted, we need to update it to its new version. + /* At this point, `id_root` has very likely been deleted, we need to update it to its new + * version. */ id_root = id_root_reference->newid; @@ -855,7 +858,7 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ * * \note All IDs tagged with `LIB_TAG_DOIT` will be deleted. * - * \param id_root: The root liboverride ID to resync from. + * \param id_root: The root liboverride ID to delete. */ void BKE_lib_override_library_delete(Main *bmain, ID *id_root) { @@ -864,8 +867,7 @@ void BKE_lib_override_library_delete(Main *bmain, ID *id_root) /* Tag all collections and objects, as well as other IDs using them. */ id_root->tag |= LIB_TAG_DOIT; - /* Make a mapping 'linked reference IDs' -> 'Local override IDs' of existing overrides, and tag - * linked reference ones to be overridden again. */ + /* Tag all library overrides in the chains of dependencies from the given root one. */ BKE_lib_override_library_override_group_tag(bmain, id_root, LIB_TAG_DOIT, true); ID *id; @@ -889,7 +891,7 @@ void BKE_lib_override_library_delete(Main *bmain, ID *id_root) } FOREACH_MAIN_ID_END; - /* Should not actually be needed here... */ + /* Should not actually be needed here. */ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); } @@ -1069,7 +1071,7 @@ IDOverrideLibraryPropertyOperation *BKE_lib_override_library_property_operation_ return ELEM(subitem_locindex, -1, opop->subitem_local_index) ? opop : NULL; } - /* index == -1 means all indices, that is valid fallback in case we requested specific index. + /* `index == -1` means all indices, that is a valid fallback in case we requested specific index. */ if (!strict && (subitem_locindex != subitem_defindex) && (opop = BLI_listbase_bytes_find( @@ -1230,7 +1232,7 @@ bool BKE_lib_override_library_status_check_local(Main *bmain, ID *local) BLI_assert(GS(local->name) == GS(reference->name)); if (GS(local->name) == ID_OB) { - /* Our beloved pose's bone cross-data pointers.. Usually, depsgraph evaluation would + /* Our beloved pose's bone cross-data pointers. Usually, depsgraph evaluation would * ensure this is valid, but in some situations (like hidden collections etc.) this won't * be the case, so we need to take care of this ourselves. */ Object *ob_local = (Object *)local; @@ -1290,16 +1292,16 @@ bool BKE_lib_override_library_status_check_reference(Main *bmain, ID *local) if (reference->override_library && (reference->tag & LIB_TAG_OVERRIDE_LIBRARY_REFOK) == 0) { if (!BKE_lib_override_library_status_check_reference(bmain, reference)) { - /* If reference is also override of another data-block, and its status is not OK, + /* If reference is also an override of another data-block, and its status is not OK, * then this override is not OK either. - * Note that this should only happen when reloading libraries... */ + * Note that this should only happen when reloading libraries. */ local->tag &= ~LIB_TAG_OVERRIDE_LIBRARY_REFOK; return false; } } if (GS(local->name) == ID_OB) { - /* Our beloved pose's bone cross-data pointers.. Usually, depsgraph evaluation would + /* Our beloved pose's bone cross-data pointers. Usually, depsgraph evaluation would * ensure this is valid, but in some situations (like hidden collections etc.) this won't * be the case, so we need to take care of this ourselves. */ Object *ob_local = (Object *)local; @@ -1332,7 +1334,7 @@ bool BKE_lib_override_library_status_check_reference(Main *bmain, ID *local) } /** - * Compares local and reference data-blocks and create new override operations as needed, + * Compare local and reference data-blocks and create new override operations as needed, * or reset to reference values if overriding is not allowed. * * \note Defining override operations is only mandatory before saving a `.blend` file on disk @@ -1341,9 +1343,9 @@ bool BKE_lib_override_library_status_check_reference(Main *bmain, ID *local) * * \note This is by far the biggest operation (the more time-consuming) of the three so far, * since it has to go over all properties in depth (all overridable ones at least). - * Generating diff values and applying overrides are much cheaper. + * Generating differential values and applying overrides are much cheaper. * - * \return true if new overriding op was created, or some local data was reset. */ + * \return true if a new overriding op was created, or some local data was reset. */ bool BKE_lib_override_library_operations_create(Main *bmain, ID *local) { BLI_assert(local->override_library != NULL); @@ -1352,7 +1354,7 @@ bool BKE_lib_override_library_operations_create(Main *bmain, ID *local) if (!is_template) { /* Do not attempt to generate overriding rules from an empty place-holder generated by link - * code when it cannot find to actual library/ID. Much better to keep the local data-block as + * code when it cannot find the actual library/ID. Much better to keep the local data-block as * is in the file in that case, until broken lib is fixed. */ if (ID_MISSING(local->override_library->reference)) { return ret; @@ -1566,7 +1568,7 @@ static void lib_override_library_id_hierarchy_recursive_reset(Main *bmain, ID *i lib_override_library_id_reset_do(bmain, id_root); - /* This way we won't process again that ID should we encounter it again through another + /* This way we won't process again that ID, should we encounter it again through another * relationship hierarchy. * Note that this does not free any memory from relations, so we can still use the entries. */ @@ -1609,7 +1611,7 @@ void BKE_lib_override_library_id_hierarchy_reset(Main *bmain, ID *id_root) FOREACH_MAIN_ID_END; } -/** Set or clear given tag in all operations as unused in that override property data. */ +/** Set or clear given tag in all operations in that override property data. */ void BKE_lib_override_library_operations_tag(struct IDOverrideLibraryProperty *override_property, const short tag, const bool do_set) @@ -1699,13 +1701,13 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) } /* Do not attempt to apply overriding rules over an empty place-holder generated by link code - * when it cannot find to actual library/ID. Much better to keep the local data-block as loaded + * when it cannot find the actual library/ID. Much better to keep the local data-block as loaded * from the file in that case, until broken lib is fixed. */ if (ID_MISSING(local->override_library->reference)) { return; } - /* Recursively do 'ancestors' overrides first, if any. */ + /* Recursively do 'ancestor' overrides first, if any. */ if (local->override_library->reference->override_library && (local->override_library->reference->tag & LIB_TAG_OVERRIDE_LIBRARY_REFOK) == 0) { BKE_lib_override_library_update(bmain, local->override_library->reference); @@ -1717,7 +1719,7 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) /* XXX We need a way to get off-Main copies of IDs (similar to localized mats/texts/ etc.)! * However, this is whole bunch of code work in itself, so for now plain stupid ID copy - * will do, as inn-efficient as it is. :/ + * will do, as innefficient as it is. :/ * Actually, maybe not! Since we are swapping with original ID's local content, we want to * keep user-count in correct state when freeing tmp_id * (and that user-counts of IDs used by 'new' local data also remain correct). */ @@ -1738,7 +1740,7 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) * manual handling here. */ BLI_strncpy(tmp_id->name, local->name, sizeof(tmp_id->name)); - /* Those ugly loop-back pointers again... Luckily we only need to deal with the shape keys here, + /* Those ugly loop-back pointers again. Luckily we only need to deal with the shape keys here, * collections' parents are fully runtime and reconstructed later. */ Key *local_key = BKE_key_from_id(local); Key *tmp_key = BKE_key_from_id(tmp_id); @@ -1762,7 +1764,7 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) BKE_lib_id_swap(bmain, local, tmp_id); if (local_key != NULL && tmp_key != NULL) { - /* This is some kind of hard-coded 'always enforced override'... */ + /* This is some kind of hard-coded 'always enforced override'. */ BKE_lib_id_swap(bmain, &local_key->id, &tmp_key->id); tmp_key->id.flag |= (local_key->id.flag & LIB_EMBEDDED_DATA_LIB_OVERRIDE); /* The swap of local and tmp_id inverted those pointers, we need to redefine proper @@ -1773,9 +1775,8 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) tmp_key->from = tmp_id; } - /* Again, horribly inn-efficient in our case, we need something off-Main - * (aka more generic nolib copy/free stuff)! */ - /* XXX And crashing in complex cases (e.g. because depsgraph uses same data...). */ + /* Again, horribly innefficient in our case, we need something off-Main (aka more generic nolib + * copy/free stuff)! */ BKE_id_free_ex(bmain, tmp_id, LIB_ID_FREE_NO_UI_USER, true); if (GS(local->name) == ID_AR) { @@ -1803,7 +1804,7 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) local->tag |= LIB_TAG_OVERRIDE_LIBRARY_REFOK; /* Full rebuild of Depsgraph! */ - /* Note: this is really brute force, in theory updates from RNA should have handle this already, + /* Note: this is really brute force, in theory updates from RNA should have handled this already, * but for now let's play it safe. */ DEG_id_tag_update_ex(bmain, local, ID_RECALC_ALL); DEG_relations_tag_update(bmain); @@ -1834,12 +1835,11 @@ void BKE_lib_override_library_main_update(Main *bmain) * Storage (how to store overriding data into `.blend` files). * * Basically: - * 1) Only 'differential' storage needs special handling here. All others (replacing values or + * 1) Only 'differential' overrides needs special handling here. All others (replacing values or * inserting/removing items from a collection) can be handled with simply storing current * content of local data-block. - * 2) We store the differential value into a second 'ghost' data-block, - * which is an empty ID of same type as local one, - * where we only define values that need differential data. + * 2) We store the differential value into a second 'ghost' data-block, which is an empty ID of + * same type as the local one, where we only define values that need differential data. * * This avoids us having to modify 'real' data-block at write time (and restoring it afterwards), * which is inefficient, and potentially dangerous (in case of concurrent access...), while not -- cgit v1.2.3 From 75a2db5d9742a46ec4662fe85765f27b6f5e0f95 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 10 Nov 2020 15:30:35 +0100 Subject: Multires: Cleanup, clarify comment --- source/blender/blenkernel/intern/subdiv_displacement_multires.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/subdiv_displacement_multires.c b/source/blender/blenkernel/intern/subdiv_displacement_multires.c index 69cac840276..0fb08880dd5 100644 --- a/source/blender/blenkernel/intern/subdiv_displacement_multires.c +++ b/source/blender/blenkernel/intern/subdiv_displacement_multires.c @@ -442,7 +442,7 @@ void BKE_subdiv_displacement_attach_from_multires(Subdiv *subdiv, { /* Make sure we don't have previously assigned displacement. */ BKE_subdiv_displacement_detach(subdiv); - /* It is possible to have mesh without MDISPS layer. Happens when using + /* It is possible to have mesh without CD_MDISPS layer. Happens when using * dynamic topology. */ if (!CustomData_has_layer(&mesh->ldata, CD_MDISPS)) { return; -- cgit v1.2.3 From feb71f1d714887715fd9319c91edfe71eddb4a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 10 Nov 2020 15:33:14 +0100 Subject: Animation: Expand unit tests for `BKE_fcurve_active_keyframe_index()` Expand unit test for `BKE_fcurve_active_keyframe_index()` to test edge cases better. This also introduces a new test macro `EXPECT_BLI_ASSERT()`, which can be used to test that an assertion fails successfully. No functional changes to actual Blender code. --- .../tests/guardedalloc_overflow_test.cc | 5 ----- source/blender/blenkernel/intern/fcurve.c | 2 +- source/blender/blenkernel/intern/fcurve_test.cc | 26 ++++++++++++++++++++-- tests/gtests/testing/testing.h | 18 +++++++++++++++ 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/intern/guardedalloc/tests/guardedalloc_overflow_test.cc b/intern/guardedalloc/tests/guardedalloc_overflow_test.cc index e5754bc95ea..efbfc171fff 100644 --- a/intern/guardedalloc/tests/guardedalloc_overflow_test.cc +++ b/intern/guardedalloc/tests/guardedalloc_overflow_test.cc @@ -5,11 +5,6 @@ #include "MEM_guardedalloc.h" /* We expect to abort on integer overflow, to prevent possible exploits. */ -#ifdef _WIN32 -# define ABORT_PREDICATE ::testing::ExitedWithCode(3) -#else -# define ABORT_PREDICATE ::testing::KilledBySignal(SIGABRT) -#endif #if defined(__GNUC__) && !defined(__clang__) /* Disable since it's the purpose of this test. */ diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 8bfc626379f..e6d3696b198 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -855,7 +855,7 @@ void BKE_fcurve_active_keyframe_set(FCurve *fcu, const BezTriple *active_bezt) } /* The active keyframe should always be selected. */ - BLI_assert(BEZT_ISSEL_ANY(active_bezt)); + BLI_assert(BEZT_ISSEL_ANY(active_bezt) || !"active keyframe must be selected"); fcu->active_keyframe_index = (int)offset; } diff --git a/source/blender/blenkernel/intern/fcurve_test.cc b/source/blender/blenkernel/intern/fcurve_test.cc index 97dd541e2b9..fb6ce02d146 100644 --- a/source/blender/blenkernel/intern/fcurve_test.cc +++ b/source/blender/blenkernel/intern/fcurve_test.cc @@ -22,6 +22,7 @@ #include "BKE_fcurve.h" #include "ED_keyframing.h" +#include "ED_types.h" /* For SELECT. */ #include "DNA_anim_types.h" @@ -295,17 +296,38 @@ TEST(fcurve_active_keyframe, ActiveKeyframe) EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), FCURVE_ACTIVE_KEYFRAME_NONE); /* Check a "normal" action. */ + fcu->bezt[2].f2 |= SELECT; BKE_fcurve_active_keyframe_set(fcu, &fcu->bezt[2]); EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), 2); - /* Check out of bounds. */ + /* Check setting an unselected keyframe as active. */ + fcu->bezt[2].f1 = fcu->bezt[2].f2 = fcu->bezt[2].f3 = 0; + EXPECT_BLI_ASSERT(BKE_fcurve_active_keyframe_set(fcu, &fcu->bezt[2]), + "active keyframe must be selected"); + EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), FCURVE_ACTIVE_KEYFRAME_NONE); + + /* Check out of bounds (lower). */ BKE_fcurve_active_keyframe_set(fcu, fcu->bezt - 20); + EXPECT_EQ(fcu->active_keyframe_index, FCURVE_ACTIVE_KEYFRAME_NONE) + << "Setting out-of-bounds value via the API should result in valid active_keyframe_index"; EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), FCURVE_ACTIVE_KEYFRAME_NONE); - /* Check out of bounds again. */ + fcu->active_keyframe_index = -20; + EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), FCURVE_ACTIVE_KEYFRAME_NONE) + << "Even with active_keyframe_index out of bounds, getting it via the API should produce a " + "valid value"; + + /* Check out of bounds (higher). */ BKE_fcurve_active_keyframe_set(fcu, fcu->bezt + 4); + EXPECT_EQ(fcu->active_keyframe_index, FCURVE_ACTIVE_KEYFRAME_NONE) + << "Setting out-of-bounds value via the API should result in valid active_keyframe_index"; EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), FCURVE_ACTIVE_KEYFRAME_NONE); + fcu->active_keyframe_index = fcu->totvert; + EXPECT_EQ(BKE_fcurve_active_keyframe_index(fcu), FCURVE_ACTIVE_KEYFRAME_NONE) + << "Even with active_keyframe_index out of bounds, getting it via the API should produce a " + "valid value"; + BKE_fcurve_free(fcu); } diff --git a/tests/gtests/testing/testing.h b/tests/gtests/testing/testing.h index 34928035b7d..8136a93314e 100644 --- a/tests/gtests/testing/testing.h +++ b/tests/gtests/testing/testing.h @@ -137,4 +137,22 @@ inline void EXPECT_EQ_ARRAY_ND(const T *expected, const T *actual, const size_t } } +#ifdef _WIN32 +# define ABORT_PREDICATE ::testing::ExitedWithCode(3) +#else +# define ABORT_PREDICATE ::testing::KilledBySignal(SIGABRT) +#endif + +/* Test macro for when BLI_assert() is expected to fail. + * Note that the EXPECT_BLI_ASSERT macro is a no-op, unless used in a debug build with + * WITH_ASSERT_ABORT=ON. */ +#if defined(WITH_ASSERT_ABORT) && !defined(NDEBUG) +/* EXPECT_EXIT() is used as that's the only exit-expecting function in GTest that allows us to + * check for SIGABRT. */ +# define EXPECT_BLI_ASSERT(function_call, expect_message) \ + EXPECT_EXIT(function_call, ABORT_PREDICATE, expect_message) +#else +# define EXPECT_BLI_ASSERT(function_call, expect_message) function_call +#endif + #endif // __BLENDER_TESTING_H__ -- cgit v1.2.3 From a284e559b90eb6d6824fc0f3e263ec7de1b4a49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Tue, 10 Nov 2020 15:18:40 +0100 Subject: Fix T82561: shader compilation crashes in OSL The "type" sockets on shader nodes were renamed in rB31a620b9420cab to avoid clashes with the `NodeType type` member from the Node base class, but the OSL shader compilation was missing those changes. --- intern/cycles/render/nodes.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 43dff896db7..bde573bf0dc 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -959,7 +959,7 @@ void SkyTextureNode::compile(OSLCompiler &compiler) else assert(false); - compiler.parameter(this, "type"); + compiler.parameter(this, "sky_type"); compiler.parameter("theta", sunsky.theta); compiler.parameter("phi", sunsky.phi); compiler.parameter_color("radiance", @@ -1027,7 +1027,7 @@ void GradientTextureNode::compile(OSLCompiler &compiler) { tex_mapping.compile(compiler); - compiler.parameter(this, "type"); + compiler.parameter(this, "gradient_type"); compiler.add(this, "node_gradient_texture"); } @@ -1437,7 +1437,7 @@ void MusgraveTextureNode::compile(OSLCompiler &compiler) { tex_mapping.compile(compiler); - compiler.parameter(this, "type"); + compiler.parameter(this, "musgrave_type"); compiler.parameter(this, "dimensions"); compiler.add(this, "node_musgrave_texture"); } @@ -1537,7 +1537,7 @@ void WaveTextureNode::compile(OSLCompiler &compiler) { tex_mapping.compile(compiler); - compiler.parameter(this, "type"); + compiler.parameter(this, "wave_type"); compiler.parameter(this, "bands_direction"); compiler.parameter(this, "rings_direction"); compiler.parameter(this, "profile"); @@ -1983,7 +1983,7 @@ void MappingNode::compile(SVMCompiler &compiler) void MappingNode::compile(OSLCompiler &compiler) { - compiler.parameter(this, "type"); + compiler.parameter(this, "mapping_type"); compiler.add(this, "node_mapping"); } @@ -4926,7 +4926,7 @@ void MixNode::compile(SVMCompiler &compiler) void MixNode::compile(OSLCompiler &compiler) { - compiler.parameter(this, "type"); + compiler.parameter(this, "mix_type"); compiler.parameter(this, "use_clamp"); compiler.add(this, "node_mix"); } @@ -5846,7 +5846,7 @@ void MapRangeNode::compile(SVMCompiler &compiler) void MapRangeNode::compile(OSLCompiler &compiler) { - compiler.parameter(this, "type"); + compiler.parameter(this, "range_type"); compiler.add(this, "node_map_range"); } @@ -5907,7 +5907,7 @@ void ClampNode::compile(SVMCompiler &compiler) void ClampNode::compile(OSLCompiler &compiler) { - compiler.parameter(this, "type"); + compiler.parameter(this, "clamp_type"); compiler.add(this, "node_clamp"); } @@ -6074,7 +6074,7 @@ void MathNode::compile(SVMCompiler &compiler) void MathNode::compile(OSLCompiler &compiler) { - compiler.parameter(this, "type"); + compiler.parameter(this, "math_type"); compiler.add(this, "node_math"); } @@ -6185,7 +6185,7 @@ void VectorMathNode::compile(SVMCompiler &compiler) void VectorMathNode::compile(OSLCompiler &compiler) { - compiler.parameter(this, "type"); + compiler.parameter(this, "math_type"); compiler.add(this, "node_vector_math"); } @@ -6241,7 +6241,7 @@ void VectorRotateNode::compile(SVMCompiler &compiler) void VectorRotateNode::compile(OSLCompiler &compiler) { - compiler.parameter(this, "type"); + compiler.parameter(this, "rotate_type"); compiler.parameter(this, "invert"); compiler.add(this, "node_vector_rotate"); } @@ -6288,7 +6288,7 @@ void VectorTransformNode::compile(SVMCompiler &compiler) void VectorTransformNode::compile(OSLCompiler &compiler) { - compiler.parameter(this, "type"); + compiler.parameter(this, "transform_type"); compiler.parameter(this, "convert_from"); compiler.parameter(this, "convert_to"); compiler.add(this, "node_vector_transform"); -- cgit v1.2.3 From de8d7003bc55d9d8401b51af80ee6eb6b35e66e2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 10 Nov 2020 15:54:38 +0100 Subject: Cleanup/Update comments in liboverride code. --- source/blender/blenkernel/intern/lib_override.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index c9776b1a6a5..04c427aaf9a 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -1881,15 +1881,15 @@ ID *BKE_lib_override_library_operations_store_start(Main *bmain, /* This is fully disabled for now, as it generated very hard to solve issues with Collections and * how they reference each-other in their parents/children relations. - * Core of the issue is creating and storing those copies in a separate BMain, while collection - * copy code re-assign blindly parents/children, even if they do not belong to the same BMain. + * Core of the issue is creating and storing those copies in a separate Main, while collection + * copy code re-assign blindly parents/children, even if they do not belong to the same Main. * One solution could be to implement special flag as discussed below, and prevent any * other-ID-reference creation/update in that case (since no differential operation is expected * to involve those anyway). */ #if 0 /* XXX TODO We may also want a specialized handling of things here too, to avoid copying heavy * never-overridable data (like Mesh geometry etc.)? And also maybe avoid lib - * reference-counting completely (shallow copy...). */ + * reference-counting completely (shallow copy). */ /* This would imply change in handling of user-count all over RNA * (and possibly all over Blender code). * Not impossible to do, but would rather see first is extra useless usual user handling is @@ -1928,7 +1928,7 @@ void BKE_lib_override_library_operations_store_end( BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(local)); /* Nothing else to do here really, we need to keep all temp override storage data-blocks in - * memory until whole file is written anyway (otherwise we'd get mem pointers overlap...). */ + * memory until whole file is written anyway (otherwise we'd get mem pointers overlap). */ local->override_library->storage = NULL; } -- cgit v1.2.3 From 2ecab4c8a6170c1c877fa4d2a67ae820baa68c35 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 10 Nov 2020 16:10:47 +0100 Subject: LibOverride: Optimize deletion of overrides in liboverride delete. --- source/blender/blenkernel/intern/lib_override.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 04c427aaf9a..15736011f6f 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -884,12 +884,7 @@ void BKE_lib_override_library_delete(Main *bmain, ID *id_root) FOREACH_MAIN_ID_END; /* Delete the override IDs. */ - FOREACH_MAIN_ID_BEGIN (bmain, id) { - if (id->tag & LIB_TAG_DOIT) { - BKE_id_delete(bmain, id); - } - } - FOREACH_MAIN_ID_END; + BKE_id_multi_tagged_delete(bmain); /* Should not actually be needed here. */ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); -- cgit v1.2.3 From 23614c49e94592ad71f9ff986c7eb5d60ce7ca8c Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Tue, 10 Nov 2020 10:59:25 -0300 Subject: Fix T81951: Add Cube new tool surface snaping not working For the `plane_depth` of type `PLACE_DEPTH_SURFACE` to take effect, a `snap_context` is needed. But, even if a temporary `snap_context` was created for `plane_orient == PLACE_ORIENT_SURFACE`, this context was not used for `plane_depth`. So, use a temporary `snap_context` for `PLACE_DEPTH_SURFACE` (as it is done for `PLACE_ORIENT_SURFACE`). Differential Revision: https://developer.blender.org/D9345 Differential Revision: https://developer.blender.org/D9435 --- .../editors/space_view3d/view3d_placement.c | 45 +++++++++++----------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c index 176fc641085..25634d9f221 100644 --- a/source/blender/editors/space_view3d/view3d_placement.c +++ b/source/blender/editors/space_view3d/view3d_placement.c @@ -639,23 +639,27 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv } } - ipd->launch_event = WM_userdef_event_type_from_keymap_type(event->type); - - ED_transform_calc_orientation_from_type(C, ipd->matrix_orient); - - /* Set the orientation. */ - if (plane_orient == PLACE_ORIENT_SURFACE) { - bool snap_context_free = false; - SnapObjectContext *snap_context = - (ipd->snap_gizmo ? ED_gizmotypes_snap_3d_context_ensure( - ipd->scene, ipd->region, ipd->v3d, ipd->snap_gizmo) : - NULL); - if (snap_context == NULL) { + SnapObjectContext *snap_context = NULL; + bool snap_context_free = false; + if ((plane_orient == PLACE_ORIENT_SURFACE) || (plane_depth == PLACE_DEPTH_SURFACE)) { + /* Need# snap_context */ + if (ipd->snap_gizmo) { + snap_context = ED_gizmotypes_snap_3d_context_ensure( + ipd->scene, ipd->region, ipd->v3d, ipd->snap_gizmo); + } + else { snap_context = ED_transform_snap_object_context_create_view3d( ipd->scene, 0, ipd->region, ipd->v3d); snap_context_free = true; } + } + ipd->launch_event = WM_userdef_event_type_from_keymap_type(event->type); + + ED_transform_calc_orientation_from_type(C, ipd->matrix_orient); + + /* Set the orientation. */ + if (snap_context && (plane_orient == PLACE_ORIENT_SURFACE)) { float matrix_orient_surface[3][3]; /* Use the snap normal as a fallback in case the cursor isn't over a surface @@ -673,10 +677,6 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv matrix_orient_surface)) { copy_m3_m3(ipd->matrix_orient, matrix_orient_surface); } - - if (snap_context_free) { - ED_transform_snap_object_context_destroy(snap_context); - } } ipd->orient_axis = plane_axis; @@ -751,13 +751,8 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv ipd->v3d, ipd->region, ipd->scene->cursor.location, mval_fl, ipd->co_src); use_depth_fallback = false; } - else if (plane_depth == PLACE_DEPTH_SURFACE) { - SnapObjectContext *snap_context = - (ipd->snap_gizmo ? ED_gizmotypes_snap_3d_context_ensure( - ipd->scene, ipd->region, ipd->v3d, ipd->snap_gizmo) : - NULL); - if ((snap_context != NULL) && - ED_transform_snap_object_project_view3d(snap_context, + else if (snap_context && (plane_depth == PLACE_DEPTH_SURFACE)) { + if (ED_transform_snap_object_project_view3d(snap_context, CTX_data_ensure_evaluated_depsgraph(C), SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ @@ -804,6 +799,10 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv ipd->step[0].plane, ipd->co_src, ipd->matrix_orient[ipd->orient_axis]); copy_v3_v3(ipd->step[0].co_dst, ipd->co_src); + + if (snap_context_free) { + ED_transform_snap_object_context_destroy(snap_context); + } } static int view3d_interactive_add_invoke(bContext *C, wmOperator *op, const wmEvent *event) -- cgit v1.2.3 From bd6bfba64dad2e14cab2c8372ba0f3ad39b93cdc Mon Sep 17 00:00:00 2001 From: Patrick Mours Date: Tue, 10 Nov 2020 16:19:47 +0100 Subject: Cycles: Enable NanoVDB usage by default As discussed during the Rendering Metting. Ref T81454. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa791a53f81..67b57dc2fc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,7 +203,7 @@ option(WITH_OPENVDB "Enable features relying on OpenVDB" ON) option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ON) option(WITH_OPENVDB_3_ABI_COMPATIBLE "Assume OpenVDB library has been compiled with version 3 ABI compatibility" OFF) mark_as_advanced(WITH_OPENVDB_3_ABI_COMPATIBLE) -option(WITH_NANOVDB "Enable usage of NanoVDB data structure for accelerated rendering on the GPU" OFF) +option(WITH_NANOVDB "Enable usage of NanoVDB data structure for rendering on the GPU" ON) # GHOST Windowing Library Options option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF) -- cgit v1.2.3 From 626a79204ee2a9023cca1f7b9dfd88aa8d25cfc6 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Tue, 10 Nov 2020 08:48:18 -0700 Subject: MSVC: Fix build warning If a define of NOMINMAX was made before BLI_task.hh was included, the compiler would emit a warning C4005: 'NOMINMAX': macro redefinition warning, to work around this only define it if it is not already defined, and only undefine it if we were the ones that made the define earlier. --- source/blender/blenlib/BLI_task.hh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/blender/blenlib/BLI_task.hh b/source/blender/blenlib/BLI_task.hh index 8a0d77745c8..0da03d84793 100644 --- a/source/blender/blenlib/BLI_task.hh +++ b/source/blender/blenlib/BLI_task.hh @@ -24,16 +24,20 @@ /* Quiet top level deprecation message, unrelated to API usage here. */ # define TBB_SUPPRESS_DEPRECATED_MESSAGES 1 -# ifdef WIN32 +# if defined(WIN32) && !defined(NOMINMAX) /* TBB includes Windows.h which will define min/max macros causing issues * when we try to use std::min and std::max later on. */ # define NOMINMAX +# define TBB_MIN_MAX_CLEANUP # endif # include # ifdef WIN32 -/* We cannot keep this defined, since other parts of the code deal with this on their own leading - * to multiple define warnings unless we un-define this. */ -# undef NOMINMAX +/* We cannot keep this defined, since other parts of the code deal with this on their own, leading + * to multiple define warnings unless we un-define this, however we can only undefine this if we + * were the ones that made the definition earlier. */ +# ifdef TBB_MIN_MAX_CLEANUP +# undef NOMINMAX +# endif # endif #endif -- cgit v1.2.3 From 339f442a9327d6eeb1bc7a52be702ea9b461df72 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 10 Nov 2020 17:12:36 +0100 Subject: Fix (unreported) potential assert in viewlayer synchronization. Some operations, like remapping and ID (Object) to another, can lead to having the same object in more than one base. While this is not a valid state, this is being taken care of by the `BKE_layer_collection_sync` call, so the object-to-base GHash generation itself should be resilient to such issue. Note: another way to fix this would be to make remapping post-process code check explicitely for such doublons, but I would rather avoid adding even more 'specialized' code there, it already has to deal with too many of those corner cases. --- source/blender/blenkernel/intern/layer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 784cd5b2edf..0757cf791b7 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -367,7 +367,13 @@ static void view_layer_bases_hash_create(ViewLayer *view_layer) LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { if (base->object) { - BLI_ghash_insert(hash, base->object, base); + /* Some processes, like ID remapping, may lead to having several bases with the same + * object. So just take the first one here, and ignore all others + * (#BKE_layer_collection_sync will clean this up anyway). */ + void **val_pp; + if (!BLI_ghash_ensure_p(hash, base->object, &val_pp)) { + *val_pp = base; + } } } -- cgit v1.2.3 From a63208823c8426b76270393f9217d3cf3ef66d0b Mon Sep 17 00:00:00 2001 From: Patrick Mours Date: Tue, 10 Nov 2020 18:28:14 +0100 Subject: Fix NanoVDB compile errors with recent NanoVDB versions There were some changes to the NanoVDB API that broke the way Cycles was previously using it. With these changes it compiles successfully again and also still compiles with the NanoVDB revision that is currently part of the Blender dependencies. Ref T81454. --- .../cycles/kernel/kernels/cpu/kernel_cpu_image.h | 26 +++++++++++++--------- .../cycles/kernel/kernels/cuda/kernel_cuda_image.h | 10 ++++----- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h b/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h index aaf58cbd0ab..44c658d4cab 100644 --- a/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h +++ b/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h @@ -478,7 +478,7 @@ template struct TextureInterpolator { #ifdef WITH_NANOVDB template struct NanoVDBInterpolator { - typedef nanovdb::ReadAccessor> ReadAccessorT; + typedef typename nanovdb::NanoGrid::AccessorType AccessorType; static ccl_always_inline float4 read(float r) { @@ -490,16 +490,22 @@ template struct NanoVDBInterpolator { return make_float4(r[0], r[1], r[2], 1.0f); } - static ccl_always_inline float4 interp_3d_closest(ReadAccessorT acc, float x, float y, float z) + static ccl_always_inline float4 interp_3d_closest(const AccessorType &acc, + float x, + float y, + float z) { const nanovdb::Vec3f xyz(x, y, z); - return read(nanovdb::NearestNeighborSampler(acc)(xyz)); + return read(nanovdb::SampleFromVoxels(acc)(xyz)); } - static ccl_always_inline float4 interp_3d_linear(ReadAccessorT acc, float x, float y, float z) + static ccl_always_inline float4 interp_3d_linear(const AccessorType &acc, + float x, + float y, + float z) { const nanovdb::Vec3f xyz(x - 0.5f, y - 0.5f, z - 0.5f); - return read(nanovdb::TrilinearSampler(acc)(xyz)); + return read(nanovdb::SampleFromVoxels(acc)(xyz)); } # if defined(__GNUC__) || defined(__clang__) @@ -508,7 +514,7 @@ template struct NanoVDBInterpolator { static ccl_never_inline # endif float4 - interp_3d_cubic(ReadAccessorT acc, float x, float y, float z) + interp_3d_cubic(const AccessorType &acc, float x, float y, float z) { int ix, iy, iz; int nix, niy, niz; @@ -561,15 +567,15 @@ template struct NanoVDBInterpolator { using namespace nanovdb; NanoGrid *const grid = (NanoGrid *)info.data; - const NanoRoot &root = grid->tree().root(); + AccessorType acc = grid->getAccessor(); switch ((interp == INTERPOLATION_NONE) ? info.interpolation : interp) { case INTERPOLATION_CLOSEST: - return interp_3d_closest(root, x, y, z); + return interp_3d_closest(acc, x, y, z); case INTERPOLATION_LINEAR: - return interp_3d_linear(root, x, y, z); + return interp_3d_linear(acc, x, y, z); default: - return interp_3d_cubic(root, x, y, z); + return interp_3d_cubic(acc, x, y, z); } } }; diff --git a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h index b8aaacba960..001bc652810 100644 --- a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h +++ b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h @@ -159,18 +159,18 @@ ccl_device_inline T kernel_tex_image_interp_nanovdb( const TextureInfo &info, float x, float y, float z, uint interpolation) { using namespace nanovdb; - typedef ReadAccessor> ReadAccessorT; NanoGrid *const grid = (NanoGrid *)info.data; - const NanoRoot &root = grid->tree().root(); + typedef typename nanovdb::NanoGrid::AccessorType AccessorType; + AccessorType acc = grid->getAccessor(); switch (interpolation) { case INTERPOLATION_CLOSEST: - return NearestNeighborSampler(root)(Vec3f(x, y, z)); + return SampleFromVoxels(acc)(Vec3f(x, y, z)); case INTERPOLATION_LINEAR: - return TrilinearSampler(root)(Vec3f(x - 0.5f, y - 0.5f, z - 0.5f)); + return SampleFromVoxels(acc)(Vec3f(x - 0.5f, y - 0.5f, z - 0.5f)); default: - TrilinearSampler s(root); + SampleFromVoxels s(acc); return kernel_tex_image_interp_tricubic_nanovdb(s, x - 0.5f, y - 0.5f, z - 0.5f); } } -- cgit v1.2.3 From b980cd163a9d5d77eeffc2e353333e739fa9e719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Tue, 10 Nov 2020 18:49:50 +0100 Subject: Cycles: fix compilation of OSL shaders following API change The names of the parameters are based on those of those of the sockets, so they also need to be updated. This was forgotten about in the previous commit (rBa284e559b90e). Ref T82561. --- intern/cycles/kernel/shaders/node_clamp.osl | 4 +- .../kernel/shaders/node_gradient_texture.osl | 4 +- intern/cycles/kernel/shaders/node_map_range.osl | 8 +-- intern/cycles/kernel/shaders/node_mapping.osl | 10 +-- intern/cycles/kernel/shaders/node_math.osl | 82 +++++++++++----------- intern/cycles/kernel/shaders/node_mix.osl | 38 +++++----- .../kernel/shaders/node_musgrave_texture.osl | 42 +++++------ intern/cycles/kernel/shaders/node_sky_texture.osl | 8 +-- intern/cycles/kernel/shaders/node_vector_math.osl | 50 ++++++------- .../cycles/kernel/shaders/node_vector_rotate.osl | 10 +-- .../kernel/shaders/node_vector_transform.osl | 8 +-- intern/cycles/kernel/shaders/node_wave_texture.osl | 4 +- 12 files changed, 134 insertions(+), 134 deletions(-) diff --git a/intern/cycles/kernel/shaders/node_clamp.osl b/intern/cycles/kernel/shaders/node_clamp.osl index ce9392a0d98..22a1cac7114 100644 --- a/intern/cycles/kernel/shaders/node_clamp.osl +++ b/intern/cycles/kernel/shaders/node_clamp.osl @@ -16,11 +16,11 @@ #include "stdcycles.h" -shader node_clamp(string type = "minmax", +shader node_clamp(string clamp_type = "minmax", float Value = 1.0, float Min = 0.0, float Max = 1.0, output float Result = 0.0) { - Result = (type == "range" && (Min > Max)) ? clamp(Value, Max, Min) : clamp(Value, Min, Max); + Result = (clamp_type == "range" && (Min > Max)) ? clamp(Value, Max, Min) : clamp(Value, Min, Max); } diff --git a/intern/cycles/kernel/shaders/node_gradient_texture.osl b/intern/cycles/kernel/shaders/node_gradient_texture.osl index e9acebc0572..c7faee0d022 100644 --- a/intern/cycles/kernel/shaders/node_gradient_texture.osl +++ b/intern/cycles/kernel/shaders/node_gradient_texture.osl @@ -62,7 +62,7 @@ float gradient(point p, string type) shader node_gradient_texture( int use_mapping = 0, matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), - string type = "linear", + string gradient_type = "linear", point Vector = P, output float Fac = 0.0, output color Color = 0.0) @@ -72,6 +72,6 @@ shader node_gradient_texture( if (use_mapping) p = transform(mapping, p); - Fac = gradient(p, type); + Fac = gradient(p, gradient_type); Color = color(Fac, Fac, Fac); } diff --git a/intern/cycles/kernel/shaders/node_map_range.osl b/intern/cycles/kernel/shaders/node_map_range.osl index 1c49027e6dd..2fcc664a80e 100644 --- a/intern/cycles/kernel/shaders/node_map_range.osl +++ b/intern/cycles/kernel/shaders/node_map_range.osl @@ -27,7 +27,7 @@ float smootherstep(float edge0, float edge1, float x) return t * t * t * (t * (t * 6.0 - 15.0) + 10.0); } -shader node_map_range(string type = "linear", +shader node_map_range(string range_type = "linear", float Value = 1.0, float FromMin = 0.0, float FromMax = 1.0, @@ -38,15 +38,15 @@ shader node_map_range(string type = "linear", { if (FromMax != FromMin) { float Factor = Value; - if (type == "stepped") { + if (range_type == "stepped") { Factor = (Value - FromMin) / (FromMax - FromMin); Factor = (Steps > 0) ? floor(Factor * (Steps + 1.0)) / Steps : 0.0; } - else if (type == "smoothstep") { + else if (range_type == "smoothstep") { Factor = (FromMin > FromMax) ? 1.0 - smoothstep(FromMax, FromMin, Value) : smoothstep(FromMin, FromMax, Value); } - else if (type == "smootherstep") { + else if (range_type == "smootherstep") { Factor = (FromMin > FromMax) ? 1.0 - smootherstep(FromMax, FromMin, Value) : smootherstep(FromMin, FromMax, Value); } diff --git a/intern/cycles/kernel/shaders/node_mapping.osl b/intern/cycles/kernel/shaders/node_mapping.osl index 8d204999630..131640685bc 100644 --- a/intern/cycles/kernel/shaders/node_mapping.osl +++ b/intern/cycles/kernel/shaders/node_mapping.osl @@ -47,24 +47,24 @@ matrix euler_to_mat(point euler) return mat; } -shader node_mapping(string type = "point", +shader node_mapping(string mapping_type = "point", point VectorIn = point(0.0, 0.0, 0.0), point Location = point(0.0, 0.0, 0.0), point Rotation = point(0.0, 0.0, 0.0), point Scale = point(1.0, 1.0, 1.0), output point VectorOut = point(0.0, 0.0, 0.0)) { - if (type == "point") { + if (mapping_type == "point") { VectorOut = transform(euler_to_mat(Rotation), (VectorIn * Scale)) + Location; } - else if (type == "texture") { + else if (mapping_type == "texture") { VectorOut = safe_divide(transform(transpose(euler_to_mat(Rotation)), (VectorIn - Location)), Scale); } - else if (type == "vector") { + else if (mapping_type == "vector") { VectorOut = transform(euler_to_mat(Rotation), (VectorIn * Scale)); } - else if (type == "normal") { + else if (mapping_type == "normal") { VectorOut = normalize((vector)transform(euler_to_mat(Rotation), safe_divide(VectorIn, Scale))); } else { diff --git a/intern/cycles/kernel/shaders/node_math.osl b/intern/cycles/kernel/shaders/node_math.osl index dbaa7ccb60e..66884610561 100644 --- a/intern/cycles/kernel/shaders/node_math.osl +++ b/intern/cycles/kernel/shaders/node_math.osl @@ -18,91 +18,91 @@ #include "stdcycles.h" /* OSL asin, acos, and pow functions are safe by default. */ -shader node_math(string type = "add", +shader node_math(string math_type = "add", float Value1 = 0.5, float Value2 = 0.5, float Value3 = 0.5, output float Value = 0.0) { - if (type == "add") + if (math_type == "add") Value = Value1 + Value2; - else if (type == "subtract") + else if (math_type == "subtract") Value = Value1 - Value2; - else if (type == "multiply") + else if (math_type == "multiply") Value = Value1 * Value2; - else if (type == "divide") + else if (math_type == "divide") Value = safe_divide(Value1, Value2); - else if (type == "power") + else if (math_type == "power") Value = pow(Value1, Value2); - else if (type == "logarithm") + else if (math_type == "logarithm") Value = safe_log(Value1, Value2); - else if (type == "sqrt") + else if (math_type == "sqrt") Value = safe_sqrt(Value1); - else if (type == "inversesqrt") + else if (math_type == "inversesqrt") Value = inversesqrt(Value1); - else if (type == "absolute") + else if (math_type == "absolute") Value = fabs(Value1); - else if (type == "radians") + else if (math_type == "radians") Value = radians(Value1); - else if (type == "degrees") + else if (math_type == "degrees") Value = degrees(Value1); - else if (type == "minimum") + else if (math_type == "minimum") Value = min(Value1, Value2); - else if (type == "maximum") + else if (math_type == "maximum") Value = max(Value1, Value2); - else if (type == "less_than") + else if (math_type == "less_than") Value = Value1 < Value2; - else if (type == "greater_than") + else if (math_type == "greater_than") Value = Value1 > Value2; - else if (type == "round") + else if (math_type == "round") Value = floor(Value1 + 0.5); - else if (type == "floor") + else if (math_type == "floor") Value = floor(Value1); - else if (type == "ceil") + else if (math_type == "ceil") Value = ceil(Value1); - else if (type == "fraction") + else if (math_type == "fraction") Value = Value1 - floor(Value1); - else if (type == "modulo") + else if (math_type == "modulo") Value = safe_modulo(Value1, Value2); - else if (type == "trunc") + else if (math_type == "trunc") Value = trunc(Value1); - else if (type == "snap") + else if (math_type == "snap") Value = floor(safe_divide(Value1, Value2)) * Value2; - else if (type == "wrap") + else if (math_type == "wrap") Value = wrap(Value1, Value2, Value3); - else if (type == "pingpong") + else if (math_type == "pingpong") Value = pingpong(Value1, Value2); - else if (type == "sine") + else if (math_type == "sine") Value = sin(Value1); - else if (type == "cosine") + else if (math_type == "cosine") Value = cos(Value1); - else if (type == "tangent") + else if (math_type == "tangent") Value = tan(Value1); - else if (type == "sinh") + else if (math_type == "sinh") Value = sinh(Value1); - else if (type == "cosh") + else if (math_type == "cosh") Value = cosh(Value1); - else if (type == "tanh") + else if (math_type == "tanh") Value = tanh(Value1); - else if (type == "arcsine") + else if (math_type == "arcsine") Value = asin(Value1); - else if (type == "arccosine") + else if (math_type == "arccosine") Value = acos(Value1); - else if (type == "arctangent") + else if (math_type == "arctangent") Value = atan(Value1); - else if (type == "arctan2") + else if (math_type == "arctan2") Value = atan2(Value1, Value2); - else if (type == "sign") + else if (math_type == "sign") Value = sign(Value1); - else if (type == "exponent") + else if (math_type == "exponent") Value = exp(Value1); - else if (type == "compare") + else if (math_type == "compare") Value = ((Value1 == Value2) || (abs(Value1 - Value2) <= max(Value3, 1e-5))) ? 1.0 : 0.0; - else if (type == "multiply_add") + else if (math_type == "multiply_add") Value = Value1 * Value2 + Value3; - else if (type == "smoothmin") + else if (math_type == "smoothmin") Value = smoothmin(Value1, Value2, Value3); - else if (type == "smoothmax") + else if (math_type == "smoothmax") Value = -(smoothmin(-Value1, -Value2, Value3)); else warning("%s", "Unknown math operator!"); diff --git a/intern/cycles/kernel/shaders/node_mix.osl b/intern/cycles/kernel/shaders/node_mix.osl index a13b4bb7b96..dcd9f014f3e 100644 --- a/intern/cycles/kernel/shaders/node_mix.osl +++ b/intern/cycles/kernel/shaders/node_mix.osl @@ -279,7 +279,7 @@ color node_mix_clamp(color col) return outcol; } -shader node_mix(string type = "mix", +shader node_mix(string mix_type = "mix", int use_clamp = 0, float Fac = 0.5, color Color1 = 0.0, @@ -288,41 +288,41 @@ shader node_mix(string type = "mix", { float t = clamp(Fac, 0.0, 1.0); - if (type == "mix") + if (mix_type == "mix") Color = node_mix_blend(t, Color1, Color2); - if (type == "add") + if (mix_type == "add") Color = node_mix_add(t, Color1, Color2); - if (type == "multiply") + if (mix_type == "multiply") Color = node_mix_mul(t, Color1, Color2); - if (type == "screen") + if (mix_type == "screen") Color = node_mix_screen(t, Color1, Color2); - if (type == "overlay") + if (mix_type == "overlay") Color = node_mix_overlay(t, Color1, Color2); - if (type == "subtract") + if (mix_type == "subtract") Color = node_mix_sub(t, Color1, Color2); - if (type == "divide") + if (mix_type == "divide") Color = node_mix_div(t, Color1, Color2); - if (type == "difference") + if (mix_type == "difference") Color = node_mix_diff(t, Color1, Color2); - if (type == "darken") + if (mix_type == "darken") Color = node_mix_dark(t, Color1, Color2); - if (type == "lighten") + if (mix_type == "lighten") Color = node_mix_light(t, Color1, Color2); - if (type == "dodge") + if (mix_type == "dodge") Color = node_mix_dodge(t, Color1, Color2); - if (type == "burn") + if (mix_type == "burn") Color = node_mix_burn(t, Color1, Color2); - if (type == "hue") + if (mix_type == "hue") Color = node_mix_hue(t, Color1, Color2); - if (type == "saturation") + if (mix_type == "saturation") Color = node_mix_sat(t, Color1, Color2); - if (type == "value") + if (mix_type == "value") Color = node_mix_val(t, Color1, Color2); - if (type == "color") + if (mix_type == "color") Color = node_mix_color(t, Color1, Color2); - if (type == "soft_light") + if (mix_type == "soft_light") Color = node_mix_soft(t, Color1, Color2); - if (type == "linear_light") + if (mix_type == "linear_light") Color = node_mix_linear(t, Color1, Color2); if (use_clamp) diff --git a/intern/cycles/kernel/shaders/node_musgrave_texture.osl b/intern/cycles/kernel/shaders/node_musgrave_texture.osl index d03b84c1ab4..0e71ce74c29 100644 --- a/intern/cycles/kernel/shaders/node_musgrave_texture.osl +++ b/intern/cycles/kernel/shaders/node_musgrave_texture.osl @@ -684,7 +684,7 @@ float noise_musgrave_ridged_multi_fractal_4d( shader node_musgrave_texture( int use_mapping = 0, matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), - string type = "fBM", + string musgrave_type = "fBM", string dimensions = "3D", point Vector = P, float W = 0.0, @@ -707,21 +707,21 @@ shader node_musgrave_texture( if (dimensions == "1D") { float p = W * Scale; - if (type == "multifractal") { + if (musgrave_type == "multifractal") { Fac = noise_musgrave_multi_fractal_1d(p, dimension, lacunarity, octaves); } - else if (type == "fBM") { + else if (musgrave_type == "fBM") { Fac = noise_musgrave_fBm_1d(p, dimension, lacunarity, octaves); } - else if (type == "hybrid_multifractal") { + else if (musgrave_type == "hybrid_multifractal") { Fac = noise_musgrave_hybrid_multi_fractal_1d( p, dimension, lacunarity, octaves, Offset, Gain); } - else if (type == "ridged_multifractal") { + else if (musgrave_type == "ridged_multifractal") { Fac = noise_musgrave_ridged_multi_fractal_1d( p, dimension, lacunarity, octaves, Offset, Gain); } - else if (type == "hetero_terrain") { + else if (musgrave_type == "hetero_terrain") { Fac = noise_musgrave_hetero_terrain_1d(p, dimension, lacunarity, octaves, Offset); } else { @@ -730,21 +730,21 @@ shader node_musgrave_texture( } else if (dimensions == "2D") { vector2 p = vector2(s[0], s[1]) * Scale; - if (type == "multifractal") { + if (musgrave_type == "multifractal") { Fac = noise_musgrave_multi_fractal_2d(p, dimension, lacunarity, octaves); } - else if (type == "fBM") { + else if (musgrave_type == "fBM") { Fac = noise_musgrave_fBm_2d(p, dimension, lacunarity, octaves); } - else if (type == "hybrid_multifractal") { + else if (musgrave_type == "hybrid_multifractal") { Fac = noise_musgrave_hybrid_multi_fractal_2d( p, dimension, lacunarity, octaves, Offset, Gain); } - else if (type == "ridged_multifractal") { + else if (musgrave_type == "ridged_multifractal") { Fac = noise_musgrave_ridged_multi_fractal_2d( p, dimension, lacunarity, octaves, Offset, Gain); } - else if (type == "hetero_terrain") { + else if (musgrave_type == "hetero_terrain") { Fac = noise_musgrave_hetero_terrain_2d(p, dimension, lacunarity, octaves, Offset); } else { @@ -753,21 +753,21 @@ shader node_musgrave_texture( } else if (dimensions == "3D") { vector3 p = s * Scale; - if (type == "multifractal") { + if (musgrave_type == "multifractal") { Fac = noise_musgrave_multi_fractal_3d(p, dimension, lacunarity, octaves); } - else if (type == "fBM") { + else if (musgrave_type == "fBM") { Fac = noise_musgrave_fBm_3d(p, dimension, lacunarity, octaves); } - else if (type == "hybrid_multifractal") { + else if (musgrave_type == "hybrid_multifractal") { Fac = noise_musgrave_hybrid_multi_fractal_3d( p, dimension, lacunarity, octaves, Offset, Gain); } - else if (type == "ridged_multifractal") { + else if (musgrave_type == "ridged_multifractal") { Fac = noise_musgrave_ridged_multi_fractal_3d( p, dimension, lacunarity, octaves, Offset, Gain); } - else if (type == "hetero_terrain") { + else if (musgrave_type == "hetero_terrain") { Fac = noise_musgrave_hetero_terrain_3d(p, dimension, lacunarity, octaves, Offset); } else { @@ -776,21 +776,21 @@ shader node_musgrave_texture( } else if (dimensions == "4D") { vector4 p = vector4(s[0], s[1], s[2], W) * Scale; - if (type == "multifractal") { + if (musgrave_type == "multifractal") { Fac = noise_musgrave_multi_fractal_4d(p, dimension, lacunarity, octaves); } - else if (type == "fBM") { + else if (musgrave_type == "fBM") { Fac = noise_musgrave_fBm_4d(p, dimension, lacunarity, octaves); } - else if (type == "hybrid_multifractal") { + else if (musgrave_type == "hybrid_multifractal") { Fac = noise_musgrave_hybrid_multi_fractal_4d( p, dimension, lacunarity, octaves, Offset, Gain); } - else if (type == "ridged_multifractal") { + else if (musgrave_type == "ridged_multifractal") { Fac = noise_musgrave_ridged_multi_fractal_4d( p, dimension, lacunarity, octaves, Offset, Gain); } - else if (type == "hetero_terrain") { + else if (musgrave_type == "hetero_terrain") { Fac = noise_musgrave_hetero_terrain_4d(p, dimension, lacunarity, octaves, Offset); } else { diff --git a/intern/cycles/kernel/shaders/node_sky_texture.osl b/intern/cycles/kernel/shaders/node_sky_texture.osl index a12e7a9dc17..43d7bd36973 100644 --- a/intern/cycles/kernel/shaders/node_sky_texture.osl +++ b/intern/cycles/kernel/shaders/node_sky_texture.osl @@ -212,7 +212,7 @@ shader node_sky_texture( int use_mapping = 0, matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), vector Vector = P, - string type = "hosek_wilkie", + string sky_type = "hosek_wilkie", float theta = 0.0, float phi = 0.0, string filename = "", @@ -228,10 +228,10 @@ shader node_sky_texture( if (use_mapping) p = transform(mapping, p); - if (type == "nishita_improved") + if (sky_type == "nishita_improved") Color = sky_radiance_nishita(p, nishita_data, filename); - if (type == "hosek_wilkie") + if (sky_type == "hosek_wilkie") Color = sky_radiance_hosek(p, phi, theta, radiance, config_x, config_y, config_z); - if (type == "preetham") + if (sky_type == "preetham") Color = sky_radiance_preetham(p, phi, theta, radiance, config_x, config_y, config_z); } diff --git a/intern/cycles/kernel/shaders/node_vector_math.osl b/intern/cycles/kernel/shaders/node_vector_math.osl index 218851598b4..30f0b1daf4c 100644 --- a/intern/cycles/kernel/shaders/node_vector_math.osl +++ b/intern/cycles/kernel/shaders/node_vector_math.osl @@ -17,7 +17,7 @@ #include "node_math.h" #include "stdcycles.h" -shader node_vector_math(string type = "add", +shader node_vector_math(string math_type = "add", vector Vector1 = vector(0.0, 0.0, 0.0), vector Vector2 = vector(0.0, 0.0, 0.0), vector Vector3 = vector(0.0, 0.0, 0.0), @@ -25,76 +25,76 @@ shader node_vector_math(string type = "add", output float Value = 0.0, output vector Vector = vector(0.0, 0.0, 0.0)) { - if (type == "add") { + if (math_type == "add") { Vector = Vector1 + Vector2; } - else if (type == "subtract") { + else if (math_type == "subtract") { Vector = Vector1 - Vector2; } - else if (type == "multiply") { + else if (math_type == "multiply") { Vector = Vector1 * Vector2; } - else if (type == "divide") { + else if (math_type == "divide") { Vector = safe_divide(Vector1, Vector2); } - else if (type == "cross_product") { + else if (math_type == "cross_product") { Vector = cross(Vector1, Vector2); } - else if (type == "project") { + else if (math_type == "project") { Vector = project(Vector1, Vector2); } - else if (type == "reflect") { + else if (math_type == "reflect") { Vector = reflect(Vector1, normalize(Vector2)); } - else if (type == "dot_product") { + else if (math_type == "dot_product") { Value = dot(Vector1, Vector2); } - else if (type == "distance") { + else if (math_type == "distance") { Value = distance(Vector1, Vector2); } - else if (type == "length") { + else if (math_type == "length") { Value = length(Vector1); } - else if (type == "scale") { + else if (math_type == "scale") { Vector = Vector1 * Scale; } - else if (type == "normalize") { + else if (math_type == "normalize") { Vector = normalize(Vector1); } - else if (type == "snap") { + else if (math_type == "snap") { Vector = snap(Vector1, Vector2); } - else if (type == "floor") { + else if (math_type == "floor") { Vector = floor(Vector1); } - else if (type == "ceil") { + else if (math_type == "ceil") { Vector = ceil(Vector1); } - else if (type == "modulo") { + else if (math_type == "modulo") { Vector = fmod(Vector1, Vector2); } - else if (type == "wrap") { + else if (math_type == "wrap") { Vector = wrap(Vector1, Vector2, Vector3); } - else if (type == "fraction") { + else if (math_type == "fraction") { Vector = Vector1 - floor(Vector1); } - else if (type == "absolute") { + else if (math_type == "absolute") { Vector = abs(Vector1); } - else if (type == "minimum") { + else if (math_type == "minimum") { Vector = min(Vector1, Vector2); } - else if (type == "maximum") { + else if (math_type == "maximum") { Vector = max(Vector1, Vector2); } - else if (type == "sine") { + else if (math_type == "sine") { Vector = sin(Vector1); } - else if (type == "cosine") { + else if (math_type == "cosine") { Vector = cos(Vector1); } - else if (type == "tangent") { + else if (math_type == "tangent") { Vector = tan(Vector1); } else { diff --git a/intern/cycles/kernel/shaders/node_vector_rotate.osl b/intern/cycles/kernel/shaders/node_vector_rotate.osl index 2efe3470ae2..e99bf7d81b0 100644 --- a/intern/cycles/kernel/shaders/node_vector_rotate.osl +++ b/intern/cycles/kernel/shaders/node_vector_rotate.osl @@ -18,7 +18,7 @@ #include "stdcycles.h" shader node_vector_rotate(int invert = 0, - string type = "axis", + string rotate_type = "axis", vector VectorIn = vector(0.0, 0.0, 0.0), point Center = point(0.0, 0.0, 0.0), point Rotation = point(0.0, 0.0, 0.0), @@ -26,19 +26,19 @@ shader node_vector_rotate(int invert = 0, float Angle = 0.0, output vector VectorOut = vector(0.0, 0.0, 0.0)) { - if (type == "euler_xyz") { + if (rotate_type == "euler_xyz") { matrix rmat = (invert) ? transpose(euler_to_mat(Rotation)) : euler_to_mat(Rotation); VectorOut = transform(rmat, VectorIn - Center) + Center; } else { float a = (invert) ? -Angle : Angle; - if (type == "x_axis") { + if (rotate_type == "x_axis") { VectorOut = rotate(VectorIn - Center, a, point(0.0), vector(1.0, 0.0, 0.0)) + Center; } - else if (type == "y_axis") { + else if (rotate_type == "y_axis") { VectorOut = rotate(VectorIn - Center, a, point(0.0), vector(0.0, 1.0, 0.0)) + Center; } - else if (type == "z_axis") { + else if (rotate_type == "z_axis") { VectorOut = rotate(VectorIn - Center, a, point(0.0), vector(0.0, 0.0, 1.0)) + Center; } else { // axis diff --git a/intern/cycles/kernel/shaders/node_vector_transform.osl b/intern/cycles/kernel/shaders/node_vector_transform.osl index 1db799cfc9e..b71c6ec4824 100644 --- a/intern/cycles/kernel/shaders/node_vector_transform.osl +++ b/intern/cycles/kernel/shaders/node_vector_transform.osl @@ -16,18 +16,18 @@ #include "stdcycles.h" -shader node_vector_transform(string type = "vector", +shader node_vector_transform(string transform_type = "vector", string convert_from = "world", string convert_to = "object", vector VectorIn = vector(0.0, 0.0, 0.0), output vector VectorOut = vector(0.0, 0.0, 0.0)) { - if (type == "vector" || type == "normal") { + if (transform_type == "vector" || transform_type == "normal") { VectorOut = transform(convert_from, convert_to, VectorIn); - if (type == "normal") + if (transform_type == "normal") VectorOut = normalize(VectorOut); } - else if (type == "point") { + else if (transform_type == "point") { point Point = (point)VectorIn; VectorOut = transform(convert_from, convert_to, Point); } diff --git a/intern/cycles/kernel/shaders/node_wave_texture.osl b/intern/cycles/kernel/shaders/node_wave_texture.osl index 874bfb8d3af..71d81dff7ec 100644 --- a/intern/cycles/kernel/shaders/node_wave_texture.osl +++ b/intern/cycles/kernel/shaders/node_wave_texture.osl @@ -86,7 +86,7 @@ float wave(point p_input, shader node_wave_texture(int use_mapping = 0, matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), - string type = "bands", + string wave_type = "bands", string bands_direction = "x", string rings_direction = "x", string profile = "sine", @@ -106,7 +106,7 @@ shader node_wave_texture(int use_mapping = 0, p = transform(mapping, p); Fac = wave(p * Scale, - type, + wave_type, bands_direction, rings_direction, profile, -- cgit v1.2.3 From 86bdd2acc66c95c3698525ab3d5d6263cc1b825c Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Tue, 10 Nov 2020 13:23:55 -0700 Subject: Windows: Fix build issue with VCPKG For blender we disable VCPKG to prevent it from picking up the wrong libraries from VCPKG rather than our lib folder some of the cycles tests needed this to link correctly. reported by @alef on chat --- build_files/cmake/Modules/GTestTesting.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake index 2e45f253a9a..6406dd6aa28 100644 --- a/build_files/cmake/Modules/GTestTesting.cmake +++ b/build_files/cmake/Modules/GTestTesting.cmake @@ -97,6 +97,7 @@ macro(BLENDER_SRC_GTEST_EX) set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0) endif() if(WIN32) + set_target_properties(${TARGET_NAME} PROPERTIES VS_GLOBAL_VcpkgEnabled "false") unset(MANIFEST) endif() unset(TEST_INC) -- cgit v1.2.3 From cd9acfed4f7674b84be965d469a367aef96f8af3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 08:36:54 +1100 Subject: Cleanup: use preprocessor version check for PyTypeObject declaration While `tp_print` was deprecated, Python 3.8+ uses this for 'tp_vectorcall_offset' which wasn't stated in the comment from efd71aad4f22ec0073d80b8dd296015d3f395aa8. Instead of suppressing clang-tidy, use preprocessor a check since this properly represents the difference between Python versions. --- .../blender/freestyle/intern/python/BPy_BBox.cpp | 8 ++-- .../intern/python/BPy_BinaryPredicate0D.cpp | 8 ++-- .../intern/python/BPy_BinaryPredicate1D.cpp | 8 ++-- .../freestyle/intern/python/BPy_FrsMaterial.cpp | 8 ++-- .../freestyle/intern/python/BPy_FrsNoise.cpp | 8 ++-- source/blender/freestyle/intern/python/BPy_Id.cpp | 8 ++-- .../intern/python/BPy_IntegrationType.cpp | 8 ++-- .../freestyle/intern/python/BPy_Interface0D.cpp | 8 ++-- .../freestyle/intern/python/BPy_Interface1D.cpp | 8 ++-- .../freestyle/intern/python/BPy_Iterator.cpp | 8 ++-- .../freestyle/intern/python/BPy_MediumType.cpp | 8 ++-- .../blender/freestyle/intern/python/BPy_Nature.cpp | 8 ++-- .../freestyle/intern/python/BPy_Operators.cpp | 8 ++-- .../blender/freestyle/intern/python/BPy_SShape.cpp | 8 ++-- .../intern/python/BPy_StrokeAttribute.cpp | 8 ++-- .../freestyle/intern/python/BPy_StrokeShader.cpp | 8 ++-- .../intern/python/BPy_UnaryFunction0D.cpp | 8 ++-- .../intern/python/BPy_UnaryFunction1D.cpp | 8 ++-- .../intern/python/BPy_UnaryPredicate0D.cpp | 8 ++-- .../intern/python/BPy_UnaryPredicate1D.cpp | 8 ++-- .../freestyle/intern/python/BPy_ViewMap.cpp | 8 ++-- .../freestyle/intern/python/BPy_ViewShape.cpp | 8 ++-- .../python/BinaryPredicate1D/BPy_FalseBP1D.cpp | 8 ++-- .../python/BinaryPredicate1D/BPy_Length2DBP1D.cpp | 8 ++-- .../BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp | 8 ++-- .../python/BinaryPredicate1D/BPy_TrueBP1D.cpp | 8 ++-- .../BPy_ViewMapGradientNormBP1D.cpp | 8 ++-- .../intern/python/Interface0D/BPy_CurvePoint.cpp | 8 ++-- .../intern/python/Interface0D/BPy_SVertex.cpp | 8 ++-- .../intern/python/Interface0D/BPy_ViewVertex.cpp | 8 ++-- .../Interface0D/CurvePoint/BPy_StrokeVertex.cpp | 8 ++-- .../Interface0D/ViewVertex/BPy_NonTVertex.cpp | 8 ++-- .../python/Interface0D/ViewVertex/BPy_TVertex.cpp | 8 ++-- .../intern/python/Interface1D/BPy_FEdge.cpp | 8 ++-- .../intern/python/Interface1D/BPy_FrsCurve.cpp | 8 ++-- .../intern/python/Interface1D/BPy_Stroke.cpp | 8 ++-- .../intern/python/Interface1D/BPy_ViewEdge.cpp | 8 ++-- .../intern/python/Interface1D/Curve/BPy_Chain.cpp | 8 ++-- .../python/Interface1D/FEdge/BPy_FEdgeSharp.cpp | 8 ++-- .../python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 8 ++-- .../python/Iterator/BPy_AdjacencyIterator.cpp | 8 ++-- .../python/Iterator/BPy_ChainPredicateIterator.cpp | 8 ++-- .../Iterator/BPy_ChainSilhouetteIterator.cpp | 8 ++-- .../python/Iterator/BPy_ChainingIterator.cpp | 8 ++-- .../python/Iterator/BPy_CurvePointIterator.cpp | 8 ++-- .../python/Iterator/BPy_Interface0DIterator.cpp | 8 ++-- .../intern/python/Iterator/BPy_SVertexIterator.cpp | 8 ++-- .../python/Iterator/BPy_StrokeVertexIterator.cpp | 8 ++-- .../python/Iterator/BPy_ViewEdgeIterator.cpp | 8 ++-- .../Iterator/BPy_orientedViewEdgeIterator.cpp | 8 ++-- .../StrokeShader/BPy_BackboneStretcherShader.cpp | 8 ++-- .../python/StrokeShader/BPy_BezierCurveShader.cpp | 8 ++-- .../StrokeShader/BPy_BlenderTextureShader.cpp | 8 ++-- .../python/StrokeShader/BPy_CalligraphicShader.cpp | 8 ++-- .../python/StrokeShader/BPy_ColorNoiseShader.cpp | 8 ++-- .../StrokeShader/BPy_ConstantColorShader.cpp | 8 ++-- .../StrokeShader/BPy_ConstantThicknessShader.cpp | 8 ++-- .../BPy_ConstrainedIncreasingThicknessShader.cpp | 8 ++-- .../python/StrokeShader/BPy_GuidingLinesShader.cpp | 8 ++-- .../StrokeShader/BPy_IncreasingColorShader.cpp | 8 ++-- .../StrokeShader/BPy_IncreasingThicknessShader.cpp | 8 ++-- .../StrokeShader/BPy_PolygonalizationShader.cpp | 8 ++-- .../python/StrokeShader/BPy_SamplingShader.cpp | 8 ++-- .../python/StrokeShader/BPy_SmoothingShader.cpp | 8 ++-- .../python/StrokeShader/BPy_SpatialNoiseShader.cpp | 8 ++-- .../StrokeShader/BPy_StrokeTextureStepShader.cpp | 8 ++-- .../StrokeShader/BPy_ThicknessNoiseShader.cpp | 8 ++-- .../python/StrokeShader/BPy_TipRemoverShader.cpp | 8 ++-- .../UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp | 8 ++-- .../BPy_UnaryFunction0DEdgeNature.cpp | 8 ++-- .../UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp | 8 ++-- .../UnaryFunction0D/BPy_UnaryFunction0DId.cpp | 8 ++-- .../BPy_UnaryFunction0DMaterial.cpp | 8 ++-- .../BPy_UnaryFunction0DUnsigned.cpp | 8 ++-- .../UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp | 8 ++-- .../UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp | 8 ++-- .../BPy_UnaryFunction0DVectorViewShape.cpp | 8 ++-- .../BPy_UnaryFunction0DViewShape.cpp | 8 ++-- .../UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp | 8 ++-- .../UnaryFunction0D_Material/BPy_MaterialF0D.cpp | 8 ++-- .../BPy_CurveNatureF0D.cpp | 8 ++-- .../UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp | 8 ++-- .../BPy_VertexOrientation2DF0D.cpp | 8 ++-- .../BPy_VertexOrientation3DF0D.cpp | 8 ++-- .../BPy_GetOccludeeF0D.cpp | 8 ++-- .../UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp | 8 ++-- .../BPy_Curvature2DAngleF0D.cpp | 8 ++-- .../UnaryFunction0D_double/BPy_DensityF0D.cpp | 8 ++-- .../BPy_GetProjectedXF0D.cpp | 8 ++-- .../BPy_GetProjectedYF0D.cpp | 8 ++-- .../BPy_GetProjectedZF0D.cpp | 8 ++-- .../UnaryFunction0D_double/BPy_GetXF0D.cpp | 8 ++-- .../UnaryFunction0D_double/BPy_GetYF0D.cpp | 8 ++-- .../UnaryFunction0D_double/BPy_GetZF0D.cpp | 8 ++-- .../BPy_LocalAverageDepthF0D.cpp | 8 ++-- .../BPy_ZDiscontinuityF0D.cpp | 8 ++-- .../BPy_GetCurvilinearAbscissaF0D.cpp | 8 ++-- .../UnaryFunction0D_float/BPy_GetParameterF0D.cpp | 8 ++-- .../BPy_GetViewMapGradientNormF0D.cpp | 8 ++-- .../BPy_ReadCompleteViewMapPixelF0D.cpp | 8 ++-- .../UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp | 8 ++-- .../BPy_ReadSteerableViewMapPixelF0D.cpp | 8 ++-- .../BPy_QuantitativeInvisibilityF0D.cpp | 8 ++-- .../BPy_GetOccludersF0D.cpp | 8 ++-- .../UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp | 8 ++-- .../BPy_UnaryFunction1DEdgeNature.cpp | 8 ++-- .../UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp | 8 ++-- .../BPy_UnaryFunction1DUnsigned.cpp | 8 ++-- .../UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp | 8 ++-- .../UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp | 8 ++-- .../BPy_UnaryFunction1DVectorViewShape.cpp | 8 ++-- .../UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp | 8 ++-- .../BPy_CurveNatureF1D.cpp | 8 ++-- .../UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp | 8 ++-- .../UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp | 8 ++-- .../UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp | 8 ++-- .../BPy_Curvature2DAngleF1D.cpp | 8 ++-- .../UnaryFunction1D_double/BPy_DensityF1D.cpp | 8 ++-- .../BPy_GetCompleteViewMapDensityF1D.cpp | 8 ++-- .../BPy_GetDirectionalViewMapDensityF1D.cpp | 8 ++-- .../BPy_GetProjectedXF1D.cpp | 8 ++-- .../BPy_GetProjectedYF1D.cpp | 8 ++-- .../BPy_GetProjectedZF1D.cpp | 8 ++-- .../BPy_GetSteerableViewMapDensityF1D.cpp | 8 ++-- .../BPy_GetViewMapGradientNormF1D.cpp | 8 ++-- .../UnaryFunction1D_double/BPy_GetXF1D.cpp | 8 ++-- .../UnaryFunction1D_double/BPy_GetYF1D.cpp | 8 ++-- .../UnaryFunction1D_double/BPy_GetZF1D.cpp | 8 ++-- .../BPy_LocalAverageDepthF1D.cpp | 8 ++-- .../BPy_ZDiscontinuityF1D.cpp | 8 ++-- .../BPy_QuantitativeInvisibilityF1D.cpp | 8 ++-- .../BPy_GetOccludeeF1D.cpp | 8 ++-- .../BPy_GetOccludersF1D.cpp | 8 ++-- .../BPy_GetShapeF1D.cpp | 8 ++-- .../BPy_ChainingTimeStampF1D.cpp | 8 ++-- .../BPy_IncrementChainingTimeStampF1D.cpp | 8 ++-- .../UnaryFunction1D_void/BPy_TimeStampF1D.cpp | 8 ++-- .../python/UnaryPredicate0D/BPy_FalseUP0D.cpp | 8 ++-- .../python/UnaryPredicate0D/BPy_TrueUP0D.cpp | 8 ++-- .../python/UnaryPredicate1D/BPy_ContourUP1D.cpp | 8 ++-- .../UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp | 8 ++-- .../BPy_EqualToChainingTimeStampUP1D.cpp | 8 ++-- .../UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp | 8 ++-- .../UnaryPredicate1D/BPy_ExternalContourUP1D.cpp | 8 ++-- .../python/UnaryPredicate1D/BPy_FalseUP1D.cpp | 8 ++-- .../BPy_QuantitativeInvisibilityUP1D.cpp | 8 ++-- .../python/UnaryPredicate1D/BPy_ShapeUP1D.cpp | 8 ++-- .../python/UnaryPredicate1D/BPy_TrueUP1D.cpp | 8 ++-- .../BPy_WithinImageBoundaryUP1D.cpp | 8 ++-- source/blender/python/bmesh/bmesh_py_ops.c | 6 ++- source/blender/python/generic/idprop_py_api.c | 18 ++++++-- source/blender/python/generic/imbuf_py_api.c | 6 ++- .../blender/python/intern/bpy_app_translations.c | 6 ++- source/blender/python/intern/bpy_library_load.c | 6 ++- source/blender/python/intern/bpy_rna.c | 48 ++++++++++++++++++---- source/blender/python/mathutils/mathutils_Vector.c | 6 ++- 156 files changed, 825 insertions(+), 463 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp index 4e0da4e87cf..d66a74bc83f 100644 --- a/source/blender/freestyle/intern/python/BPy_BBox.cpp +++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp @@ -80,9 +80,11 @@ PyTypeObject BBox_Type = { sizeof(BPy_BBox), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BBox_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index 8f4718e774f..2359d79f7d0 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -153,9 +153,11 @@ PyTypeObject BinaryPredicate0D_Type = { sizeof(BPy_BinaryPredicate0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 31500186ab4..7d554e0abe1 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -187,9 +187,11 @@ PyTypeObject BinaryPredicate1D_Type = { sizeof(BPy_BinaryPredicate1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index bb0dbb02049..2aa08ec3ab5 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -538,9 +538,11 @@ PyTypeObject FrsMaterial_Type = { sizeof(BPy_FrsMaterial), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)FrsMaterial_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp index ebea140b9b5..943a9ca0e64 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp @@ -330,9 +330,11 @@ PyTypeObject FrsNoise_Type = { sizeof(BPy_FrsNoise), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)FrsNoise_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp index 515f6525648..323e76fe249 100644 --- a/source/blender/freestyle/intern/python/BPy_Id.cpp +++ b/source/blender/freestyle/intern/python/BPy_Id.cpp @@ -171,9 +171,11 @@ PyTypeObject Id_Type = { sizeof(BPy_Id), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Id_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp index 2cceedbbb28..25f3c54ea7d 100644 --- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp @@ -153,9 +153,11 @@ PyTypeObject IntegrationType_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index 5a7d38055f1..3d0c57d5509 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -313,9 +313,11 @@ PyTypeObject Interface0D_Type = { sizeof(BPy_Interface0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Interface0D_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 8225076397c..8a4a6eb61db 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -341,9 +341,11 @@ PyTypeObject Interface1D_Type = { sizeof(BPy_Interface1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Interface1D_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index 4a6f56f8f8c..bee30aa9e8c 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -228,9 +228,11 @@ PyTypeObject Iterator_Type = { sizeof(BPy_Iterator), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Iterator_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp index 1a568913d74..547f46839b8 100644 --- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp +++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp @@ -45,9 +45,11 @@ PyTypeObject MediumType_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp index c9e03459126..b0a620803d1 100644 --- a/source/blender/freestyle/intern/python/BPy_Nature.cpp +++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp @@ -107,9 +107,11 @@ PyTypeObject Nature_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index a4ee0db7093..5fd02e4a9dd 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -770,9 +770,11 @@ PyTypeObject Operators_Type = { sizeof(BPy_Operators), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Operators_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index b25178de0c9..ed83e76559f 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -281,9 +281,11 @@ PyTypeObject SShape_Type = { sizeof(BPy_SShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SShape_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index 247e78542d5..8f706f56f7d 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -677,9 +677,11 @@ PyTypeObject StrokeAttribute_Type = { sizeof(BPy_StrokeAttribute), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)StrokeAttribute_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index 597eccda1f9..b55da256c22 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -282,9 +282,11 @@ PyTypeObject StrokeShader_Type = { sizeof(BPy_StrokeShader), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)StrokeShader___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index 47742e39c5c..78c93ddce31 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -124,9 +124,11 @@ PyTypeObject UnaryFunction0D_Type = { sizeof(BPy_UnaryFunction0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index 9793f25fc07..365850b748c 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -118,9 +118,11 @@ PyTypeObject UnaryFunction1D_Type = { sizeof(BPy_UnaryFunction1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index 848ae19b4a4..e3076d4615f 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -167,9 +167,11 @@ PyTypeObject UnaryPredicate0D_Type = { sizeof(BPy_UnaryPredicate0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index 969226ebd8a..4b5269a1434 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -225,9 +225,11 @@ PyTypeObject UnaryPredicate1D_Type = { sizeof(BPy_UnaryPredicate1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp index 382064ffc7a..8565a95fc1a 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp @@ -184,9 +184,11 @@ PyTypeObject ViewMap_Type = { sizeof(BPy_ViewMap), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ViewMap_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp index 84a18c2203e..6c8551867fd 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -352,9 +352,11 @@ PyTypeObject ViewShape_Type = { sizeof(BPy_ViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ViewShape_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp index 19062cd0048..e284f28cd0b 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp @@ -59,9 +59,11 @@ PyTypeObject FalseBP1D_Type = { sizeof(BPy_FalseBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp index 59b25a037dc..2c84f69dd6e 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp @@ -61,9 +61,11 @@ PyTypeObject Length2DBP1D_Type = { sizeof(BPy_Length2DBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp index f422e37776f..ab79ae4e209 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp @@ -60,9 +60,11 @@ PyTypeObject SameShapeIdBP1D_Type = { sizeof(BPy_SameShapeIdBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp index a3fe6945b71..47c3c6b53aa 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp @@ -60,9 +60,11 @@ PyTypeObject TrueBP1D_Type = { sizeof(BPy_TrueBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index 9fc66e571a7..9d69b1c902c 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -90,9 +90,11 @@ PyTypeObject ViewMapGradientNormBP1D_Type = { sizeof(BPy_ViewMapGradientNormBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index a3229667cb7..f70f70275df 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -242,9 +242,11 @@ PyTypeObject CurvePoint_Type = { sizeof(BPy_CurvePoint), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index e1f9a588e62..b245ecd81f1 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -455,9 +455,11 @@ PyTypeObject SVertex_Type = { sizeof(BPy_SVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index e565575dee1..696b3022e85 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -164,9 +164,11 @@ PyTypeObject ViewVertex_Type = { sizeof(BPy_ViewVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 827dc22231e..5e63e190356 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -361,9 +361,11 @@ PyTypeObject StrokeVertex_Type = { sizeof(BPy_StrokeVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 c0b8dfafba8..ed10f3e0af5 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp @@ -109,9 +109,11 @@ PyTypeObject NonTVertex_Type = { sizeof(BPy_NonTVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 ec23c8f46fe..596eec7a4e5 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp @@ -219,9 +219,11 @@ PyTypeObject TVertex_Type = { sizeof(BPy_TVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index f5c2c91da6c..0438abfd38c 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -358,9 +358,11 @@ PyTypeObject FEdge_Type = { sizeof(BPy_FEdge), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp index 4420ce02ced..d77a8007b1a 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp @@ -190,9 +190,11 @@ PyTypeObject FrsCurve_Type = { sizeof(BPy_FrsCurve), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 49d6896c2da..90cc3e4f1ab 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -501,9 +501,11 @@ PyTypeObject Stroke_Type = { sizeof(BPy_Stroke), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp index a8102add2c1..c416d860c77 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -386,9 +386,11 @@ PyTypeObject ViewEdge_Type = { sizeof(BPy_ViewEdge), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 951df52f03a..dcf6c149b7d 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp @@ -150,9 +150,11 @@ PyTypeObject Chain_Type = { sizeof(BPy_Chain), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 e430edadd5f..454a2bb1c0f 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -408,9 +408,11 @@ PyTypeObject FEdgeSharp_Type = { sizeof(BPy_FEdgeSharp), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 962dd95b866..c0d56ec949c 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -253,9 +253,11 @@ PyTypeObject FEdgeSmooth_Type = { sizeof(BPy_FEdgeSmooth), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index b3bdcabcfb0..9f5f8d07e26 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -186,9 +186,11 @@ PyTypeObject AdjacencyIterator_Type = { sizeof(BPy_AdjacencyIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index ef6d2fd8944..e4cd1cd073b 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -167,9 +167,11 @@ PyTypeObject ChainPredicateIterator_Type = { sizeof(BPy_ChainPredicateIterator), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ChainPredicateIterator_dealloc, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index 6f442eb0c10..9aa8984f4af 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -121,9 +121,11 @@ PyTypeObject ChainSilhouetteIterator_Type = { sizeof(BPy_ChainSilhouetteIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index f2a485964a0..f2441fa9d18 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -255,9 +255,11 @@ PyTypeObject ChainingIterator_Type = { sizeof(BPy_ChainingIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index e50d60002a9..ff710e931d4 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -135,9 +135,11 @@ PyTypeObject CurvePointIterator_Type = { sizeof(BPy_CurvePointIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index 557436935d0..d0de53fa424 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -210,9 +210,11 @@ PyTypeObject Interface0DIterator_Type = { sizeof(BPy_Interface0DIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp index 95def64989c..c0db79858b7 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -162,9 +162,11 @@ PyTypeObject SVertexIterator_Type = { sizeof(BPy_SVertexIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 8549e81a9b8..ceb0d2a7546 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -293,9 +293,11 @@ PyTypeObject StrokeVertexIterator_Type = { sizeof(BPy_StrokeVertexIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index b515d3b9564..e01bbe928ce 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -240,9 +240,11 @@ PyTypeObject ViewEdgeIterator_Type = { sizeof(BPy_ViewEdgeIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index 3cc73820177..735746e33be 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -144,9 +144,11 @@ PyTypeObject orientedViewEdgeIterator_Type = { sizeof(BPy_orientedViewEdgeIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp index 842981446b9..c3b98d12918 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp @@ -71,9 +71,11 @@ PyTypeObject BackboneStretcherShader_Type = { sizeof(BPy_BackboneStretcherShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp index a04d8f4f3e1..50fc9938a87 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp @@ -71,9 +71,11 @@ PyTypeObject BezierCurveShader_Type = { sizeof(BPy_BezierCurveShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp index 38ecfb64f4f..e1198266a98 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp @@ -91,9 +91,11 @@ PyTypeObject BlenderTextureShader_Type = { sizeof(BPy_BlenderTextureShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp index db60c5b9db9..e8790df2dd0 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp @@ -89,9 +89,11 @@ PyTypeObject CalligraphicShader_Type = { sizeof(BPy_CalligraphicShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp index d05c11db5e6..8fb6e26d8d7 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp @@ -70,9 +70,11 @@ PyTypeObject ColorNoiseShader_Type = { sizeof(BPy_ColorNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp index 7b13441380f..2b108226e90 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp @@ -76,9 +76,11 @@ PyTypeObject ConstantColorShader_Type = { sizeof(BPy_ConstantColorShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp index fe00b621d74..0174107f27f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp @@ -70,9 +70,11 @@ PyTypeObject ConstantThicknessShader_Type = { sizeof(BPy_ConstantThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp index 3a0f02ea9a3..b5c200c17b1 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp @@ -76,9 +76,11 @@ PyTypeObject ConstrainedIncreasingThicknessShader_Type = { sizeof(BPy_ConstrainedIncreasingThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp index b266aee1fe8..d1c3219b079 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp @@ -78,9 +78,11 @@ PyTypeObject GuidingLinesShader_Type = { sizeof(BPy_GuidingLinesShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp index b400c9b5414..7d1efebe71f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp @@ -98,9 +98,11 @@ PyTypeObject IncreasingColorShader_Type = { sizeof(BPy_IncreasingColorShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp index 14014dbc394..f13930bd4b3 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp @@ -76,9 +76,11 @@ PyTypeObject IncreasingThicknessShader_Type = { sizeof(BPy_IncreasingThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp index 838622ad624..48c63554f06 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp @@ -77,9 +77,11 @@ PyTypeObject PolygonalizationShader_Type = { sizeof(BPy_PolygonalizationShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp index 27ab73a6b65..5f0a0bfb305 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp @@ -68,9 +68,11 @@ PyTypeObject SamplingShader_Type = { sizeof(BPy_SamplingShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp index 3545a29f337..3d30fb4e11b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp @@ -100,9 +100,11 @@ PyTypeObject SmoothingShader_Type = { sizeof(BPy_SmoothingShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp index 129ad9cb735..876dd5f2f63 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp @@ -94,9 +94,11 @@ PyTypeObject SpatialNoiseShader_Type = { sizeof(BPy_SpatialNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp index 26683a57ea1..bd70d41717b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp @@ -70,9 +70,11 @@ PyTypeObject StrokeTextureStepShader_Type = { sizeof(BPy_StrokeTextureStepShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp index 8b02ea4322a..fd7f5fabe77 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp @@ -72,9 +72,11 @@ PyTypeObject ThicknessNoiseShader_Type = { sizeof(BPy_ThicknessNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp index b433a75f2e4..ed575b12b8d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp @@ -69,9 +69,11 @@ PyTypeObject TipRemoverShader_Type = { sizeof(BPy_TipRemoverShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index 61a6e68c59f..5ce96212031 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -187,9 +187,11 @@ PyTypeObject UnaryFunction0DDouble_Type = { sizeof(BPy_UnaryFunction0DDouble), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index a1304e0f7b2..8c988d55c91 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -126,9 +126,11 @@ PyTypeObject UnaryFunction0DEdgeNature_Type = { sizeof(BPy_UnaryFunction0DEdgeNature), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index 2cef1302d94..25b19e84b60 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -163,9 +163,11 @@ PyTypeObject UnaryFunction0DFloat_Type = { sizeof(BPy_UnaryFunction0DFloat), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index c34c9beded6..b2426cab572 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -122,9 +122,11 @@ PyTypeObject UnaryFunction0DId_Type = { sizeof(BPy_UnaryFunction0DId), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index 68170329238..77f89265ba4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -125,9 +125,11 @@ PyTypeObject UnaryFunction0DMaterial_Type = { sizeof(BPy_UnaryFunction0DMaterial), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index 7ecb40592a9..52f990502ef 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -126,9 +126,11 @@ PyTypeObject UnaryFunction0DUnsigned_Type = { sizeof(BPy_UnaryFunction0DUnsigned), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index 2d4e5fe566e..45e1144cd32 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -131,9 +131,11 @@ PyTypeObject UnaryFunction0DVec2f_Type = { sizeof(BPy_UnaryFunction0DVec2f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index 9e591b03703..18eeae86dd7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -124,9 +124,11 @@ PyTypeObject UnaryFunction0DVec3f_Type = { sizeof(BPy_UnaryFunction0DVec3f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 3a6c6f0117f..28c4425b2a4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -135,9 +135,11 @@ PyTypeObject UnaryFunction0DVectorViewShape_Type = { sizeof(BPy_UnaryFunction0DVectorViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index 1cf47960cdb..75773aaa8d0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -133,9 +133,11 @@ PyTypeObject UnaryFunction0DViewShape_Type = { sizeof(BPy_UnaryFunction0DViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 379b909e382..b59e72e23d2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp @@ -74,9 +74,11 @@ PyTypeObject ShapeIdF0D_Type = { sizeof(BPy_ShapeIdF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 75c497aa1a7..9f7f2b234f7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp @@ -77,9 +77,11 @@ PyTypeObject MaterialF0D_Type = { sizeof(BPy_MaterialF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 802087438d7..1cd1a4ab8ac 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp @@ -68,9 +68,11 @@ PyTypeObject CurveNatureF0D_Type = { sizeof(BPy_CurveNatureF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 c2338510b2f..60cfed83713 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp @@ -70,9 +70,11 @@ PyTypeObject Normal2DF0D_Type = { sizeof(BPy_Normal2DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 a30e3472742..063f1651486 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp @@ -72,9 +72,11 @@ PyTypeObject VertexOrientation2DF0D_Type = { sizeof(BPy_VertexOrientation2DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 f28f8b0dd02..b0188cd0244 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp @@ -72,9 +72,11 @@ PyTypeObject VertexOrientation3DF0D_Type = { sizeof(BPy_VertexOrientation3DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 91c5eb6d17d..ba890477782 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetOccludeeF0D_Type = { sizeof(BPy_GetOccludeeF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 e362a6be0d3..531020dc32a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetShapeF0D_Type = { sizeof(BPy_GetShapeF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 2e837d7e601..cb36e388306 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp @@ -72,9 +72,11 @@ PyTypeObject Curvature2DAngleF0D_Type = { sizeof(BPy_Curvature2DAngleF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 e4d3f88e261..ca306a55d1e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp @@ -77,9 +77,11 @@ PyTypeObject DensityF0D_Type = { sizeof(BPy_DensityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 09ae5751e5b..6a688212239 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetProjectedXF0D_Type = { sizeof(BPy_GetProjectedXF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 b54ea8e3495..8efaaf1b699 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetProjectedYF0D_Type = { sizeof(BPy_GetProjectedYF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 cb7640c3a15..e13c990685f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetProjectedZF0D_Type = { sizeof(BPy_GetProjectedZF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 914af1847f6..43cbb433bdd 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetXF0D_Type = { sizeof(BPy_GetXF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 d7c8ca7d9c9..24bfe3be985 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetYF0D_Type = { sizeof(BPy_GetYF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 b59929ec87a..84a985a134d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetZF0D_Type = { sizeof(BPy_GetZF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 8643f6f26c7..247473dcb41 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp @@ -75,9 +75,11 @@ PyTypeObject LocalAverageDepthF0D_Type = { sizeof(BPy_LocalAverageDepthF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 d5fd9295566..e82b5f1c557 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp @@ -72,9 +72,11 @@ PyTypeObject ZDiscontinuityF0D_Type = { sizeof(BPy_ZDiscontinuityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 2696a7f4186..b4760d10b2c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp @@ -70,9 +70,11 @@ PyTypeObject GetCurvilinearAbscissaF0D_Type = { sizeof(BPy_GetCurvilinearAbscissaF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 ba5d7e641e7..d4c735e3572 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp @@ -66,9 +66,11 @@ PyTypeObject GetParameterF0D_Type = { sizeof(BPy_GetParameterF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 9dae36028cb..6d5f1ed80c3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp @@ -75,9 +75,11 @@ PyTypeObject GetViewMapGradientNormF0D_Type = { sizeof(BPy_GetViewMapGradientNormF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 3ed7f969de9..bbf2aee5204 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp @@ -73,9 +73,11 @@ PyTypeObject ReadCompleteViewMapPixelF0D_Type = { sizeof(BPy_ReadCompleteViewMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 1507ed30eb1..54401153d37 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp @@ -74,9 +74,11 @@ PyTypeObject ReadMapPixelF0D_Type = { sizeof(BPy_ReadMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 39e84fcade3..88ca0579870 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp @@ -77,9 +77,11 @@ PyTypeObject ReadSteerableViewMapPixelF0D_Type = { sizeof(BPy_ReadSteerableViewMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 ae1971bf9b9..d6e00988e68 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp @@ -75,9 +75,11 @@ PyTypeObject QuantitativeInvisibilityF0D_Type = { sizeof(BPy_QuantitativeInvisibilityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 96390bc8058..ddff11d7916 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp @@ -68,9 +68,11 @@ PyTypeObject GetOccludersF0D_Type = { sizeof(BPy_GetOccludersF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index 75631c0b44f..57b2d61d5c1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -268,9 +268,11 @@ PyTypeObject UnaryFunction1DDouble_Type = { sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index f4a3b1cddf0..a987dbb67f5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -175,9 +175,11 @@ PyTypeObject UnaryFunction1DEdgeNature_Type = { sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index faac4170d4c..66499c68c65 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -164,9 +164,11 @@ PyTypeObject UnaryFunction1DFloat_Type = { sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index f82af0f76a1..54c5c786367 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -175,9 +175,11 @@ PyTypeObject UnaryFunction1DUnsigned_Type = { sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index 4efc7edd00a..8b23163fc95 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -179,9 +179,11 @@ PyTypeObject UnaryFunction1DVec2f_Type = { sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index af8ceb10126..9b6a2445588 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -172,9 +172,11 @@ PyTypeObject UnaryFunction1DVec3f_Type = { sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index 0fd455ca2fe..c95595dc953 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -200,9 +200,11 @@ PyTypeObject UnaryFunction1DVectorViewShape_Type = { sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index 9cf47f7ccd3..b258b0b27f7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -187,9 +187,11 @@ PyTypeObject UnaryFunction1DVoid_Type = { sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 f9118f2d8bd..205820d9a92 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp @@ -80,9 +80,11 @@ PyTypeObject CurveNatureF1D_Type = { sizeof(BPy_CurveNatureF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 0155dff0428..d22a1ec99ef 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp @@ -74,9 +74,11 @@ PyTypeObject Normal2DF1D_Type = { sizeof(BPy_Normal2DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 0e3fead3cea..f66bd4c668f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp @@ -74,9 +74,11 @@ PyTypeObject Orientation2DF1D_Type = { sizeof(BPy_Orientation2DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 f479b9bac37..2f408d45b74 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp @@ -74,9 +74,11 @@ PyTypeObject Orientation3DF1D_Type = { sizeof(BPy_Orientation3DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 754265f1614..13455eb3a4c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp @@ -75,9 +75,11 @@ PyTypeObject Curvature2DAngleF1D_Type = { sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 46b73ab6411..fcf2bebc161 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp @@ -88,9 +88,11 @@ PyTypeObject DensityF1D_Type = { sizeof(BPy_DensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 67439056723..5c352c670c1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp @@ -92,9 +92,11 @@ PyTypeObject GetCompleteViewMapDensityF1D_Type = { sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 53df6f56911..45c6a1b0fb7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp @@ -99,9 +99,11 @@ PyTypeObject GetDirectionalViewMapDensityF1D_Type = { sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 5f24bc78840..0c7276a13ec 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp @@ -74,9 +74,11 @@ PyTypeObject GetProjectedXF1D_Type = { sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 6243d07ab4b..1f1c01a5344 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp @@ -74,9 +74,11 @@ PyTypeObject GetProjectedYF1D_Type = { sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 1800d5a98c6..cfa06f9d8fd 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp @@ -74,9 +74,11 @@ PyTypeObject GetProjectedZF1D_Type = { sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 2d26001b236..985e10f2b83 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp @@ -89,9 +89,11 @@ PyTypeObject GetSteerableViewMapDensityF1D_Type = { sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 076e67fe171..441ea2f5833 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp @@ -89,9 +89,11 @@ PyTypeObject GetViewMapGradientNormF1D_Type = { sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 13f16d08993..716cfbfe37a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp @@ -74,9 +74,11 @@ PyTypeObject GetXF1D_Type = { sizeof(BPy_GetXF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 66bba03695d..693c2453db2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp @@ -73,9 +73,11 @@ PyTypeObject GetYF1D_Type = { sizeof(BPy_GetYF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 d2366005ed4..e9030625b10 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp @@ -74,9 +74,11 @@ PyTypeObject GetZF1D_Type = { sizeof(BPy_GetZF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 f101bce35b7..4ae2cd054e2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp @@ -84,9 +84,11 @@ PyTypeObject LocalAverageDepthF1D_Type = { sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 bed44e430c2..9feb07552ca 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp @@ -78,9 +78,11 @@ PyTypeObject ZDiscontinuityF1D_Type = { sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 c82a6df7a34..400b5a95fcf 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp @@ -80,9 +80,11 @@ PyTypeObject QuantitativeInvisibilityF1D_Type = { sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 0c958f29b6f..7637153017f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetOccludeeF1D_Type = { sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 307c74e5547..d532268b294 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetOccludersF1D_Type = { sizeof(BPy_GetOccludersF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 a0232826fed..dd1492e940e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp @@ -67,9 +67,11 @@ PyTypeObject GetShapeF1D_Type = { sizeof(BPy_GetShapeF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 0a9acf068e0..c3750734efc 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp @@ -67,9 +67,11 @@ PyTypeObject ChainingTimeStampF1D_Type = { sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 976a9c4f972..85738684e44 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp @@ -67,9 +67,11 @@ PyTypeObject IncrementChainingTimeStampF1D_Type = { sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ 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 99a40cc154a..1f577820da4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp @@ -65,9 +65,11 @@ PyTypeObject TimeStampF1D_Type = { sizeof(BPy_TimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp index 8f649f48e41..227aca2b5c6 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp @@ -58,9 +58,11 @@ PyTypeObject FalseUP0D_Type = { sizeof(BPy_FalseUP0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp index 1d068055dd5..5f5c756b28d 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp @@ -58,9 +58,11 @@ PyTypeObject TrueUP0D_Type = { sizeof(BPy_TrueUP0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp index 658c12ecae5..b3f9c225931 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp @@ -59,9 +59,11 @@ PyTypeObject ContourUP1D_Type = { sizeof(BPy_ContourUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp index 3683159a183..f865fe5013d 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp @@ -75,9 +75,11 @@ PyTypeObject DensityLowerThanUP1D_Type = { sizeof(BPy_DensityLowerThanUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp index a9f3812382b..154b44ff81a 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp @@ -70,9 +70,11 @@ PyTypeObject EqualToChainingTimeStampUP1D_Type = { sizeof(BPy_EqualToChainingTimeStampUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp index 9e2bde8f6c7..2bb9dbaf484 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp @@ -69,9 +69,11 @@ PyTypeObject EqualToTimeStampUP1D_Type = { sizeof(BPy_EqualToTimeStampUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp index ba9a9af429f..7b9923d7b6c 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp @@ -63,9 +63,11 @@ PyTypeObject ExternalContourUP1D_Type = { sizeof(BPy_ExternalContourUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp index c3c73b77c1c..ec1a02e13aa 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp @@ -58,9 +58,11 @@ PyTypeObject FalseUP1D_Type = { sizeof(BPy_FalseUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp index c16edfff96b..b9a76f91c21 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp @@ -74,9 +74,11 @@ PyTypeObject QuantitativeInvisibilityUP1D_Type = { sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp index 54075f4b444..68f0ea7a913 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp @@ -70,9 +70,11 @@ PyTypeObject ShapeUP1D_Type = { sizeof(BPy_ShapeUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp index b1b97b10282..362bcc4cea8 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp @@ -58,9 +58,11 @@ PyTypeObject TrueUP1D_Type = { sizeof(BPy_TrueUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp index cbeb728de07..9329e3a7628 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp @@ -71,9 +71,11 @@ PyTypeObject WithinImageBoundaryUP1D_Type = { sizeof(BPy_WithinImageBoundaryUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - /* Incompatible with Python3.8+ (deprecated function). - * NOLINTNEXTLINE: modernize-use-nullptr. */ - 0, /* tp_print */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c index 2168e0d1730..28689bb8b7e 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.c +++ b/source/blender/python/bmesh/bmesh_py_ops.c @@ -167,7 +167,11 @@ static PyTypeObject bmesh_op_Type = { 0, /* tp_itemsize */ /* methods */ NULL, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 6f5f36ec42f..38191ffc8bd 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -1198,7 +1198,11 @@ PyTypeObject BPy_IDGroup_Type = { /* Methods to implement standard operations */ NULL, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ @@ -1607,7 +1611,11 @@ PyTypeObject BPy_IDArray_Type = { /* Methods to implement standard operations */ NULL, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ @@ -1724,7 +1732,11 @@ PyTypeObject BPy_IDGroup_Iter_Type = { /* Methods to implement standard operations */ NULL, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c index 5dc4aa6ce7c..1ebb8de2f7a 100644 --- a/source/blender/python/generic/imbuf_py_api.c +++ b/source/blender/python/generic/imbuf_py_api.c @@ -342,7 +342,11 @@ PyTypeObject Py_ImBuf_Type = { /* Methods to implement standard operations */ (destructor)py_imbuf_dealloc, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index 30e0d94939d..6ccefe5a74e 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -795,7 +795,11 @@ static PyTypeObject BlenderAppTranslationsType = { /* methods */ /* No destructor, this is a singleton! */ NULL, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index 061595a6c5d..adab984057b 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -92,7 +92,11 @@ static PyTypeObject bpy_lib_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)bpy_lib_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index c16715b46fb..5ae90577240 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6404,7 +6404,11 @@ PyTypeObject pyrna_struct_meta_idprop_Type = { 0, /* tp_itemsize */ /* methods */ NULL, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, @@ -6485,7 +6489,11 @@ PyTypeObject pyrna_struct_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_struct_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, @@ -6574,7 +6582,11 @@ PyTypeObject pyrna_prop_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, @@ -6658,7 +6670,11 @@ PyTypeObject pyrna_prop_array_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_array_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, @@ -6741,7 +6757,11 @@ PyTypeObject pyrna_prop_collection_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, @@ -6827,7 +6847,11 @@ static PyTypeObject pyrna_prop_collection_idprop_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, @@ -6913,7 +6937,11 @@ PyTypeObject pyrna_func_Type = { 0, /* tp_itemsize */ /* methods */ NULL, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, @@ -7009,7 +7037,11 @@ static PyTypeObject pyrna_prop_collection_iter_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_collection_iter_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 80efbf6fbac..d3bcd2376ee 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -3042,7 +3042,11 @@ PyTypeObject vector_Type = { /* Methods to implement standard operations */ (destructor)BaseMathObject_dealloc, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ + #if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + (printfunc)NULL, /* printfunc tp_print */ +#endif NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ -- cgit v1.2.3 From c4d8f6a4a8ddc29ed27311ed7578b3c8c31399d2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 09:06:45 +1100 Subject: Cleanup: clang-format --- intern/cycles/kernel/shaders/node_clamp.osl | 3 +- source/blender/python/bmesh/bmesh_py_ops.c | 6 +-- source/blender/python/generic/idprop_py_api.c | 6 +-- source/blender/python/generic/imbuf_py_api.c | 8 ++-- .../blender/python/intern/bpy_app_translations.c | 6 +-- source/blender/python/intern/bpy_library_load.c | 4 +- source/blender/python/intern/bpy_rna.c | 48 +++++++++++----------- source/blender/python/mathutils/mathutils_Vector.c | 12 +++--- 8 files changed, 47 insertions(+), 46 deletions(-) diff --git a/intern/cycles/kernel/shaders/node_clamp.osl b/intern/cycles/kernel/shaders/node_clamp.osl index 22a1cac7114..b600fb7c455 100644 --- a/intern/cycles/kernel/shaders/node_clamp.osl +++ b/intern/cycles/kernel/shaders/node_clamp.osl @@ -22,5 +22,6 @@ shader node_clamp(string clamp_type = "minmax", float Max = 1.0, output float Result = 0.0) { - Result = (clamp_type == "range" && (Min > Max)) ? clamp(Value, Max, Min) : clamp(Value, Min, Max); + Result = (clamp_type == "range" && (Min > Max)) ? clamp(Value, Max, Min) : + clamp(Value, Min, Max); } diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c index 28689bb8b7e..03a890d315c 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.c +++ b/source/blender/python/bmesh/bmesh_py_ops.c @@ -166,14 +166,14 @@ static PyTypeObject bmesh_op_Type = { sizeof(BPy_BMeshOpFunc), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ + NULL, /* tp_dealloc */ #if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ (reprfunc)bpy_bmesh_op_repr, /* tp_repr */ diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 38191ffc8bd..a8b66f3f2fe 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -1197,7 +1197,7 @@ PyTypeObject BPy_IDGroup_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ + NULL, /* destructor tp_dealloc; */ #if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ #else @@ -1610,7 +1610,7 @@ PyTypeObject BPy_IDArray_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ + NULL, /* destructor tp_dealloc; */ #if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ #else @@ -1731,7 +1731,7 @@ PyTypeObject BPy_IDGroup_Iter_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ + NULL, /* destructor tp_dealloc; */ #if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ #else diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c index 1ebb8de2f7a..3ea4550dd50 100644 --- a/source/blender/python/generic/imbuf_py_api.c +++ b/source/blender/python/generic/imbuf_py_api.c @@ -347,10 +347,10 @@ PyTypeObject Py_ImBuf_Type = { #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* cmpfunc tp_compare; */ - (reprfunc)py_imbuf_repr, /* reprfunc tp_repr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* cmpfunc tp_compare; */ + (reprfunc)py_imbuf_repr, /* reprfunc tp_repr; */ /* Method suites for standard classes */ diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index 6ccefe5a74e..ee64d0a409c 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -794,14 +794,14 @@ static PyTypeObject BlenderAppTranslationsType = { 0, /* tp_itemsize */ /* methods */ /* No destructor, this is a singleton! */ - NULL, /* tp_dealloc */ + NULL, /* tp_dealloc */ #if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ NULL, /* tp_repr */ diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index adab984057b..bc3d8b2c360 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -97,8 +97,8 @@ static PyTypeObject bpy_lib_Type = { #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ NULL, /* tp_repr */ diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 5ae90577240..6e41bc96eed 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6403,14 +6403,14 @@ PyTypeObject pyrna_struct_meta_idprop_Type = { 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ + NULL, /* tp_dealloc */ #if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* deprecated in Python 3.0! */ NULL, /* tp_repr */ @@ -6460,7 +6460,7 @@ PyTypeObject pyrna_struct_meta_idprop_Type = { #if defined(_MSC_VER) NULL, /* defer assignment */ #else - &PyType_Type, /* struct _typeobject *tp_base; */ + &PyType_Type, /* struct _typeobject *tp_base; */ #endif NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ @@ -6494,8 +6494,8 @@ PyTypeObject pyrna_struct_Type = { #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in Python 3.0! */ (reprfunc)pyrna_struct_repr, /* tp_repr */ @@ -6529,7 +6529,7 @@ PyTypeObject pyrna_struct_Type = { /* delete references to contained objects */ (inquiry)pyrna_struct_clear, /* inquiry tp_clear; */ #else - NULL, /* traverseproc tp_traverse; */ + NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ @@ -6587,8 +6587,8 @@ PyTypeObject pyrna_prop_Type = { #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in Python 3.0! */ (reprfunc)pyrna_prop_repr, /* tp_repr */ @@ -6675,8 +6675,8 @@ PyTypeObject pyrna_prop_array_Type = { #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in Python 3.0! */ (reprfunc)pyrna_prop_array_repr, /* tp_repr */ @@ -6762,8 +6762,8 @@ PyTypeObject pyrna_prop_collection_Type = { #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in Python 3.0! */ NULL, @@ -6852,8 +6852,8 @@ static PyTypeObject pyrna_prop_collection_idprop_Type = { #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in Python 3.0! */ NULL, @@ -6936,14 +6936,14 @@ PyTypeObject pyrna_func_Type = { sizeof(BPy_FunctionRNA), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ + NULL, /* tp_dealloc */ #if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in Python 3.0! */ (reprfunc)pyrna_func_repr, /* tp_repr */ @@ -7037,13 +7037,13 @@ static PyTypeObject pyrna_prop_collection_iter_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_collection_iter_dealloc, /* tp_dealloc */ -#if PY_VERSION_HEX >= 0x03080000 +# if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ -#else - (printfunc)NULL, /* printfunc tp_print */ -#endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ +# else + (printfunc)NULL, /* printfunc tp_print */ +# endif + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in Python 3.0! */ NULL, diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index d3bcd2376ee..61487df1ab5 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -3042,15 +3042,15 @@ PyTypeObject vector_Type = { /* Methods to implement standard operations */ (destructor)BaseMathObject_dealloc, /* destructor tp_dealloc; */ - #if PY_VERSION_HEX >= 0x03080000 +#if PY_VERSION_HEX >= 0x03080000 0, /* tp_vectorcall_offset */ #else (printfunc)NULL, /* printfunc tp_print */ #endif - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* cmpfunc tp_compare; */ - (reprfunc)Vector_repr, /* reprfunc tp_repr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* cmpfunc tp_compare; */ + (reprfunc)Vector_repr, /* reprfunc tp_repr; */ /* Method suites for standard classes */ @@ -3065,7 +3065,7 @@ PyTypeObject vector_Type = { #ifndef MATH_STANDALONE (reprfunc)Vector_str, /* reprfunc tp_str; */ #else - NULL, /* reprfunc tp_str; */ + NULL, /* reprfunc tp_str; */ #endif NULL, /* getattrofunc tp_getattro; */ NULL, /* setattrofunc tp_setattro; */ -- cgit v1.2.3 From 8953485f5612f6ddf1ce7be2320b349383caefdd Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Tue, 10 Nov 2020 17:21:11 -0700 Subject: Fix: Selection not possible from outliner gutter Selection should be possible from the left gutter in object mode. When in other modes the mode column displays icon buttons which should be prioritized for selection only in those modes. Introduced in rB2110af20f5e6. --- source/blender/editors/space_outliner/outliner_select.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 688f6d646ff..aebb574578f 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1312,6 +1312,17 @@ bool outliner_is_co_within_mode_column(SpaceOutliner *space_outliner, const floa return space_outliner->flag & SO_MODE_COLUMN && view_mval[0] < UI_UNIT_X; } +static bool outliner_is_co_within_active_mode_column(bContext *C, + SpaceOutliner *space_outliner, + const float view_mval[2]) +{ + ViewLayer *view_layer = CTX_data_view_layer(C); + Object *obact = OBACT(view_layer); + + return outliner_is_co_within_mode_column(space_outliner, view_mval) && obact && + obact->mode != OB_MODE_OBJECT; +} + /** * Action to run when clicking in the outliner, * @@ -1334,7 +1345,7 @@ static int outliner_item_do_activate_from_cursor(bContext *C, if (outliner_is_co_within_restrict_columns(space_outliner, region, view_mval[0])) { return OPERATOR_CANCELLED; } - if (outliner_is_co_within_mode_column(space_outliner, view_mval)) { + if (outliner_is_co_within_active_mode_column(C, space_outliner, view_mval)) { return OPERATOR_CANCELLED; } @@ -1504,7 +1515,7 @@ static int outliner_box_select_invoke(bContext *C, wmOperator *op, const wmEvent return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; } - if (outliner_is_co_within_mode_column(space_outliner, view_mval)) { + if (outliner_is_co_within_active_mode_column(C, space_outliner, view_mval)) { return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; } -- cgit v1.2.3 From 12168ccf189df580b3a2ffd95bcc31a51c7d86a3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 14:08:53 +1100 Subject: ImBuf: replace incorrect strstr use with memcmp Besides being incorrect as only the first two bytes should be tested, searching binary data using `strstr` can easily read past buffer bounds. --- source/blender/imbuf/intern/radiance_hdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 3dd26e1f7a2..21709fa8603 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -203,7 +203,7 @@ int imb_is_a_hdr(const unsigned char *buf) /* update: actually, the 'RADIANCE' part is just an optional program name, * the magic word is really only the '#?' part */ // if (strstr((char *)buf, "#?RADIANCE")) return 1; - if (strstr((char *)buf, "#?")) { + if (memcmp((char *)buf, "#?", 2) == 0) { return 1; } // if (strstr((char *)buf, "32-bit_rle_rgbe")) return 1; -- cgit v1.2.3 From 75c18b989c566d24c76f9f7a44271654bc07a02c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 14:46:32 +1100 Subject: Cleanup: remove redundant NULL checks in ImFileType.is_a callback Most of these callbacks don't do a NULL check, so there is no need to do this for bmp/png. Also correct radiance_hdr comments. --- source/blender/imbuf/intern/bmp.c | 32 +++++++++++++----------------- source/blender/imbuf/intern/png.c | 9 ++++----- source/blender/imbuf/intern/radiance_hdr.c | 22 ++++++++++---------- source/blender/imbuf/intern/targa.c | 2 +- 4 files changed, 31 insertions(+), 34 deletions(-) diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index f897b1c6df3..f7fdc7a8e80 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -74,31 +74,27 @@ typedef struct BMPHEADER { static int checkbmp(const uchar *mem) { + if (!CHECK_HEADER_FIELD_BMP(mem)) { + return 0; + } int ret_val = 0; BMPINFOHEADER bmi; uint u; - if (mem) { - if (CHECK_HEADER_FIELD_BMP(mem)) { - /* skip fileheader */ - mem += BMP_FILEHEADER_SIZE; - } - else { - return 0; - } + /* skip fileheader */ + mem += BMP_FILEHEADER_SIZE; - /* for systems where an int needs to be 4 bytes aligned */ - memcpy(&bmi, mem, sizeof(bmi)); + /* for systems where an int needs to be 4 bytes aligned */ + memcpy(&bmi, mem, sizeof(bmi)); - u = LITTLE_LONG(bmi.biSize); - /* we only support uncompressed images for now. */ - if (u >= sizeof(BMPINFOHEADER)) { - if (bmi.biCompression == 0) { - u = LITTLE_SHORT(bmi.biBitCount); - if (u > 0 && u <= 32) { - ret_val = 1; - } + u = LITTLE_LONG(bmi.biSize); + /* we only support uncompressed images for now. */ + if (u >= sizeof(BMPINFOHEADER)) { + if (bmi.biCompression == 0) { + u = LITTLE_SHORT(bmi.biBitCount); + if (u > 0 && u <= 32) { + ret_val = 1; } } } diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index c4fbd3f7563..5b3311e5dd0 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -63,14 +63,13 @@ int imb_is_a_png(const unsigned char *mem) { int ret_val = 0; - if (mem) { #if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR == 2) - /* Older version of libpng doesn't use const pointer to memory. */ - ret_val = !png_sig_cmp((png_bytep)mem, 0, 8); + /* Older version of libpng doesn't use const pointer to memory. */ + ret_val = !png_sig_cmp((png_bytep)mem, 0, 8); #else - ret_val = !png_sig_cmp(mem, 0, 8); + ret_val = !png_sig_cmp(mem, 0, 8); #endif - } + return ret_val; } diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 599388442ca..8de243e52bc 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -199,15 +199,17 @@ static void FLOAT2RGBE(const fCOLOR fcol, RGBE rgbe) int imb_is_a_hdr(const unsigned char *buf) { - /* For recognition, Blender only loads first 32 bytes, so use #?RADIANCE id instead */ - /* update: actually, the 'RADIANCE' part is just an optional program name, - * the magic word is really only the '#?' part */ - // if (strstr((char *)buf, "#?RADIANCE")) return 1; - if (memcmp((char *)buf, "#?", 2) == 0) { - return 1; - } - // if (strstr((char *)buf, "32-bit_rle_rgbe")) return 1; - return 0; + /* NOTE: `#?RADIANCE` is used by other programs such as `ImageMagik`, + * Although there are some files in the wild that only use `#?` (from looking online). + * If this is ever a problem we could check for the longer header since this is part of the spec. + * + * We could check `32-bit_rle_rgbe` or `32-bit_rle_xyze` too since this is part of the format. + * Currently this isn't needed. + * + * See: http://paulbourke.net/dataformats/pic/ + */ + const unsigned char magic[2] = {'#', '?'}; + return memcmp(buf, magic, sizeof(magic)) == 0; } struct ImBuf *imb_loadhdr(const unsigned char *mem, @@ -224,7 +226,7 @@ struct ImBuf *imb_loadhdr(const unsigned char *mem, const unsigned char *ptr, *mem_eof = mem + size; char oriY[80], oriX[80]; - if (imb_is_a_hdr((void *)mem)) { + if (imb_is_a_hdr(mem)) { colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_FLOAT); /* find empty line, next line is resolution info */ diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 5a3cbd375b6..cb549fb43f2 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -288,7 +288,7 @@ static bool dumptarga(struct ImBuf *ibuf, FILE *file) int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags) { - char buf[20] = {0}; + char buf[18] = {0}; FILE *fildes; bool ok = false; -- cgit v1.2.3 From 11bf3b7035fadedebd6a12214c2f38322ca294bb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 15:05:30 +1100 Subject: Cleanup: use define for targa header size --- source/blender/imbuf/intern/targa.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index cb549fb43f2..0efc8dee2db 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -60,6 +60,14 @@ typedef struct TARGA { unsigned char imgdes; } TARGA; +/** + * On-disk header size. + * + * \note In theory it's possible padding would make the struct and on-disk size differ, + * so use a constant instead of `sizeof(TARGA)`. + */ +#define TARGA_HEADER_SIZE 18 + /***/ static int tga_out1(unsigned int data, FILE *file) @@ -286,14 +294,12 @@ static bool dumptarga(struct ImBuf *ibuf, FILE *file) return 1; } -int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags) +int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int UNUSED(flags)) { - char buf[18] = {0}; + char buf[TARGA_HEADER_SIZE] = {0}; FILE *fildes; bool ok = false; - (void)flags; /* unused */ - buf[16] = (ibuf->planes + 0x7) & ~0x7; if (ibuf->planes > 8) { buf[2] = 10; @@ -326,7 +332,7 @@ int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags) return 0; } - if (fwrite(buf, 1, 18, fildes) != 18) { + if (fwrite(buf, 1, TARGA_HEADER_SIZE, fildes) != TARGA_HEADER_SIZE) { fclose(fildes); return 0; } @@ -647,7 +653,7 @@ ImBuf *imb_loadtarga(const unsigned char *mem, if (tga.imgtyp < 4) { ibuf->foptions.flag |= RAWTGA; } - mem = mem + 18 + tga.numid; + mem = mem + TARGA_HEADER_SIZE + tga.numid; cp[0] = 0xff; cp[1] = cp[2] = 0; -- cgit v1.2.3 From e9c19b28202eb1fdc774d62f23896bf9fafb0fb8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 16:14:05 +1100 Subject: Cleanup: avoid boolean literals for functions that return int --- source/blender/imbuf/intern/util.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 37a1afb5dd7..ae904c5d133 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -167,7 +167,7 @@ int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size) } for (const ImFileType *type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { - if (type->is_a) { + if (type->is_a != NULL) { if (type->is_a(buf)) { return type->filetype; } @@ -181,7 +181,7 @@ int IMB_ispic_type(const char *name) { unsigned char buf[HEADER_SIZE]; if (!imb_ispic_read_header_from_filename(name, buf)) { - return false; + return 0; } return IMB_ispic_type_from_memory(buf, HEADER_SIZE); } @@ -190,7 +190,7 @@ bool IMB_ispic_type_matches(const char *name, int filetype) { unsigned char buf[HEADER_SIZE]; if (!imb_ispic_read_header_from_filename(name, buf)) { - return false; + return 0; } for (const ImFileType *type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { @@ -198,10 +198,12 @@ bool IMB_ispic_type_matches(const char *name, int filetype) /* Requesting to load a type that can't check it's own header doesn't make sense. * Keep the check for developers. */ BLI_assert(type->is_a != NULL); - return type->is_a ? type->is_a(buf) : false; + if (type->is_a != NULL) { + return type->is_a(buf); + } } } - return false; + return 0; } #undef HEADER_SIZE @@ -211,7 +213,7 @@ bool IMB_ispic(const char *name) return (IMB_ispic_type(name) != 0); } -static int isavi(const char *name) +static bool isavi(const char *name) { #ifdef WITH_AVI return AVI_is_avi(name); -- cgit v1.2.3 From a5f8071bdf7893ef487c677b460793e8bef55402 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 16:14:05 +1100 Subject: Cleanup: use bool for imbuf save callbacks --- source/blender/blenkernel/intern/image.c | 4 +--- source/blender/imbuf/IMB_imbuf.h | 2 +- source/blender/imbuf/intern/IMB_filetype.h | 22 +++++++++++----------- source/blender/imbuf/intern/bmp.c | 2 +- source/blender/imbuf/intern/cineon/cineon_dpx.c | 4 ++-- source/blender/imbuf/intern/dds/dds_api.cpp | 10 +++++----- source/blender/imbuf/intern/dds/dds_api.h | 2 +- source/blender/imbuf/intern/iris.c | 9 ++++----- source/blender/imbuf/intern/jp2.c | 12 ++++++------ source/blender/imbuf/intern/jpeg.c | 4 ++-- .../blender/imbuf/intern/openexr/openexr_api.cpp | 8 ++++---- source/blender/imbuf/intern/openexr/openexr_api.h | 2 +- source/blender/imbuf/intern/png.c | 2 +- source/blender/imbuf/intern/radiance_hdr.c | 2 +- source/blender/imbuf/intern/targa.c | 2 +- source/blender/imbuf/intern/tiff.c | 3 +-- source/blender/imbuf/intern/writeimage.c | 9 ++------- source/blender/sequencer/intern/proxy.c | 5 ++--- 18 files changed, 47 insertions(+), 57 deletions(-) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index f87b1b5ff45..9010c846954 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2953,13 +2953,11 @@ void BKE_imbuf_write_prepare(ImBuf *ibuf, const ImageFormatData *imf) int BKE_imbuf_write(ImBuf *ibuf, const char *name, const ImageFormatData *imf) { - int ok; - BKE_imbuf_write_prepare(ibuf, imf); BLI_make_existing_file(name); - ok = IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat); + const bool ok = IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat); if (ok == 0) { perror(name); } diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 0f9aa7055e7..bb28c4b1234 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -466,7 +466,7 @@ void IMB_scaleImBuf_threaded(struct ImBuf *ibuf, unsigned int newx, unsigned int * * \attention Defined in writeimage.c */ -short IMB_saveiff(struct ImBuf *ibuf, const char *filepath, int flags); +bool IMB_saveiff(struct ImBuf *ibuf, const char *filepath, int flags); bool IMB_prepare_write_ImBuf(const bool isfloat, struct ImBuf *ibuf); /** diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index b7763976853..520e810fe32 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -39,7 +39,7 @@ typedef struct ImFileType { int flags, char colorspace[IM_MAX_SPACE]); struct ImBuf *(*load_filepath)(const char *filepath, int flags, char colorspace[IM_MAX_SPACE]); - int (*save)(struct ImBuf *ibuf, const char *filepath, int flags); + bool (*save)(struct ImBuf *ibuf, const char *filepath, int flags); void (*load_tile)(struct ImBuf *ibuf, const unsigned char *mem, size_t size, @@ -72,7 +72,7 @@ struct ImBuf *imb_loadpng(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); -int imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags); +bool imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags); /* targa */ int imb_is_a_targa(const unsigned char *buf); @@ -80,7 +80,7 @@ struct ImBuf *imb_loadtarga(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); -int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags); +bool imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags); /* iris */ int imb_is_a_iris(const unsigned char *mem); @@ -88,7 +88,7 @@ struct ImBuf *imb_loadiris(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); -int imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags); +bool imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags); /* jp2 */ int imb_is_a_jp2(const unsigned char *buf); @@ -99,11 +99,11 @@ struct ImBuf *imb_load_jp2(const unsigned char *mem, struct ImBuf *imb_load_jp2_filepath(const char *filepath, int flags, char colorspace[IM_MAX_SPACE]); -int imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags); +bool imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags); /* jpeg */ int imb_is_a_jpeg(const unsigned char *mem); -int imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags); +bool imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags); struct ImBuf *imb_load_jpeg(const unsigned char *buffer, size_t size, int flags, @@ -115,11 +115,11 @@ struct ImBuf *imb_bmp_decode(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); -int imb_savebmp(struct ImBuf *ibuf, const char *filepath, int flags); +bool imb_savebmp(struct ImBuf *ibuf, const char *filepath, int flags); /* cineon */ int imb_is_a_cineon(const unsigned char *buf); -int imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags); +bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags); struct ImBuf *imb_load_cineon(const unsigned char *mem, size_t size, int flags, @@ -127,7 +127,7 @@ struct ImBuf *imb_load_cineon(const unsigned char *mem, /* dpx */ int imb_is_a_dpx(const unsigned char *buf); -int imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags); +bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags); struct ImBuf *imb_load_dpx(const unsigned char *mem, size_t size, int flags, @@ -139,7 +139,7 @@ struct ImBuf *imb_loadhdr(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); -int imb_savehdr(struct ImBuf *ibuf, const char *filepath, int flags); +bool imb_savehdr(struct ImBuf *ibuf, const char *filepath, int flags); /* tiff */ void imb_inittiff(void); @@ -150,4 +150,4 @@ struct ImBuf *imb_loadtiff(const unsigned char *mem, char colorspace[IM_MAX_SPACE]); void imb_loadtiletiff( struct ImBuf *ibuf, const unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect); -int imb_savetiff(struct ImBuf *ibuf, const char *filepath, int flags); +bool imb_savetiff(struct ImBuf *ibuf, const char *filepath, int flags); diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index f7fdc7a8e80..6d1726af608 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -292,7 +292,7 @@ static int putShortLSB(ushort us, FILE *ofile) } /* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */ -int imb_savebmp(ImBuf *ibuf, const char *filepath, int UNUSED(flags)) +bool imb_savebmp(ImBuf *ibuf, const char *filepath, int UNUSED(flags)) { BMPINFOHEADER infoheader; diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index 98082a97e0f..7907d648abe 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -183,7 +183,7 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon return rvalue; } -int imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags) +bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags) { return imb_save_dpx_cineon(buf, filepath, 1, flags); } @@ -204,7 +204,7 @@ ImBuf *imb_load_cineon(const unsigned char *mem, return NULL; } -int imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags) +bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags) { return imb_save_dpx_cineon(buf, filepath, 0, flags); } diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index e620c968f1c..d8bcca7e1f5 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -42,16 +42,16 @@ extern "C" { -int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) +bool imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) { - return 0; /* todo: finish this function */ + return false; /* todo: finish this function */ /* check image buffer */ if (ibuf == nullptr) { - return 0; + return false; } if (ibuf->rect == nullptr) { - return 0; + return false; } /* open file for writing */ @@ -69,7 +69,7 @@ int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) fildes << "DDS "; fildes.close(); - return 1; + return true; } int imb_is_a_dds(const unsigned char *mem) /* note: use at most first 32 bytes */ diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h index 930205c9efb..ca74cbeaa74 100644 --- a/source/blender/imbuf/intern/dds/dds_api.h +++ b/source/blender/imbuf/intern/dds/dds_api.h @@ -27,7 +27,7 @@ extern "C" { #endif int imb_is_a_dds(const unsigned char *mem); /* use only first 32 bytes of mem */ -int imb_save_dds(struct ImBuf *ibuf, const char *name, int flags); +bool imb_save_dds(struct ImBuf *ibuf, const char *name, int flags); struct ImBuf *imb_load_dds(const unsigned char *mem, size_t size, int flags, diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 214cdf1b63b..6bf2e3ec8d3 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -807,7 +807,7 @@ fail: * Added: zbuf write */ -static int output_iris(uint *lptr, int xsize, int ysize, int zsize, const char *name, int *zptr) +static bool output_iris(uint *lptr, int xsize, int ysize, int zsize, const char *name, int *zptr) { FILE *outf; IMAGE *image; @@ -969,10 +969,9 @@ static int compressrow(uchar *lbuf, uchar *rlebuf, int z, int cnt) return optr - (uchar *)rlebuf; } -int imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags) { short zsize; - int ret; zsize = (ibuf->planes + 7) >> 3; if (flags & IB_zbuf && ibuf->zbuf != NULL) { @@ -982,11 +981,11 @@ int imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags) IMB_convert_rgba_to_abgr(ibuf); test_endian_zbuf(ibuf); - ret = output_iris(ibuf->rect, ibuf->x, ibuf->y, zsize, filepath, ibuf->zbuf); + const bool ok = output_iris(ibuf->rect, ibuf->x, ibuf->y, zsize, filepath, ibuf->zbuf); /* restore! Quite clumsy, 2 times a switch... maybe better a malloc ? */ IMB_convert_rgba_to_abgr(ibuf); test_endian_zbuf(ibuf); - return ret; + return ok; } diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index 97af0eb8feb..f0486852d6f 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -1194,22 +1194,22 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) return image; } -int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int flags); +bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int flags); -int imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags) { opj_stream_t *stream = opj_stream_create_from_file( filepath, OPJ_J2K_STREAM_CHUNK_SIZE, false, NULL); if (stream == NULL) { return 0; } - int ret = imb_save_jp2_stream(ibuf, stream, flags); + const bool ok = imb_save_jp2_stream(ibuf, stream, flags); opj_stream_destroy(stream); - return ret; + return ok; } /* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */ -int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(flags)) +bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(flags)) { int quality = ibuf->foptions.quality; @@ -1230,7 +1230,7 @@ int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(fla image = ibuftoimage(ibuf, ¶meters); opj_codec_t *codec = NULL; - int ok = false; + bool ok = false; /* JP2 format output */ { /* get a JP2 compressor handle */ diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 38f8806d910..fca24a1baa9 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -608,7 +608,7 @@ static int init_jpeg(FILE *outfile, struct jpeg_compress_struct *cinfo, struct I return 0; } -static int save_stdjpeg(const char *name, struct ImBuf *ibuf) +static bool save_stdjpeg(const char *name, struct ImBuf *ibuf) { FILE *outfile; struct jpeg_compress_struct _cinfo, *cinfo = &_cinfo; @@ -642,7 +642,7 @@ static int save_stdjpeg(const char *name, struct ImBuf *ibuf) return 1; } -int imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags) { ibuf->flags = flags; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 40a502a14db..6d4cff4d18d 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -586,7 +586,7 @@ static bool imb_save_openexr_float(ImBuf *ibuf, const char *name, const int flag return true; } -int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags) +bool imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags) { if (flags & IB_mem) { imb_addencodedbufferImBuf(ibuf); @@ -594,15 +594,15 @@ int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags) } if (ibuf->foptions.flag & OPENEXR_HALF) { - return (int)imb_save_openexr_half(ibuf, name, flags); + return imb_save_openexr_half(ibuf, name, flags); } /* when no float rect, we save as half (16 bits is sufficient) */ if (ibuf->rect_float == nullptr) { - return (int)imb_save_openexr_half(ibuf, name, flags); + return imb_save_openexr_half(ibuf, name, flags); } - return (int)imb_save_openexr_float(ibuf, name, flags); + return imb_save_openexr_float(ibuf, name, flags); } /* ******* Nicer API, MultiLayer and with Tile file support ************************************ */ diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index 73db146849b..fcbd9b803b8 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -34,7 +34,7 @@ void imb_exitopenexr(void); int imb_is_a_openexr(const unsigned char *mem); -int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags); +bool imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags); struct ImBuf *imb_load_openexr(const unsigned char *mem, size_t size, int flags, char *colorspace); diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index 5b3311e5dd0..1f90f91be3e 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -118,7 +118,7 @@ BLI_INLINE unsigned short ftoshort(float val) return unit_float_to_ushort_clamp(val); } -int imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags) { png_structp png_ptr; png_infop info_ptr; diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 8de243e52bc..adeed444c80 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -411,7 +411,7 @@ static void writeHeader(FILE *file, int width, int height) fputc(10, file); } -int imb_savehdr(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_savehdr(struct ImBuf *ibuf, const char *filepath, int flags) { FILE *file = BLI_fopen(filepath, "wb"); float *fp = NULL; diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 0efc8dee2db..6d156a637d3 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -294,7 +294,7 @@ static bool dumptarga(struct ImBuf *ibuf, FILE *file) return 1; } -int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int UNUSED(flags)) +bool imb_savetarga(struct ImBuf *ibuf, const char *filepath, int UNUSED(flags)) { char buf[TARGA_HEADER_SIZE] = {0}; FILE *fildes; diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index bc69a14fa47..aa58eaa125d 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -759,8 +759,7 @@ void imb_loadtiletiff( * * \return 1 if the function is successful, 0 on failure. */ - -int imb_savetiff(ImBuf *ibuf, const char *filepath, int flags) +bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags) { TIFF *image = NULL; uint16 samplesperpixel, bitspersample; diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c index e321470559a..71ecc8b14ae 100644 --- a/source/blender/imbuf/intern/writeimage.c +++ b/source/blender/imbuf/intern/writeimage.c @@ -41,7 +41,7 @@ static bool prepare_write_imbuf(const ImFileType *type, ImBuf *ibuf) return IMB_prepare_write_ImBuf((type->flag & IM_FTYPE_FLOAT), ibuf); } -short IMB_saveiff(struct ImBuf *ibuf, const char *filepath, int flags) +bool IMB_saveiff(struct ImBuf *ibuf, const char *filepath, int flags) { const ImFileType *type; @@ -56,13 +56,8 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *filepath, int flags) for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { if (type->save && type->ftype(type, ibuf)) { - short result = false; - prepare_write_imbuf(type, ibuf); - - result = type->save(ibuf, filepath, flags); - - return result; + return type->save(ibuf, filepath, flags); } } diff --git a/source/blender/sequencer/intern/proxy.c b/source/blender/sequencer/intern/proxy.c index 83231a00f91..398a9a3e072 100644 --- a/source/blender/sequencer/intern/proxy.c +++ b/source/blender/sequencer/intern/proxy.c @@ -265,7 +265,6 @@ static void seq_proxy_build_frame(const SeqRenderData *context, char name[PROXY_MAXFILE]; int quality; int rectx, recty; - int ok; ImBuf *ibuf_tmp, *ibuf; Editing *ed = context->scene->ed; @@ -305,8 +304,8 @@ static void seq_proxy_build_frame(const SeqRenderData *context, BLI_make_existing_file(name); - ok = IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat); - if (ok == 0) { + const bool ok = IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat); + if (ok == false) { perror(name); } -- cgit v1.2.3 From 99f56b4c16323f96c0cbf54e392fb509fcac5bda Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 16:14:06 +1100 Subject: Cleanup: use 'filepath' instead of 'name' for ImBuf utilities --- source/blender/imbuf/IMB_imbuf.h | 10 +++--- source/blender/imbuf/intern/util.c | 65 +++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index bb28c4b1234..d947f4229a0 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -473,22 +473,22 @@ bool IMB_prepare_write_ImBuf(const bool isfloat, struct ImBuf *ibuf); * * \attention Defined in util.c */ -bool IMB_ispic(const char *name); -bool IMB_ispic_type_matches(const char *name, int filetype); +bool IMB_ispic(const char *filepath); +bool IMB_ispic_type_matches(const char *filepath, int filetype); int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size); -int IMB_ispic_type(const char *name); +int IMB_ispic_type(const char *filepath); /** * * \attention Defined in util.c */ -bool IMB_isanim(const char *name); +bool IMB_isanim(const char *filepath); /** * * \attention Defined in util.c */ -int imb_get_anim_type(const char *name); +int imb_get_anim_type(const char *filepath); /** * diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index ae904c5d133..73d1cadaa69 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -120,25 +120,26 @@ const char *imb_ext_audio[] = { /* Increased from 32 to 64 because of the bitmaps header size. */ #define HEADER_SIZE 64 -static bool imb_ispic_read_header_from_filename(const char *name, unsigned char buf[HEADER_SIZE]) +static bool imb_ispic_read_header_from_filepath(const char *filepath, + unsigned char buf[HEADER_SIZE]) { BLI_stat_t st; int fp; - BLI_assert(!BLI_path_is_rel(name)); + BLI_assert(!BLI_path_is_rel(filepath)); if (UTIL_DEBUG) { - printf("%s: loading %s\n", __func__, name); + printf("%s: loading %s\n", __func__, filepath); } - if (BLI_stat(name, &st) == -1) { + if (BLI_stat(filepath, &st) == -1) { return false; } if (((st.st_mode) & S_IFMT) != S_IFREG) { return false; } - if ((fp = BLI_open(name, O_BINARY | O_RDONLY, 0)) == -1) { + if ((fp = BLI_open(filepath, O_BINARY | O_RDONLY, 0)) == -1) { return false; } @@ -177,19 +178,19 @@ int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size) return 0; } -int IMB_ispic_type(const char *name) +int IMB_ispic_type(const char *filepath) { unsigned char buf[HEADER_SIZE]; - if (!imb_ispic_read_header_from_filename(name, buf)) { + if (!imb_ispic_read_header_from_filepath(filepath, buf)) { return 0; } return IMB_ispic_type_from_memory(buf, HEADER_SIZE); } -bool IMB_ispic_type_matches(const char *name, int filetype) +bool IMB_ispic_type_matches(const char *filepath, int filetype) { unsigned char buf[HEADER_SIZE]; - if (!imb_ispic_read_header_from_filename(name, buf)) { + if (!imb_ispic_read_header_from_filepath(filepath, buf)) { return 0; } @@ -208,17 +209,17 @@ bool IMB_ispic_type_matches(const char *name, int filetype) #undef HEADER_SIZE -bool IMB_ispic(const char *name) +bool IMB_ispic(const char *filepath) { - return (IMB_ispic_type(name) != 0); + return (IMB_ispic_type(filepath) != 0); } -static bool isavi(const char *name) +static bool isavi(const char *filepath) { #ifdef WITH_AVI - return AVI_is_avi(name); + return AVI_is_avi(filepath); #else - (void)name; + (void)filepath; return false; #endif } @@ -277,7 +278,7 @@ const char *IMB_ffmpeg_last_error(void) return ffmpeg_last_error; } -static int isffmpeg(const char *filename) +static int isffmpeg(const char *filepath) { AVFormatContext *pFormatCtx = NULL; unsigned int i; @@ -285,7 +286,7 @@ static int isffmpeg(const char *filename) AVCodec *pCodec; AVCodecContext *pCodecCtx; - if (BLI_path_extension_check_n(filename, + if (BLI_path_extension_check_n(filepath, ".swf", ".jpg", ".jp2", @@ -302,7 +303,7 @@ static int isffmpeg(const char *filename) return 0; } - if (avformat_open_input(&pFormatCtx, filename, NULL, NULL) != 0) { + if (avformat_open_input(&pFormatCtx, filepath, NULL, NULL) != 0) { if (UTIL_DEBUG) { fprintf(stderr, "isffmpeg: av_open_input_file failed\n"); } @@ -318,7 +319,7 @@ static int isffmpeg(const char *filename) } if (UTIL_DEBUG) { - av_dump_format(pFormatCtx, 0, filename, 0); + av_dump_format(pFormatCtx, 0, filepath, 0); } /* Find the first video stream */ @@ -357,60 +358,60 @@ static int isffmpeg(const char *filename) } #endif -int imb_get_anim_type(const char *name) +int imb_get_anim_type(const char *filepath) { int type; BLI_stat_t st; - BLI_assert(!BLI_path_is_rel(name)); + BLI_assert(!BLI_path_is_rel(filepath)); if (UTIL_DEBUG) { - printf("%s: %s\n", __func__, name); + printf("%s: %s\n", __func__, filepath); } #ifndef _WIN32 # ifdef WITH_FFMPEG /* stat test below fails on large files > 4GB */ - if (isffmpeg(name)) { + if (isffmpeg(filepath)) { return ANIM_FFMPEG; } # endif - if (BLI_stat(name, &st) == -1) { + if (BLI_stat(filepath, &st) == -1) { return 0; } if (((st.st_mode) & S_IFMT) != S_IFREG) { return 0; } - if (isavi(name)) { + if (isavi(filepath)) { return ANIM_AVI; } - if (ismovie(name)) { + if (ismovie(filepath)) { return ANIM_MOVIE; } #else - if (BLI_stat(name, &st) == -1) { + if (BLI_stat(filepath, &st) == -1) { return 0; } if (((st.st_mode) & S_IFMT) != S_IFREG) { return 0; } - if (ismovie(name)) { + if (ismovie(filepath)) { return ANIM_MOVIE; } # ifdef WITH_FFMPEG - if (isffmpeg(name)) { + if (isffmpeg(filepath)) { return ANIM_FFMPEG; } # endif - if (isavi(name)) { + if (isavi(filepath)) { return ANIM_AVI; } #endif - type = IMB_ispic(name); + type = IMB_ispic(filepath); if (type) { return ANIM_SEQUENCE; } @@ -418,11 +419,11 @@ int imb_get_anim_type(const char *name) return ANIM_NONE; } -bool IMB_isanim(const char *filename) +bool IMB_isanim(const char *filepath) { int type; - type = imb_get_anim_type(filename); + type = imb_get_anim_type(filepath); return (type && type != ANIM_SEQUENCE); } -- cgit v1.2.3 From 2d60845786aeab099c61ffa42b7f72cccc68bff1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 16:14:06 +1100 Subject: Cleanup: pass header size to 'is_a' callbacks No functional changes, prepare for fixing out-of-bounds access when reading headers. --- source/blender/imbuf/intern/IMB_filetype.h | 22 +++++++++++----------- source/blender/imbuf/intern/bmp.c | 10 +++++----- source/blender/imbuf/intern/cineon/cineon_dpx.c | 8 ++++---- source/blender/imbuf/intern/dds/dds_api.cpp | 11 ++++++----- source/blender/imbuf/intern/dds/dds_api.h | 3 ++- source/blender/imbuf/intern/iris.c | 4 ++-- source/blender/imbuf/intern/jp2.c | 2 +- source/blender/imbuf/intern/jpeg.c | 4 ++-- .../blender/imbuf/intern/oiio/openimageio_api.cpp | 2 +- source/blender/imbuf/intern/oiio/openimageio_api.h | 2 +- .../blender/imbuf/intern/openexr/openexr_api.cpp | 4 ++-- source/blender/imbuf/intern/openexr/openexr_api.h | 2 +- source/blender/imbuf/intern/png.c | 6 +++--- source/blender/imbuf/intern/radiance_hdr.c | 4 ++-- source/blender/imbuf/intern/targa.c | 20 ++++++++++---------- source/blender/imbuf/intern/tiff.c | 4 ++-- source/blender/imbuf/intern/util.c | 4 ++-- 17 files changed, 57 insertions(+), 55 deletions(-) diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index 520e810fe32..7bdbbb03227 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -32,7 +32,7 @@ typedef struct ImFileType { void (*init)(void); void (*exit)(void); - int (*is_a)(const unsigned char *buf); + bool (*is_a)(const unsigned char *buf, const size_t size); int (*ftype)(const struct ImFileType *type, const struct ImBuf *ibuf); struct ImBuf *(*load)(const unsigned char *mem, size_t size, @@ -67,7 +67,7 @@ void imb_tile_cache_tile_free(struct ImBuf *ibuf, int tx, int ty); /* Type Specific Functions */ /* png */ -int imb_is_a_png(const unsigned char *mem); +bool imb_is_a_png(const unsigned char *mem, const size_t size); struct ImBuf *imb_loadpng(const unsigned char *mem, size_t size, int flags, @@ -75,7 +75,7 @@ struct ImBuf *imb_loadpng(const unsigned char *mem, bool imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags); /* targa */ -int imb_is_a_targa(const unsigned char *buf); +bool imb_is_a_targa(const unsigned char *buf, const size_t size); struct ImBuf *imb_loadtarga(const unsigned char *mem, size_t size, int flags, @@ -83,7 +83,7 @@ struct ImBuf *imb_loadtarga(const unsigned char *mem, bool imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags); /* iris */ -int imb_is_a_iris(const unsigned char *mem); +bool imb_is_a_iris(const unsigned char *mem, const size_t size); struct ImBuf *imb_loadiris(const unsigned char *mem, size_t size, int flags, @@ -91,7 +91,7 @@ struct ImBuf *imb_loadiris(const unsigned char *mem, bool imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags); /* jp2 */ -int imb_is_a_jp2(const unsigned char *buf); +bool imb_is_a_jp2(const unsigned char *buf, const size_t size); struct ImBuf *imb_load_jp2(const unsigned char *mem, size_t size, int flags, @@ -102,7 +102,7 @@ struct ImBuf *imb_load_jp2_filepath(const char *filepath, bool imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags); /* jpeg */ -int imb_is_a_jpeg(const unsigned char *mem); +bool imb_is_a_jpeg(const unsigned char *mem, const size_t size); bool imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags); struct ImBuf *imb_load_jpeg(const unsigned char *buffer, size_t size, @@ -110,7 +110,7 @@ struct ImBuf *imb_load_jpeg(const unsigned char *buffer, char colorspace[IM_MAX_SPACE]); /* bmp */ -int imb_is_a_bmp(const unsigned char *buf); +bool imb_is_a_bmp(const unsigned char *buf, const size_t size); struct ImBuf *imb_bmp_decode(const unsigned char *mem, size_t size, int flags, @@ -118,7 +118,7 @@ struct ImBuf *imb_bmp_decode(const unsigned char *mem, bool imb_savebmp(struct ImBuf *ibuf, const char *filepath, int flags); /* cineon */ -int imb_is_a_cineon(const unsigned char *buf); +bool imb_is_a_cineon(const unsigned char *buf, const size_t size); bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags); struct ImBuf *imb_load_cineon(const unsigned char *mem, size_t size, @@ -126,7 +126,7 @@ struct ImBuf *imb_load_cineon(const unsigned char *mem, char colorspace[IM_MAX_SPACE]); /* dpx */ -int imb_is_a_dpx(const unsigned char *buf); +bool imb_is_a_dpx(const unsigned char *buf, const size_t size); bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags); struct ImBuf *imb_load_dpx(const unsigned char *mem, size_t size, @@ -134,7 +134,7 @@ struct ImBuf *imb_load_dpx(const unsigned char *mem, char colorspace[IM_MAX_SPACE]); /* hdr */ -int imb_is_a_hdr(const unsigned char *buf); +bool imb_is_a_hdr(const unsigned char *buf, const size_t size); struct ImBuf *imb_loadhdr(const unsigned char *mem, size_t size, int flags, @@ -143,7 +143,7 @@ bool imb_savehdr(struct ImBuf *ibuf, const char *filepath, int flags); /* tiff */ void imb_inittiff(void); -int imb_is_a_tiff(const unsigned char *buf); +bool imb_is_a_tiff(const unsigned char *buf, const size_t size); struct ImBuf *imb_loadtiff(const unsigned char *mem, size_t size, int flags, diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index 6d1726af608..9358b67b3ed 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -72,13 +72,13 @@ typedef struct BMPHEADER { CHECK_HEADER_FIELD(_mem, "CI") || CHECK_HEADER_FIELD(_mem, "CP") || \ CHECK_HEADER_FIELD(_mem, "IC") || CHECK_HEADER_FIELD(_mem, "PT")) -static int checkbmp(const uchar *mem) +static bool checkbmp(const uchar *mem) { if (!CHECK_HEADER_FIELD_BMP(mem)) { return 0; } - int ret_val = 0; + bool ok = false; BMPINFOHEADER bmi; uint u; @@ -94,15 +94,15 @@ static int checkbmp(const uchar *mem) if (bmi.biCompression == 0) { u = LITTLE_SHORT(bmi.biBitCount); if (u > 0 && u <= 32) { - ret_val = 1; + ok = true; } } } - return ret_val; + return ok; } -int imb_is_a_bmp(const uchar *buf) +bool imb_is_a_bmp(const uchar *buf, size_t UNUSED(size)) { return checkbmp(buf); } diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index 7907d648abe..8bbd9fbb285 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -188,7 +188,7 @@ bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags) return imb_save_dpx_cineon(buf, filepath, 1, flags); } -int imb_is_a_cineon(const unsigned char *buf) +bool imb_is_a_cineon(const unsigned char *buf, size_t UNUSED(size)) { return logImageIsCineon(buf); } @@ -198,7 +198,7 @@ ImBuf *imb_load_cineon(const unsigned char *mem, int flags, char colorspace[IM_MAX_SPACE]) { - if (imb_is_a_cineon(mem)) { + if (imb_is_a_cineon(mem, size)) { return imb_load_dpx_cineon(mem, size, 1, flags, colorspace); } return NULL; @@ -209,7 +209,7 @@ bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags) return imb_save_dpx_cineon(buf, filepath, 0, flags); } -int imb_is_a_dpx(const unsigned char *buf) +bool imb_is_a_dpx(const unsigned char *buf, size_t UNUSED(size)) { return logImageIsDpx(buf); } @@ -219,7 +219,7 @@ ImBuf *imb_load_dpx(const unsigned char *mem, int flags, char colorspace[IM_MAX_SPACE]) { - if (imb_is_a_dpx(mem)) { + if (imb_is_a_dpx(mem, size)) { return imb_load_dpx_cineon(mem, size, 0, flags, colorspace); } return NULL; diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index d8bcca7e1f5..78ce8b5ee9b 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -72,18 +72,19 @@ bool imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) return true; } -int imb_is_a_dds(const unsigned char *mem) /* note: use at most first 32 bytes */ +/* note: use at most first 32 bytes */ +bool imb_is_a_dds(const unsigned char *mem, size_t UNUSED(size)) { /* heuristic check to see if mem contains a DDS file */ /* header.fourcc == FOURCC_DDS */ if ((mem[0] != 'D') || (mem[1] != 'D') || (mem[2] != 'S') || (mem[3] != ' ')) { - return 0; + return false; } /* header.size == 124 */ if ((mem[4] != 124) || mem[5] || mem[6] || mem[7]) { - return 0; + return false; } - return 1; + return true; } struct ImBuf *imb_load_dds(const unsigned char *mem, @@ -108,7 +109,7 @@ struct ImBuf *imb_load_dds(const unsigned char *mem, */ colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE); - if (!imb_is_a_dds(mem)) { + if (!imb_is_a_dds(mem, size)) { return nullptr; } diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h index ca74cbeaa74..9020529f210 100644 --- a/source/blender/imbuf/intern/dds/dds_api.h +++ b/source/blender/imbuf/intern/dds/dds_api.h @@ -26,7 +26,8 @@ extern "C" { #endif -int imb_is_a_dds(const unsigned char *mem); /* use only first 32 bytes of mem */ +/* use only first 32 bytes of mem */ +bool imb_is_a_dds(const unsigned char *mem, const size_t size); bool imb_save_dds(struct ImBuf *ibuf, const char *name, int flags); struct ImBuf *imb_load_dds(const unsigned char *mem, size_t size, diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 6bf2e3ec8d3..c27ac5754c7 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -243,7 +243,7 @@ static void test_endian_zbuf(struct ImBuf *ibuf) /* this one is only def-ed once, strangely... */ #define GSS(x) (((uchar *)(x))[1] << 8 | ((uchar *)(x))[0]) -int imb_is_a_iris(const uchar *mem) +bool imb_is_a_iris(const uchar *mem, size_t UNUSED(size)) { return ((GS(mem) == IMAGIC) || (GSS(mem) == IMAGIC)); } @@ -271,7 +271,7 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors return NULL; } - if (!imb_is_a_iris(mem)) { + if (!imb_is_a_iris(mem, size)) { return NULL; } diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index f0486852d6f..b964510b8db 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -80,7 +80,7 @@ static OPJ_CODEC_FORMAT format_from_header(const unsigned char mem[JP2_FILEHEADE return OPJ_CODEC_UNKNOWN; } -int imb_is_a_jp2(const unsigned char *buf) +bool imb_is_a_jp2(const unsigned char *buf, size_t UNUSED(size)) { return (check_jp2(buf) || check_j2k(buf)); } diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index fca24a1baa9..4a937738b52 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -57,7 +57,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla static const uchar jpeg_default_quality = 75; static uchar ibuf_quality; -int imb_is_a_jpeg(const unsigned char *mem) +bool imb_is_a_jpeg(const unsigned char *mem, const size_t UNUSED(size)) { if ((mem[0] == 0xFF) && (mem[1] == 0xD8)) { return 1; @@ -429,7 +429,7 @@ ImBuf *imb_load_jpeg(const unsigned char *buffer, struct my_error_mgr jerr; ImBuf *ibuf; - if (!imb_is_a_jpeg(buffer)) { + if (!imb_is_a_jpeg(buffer, size)) { return NULL; } diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp index 0b787a7842f..9f27ac96e6d 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp +++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp @@ -163,7 +163,7 @@ static ImBuf *imb_oiio_load_image_float( extern "C" { -int imb_is_a_photoshop(const unsigned char *mem) +bool imb_is_a_photoshop(const unsigned char *mem, size_t UNUSED(size)) { const unsigned char magic[4] = {'8', 'B', 'P', 'S'}; return memcmp(magic, mem, sizeof(magic)) == 0; diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.h b/source/blender/imbuf/intern/oiio/openimageio_api.h index 0ac6e560cfa..659050cdb00 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.h +++ b/source/blender/imbuf/intern/oiio/openimageio_api.h @@ -31,7 +31,7 @@ extern "C" { struct ImBuf; -int imb_is_a_photoshop(const unsigned char *mem); +bool imb_is_a_photoshop(const unsigned char *mem, const size_t size); int imb_save_photoshop(struct ImBuf *ibuf, const char *name, int flags); diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 6d4cff4d18d..467454ddb7a 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -330,7 +330,7 @@ extern "C" { * Test presence of OpenEXR file. * \param mem: pointer to loaded OpenEXR bitstream */ -int imb_is_a_openexr(const unsigned char *mem) +bool imb_is_a_openexr(const unsigned char *mem, const size_t UNUSED(size)) { return Imf::isImfMagic((const char *)mem); } @@ -1905,7 +1905,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem, IMemStream *membuf = nullptr; MultiPartInputFile *file = nullptr; - if (imb_is_a_openexr(mem) == 0) { + if (imb_is_a_openexr(mem, size) == 0) { return nullptr; } diff --git a/source/blender/imbuf/intern/openexr/openexr_api.h b/source/blender/imbuf/intern/openexr/openexr_api.h index fcbd9b803b8..940715690a7 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -32,7 +32,7 @@ extern "C" { void imb_initopenexr(void); void imb_exitopenexr(void); -int imb_is_a_openexr(const unsigned char *mem); +bool imb_is_a_openexr(const unsigned char *mem, const size_t size); bool imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags); diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index 1f90f91be3e..a4ad839c513 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -59,9 +59,9 @@ BLI_INLINE unsigned short UPSAMPLE_8_TO_16(const unsigned char _val) return (_val << 8) + _val; } -int imb_is_a_png(const unsigned char *mem) +bool imb_is_a_png(const unsigned char *mem, size_t UNUSED(size)) { - int ret_val = 0; + bool ret_val = 0; #if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR == 2) /* Older version of libpng doesn't use const pointer to memory. */ @@ -548,7 +548,7 @@ ImBuf *imb_loadpng(const unsigned char *mem, size_t size, int flags, char colors float *to_float; unsigned int channels; - if (imb_is_a_png(mem) == 0) { + if (imb_is_a_png(mem, size) == 0) { return NULL; } diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index adeed444c80..d8b032dc5bd 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -197,7 +197,7 @@ static void FLOAT2RGBE(const fCOLOR fcol, RGBE rgbe) /* ImBuf read */ -int imb_is_a_hdr(const unsigned char *buf) +bool imb_is_a_hdr(const unsigned char *buf, size_t UNUSED(size)) { /* NOTE: `#?RADIANCE` is used by other programs such as `ImageMagik`, * Although there are some files in the wild that only use `#?` (from looking online). @@ -226,7 +226,7 @@ struct ImBuf *imb_loadhdr(const unsigned char *mem, const unsigned char *ptr, *mem_eof = mem + size; char oriY[80], oriX[80]; - if (imb_is_a_hdr(mem)) { + if (imb_is_a_hdr(mem, size)) { colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_FLOAT); /* find empty line, next line is resolution info */ diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 6d156a637d3..64dbf6deb4b 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -361,7 +361,7 @@ bool imb_savetarga(struct ImBuf *ibuf, const char *filepath, int UNUSED(flags)) return ok; } -static int checktarga(TARGA *tga, const unsigned char *mem) +static bool checktarga(TARGA *tga, const unsigned char *mem) { tga->numid = mem[0]; tga->maptyp = mem[1]; @@ -378,7 +378,7 @@ static int checktarga(TARGA *tga, const unsigned char *mem) tga->imgdes = mem[17]; if (tga->maptyp > 1) { - return 0; + return false; } switch (tga->imgtyp) { case 1: /* raw cmap */ @@ -389,27 +389,27 @@ static int checktarga(TARGA *tga, const unsigned char *mem) case 11: /* b&w */ break; default: - return 0; + return false; } if (tga->mapsize && tga->mapbits > 32) { - return 0; + return false; } if (tga->xsize <= 0) { - return 0; + return false; } if (tga->ysize <= 0) { - return 0; + return false; } if (tga->pixsize > 32) { - return 0; + return false; } if (tga->pixsize == 0) { - return 0; + return false; } - return 1; + return true; } -int imb_is_a_targa(const unsigned char *buf) +bool imb_is_a_targa(const unsigned char *buf, size_t UNUSED(size)) { TARGA tga; diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index aa58eaa125d..69c1c6b596c 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -316,7 +316,7 @@ static TIFF *imb_tiff_client_open(ImbTIFFMemFile *memFile, const unsigned char * * hence my manual comparison. - Jonathan Merritt (lancelet) 4th Sept 2005. */ #define IMB_TIFF_NCB 4 /* number of comparison bytes used */ -int imb_is_a_tiff(const unsigned char *buf) +bool imb_is_a_tiff(const unsigned char *buf, size_t UNUSED(size)) { const char big_endian[IMB_TIFF_NCB] = {0x4d, 0x4d, 0x00, 0x2a}; const char lil_endian[IMB_TIFF_NCB] = {0x49, 0x49, 0x2a, 0x00}; @@ -578,7 +578,7 @@ ImBuf *imb_loadtiff(const unsigned char *mem, fprintf(stderr, "imb_loadtiff: size < IMB_TIFF_NCB\n"); return NULL; } - if (imb_is_a_tiff(mem) == 0) { + if (imb_is_a_tiff(mem, size) == 0) { return NULL; } diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 73d1cadaa69..1741d3f20b7 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -169,7 +169,7 @@ int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size) for (const ImFileType *type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { if (type->is_a != NULL) { - if (type->is_a(buf)) { + if (type->is_a(buf, HEADER_SIZE)) { return type->filetype; } } @@ -200,7 +200,7 @@ bool IMB_ispic_type_matches(const char *filepath, int filetype) * Keep the check for developers. */ BLI_assert(type->is_a != NULL); if (type->is_a != NULL) { - return type->is_a(buf); + return type->is_a(buf, HEADER_SIZE); } } } -- cgit v1.2.3 From 15ffda3bcd697e6f3a0cc13e141da865f36f3b53 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 16:14:09 +1100 Subject: Fix T82602: checking image header reads past buffer bounds Use the size argument to ensure checking the header doesn't read past the buffer bounds when reading corrupt/truncated headers from image files. --- source/blender/imbuf/intern/bmp.c | 14 +++++++----- source/blender/imbuf/intern/cineon/cineon_dpx.c | 8 +++---- source/blender/imbuf/intern/cineon/logImageCore.c | 26 ++++++++++++++-------- source/blender/imbuf/intern/cineon/logImageCore.h | 4 ++-- source/blender/imbuf/intern/dds/dds_api.cpp | 5 ++++- source/blender/imbuf/intern/iris.c | 5 ++++- source/blender/imbuf/intern/jp2.c | 25 +++++++++++++-------- source/blender/imbuf/intern/jpeg.c | 9 ++++---- .../blender/imbuf/intern/oiio/openimageio_api.cpp | 5 ++++- .../blender/imbuf/intern/openexr/openexr_api.cpp | 6 ++++- source/blender/imbuf/intern/png.c | 15 ++++++++----- source/blender/imbuf/intern/radiance_hdr.c | 5 ++++- source/blender/imbuf/intern/targa.c | 12 ++++++---- source/blender/imbuf/intern/tiff.c | 5 ++++- 14 files changed, 95 insertions(+), 49 deletions(-) diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index 9358b67b3ed..58ce02f28ae 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -72,10 +72,14 @@ typedef struct BMPHEADER { CHECK_HEADER_FIELD(_mem, "CI") || CHECK_HEADER_FIELD(_mem, "CP") || \ CHECK_HEADER_FIELD(_mem, "IC") || CHECK_HEADER_FIELD(_mem, "PT")) -static bool checkbmp(const uchar *mem) +static bool checkbmp(const uchar *mem, const size_t size) { + if (size < BMP_FILEHEADER_SIZE) { + return false; + } + if (!CHECK_HEADER_FIELD_BMP(mem)) { - return 0; + return false; } bool ok = false; @@ -102,9 +106,9 @@ static bool checkbmp(const uchar *mem) return ok; } -bool imb_is_a_bmp(const uchar *buf, size_t UNUSED(size)) +bool imb_is_a_bmp(const uchar *buf, size_t size) { - return checkbmp(buf); + return checkbmp(buf, size); } ImBuf *imb_bmp_decode(const uchar *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) @@ -120,7 +124,7 @@ ImBuf *imb_bmp_decode(const uchar *mem, size_t size, int flags, char colorspace[ (void)size; /* unused */ - if (checkbmp(mem) == 0) { + if (checkbmp(mem, size) == 0) { return NULL; } diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index 8bbd9fbb285..de54e6dab9d 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -188,9 +188,9 @@ bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags) return imb_save_dpx_cineon(buf, filepath, 1, flags); } -bool imb_is_a_cineon(const unsigned char *buf, size_t UNUSED(size)) +bool imb_is_a_cineon(const unsigned char *buf, size_t size) { - return logImageIsCineon(buf); + return logImageIsCineon(buf, size); } ImBuf *imb_load_cineon(const unsigned char *mem, @@ -209,9 +209,9 @@ bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags) return imb_save_dpx_cineon(buf, filepath, 0, flags); } -bool imb_is_a_dpx(const unsigned char *buf, size_t UNUSED(size)) +bool imb_is_a_dpx(const unsigned char *buf, size_t size) { - return logImageIsDpx(buf); + return logImageIsDpx(buf, size); } ImBuf *imb_load_dpx(const unsigned char *mem, diff --git a/source/blender/imbuf/intern/cineon/logImageCore.c b/source/blender/imbuf/intern/cineon/logImageCore.c index d5f5691c5f0..2d42609fdf5 100644 --- a/source/blender/imbuf/intern/cineon/logImageCore.c +++ b/source/blender/imbuf/intern/cineon/logImageCore.c @@ -96,15 +96,23 @@ void logImageSetVerbose(int verbosity) * IO stuff */ -int logImageIsDpx(const void *buffer) +int logImageIsDpx(const void *buffer, const unsigned int size) { - unsigned int magicNum = *(unsigned int *)buffer; + unsigned int magicNum; + if (size < sizeof(magicNum)) { + return 0; + } + magicNum = *(unsigned int *)buffer; return (magicNum == DPX_FILE_MAGIC || magicNum == swap_uint(DPX_FILE_MAGIC, 1)); } -int logImageIsCineon(const void *buffer) +int logImageIsCineon(const void *buffer, const unsigned int size) { - unsigned int magicNum = *(unsigned int *)buffer; + unsigned int magicNum; + if (size < sizeof(magicNum)) { + return 0; + } + magicNum = *(unsigned int *)buffer; return (magicNum == CINEON_FILE_MAGIC || magicNum == swap_uint(CINEON_FILE_MAGIC, 1)); } @@ -119,17 +127,17 @@ LogImageFile *logImageOpenFromFile(const char *filename, int cineon) return NULL; } - if (fread(&magicNum, sizeof(unsigned int), 1, f) != 1) { + if (fread(&magicNum, sizeof(magicNum), 1, f) != 1) { fclose(f); return NULL; } fclose(f); - if (logImageIsDpx(&magicNum)) { + if (logImageIsDpx(&magicNum, sizeof(magicNum))) { return dpxOpen((const unsigned char *)filename, 0, 0); } - if (logImageIsCineon(&magicNum)) { + if (logImageIsCineon(&magicNum, sizeof(magicNum))) { return cineonOpen((const unsigned char *)filename, 0, 0); } @@ -138,10 +146,10 @@ LogImageFile *logImageOpenFromFile(const char *filename, int cineon) LogImageFile *logImageOpenFromMemory(const unsigned char *buffer, unsigned int size) { - if (logImageIsDpx(buffer)) { + if (logImageIsDpx(buffer, size)) { return dpxOpen(buffer, 1, size); } - if (logImageIsCineon(buffer)) { + if (logImageIsCineon(buffer, size)) { return cineonOpen(buffer, 1, size); } diff --git a/source/blender/imbuf/intern/cineon/logImageCore.h b/source/blender/imbuf/intern/cineon/logImageCore.h index a2d50f21a98..c2704a086b6 100644 --- a/source/blender/imbuf/intern/cineon/logImageCore.h +++ b/source/blender/imbuf/intern/cineon/logImageCore.h @@ -181,8 +181,8 @@ enum descriptor { /* int functions return 0 for OK */ void logImageSetVerbose(int verbosity); -int logImageIsDpx(const void *buffer); -int logImageIsCineon(const void *buffer); +int logImageIsDpx(const void *buffer, unsigned int size); +int logImageIsCineon(const void *buffer, unsigned int size); LogImageFile *logImageOpenFromMemory(const unsigned char *buffer, unsigned int size); LogImageFile *logImageOpenFromFile(const char *filename, int cineon); void logImageGetSize(LogImageFile *logImage, int *width, int *height, int *depth); diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index 78ce8b5ee9b..5687824f9fd 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -73,8 +73,11 @@ bool imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) } /* note: use at most first 32 bytes */ -bool imb_is_a_dds(const unsigned char *mem, size_t UNUSED(size)) +bool imb_is_a_dds(const unsigned char *mem, const size_t size) { + if (size < 8) { + return false; + } /* heuristic check to see if mem contains a DDS file */ /* header.fourcc == FOURCC_DDS */ if ((mem[0] != 'D') || (mem[1] != 'D') || (mem[2] != 'S') || (mem[3] != ' ')) { diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index c27ac5754c7..112b95bf1a1 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -243,8 +243,11 @@ static void test_endian_zbuf(struct ImBuf *ibuf) /* this one is only def-ed once, strangely... */ #define GSS(x) (((uchar *)(x))[1] << 8 | ((uchar *)(x))[0]) -bool imb_is_a_iris(const uchar *mem, size_t UNUSED(size)) +bool imb_is_a_iris(const uchar *mem, size_t size) { + if (size < 2) { + return false; + } return ((GS(mem) == IMAGIC) || (GSS(mem) == IMAGIC)); } diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index b964510b8db..e19589317d7 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -58,31 +58,38 @@ enum { DCP_CINEMA4K = 4, }; -static bool check_jp2(const unsigned char *mem) /* J2K_CFMT */ +static bool check_jp2(const unsigned char *mem, const size_t size) /* J2K_CFMT */ { + if (size < sizeof(JP2_HEAD)) { + return false; + } return memcmp(JP2_HEAD, mem, sizeof(JP2_HEAD)) ? 0 : 1; } -static bool check_j2k(const unsigned char *mem) /* J2K_CFMT */ +static bool check_j2k(const unsigned char *mem, const size_t size) /* J2K_CFMT */ { + if (size < sizeof(J2K_HEAD)) { + return false; + } return memcmp(J2K_HEAD, mem, sizeof(J2K_HEAD)) ? 0 : 1; } -static OPJ_CODEC_FORMAT format_from_header(const unsigned char mem[JP2_FILEHEADER_SIZE]) +static OPJ_CODEC_FORMAT format_from_header(const unsigned char mem[JP2_FILEHEADER_SIZE], + const size_t size) { - if (check_jp2(mem)) { + if (check_jp2(mem, size)) { return OPJ_CODEC_JP2; } - if (check_j2k(mem)) { + if (check_j2k(mem, size)) { return OPJ_CODEC_J2K; } return OPJ_CODEC_UNKNOWN; } -bool imb_is_a_jp2(const unsigned char *buf, size_t UNUSED(size)) +bool imb_is_a_jp2(const unsigned char *buf, size_t size) { - return (check_jp2(buf) || check_j2k(buf)); + return (check_jp2(buf, size) || check_j2k(buf, size)); } /** @@ -317,7 +324,7 @@ ImBuf *imb_load_jp2(const unsigned char *mem, int flags, char colorspace[IM_MAX_SPACE]) { - const OPJ_CODEC_FORMAT format = (size > JP2_FILEHEADER_SIZE) ? format_from_header(mem) : + const OPJ_CODEC_FORMAT format = (size > JP2_FILEHEADER_SIZE) ? format_from_header(mem, size) : OPJ_CODEC_UNKNOWN; struct BufInfo buf_wrapper = { .buf = mem, @@ -348,7 +355,7 @@ ImBuf *imb_load_jp2_filepath(const char *filepath, int flags, char colorspace[IM fseek(p_file, 0, SEEK_SET); - const OPJ_CODEC_FORMAT format = format_from_header(mem); + const OPJ_CODEC_FORMAT format = format_from_header(mem, sizeof(mem)); ImBuf *ibuf = imb_load_jp2_stream(stream, format, flags, colorspace); opj_stream_destroy(stream); return ibuf; diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 4a937738b52..93cdbbb1407 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -57,12 +57,13 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla static const uchar jpeg_default_quality = 75; static uchar ibuf_quality; -bool imb_is_a_jpeg(const unsigned char *mem, const size_t UNUSED(size)) +bool imb_is_a_jpeg(const unsigned char *mem, const size_t size) { - if ((mem[0] == 0xFF) && (mem[1] == 0xD8)) { - return 1; + const char magic[2] = {0xFF, 0xD8}; + if (size < sizeof(magic)) { + return false; } - return 0; + return memcmp(mem, magic, sizeof(magic)) == 0; } /*---------------------------------------------------------- diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp index 9f27ac96e6d..1e8c3c25778 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp +++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp @@ -163,9 +163,12 @@ static ImBuf *imb_oiio_load_image_float( extern "C" { -bool imb_is_a_photoshop(const unsigned char *mem, size_t UNUSED(size)) +bool imb_is_a_photoshop(const unsigned char *mem, size_t size) { const unsigned char magic[4] = {'8', 'B', 'P', 'S'}; + if (size < sizeof(magic)) { + return false; + } return memcmp(magic, mem, sizeof(magic)) == 0; } diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 467454ddb7a..56188fbe98a 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -330,8 +330,12 @@ extern "C" { * Test presence of OpenEXR file. * \param mem: pointer to loaded OpenEXR bitstream */ -bool imb_is_a_openexr(const unsigned char *mem, const size_t UNUSED(size)) +bool imb_is_a_openexr(const unsigned char *mem, const size_t size) { + /* No define is exposed for this size. */ + if (size < 4) { + return false; + } return Imf::isImfMagic((const char *)mem); } diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index a4ad839c513..25fc6a1cddf 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -59,18 +59,21 @@ BLI_INLINE unsigned short UPSAMPLE_8_TO_16(const unsigned char _val) return (_val << 8) + _val; } -bool imb_is_a_png(const unsigned char *mem, size_t UNUSED(size)) +bool imb_is_a_png(const unsigned char *mem, size_t size) { - bool ret_val = 0; + const int num_to_check = 8; + if (size < num_to_check) { + return false; + } + bool ok = false; #if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR == 2) /* Older version of libpng doesn't use const pointer to memory. */ - ret_val = !png_sig_cmp((png_bytep)mem, 0, 8); + ok = !png_sig_cmp((png_bytep)mem, 0, num_to_check); #else - ret_val = !png_sig_cmp(mem, 0, 8); + ok = !png_sig_cmp(mem, 0, num_to_check); #endif - - return ret_val; + return ok; } static void Flush(png_structp png_ptr) diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index d8b032dc5bd..285b18595f7 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -197,7 +197,7 @@ static void FLOAT2RGBE(const fCOLOR fcol, RGBE rgbe) /* ImBuf read */ -bool imb_is_a_hdr(const unsigned char *buf, size_t UNUSED(size)) +bool imb_is_a_hdr(const unsigned char *buf, const size_t size) { /* NOTE: `#?RADIANCE` is used by other programs such as `ImageMagik`, * Although there are some files in the wild that only use `#?` (from looking online). @@ -209,6 +209,9 @@ bool imb_is_a_hdr(const unsigned char *buf, size_t UNUSED(size)) * See: http://paulbourke.net/dataformats/pic/ */ const unsigned char magic[2] = {'#', '?'}; + if (size < sizeof(magic)) { + return false; + } return memcmp(buf, magic, sizeof(magic)) == 0; } diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 64dbf6deb4b..a9833623250 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -361,8 +361,12 @@ bool imb_savetarga(struct ImBuf *ibuf, const char *filepath, int UNUSED(flags)) return ok; } -static bool checktarga(TARGA *tga, const unsigned char *mem) +static bool checktarga(TARGA *tga, const unsigned char *mem, const size_t size) { + if (size < TARGA_HEADER_SIZE) { + return false; + } + tga->numid = mem[0]; tga->maptyp = mem[1]; tga->imgtyp = mem[2]; @@ -409,11 +413,11 @@ static bool checktarga(TARGA *tga, const unsigned char *mem) return true; } -bool imb_is_a_targa(const unsigned char *buf, size_t UNUSED(size)) +bool imb_is_a_targa(const unsigned char *buf, size_t size) { TARGA tga; - return checktarga(&tga, buf); + return checktarga(&tga, buf, size); } static void complete_partial_load(struct ImBuf *ibuf, unsigned int *rect) @@ -633,7 +637,7 @@ ImBuf *imb_loadtarga(const unsigned char *mem, int32_t cp_data; uchar *cp = (uchar *)&cp_data; - if (checktarga(&tga, mem) == 0) { + if (checktarga(&tga, mem, mem_size) == 0) { return NULL; } diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 69c1c6b596c..587d6ad9e7e 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -316,10 +316,13 @@ static TIFF *imb_tiff_client_open(ImbTIFFMemFile *memFile, const unsigned char * * hence my manual comparison. - Jonathan Merritt (lancelet) 4th Sept 2005. */ #define IMB_TIFF_NCB 4 /* number of comparison bytes used */ -bool imb_is_a_tiff(const unsigned char *buf, size_t UNUSED(size)) +bool imb_is_a_tiff(const unsigned char *buf, size_t size) { const char big_endian[IMB_TIFF_NCB] = {0x4d, 0x4d, 0x00, 0x2a}; const char lil_endian[IMB_TIFF_NCB] = {0x49, 0x49, 0x2a, 0x00}; + if (size < IMB_TIFF_NCB) { + return false; + } return ((memcmp(big_endian, buf, IMB_TIFF_NCB) == 0) || (memcmp(lil_endian, buf, IMB_TIFF_NCB) == 0)); -- cgit v1.2.3 From 2d48f3e445ad4294cfe1a354629bf335117ba40d Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 10 Nov 2020 13:53:05 +0100 Subject: Fix 'outliner_scroll_view()' not reaching wanted element Scrolling to an item after opening relevant parents can go wrong if said parent e.g. the last in the list [as in: then the Outliner does not scroll down all the way] It stems from the fact that 'region->v2d.tot.ymin' is not up-to-date in outliner_scroll_view after outliner_show_active opens up parents, 'tot' will only update on a redraw. Now calculate the trees height on the fly using 'outliner_tree_dimensions()'. ref D9521 ref T82553 Maniphest Tasks: T82553 Differential Revision: https://developer.blender.org/D9523 --- source/blender/editors/space_outliner/outliner_draw.c | 2 +- source/blender/editors/space_outliner/outliner_edit.c | 5 +++-- source/blender/editors/space_outliner/outliner_intern.h | 4 +++- source/blender/editors/space_outliner/outliner_select.c | 8 ++++---- source/blender/editors/space_outliner/outliner_utils.c | 6 ++++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index d961813d04a..22bb99530dc 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -109,7 +109,7 @@ static void outliner_tree_dimensions_impl(SpaceOutliner *space_outliner, } } -static void outliner_tree_dimensions(SpaceOutliner *space_outliner, int *r_width, int *r_height) +void outliner_tree_dimensions(SpaceOutliner *space_outliner, int *r_width, int *r_height) { *r_width = 0; *r_height = 0; diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 779efc3cacb..165d7bb2aa2 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -1343,7 +1343,7 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op)) int ytop = (active_element->ys + (size_y / 2)); int delta_y = ytop - v2d->cur.ymax; - outliner_scroll_view(region, delta_y); + outliner_scroll_view(space_outliner, region, delta_y); } else { return OPERATOR_CANCELLED; @@ -1375,6 +1375,7 @@ void OUTLINER_OT_show_active(wmOperatorType *ot) static int outliner_scroll_page_exec(bContext *C, wmOperator *op) { + SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); ARegion *region = CTX_wm_region(C); int size_y = BLI_rcti_size_y(®ion->v2d.mask) + 1; @@ -1384,7 +1385,7 @@ static int outliner_scroll_page_exec(bContext *C, wmOperator *op) size_y = -size_y; } - outliner_scroll_view(region, size_y); + outliner_scroll_view(space_outliner, region, size_y); ED_region_tag_redraw_no_rebuild(region); diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 382078f006b..d65dec54a20 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -251,6 +251,8 @@ TreeTraversalAction outliner_find_selected_objects(struct TreeElement *te, void void draw_outliner(const struct bContext *C); +void outliner_tree_dimensions(struct SpaceOutliner *space_outliner, int *r_width, int *r_height); + TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te); void outliner_collection_isolate_flag(struct Scene *scene, @@ -525,7 +527,7 @@ bool outliner_tree_traverse(const SpaceOutliner *space_outliner, float outliner_restrict_columns_width(const struct SpaceOutliner *space_outliner); TreeElement *outliner_find_element_with_flag(const ListBase *lb, short flag); bool outliner_is_element_visible(const TreeElement *te); -void outliner_scroll_view(struct ARegion *region, int delta_y); +void outliner_scroll_view(struct SpaceOutliner *space_outliner, struct ARegion *region, int delta_y); void outliner_tag_redraw_avoid_rebuild_on_open_change(const struct SpaceOutliner *space_outliner, struct ARegion *region); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index aebb574578f..0a0b099eb5b 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1709,7 +1709,7 @@ static TreeElement *find_walk_select_start_element(SpaceOutliner *space_outliner } /* Scroll the outliner when the walk element reaches the top or bottom boundary */ -static void outliner_walk_scroll(ARegion *region, TreeElement *te) +static void outliner_walk_scroll(SpaceOutliner *space_outliner, ARegion *region, TreeElement *te) { /* Account for the header height */ int y_max = region->v2d.cur.ymax - UI_UNIT_Y; @@ -1717,10 +1717,10 @@ static void outliner_walk_scroll(ARegion *region, TreeElement *te) /* Scroll if walked position is beyond the border */ if (te->ys > y_max) { - outliner_scroll_view(region, te->ys - y_max); + outliner_scroll_view(space_outliner, region, te->ys - y_max); } else if (te->ys < y_min) { - outliner_scroll_view(region, -(y_min - te->ys)); + outliner_scroll_view(space_outliner, region, -(y_min - te->ys)); } } @@ -1747,7 +1747,7 @@ static int outliner_walk_select_invoke(bContext *C, wmOperator *op, const wmEven OL_ITEM_SELECT | OL_ITEM_ACTIVATE | (extend ? OL_ITEM_EXTEND : 0)); /* Scroll outliner to focus on walk element */ - outliner_walk_scroll(region, active_te); + outliner_walk_scroll(space_outliner, region, active_te); ED_outliner_select_sync_from_outliner(C, space_outliner); outliner_tag_redraw_avoid_rebuild_on_open_change(space_outliner, region); diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index 86cc6672b0f..1a0ab3e00d0 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -442,9 +442,11 @@ bool outliner_item_is_co_within_close_toggle(const TreeElement *te, float view_c } /* Scroll view vertically while keeping within total bounds */ -void outliner_scroll_view(ARegion *region, int delta_y) +void outliner_scroll_view(SpaceOutliner *space_outliner, ARegion *region, int delta_y) { - int y_min = MIN2(region->v2d.cur.ymin, region->v2d.tot.ymin); + int tree_width, tree_height; + outliner_tree_dimensions(space_outliner, &tree_width, &tree_height); + int y_min = MIN2(region->v2d.cur.ymin, -tree_height); region->v2d.cur.ymax += delta_y; region->v2d.cur.ymin += delta_y; -- cgit v1.2.3 From 9b3dabacbcb3e2e108a49309df647692dab320dc Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 11 Nov 2020 10:15:18 +0100 Subject: Cleanup: Use `NDEBUG` define, `DEBUG` one is not reliable. --- source/blender/makesrna/intern/rna_define.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index b437e60ecf9..1b0a2fca0ce 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -1303,7 +1303,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, rna_addtail(&dcont->properties, dprop); } else { -#ifdef DEBUG +#ifndef NDEBUG char error[512]; if (rna_validate_identifier(identifier, error, true) == 0) { CLOG_ERROR(&LOG, -- cgit v1.2.3 From 7ba971d6d855034d5a8f0e8dab1bcd892b5aabd3 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 10 Nov 2020 12:23:48 +0100 Subject: Fix T82553: Outliner F2 renaming issue when item is out of view - scrolling would be restricted (usually, if the object to be renamed is in view, this prevents scrolling away without finishing the rename operation) - renaming by typing and confirming with Enter was not possible (you would have to escape, scroll to the object and use F2 again) - other shortcuts like A and H are still active instead of being handled as text input Avoid all these issue by forcing the item into view using outliner_show_active / outliner_scroll_view. Maniphest Tasks: T82553 Differential Revision: https://developer.blender.org/D9521 --- source/blender/editors/space_outliner/outliner_edit.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 165d7bb2aa2..c1add28b1e4 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -83,6 +83,11 @@ #include "outliner_intern.h" +static void outliner_show_active(SpaceOutliner *space_outliner, + ARegion *region, + TreeElement *te, + ID *id); + /** \} */ /* -------------------------------------------------------------------- */ @@ -394,6 +399,7 @@ static TreeElement *outliner_item_rename_find_hovered(const SpaceOutliner *space static int outliner_item_rename(bContext *C, wmOperator *op, const wmEvent *event) { ARegion *region = CTX_wm_region(C); + View2D *v2d = ®ion->v2d; SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); const bool use_active = RNA_boolean_get(op->ptr, "use_active"); @@ -403,6 +409,13 @@ static int outliner_item_rename(bContext *C, wmOperator *op, const wmEvent *even return OPERATOR_CANCELLED; } + /* Force element into view. */ + outliner_show_active(space_outliner, region, te, TREESTORE(te)->id); + int size_y = BLI_rcti_size_y(&v2d->mask) + 1; + int ytop = (te->ys + (size_y / 2)); + int delta_y = ytop - v2d->cur.ymax; + outliner_scroll_view(space_outliner, region, delta_y); + do_item_rename(region, te, TREESTORE(te), op->reports); return OPERATOR_FINISHED; -- cgit v1.2.3 From 7b6d76f3875916939b833057a9933de58d7936fa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Nov 2020 20:27:31 +1100 Subject: Cleanup: correct argument order to callback Currently the callback isn't used, found when testing a new enum callback. --- source/blender/windowmanager/intern/wm_operators.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 7b1d69e83c7..50b4f39d8e1 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3987,7 +3987,7 @@ static const EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), int i = 0; for (; id; id = id->next) { - if ((filter_ids != NULL) && filter_ids(user_data, id) == false) { + if ((filter_ids != NULL) && filter_ids(id, user_data) == false) { i++; continue; } -- cgit v1.2.3 From e47ea9fbc7c0c27843f2e934bafb3d36416c88ee Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 11 Nov 2020 11:31:33 +0100 Subject: GPencil: Fix unreported crash when style is NULL --- source/blender/draw/engines/gpencil/gpencil_cache_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index 948255b3852..cdcfd569fff 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -62,7 +62,7 @@ GPENCIL_tObject *gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob) tgp_ob->do_mat_holdout = false; for (int i = 0; i < ob->totcol; i++) { MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, i + 1); - if ((gp_style->flag & GP_MATERIAL_IS_STROKE_HOLDOUT) || + if ((gp_style != NULL) && (gp_style->flag & GP_MATERIAL_IS_STROKE_HOLDOUT) || ((gp_style->flag & GP_MATERIAL_IS_FILL_HOLDOUT))) { tgp_ob->do_mat_holdout = true; break; -- cgit v1.2.3 From 5b5ec0a2e910a42d7c02774a47fd9c70b6f16f06 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 11 Nov 2020 15:08:27 +0100 Subject: Fix T82521: Bump OpenImageIO minimum version 1.8 > 2.2.1 for install_deps.sh Since rB6fdcca8de64cd70f, we need at least OpenImageIO 2.1.12 to build Blender. --- build_files/build_environment/install_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index a951f3b4da5..c065b48f6ea 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -438,7 +438,7 @@ _with_built_openexr=false OIIO_VERSION="2.1.15.0" OIIO_VERSION_SHORT="2.1" -OIIO_VERSION_MIN="1.8" +OIIO_VERSION_MIN="2.1.12" OIIO_VERSION_MAX="3.0" OIIO_FORCE_BUILD=false OIIO_FORCE_REBUILD=false -- cgit v1.2.3 From 249e4df110e0a5ca7ebb24a7503f922b28d10405 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 6 Nov 2020 20:54:20 +0100 Subject: UI Code Quality: Start refactoring Outliner tree building (using C++) This introduces a new C++ abstraction "tree-display" (in this commit named tree-view, renamed in a followup) to help constructing and managing the tree for the different display types (View Layer, Scene, Blender file, etc.). See https://developer.blender.org/D9499 for more context. Other developers approved this rather significantly different design approach there. ---- Motivation General problems with current design: * The Outliner tree building code is messy and hard to follow. * Hard-coded display mode checks are scattered over many places. * Data is passed around in rather unsafe ways (e.g. lots of `void *`). * There are no individually testable units. * Data-structure use is inefficient. The current Outliner code needs quite some untangling, the tree building seems like a good place to start. This and the followup commits tackle that. ---- Design Idea Idea is to have an abstract base class (`AbstractTreeDisplay`), and then sub-classes with the implementation for each display type (e.g. `TreeDisplayViewLayer`, `TreeDisplayDataAPI`, etc). The tree-display is kept alive until tree-rebuild as runtime data of the space, so that further queries based on the display type can be executed (e.g. "does the display support selection syncing?", "does it support restriction toggle columns?", etc.). New files are in a new `space_outliner/tree` sub-directory. With the new design, display modes become proper units, making them more maintainable, safer and testable. It should also be easier now to add new display modes. --- source/blender/blenkernel/intern/screen.c | 1 + .../blender/editors/space_outliner/CMakeLists.txt | 3 + .../editors/space_outliner/outliner_intern.h | 12 + .../blender/editors/space_outliner/outliner_tree.c | 242 ++----------------- .../editors/space_outliner/space_outliner.c | 16 +- .../editors/space_outliner/tree/tree_view.cc | 61 +++++ .../editors/space_outliner/tree/tree_view.hh | 89 +++++++ .../space_outliner/tree/tree_view_view_layer.cc | 258 +++++++++++++++++++++ source/blender/makesdna/DNA_space_types.h | 5 + 9 files changed, 464 insertions(+), 223 deletions(-) create mode 100644 source/blender/editors/space_outliner/tree/tree_view.cc create mode 100644 source/blender/editors/space_outliner/tree/tree_view.hh create mode 100644 source/blender/editors/space_outliner/tree/tree_view_view_layer.cc diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 568c0c6f567..8662fce3dcc 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -1640,6 +1640,7 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area) } space_outliner->treehash = NULL; space_outliner->tree.first = space_outliner->tree.last = NULL; + space_outliner->runtime = NULL; } else if (sl->spacetype == SPACE_IMAGE) { SpaceImage *sima = (SpaceImage *)sl; diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index 1aa25ba00b1..a0577b1103d 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -44,8 +44,11 @@ set(SRC outliner_tree.c outliner_utils.c space_outliner.c + tree/tree_view.cc + tree/tree_view_view_layer.cc outliner_intern.h + tree/tree_view.hh ) set(LIB diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index d65dec54a20..56098d72c8f 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -25,6 +25,10 @@ #include "RNA_types.h" +#ifdef __cplusplus +extern "C" { +#endif + /* internal exports only */ struct ARegion; @@ -42,6 +46,10 @@ struct bPoseChannel; struct wmKeyConfig; struct wmOperatorType; +typedef struct SpaceOutliner_Runtime { + struct TreeView *tree_view; +} SpaceOutliner_Runtime; + typedef enum TreeElementInsertType { TE_INSERT_BEFORE, TE_INSERT_AFTER, @@ -534,3 +542,7 @@ void outliner_tag_redraw_avoid_rebuild_on_open_change(const struct SpaceOutliner /* outliner_sync.c ---------------------------------------------- */ void outliner_sync_selection(const struct bContext *C, struct SpaceOutliner *space_outliner); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 9cd38ac07f5..874d35112a5 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -85,6 +85,7 @@ #include "UI_interface.h" #include "outliner_intern.h" +#include "tree/tree_view.hh" #ifdef WIN32 # include "BLI_math_base.h" /* M_PI */ @@ -94,7 +95,6 @@ static TreeElement *outliner_add_collection_recursive(SpaceOutliner *space_outliner, Collection *collection, TreeElement *ten); -static void outliner_make_object_parent_hierarchy(ListBase *lb); static int outliner_exclude_filter_get(const SpaceOutliner *space_outliner); /* ********************************************************* */ @@ -237,14 +237,6 @@ void outliner_free_tree_element(TreeElement *element, ListBase *parent_subtree) /* ********************************************************* */ -/* Prototype, see functions below */ -static TreeElement *outliner_add_element(SpaceOutliner *space_outliner, - ListBase *lb, - void *idv, - TreeElement *parent, - short type, - short index); - /* -------------------------------------------------------- */ bool outliner_requires_rebuild_on_select_or_active_change(const SpaceOutliner *space_outliner) @@ -920,12 +912,12 @@ static void outliner_add_id_contents(SpaceOutliner *space_outliner, * \note: If child items are only added to the tree if the item is open, the TSE_ type _must_ be * added to #outliner_element_needs_rebuild_on_open_change(). */ -static TreeElement *outliner_add_element(SpaceOutliner *space_outliner, - ListBase *lb, - void *idv, - TreeElement *parent, - short type, - short index) +TreeElement *outliner_add_element(SpaceOutliner *space_outliner, + ListBase *lb, + void *idv, + TreeElement *parent, + short type, + short index) { TreeElement *te; TreeStoreElem *tselem; @@ -1546,82 +1538,6 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *space } } -static void outliner_add_layer_collection_objects(SpaceOutliner *space_outliner, - ListBase *tree, - ViewLayer *layer, - LayerCollection *lc, - TreeElement *ten) -{ - LISTBASE_FOREACH (CollectionObject *, cob, &lc->collection->gobject) { - Base *base = BKE_view_layer_base_find(layer, cob->ob); - TreeElement *te_object = outliner_add_element(space_outliner, tree, base->object, ten, 0, 0); - te_object->directdata = base; - - if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) { - te_object->flag |= TE_DISABLED; - } - } -} - -static void outliner_add_layer_collections_recursive(SpaceOutliner *space_outliner, - ListBase *tree, - ViewLayer *layer, - ListBase *layer_collections, - TreeElement *parent_ten, - const bool show_objects) -{ - LISTBASE_FOREACH (LayerCollection *, lc, layer_collections) { - const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0; - TreeElement *ten; - - if (exclude && ((space_outliner->show_restrict_flags & SO_RESTRICT_ENABLE) == 0)) { - ten = parent_ten; - } - else { - ID *id = &lc->collection->id; - ten = outliner_add_element(space_outliner, tree, id, parent_ten, TSE_LAYER_COLLECTION, 0); - - ten->name = id->name + 2; - ten->directdata = lc; - - /* Open by default, except linked collections, which may contain many elements. */ - TreeStoreElem *tselem = TREESTORE(ten); - if (!(tselem->used || ID_IS_LINKED(id) || ID_IS_OVERRIDE_LIBRARY(id))) { - tselem->flag &= ~TSE_CLOSED; - } - - if (exclude || (lc->runtime_flag & LAYER_COLLECTION_VISIBLE_VIEW_LAYER) == 0) { - ten->flag |= TE_DISABLED; - } - } - - outliner_add_layer_collections_recursive( - space_outliner, &ten->subtree, layer, &lc->layer_collections, ten, show_objects); - if (!exclude && show_objects) { - outliner_add_layer_collection_objects(space_outliner, &ten->subtree, layer, lc, ten); - } - } -} - -static void outliner_add_view_layer(SpaceOutliner *space_outliner, - ListBase *tree, - TreeElement *parent, - ViewLayer *layer, - const bool show_objects) -{ - /* First layer collection is for master collection, don't show it. */ - LayerCollection *lc = layer->layer_collections.first; - if (lc == NULL) { - return; - } - - outliner_add_layer_collections_recursive( - space_outliner, tree, layer, &lc->layer_collections, parent, show_objects); - if (show_objects) { - outliner_add_layer_collection_objects(space_outliner, tree, layer, lc, parent); - } -} - BLI_INLINE void outliner_add_collection_init(TreeElement *te, Collection *collection) { te->name = BKE_collection_ui_name_get(collection); @@ -1661,7 +1577,7 @@ static TreeElement *outliner_add_collection_recursive(SpaceOutliner *space_outli /* Hierarchy --------------------------------------------- */ /* make sure elements are correctly nested */ -static void outliner_make_object_parent_hierarchy(ListBase *lb) +void outliner_make_object_parent_hierarchy(ListBase *lb) { TreeElement *te, *ten, *tep; TreeStoreElem *tselem; @@ -1686,103 +1602,6 @@ static void outliner_make_object_parent_hierarchy(ListBase *lb) } } -/** - * For all objects in the tree, lookup the parent in this map, - * and move or add tree elements as needed. - */ -static void outliner_make_object_parent_hierarchy_collections(SpaceOutliner *space_outliner, - GHash *object_tree_elements_hash) -{ - GHashIterator gh_iter; - GHASH_ITER (gh_iter, object_tree_elements_hash) { - Object *child = BLI_ghashIterator_getKey(&gh_iter); - - if (child->parent == NULL) { - continue; - } - - ListBase *child_ob_tree_elements = BLI_ghashIterator_getValue(&gh_iter); - ListBase *parent_ob_tree_elements = BLI_ghash_lookup(object_tree_elements_hash, child->parent); - if (parent_ob_tree_elements == NULL) { - continue; - } - - LISTBASE_FOREACH (LinkData *, link, parent_ob_tree_elements) { - TreeElement *parent_ob_tree_element = link->data; - TreeElement *parent_ob_collection_tree_element = NULL; - bool found = false; - - /* We always want to remove the child from the direct collection its parent is nested under. - * This is particularly important when dealing with multi-level nesting (grandchildren). */ - parent_ob_collection_tree_element = parent_ob_tree_element->parent; - while (!ELEM(TREESTORE(parent_ob_collection_tree_element)->type, - TSE_VIEW_COLLECTION_BASE, - TSE_LAYER_COLLECTION)) { - parent_ob_collection_tree_element = parent_ob_collection_tree_element->parent; - } - - LISTBASE_FOREACH (LinkData *, link_iter, child_ob_tree_elements) { - TreeElement *child_ob_tree_element = link_iter->data; - - if (child_ob_tree_element->parent == parent_ob_collection_tree_element) { - /* Move from the collection subtree into the parent object subtree. */ - BLI_remlink(&parent_ob_collection_tree_element->subtree, child_ob_tree_element); - BLI_addtail(&parent_ob_tree_element->subtree, child_ob_tree_element); - child_ob_tree_element->parent = parent_ob_tree_element; - found = true; - break; - } - } - - if (!found) { - /* We add the child in the tree even if it is not in the collection. - * We deliberately clear its sub-tree though, to make it less prominent. */ - TreeElement *child_ob_tree_element = outliner_add_element( - space_outliner, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); - outliner_free_tree(&child_ob_tree_element->subtree); - child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION; - BLI_addtail(child_ob_tree_elements, BLI_genericNodeN(child_ob_tree_element)); - } - } - } -} - -/** - * Build a map from Object* to a list of TreeElement* matching the object. - */ -static void outliner_object_tree_elements_lookup_create_recursive(GHash *object_tree_elements_hash, - TreeElement *te_parent) -{ - LISTBASE_FOREACH (TreeElement *, te, &te_parent->subtree) { - TreeStoreElem *tselem = TREESTORE(te); - - if (tselem->type == TSE_LAYER_COLLECTION) { - outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, te); - } - else if (tselem->type == 0 && te->idcode == ID_OB) { - Object *ob = (Object *)tselem->id; - ListBase *tree_elements = BLI_ghash_lookup(object_tree_elements_hash, ob); - - if (tree_elements == NULL) { - tree_elements = MEM_callocN(sizeof(ListBase), __func__); - BLI_ghash_insert(object_tree_elements_hash, ob, tree_elements); - } - - BLI_addtail(tree_elements, BLI_genericNodeN(te)); - outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, te); - } - } -} - -static void outliner_object_tree_elements_lookup_free(GHash *object_tree_elements_hash) -{ - GHASH_FOREACH_BEGIN (ListBase *, tree_elements, object_tree_elements_hash) { - BLI_freelistN(tree_elements); - MEM_freeN(tree_elements); - } - GHASH_FOREACH_END(); -} - /* Sorting ------------------------------------------------------ */ typedef struct tTreeSort { @@ -2499,9 +2318,18 @@ void outliner_build_tree(Main *mainvar, outliner_free_tree(&space_outliner->tree); outliner_storage_cleanup(space_outliner); + outliner_tree_view_destroy(&space_outliner->runtime->tree_view); + + TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; + space_outliner->runtime->tree_view = outliner_tree_view_create(space_outliner->outlinevis); + space_outliner->tree = outliner_tree_view_build_tree( + space_outliner->runtime->tree_view, &source_data, space_outliner); + if (!BLI_listbase_is_empty(&space_outliner->tree)) { + /* Skip. */ + } /* options */ - if (space_outliner->outlinevis == SO_LIBRARIES) { + else if (space_outliner->outlinevis == SO_LIBRARIES) { Library *lib; /* current file first - mainvar provides tselem with unique pointer - not used */ @@ -2612,38 +2440,8 @@ void outliner_build_tree(Main *mainvar, outliner_add_orphaned_datablocks(mainvar, space_outliner); } else if (space_outliner->outlinevis == SO_VIEW_LAYER) { - if (space_outliner->filter & SO_FILTER_NO_COLLECTION) { - /* Show objects in the view layer. */ - LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { - TreeElement *te_object = outliner_add_element( - space_outliner, &space_outliner->tree, base->object, NULL, 0, 0); - te_object->directdata = base; - } - - if ((space_outliner->filter & SO_FILTER_NO_CHILDREN) == 0) { - outliner_make_object_parent_hierarchy(&space_outliner->tree); - } - } - else { - /* Show collections in the view layer. */ - ten = outliner_add_element( - space_outliner, &space_outliner->tree, scene, NULL, TSE_VIEW_COLLECTION_BASE, 0); - ten->name = IFACE_("Scene Collection"); - TREESTORE(ten)->flag &= ~TSE_CLOSED; - - bool show_objects = !(space_outliner->filter & SO_FILTER_NO_OBJECT); - outliner_add_view_layer(space_outliner, &ten->subtree, ten, view_layer, show_objects); - - if ((space_outliner->filter & SO_FILTER_NO_CHILDREN) == 0) { - GHash *object_tree_elements_hash = BLI_ghash_new( - BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__); - outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, ten); - outliner_make_object_parent_hierarchy_collections(space_outliner, - object_tree_elements_hash); - outliner_object_tree_elements_lookup_free(object_tree_elements_hash); - BLI_ghash_free(object_tree_elements_hash, NULL, NULL); - } - } + /* Ported to new tree-view, should be built there already. */ + BLI_assert(false); } if ((space_outliner->flag & SO_SKIP_SORT_ALPHA) == 0) { diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 8be7f4d1bad..ce772043e3b 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -351,11 +351,21 @@ static void outliner_free(SpaceLink *sl) if (space_outliner->treehash) { BKE_outliner_treehash_free(space_outliner->treehash); } + + if (space_outliner->runtime) { + MEM_freeN(space_outliner->runtime); + } } /* spacetype; init callback */ -static void outliner_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) +static void outliner_init(wmWindowManager *UNUSED(wm), ScrArea *area) { + SpaceOutliner *space_outliner = area->spacedata.first; + + if (space_outliner->runtime == NULL) { + space_outliner->runtime = MEM_callocN(sizeof(*space_outliner->runtime), + "SpaceOutliner_Runtime"); + } } static SpaceLink *outliner_duplicate(SpaceLink *sl) @@ -369,6 +379,10 @@ static SpaceLink *outliner_duplicate(SpaceLink *sl) space_outliner_new->sync_select_dirty = WM_OUTLINER_SYNC_SELECT_FROM_ALL; + if (space_outliner->runtime) { + space_outliner_new->runtime = MEM_dupallocN(space_outliner->runtime); + } + return (SpaceLink *)space_outliner_new; } diff --git a/source/blender/editors/space_outliner/tree/tree_view.cc b/source/blender/editors/space_outliner/tree/tree_view.cc new file mode 100644 index 00000000000..de9bc1237b5 --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_view.cc @@ -0,0 +1,61 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + */ + +#include "BLI_listbase.h" + +#include "DNA_listBase.h" + +#include "tree_view.hh" + +namespace outliner = blender::outliner; +/* Convenience. */ +using blender::outliner::AbstractTreeView; + +TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode) +{ + AbstractTreeView *tree_view = nullptr; + + switch (mode) { + case SO_SCENES: + case SO_LIBRARIES: + case SO_SEQUENCE: + case SO_DATA_API: + case SO_ID_ORPHANS: + break; + case SO_VIEW_LAYER: + tree_view = new outliner::TreeViewViewLayer(); + break; + } + + return reinterpret_cast(tree_view); +} + +void outliner_tree_view_destroy(TreeView **tree_view) +{ + delete reinterpret_cast(*tree_view); + *tree_view = nullptr; +} + +ListBase outliner_tree_view_build_tree(TreeView *tree_view, + TreeSourceData *source_data, + SpaceOutliner *space_outliner) +{ + return reinterpret_cast(tree_view)->buildTree(*source_data, *space_outliner); +} diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh new file mode 100644 index 00000000000..b7d71c0b608 --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_view.hh @@ -0,0 +1,89 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + */ + +#pragma once + +#include "DNA_space_types.h" + +struct bContext; +struct ListBase; +struct SpaceOutliner; +struct TreeSourceData; + +#ifdef __cplusplus + +namespace blender { +namespace outliner { + +using Tree = ListBase; + +class AbstractTreeView { + public: + virtual ~AbstractTreeView() = default; + + /** Build a tree for this view and the current context. */ + virtual Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) = 0; +}; + +class TreeViewViewLayer : public AbstractTreeView { + public: + Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) override final; +}; + +} // namespace outliner +} // namespace blender + +extern "C" { +#endif + +/* -------------------------------------------------------------------- */ +/* C-API */ + +typedef struct TreeView TreeView; + +/** + * \brief The data to build the tree from. + */ +typedef struct TreeSourceData { + struct Main *bmain; + struct Scene *scene; + struct ViewLayer *view_layer; +} TreeSourceData; + +TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode); +void outliner_tree_view_destroy(TreeView **tree_view); + +ListBase outliner_tree_view_build_tree(TreeView *tree_view, + TreeSourceData *source_data, + struct SpaceOutliner *space_outliner); + +/* The following functions are needed to build the actual tree. Could be moved to a helper class + * (e.g. TreeBuilder). */ +struct TreeElement *outliner_add_element(struct SpaceOutliner *space_outliner, + ListBase *lb, + void *idv, + struct TreeElement *parent, + short type, + short index); +void outliner_make_object_parent_hierarchy(ListBase *lb); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc new file mode 100644 index 00000000000..665e8d1954f --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc @@ -0,0 +1,258 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + */ + +#include + +#include "DNA_scene_types.h" + +#include "BKE_layer.h" + +#include "BLI_ghash.h" +#include "BLI_listbase.h" + +#include "BLT_translation.h" + +#include "MEM_guardedalloc.h" + +#include "../outliner_intern.h" +#include "tree_view.hh" + +namespace blender { +namespace outliner { + +/** + * For all objects in the tree, lookup the parent in this map, + * and move or add tree elements as needed. + */ +static void outliner_make_object_parent_hierarchy_collections(SpaceOutliner *space_outliner, + GHash *object_tree_elements_hash) +{ + GHashIterator gh_iter; + GHASH_ITER (gh_iter, object_tree_elements_hash) { + Object *child = static_cast(BLI_ghashIterator_getKey(&gh_iter)); + + if (child->parent == NULL) { + continue; + } + + ListBase *child_ob_tree_elements = static_cast( + BLI_ghashIterator_getValue(&gh_iter)); + ListBase *parent_ob_tree_elements = static_cast( + BLI_ghash_lookup(object_tree_elements_hash, child->parent)); + if (parent_ob_tree_elements == NULL) { + continue; + } + + LISTBASE_FOREACH (LinkData *, link, parent_ob_tree_elements) { + TreeElement *parent_ob_tree_element = static_cast(link->data); + TreeElement *parent_ob_collection_tree_element = NULL; + bool found = false; + + /* We always want to remove the child from the direct collection its parent is nested under. + * This is particularly important when dealing with multi-level nesting (grandchildren). */ + parent_ob_collection_tree_element = parent_ob_tree_element->parent; + while (!ELEM(TREESTORE(parent_ob_collection_tree_element)->type, + TSE_VIEW_COLLECTION_BASE, + TSE_LAYER_COLLECTION)) { + parent_ob_collection_tree_element = parent_ob_collection_tree_element->parent; + } + + LISTBASE_FOREACH (LinkData *, link_iter, child_ob_tree_elements) { + TreeElement *child_ob_tree_element = static_cast(link_iter->data); + + if (child_ob_tree_element->parent == parent_ob_collection_tree_element) { + /* Move from the collection subtree into the parent object subtree. */ + BLI_remlink(&parent_ob_collection_tree_element->subtree, child_ob_tree_element); + BLI_addtail(&parent_ob_tree_element->subtree, child_ob_tree_element); + child_ob_tree_element->parent = parent_ob_tree_element; + found = true; + break; + } + } + + if (!found) { + /* We add the child in the tree even if it is not in the collection. + * We deliberately clear its sub-tree though, to make it less prominent. */ + TreeElement *child_ob_tree_element = outliner_add_element( + space_outliner, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); + outliner_free_tree(&child_ob_tree_element->subtree); + child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION; + BLI_addtail(child_ob_tree_elements, BLI_genericNodeN(child_ob_tree_element)); + } + } + } +} + +/** + * Build a map from Object* to a list of TreeElement* matching the object. + */ +static void outliner_object_tree_elements_lookup_create_recursive(GHash *object_tree_elements_hash, + TreeElement *te_parent) +{ + LISTBASE_FOREACH (TreeElement *, te, &te_parent->subtree) { + TreeStoreElem *tselem = TREESTORE(te); + + if (tselem->type == TSE_LAYER_COLLECTION) { + outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, te); + } + else if (tselem->type == 0 && te->idcode == ID_OB) { + Object *ob = (Object *)tselem->id; + ListBase *tree_elements = static_cast( + BLI_ghash_lookup(object_tree_elements_hash, ob)); + + if (tree_elements == NULL) { + tree_elements = static_cast(MEM_callocN(sizeof(ListBase), __func__)); + BLI_ghash_insert(object_tree_elements_hash, ob, tree_elements); + } + + BLI_addtail(tree_elements, BLI_genericNodeN(te)); + outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, te); + } + } +} + +static void outliner_object_tree_elements_lookup_free(GHash *object_tree_elements_hash) +{ + GHASH_FOREACH_BEGIN (ListBase *, tree_elements, object_tree_elements_hash) { + BLI_freelistN(tree_elements); + MEM_freeN(tree_elements); + } + GHASH_FOREACH_END(); +} + +static void outliner_add_layer_collection_objects(SpaceOutliner *space_outliner, + ListBase *tree, + ViewLayer *layer, + LayerCollection *lc, + TreeElement *ten) +{ + LISTBASE_FOREACH (CollectionObject *, cob, &lc->collection->gobject) { + Base *base = BKE_view_layer_base_find(layer, cob->ob); + TreeElement *te_object = outliner_add_element(space_outliner, tree, base->object, ten, 0, 0); + te_object->directdata = base; + + if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) { + te_object->flag |= TE_DISABLED; + } + } +} + +static void outliner_add_layer_collections_recursive(SpaceOutliner *space_outliner, + ListBase *tree, + ViewLayer *layer, + ListBase *layer_collections, + TreeElement *parent_ten, + const bool show_objects) +{ + LISTBASE_FOREACH (LayerCollection *, lc, layer_collections) { + const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0; + TreeElement *ten; + + if (exclude && ((space_outliner->show_restrict_flags & SO_RESTRICT_ENABLE) == 0)) { + ten = parent_ten; + } + else { + ID *id = &lc->collection->id; + ten = outliner_add_element(space_outliner, tree, id, parent_ten, TSE_LAYER_COLLECTION, 0); + + ten->name = id->name + 2; + ten->directdata = lc; + + /* Open by default, except linked collections, which may contain many elements. */ + TreeStoreElem *tselem = TREESTORE(ten); + if (!(tselem->used || ID_IS_LINKED(id) || ID_IS_OVERRIDE_LIBRARY(id))) { + tselem->flag &= ~TSE_CLOSED; + } + + if (exclude || (lc->runtime_flag & LAYER_COLLECTION_VISIBLE_VIEW_LAYER) == 0) { + ten->flag |= TE_DISABLED; + } + } + + outliner_add_layer_collections_recursive( + space_outliner, &ten->subtree, layer, &lc->layer_collections, ten, show_objects); + if (!exclude && show_objects) { + outliner_add_layer_collection_objects(space_outliner, &ten->subtree, layer, lc, ten); + } + } +} + +static void outliner_add_view_layer(SpaceOutliner *space_outliner, + ListBase *tree, + TreeElement *parent, + ViewLayer *layer, + const bool show_objects) +{ + /* First layer collection is for master collection, don't show it. */ + LayerCollection *lc = static_cast(layer->layer_collections.first); + if (lc == NULL) { + return; + } + + outliner_add_layer_collections_recursive( + space_outliner, tree, layer, &lc->layer_collections, parent, show_objects); + if (show_objects) { + outliner_add_layer_collection_objects(space_outliner, tree, layer, lc, parent); + } +} + +Tree TreeViewViewLayer::buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) +{ + Tree tree = {nullptr}; + + if (space_outliner.filter & SO_FILTER_NO_COLLECTION) { + /* Show objects in the view layer. */ + LISTBASE_FOREACH (Base *, base, &source_data.view_layer->object_bases) { + TreeElement *te_object = outliner_add_element( + &space_outliner, &tree, base->object, nullptr, 0, 0); + te_object->directdata = base; + } + + if ((space_outliner.filter & SO_FILTER_NO_CHILDREN) == 0) { + outliner_make_object_parent_hierarchy(&tree); + } + } + else { + /* Show collections in the view layer. */ + TreeElement *ten = outliner_add_element( + &space_outliner, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); + ten->name = IFACE_("Scene Collection"); + TREESTORE(ten)->flag &= ~TSE_CLOSED; + + bool show_objects = !(space_outliner.filter & SO_FILTER_NO_OBJECT); + outliner_add_view_layer( + &space_outliner, &ten->subtree, ten, source_data.view_layer, show_objects); + + if ((space_outliner.filter & SO_FILTER_NO_CHILDREN) == 0) { + GHash *object_tree_elements_hash = BLI_ghash_new( + BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__); + outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, ten); + outliner_make_object_parent_hierarchy_collections(&space_outliner, + object_tree_elements_hash); + outliner_object_tree_elements_lookup_free(object_tree_elements_hash); + BLI_ghash_free(object_tree_elements_hash, nullptr, nullptr); + } + } + + return tree; +} + +} // namespace outliner +} // namespace blender diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 80703782f18..a3aa79d29e8 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -234,6 +234,9 @@ typedef enum eSpaceButtons_Flag { /** \name Outliner * \{ */ +/* Defined in `outliner_intern.h`. */ +typedef struct SpaceOutliner_Runtime SpaceOutliner_Runtime; + /* Outliner */ typedef struct SpaceOutliner { SpaceLink *next, *prev; @@ -276,6 +279,8 @@ typedef struct SpaceOutliner { * Pointers to treestore elements, grouped by (id, type, nr) * in hashtable for faster searching */ void *treehash; + + SpaceOutliner_Runtime *runtime; } SpaceOutliner; /* SpaceOutliner.flag */ -- cgit v1.2.3 From c9cc03b688230d0b898467135e75e2cbac8a3226 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 6 Nov 2020 22:28:15 +0100 Subject: UI Code Quality: General refactor of Outliner View Layer display mode creation See https://developer.blender.org/D9499. * Turn functions into member functions (makes API for a type more obvious & local, allows implicitly sharing data through member variables, enables order independend definition of functions, allows more natural language for function names because of the obvious context). * Move important variables to classes rather than passing around all the time (shorter, more task-focused code, localizes important data names). * Add helper class for adding object children sub-trees (smaller, more focused units are easier to reason about, have higher coherence, better testability, can manage own resources easily with RAII). * Use C++ iterators over C-macros (arguably more readable, less macros is generally preferred) * Add doxygen groups (visually emphasizes the coherence of code sections, provide place for higher level comments on sections). * Prefer references over pointers for passing by reference (makes clear that NULL is not a valid value and that the current scope is not the owner). --- .../blender/editors/space_outliner/outliner_tree.c | 3 +- .../editors/space_outliner/tree/tree_view.cc | 4 +- .../editors/space_outliner/tree/tree_view.hh | 30 +- .../space_outliner/tree/tree_view_view_layer.cc | 352 ++++++++++++--------- 4 files changed, 231 insertions(+), 158 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 874d35112a5..84b59da26c1 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -2321,7 +2321,8 @@ void outliner_build_tree(Main *mainvar, outliner_tree_view_destroy(&space_outliner->runtime->tree_view); TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; - space_outliner->runtime->tree_view = outliner_tree_view_create(space_outliner->outlinevis); + space_outliner->runtime->tree_view = outliner_tree_view_create(space_outliner->outlinevis, + space_outliner); space_outliner->tree = outliner_tree_view_build_tree( space_outliner->runtime->tree_view, &source_data, space_outliner); diff --git a/source/blender/editors/space_outliner/tree/tree_view.cc b/source/blender/editors/space_outliner/tree/tree_view.cc index de9bc1237b5..8352a23080d 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.cc +++ b/source/blender/editors/space_outliner/tree/tree_view.cc @@ -28,7 +28,7 @@ namespace outliner = blender::outliner; /* Convenience. */ using blender::outliner::AbstractTreeView; -TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode) +TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner) { AbstractTreeView *tree_view = nullptr; @@ -40,7 +40,7 @@ TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode) case SO_ID_ORPHANS: break; case SO_VIEW_LAYER: - tree_view = new outliner::TreeViewViewLayer(); + tree_view = new outliner::TreeViewViewLayer(*space_outliner); break; } diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh index b7d71c0b608..57ee7c58c29 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.hh +++ b/source/blender/editors/space_outliner/tree/tree_view.hh @@ -25,6 +25,7 @@ struct bContext; struct ListBase; struct SpaceOutliner; +struct TreeElement; struct TreeSourceData; #ifdef __cplusplus @@ -34,17 +35,40 @@ namespace outliner { using Tree = ListBase; +/* -------------------------------------------------------------------- */ +/* Tree-View Interface */ + class AbstractTreeView { public: + AbstractTreeView(SpaceOutliner &space_outliner) : _space_outliner(space_outliner) + { + } virtual ~AbstractTreeView() = default; /** Build a tree for this view and the current context. */ virtual Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) = 0; + + protected: + SpaceOutliner &_space_outliner; }; -class TreeViewViewLayer : public AbstractTreeView { +/* -------------------------------------------------------------------- */ +/* View Layer Tree-View */ + +class TreeViewViewLayer final : public AbstractTreeView { public: - Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) override final; + TreeViewViewLayer(SpaceOutliner &space_outliner); + + Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) override; + + private: + ViewLayer *_view_layer; + bool _show_objects = true; + + void add_view_layer(ListBase &, TreeElement &); + void add_layer_collections_recursive(ListBase &, ListBase &, TreeElement &); + void add_layer_collection_objects(ListBase &, LayerCollection &, TreeElement &); + void add_layer_collection_objects_children(TreeElement &); }; } // namespace outliner @@ -67,7 +91,7 @@ typedef struct TreeSourceData { struct ViewLayer *view_layer; } TreeSourceData; -TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode); +TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner); void outliner_tree_view_destroy(TreeView **tree_view); ListBase outliner_tree_view_build_tree(TreeView *tree_view, diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc index 665e8d1954f..0d35db36e5b 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc @@ -26,6 +26,7 @@ #include "BLI_ghash.h" #include "BLI_listbase.h" +#include "BLI_listbase_wrapper.hh" #include "BLT_translation.h" @@ -37,140 +38,100 @@ namespace blender { namespace outliner { -/** - * For all objects in the tree, lookup the parent in this map, - * and move or add tree elements as needed. - */ -static void outliner_make_object_parent_hierarchy_collections(SpaceOutliner *space_outliner, - GHash *object_tree_elements_hash) -{ - GHashIterator gh_iter; - GHASH_ITER (gh_iter, object_tree_elements_hash) { - Object *child = static_cast(BLI_ghashIterator_getKey(&gh_iter)); - - if (child->parent == NULL) { - continue; - } +/* Convenience/readability. */ +template using List = ListBaseWrapper; - ListBase *child_ob_tree_elements = static_cast( - BLI_ghashIterator_getValue(&gh_iter)); - ListBase *parent_ob_tree_elements = static_cast( - BLI_ghash_lookup(object_tree_elements_hash, child->parent)); - if (parent_ob_tree_elements == NULL) { - continue; - } +class ObjectsChildrenBuilder { + public: + ObjectsChildrenBuilder(SpaceOutliner &outliner); + ~ObjectsChildrenBuilder(); - LISTBASE_FOREACH (LinkData *, link, parent_ob_tree_elements) { - TreeElement *parent_ob_tree_element = static_cast(link->data); - TreeElement *parent_ob_collection_tree_element = NULL; - bool found = false; + void operator()(TreeElement &collection_tree_elem); - /* We always want to remove the child from the direct collection its parent is nested under. - * This is particularly important when dealing with multi-level nesting (grandchildren). */ - parent_ob_collection_tree_element = parent_ob_tree_element->parent; - while (!ELEM(TREESTORE(parent_ob_collection_tree_element)->type, - TSE_VIEW_COLLECTION_BASE, - TSE_LAYER_COLLECTION)) { - parent_ob_collection_tree_element = parent_ob_collection_tree_element->parent; - } + private: + SpaceOutliner &_outliner; + GHash &_object_tree_elements_hash; - LISTBASE_FOREACH (LinkData *, link_iter, child_ob_tree_elements) { - TreeElement *child_ob_tree_element = static_cast(link_iter->data); + void object_tree_elements_lookup_create_recursive(TreeElement *te_parent); + void make_object_parent_hierarchy_collections(); +}; - if (child_ob_tree_element->parent == parent_ob_collection_tree_element) { - /* Move from the collection subtree into the parent object subtree. */ - BLI_remlink(&parent_ob_collection_tree_element->subtree, child_ob_tree_element); - BLI_addtail(&parent_ob_tree_element->subtree, child_ob_tree_element); - child_ob_tree_element->parent = parent_ob_tree_element; - found = true; - break; - } - } +/* -------------------------------------------------------------------- */ +/** \name Tree View for a View Layer. + * + * \{ */ - if (!found) { - /* We add the child in the tree even if it is not in the collection. - * We deliberately clear its sub-tree though, to make it less prominent. */ - TreeElement *child_ob_tree_element = outliner_add_element( - space_outliner, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); - outliner_free_tree(&child_ob_tree_element->subtree); - child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION; - BLI_addtail(child_ob_tree_elements, BLI_genericNodeN(child_ob_tree_element)); - } - } - } +TreeViewViewLayer::TreeViewViewLayer(SpaceOutliner &space_outliner) + : AbstractTreeView(space_outliner) +{ } -/** - * Build a map from Object* to a list of TreeElement* matching the object. - */ -static void outliner_object_tree_elements_lookup_create_recursive(GHash *object_tree_elements_hash, - TreeElement *te_parent) +Tree TreeViewViewLayer::buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) { - LISTBASE_FOREACH (TreeElement *, te, &te_parent->subtree) { - TreeStoreElem *tselem = TREESTORE(te); + Tree tree = {nullptr}; - if (tselem->type == TSE_LAYER_COLLECTION) { - outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, te); - } - else if (tselem->type == 0 && te->idcode == ID_OB) { - Object *ob = (Object *)tselem->id; - ListBase *tree_elements = static_cast( - BLI_ghash_lookup(object_tree_elements_hash, ob)); + _view_layer = source_data.view_layer; + _show_objects = !(space_outliner.filter & SO_FILTER_NO_OBJECT); - if (tree_elements == NULL) { - tree_elements = static_cast(MEM_callocN(sizeof(ListBase), __func__)); - BLI_ghash_insert(object_tree_elements_hash, ob, tree_elements); - } + const bool show_children = (space_outliner.filter & SO_FILTER_NO_CHILDREN) == 0; - BLI_addtail(tree_elements, BLI_genericNodeN(te)); - outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, te); + if (space_outliner.filter & SO_FILTER_NO_COLLECTION) { + /* Show objects in the view layer. */ + for (Base *base : List(_view_layer->object_bases)) { + TreeElement *te_object = outliner_add_element( + &space_outliner, &tree, base->object, nullptr, 0, 0); + te_object->directdata = base; + } + + if (show_children) { + outliner_make_object_parent_hierarchy(&tree); } } -} + else { + /* Show collections in the view layer. */ + TreeElement &ten = *outliner_add_element( + &space_outliner, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); + ten.name = IFACE_("Scene Collection"); + TREESTORE(&ten)->flag &= ~TSE_CLOSED; -static void outliner_object_tree_elements_lookup_free(GHash *object_tree_elements_hash) -{ - GHASH_FOREACH_BEGIN (ListBase *, tree_elements, object_tree_elements_hash) { - BLI_freelistN(tree_elements); - MEM_freeN(tree_elements); + add_view_layer(ten.subtree, ten); + if (show_children) { + add_layer_collection_objects_children(ten); + } } - GHASH_FOREACH_END(); + + return tree; } -static void outliner_add_layer_collection_objects(SpaceOutliner *space_outliner, - ListBase *tree, - ViewLayer *layer, - LayerCollection *lc, - TreeElement *ten) +void TreeViewViewLayer::add_view_layer(ListBase &tree, TreeElement &parent) { - LISTBASE_FOREACH (CollectionObject *, cob, &lc->collection->gobject) { - Base *base = BKE_view_layer_base_find(layer, cob->ob); - TreeElement *te_object = outliner_add_element(space_outliner, tree, base->object, ten, 0, 0); - te_object->directdata = base; + /* First layer collection is for master collection, don't show it. */ + LayerCollection *lc = static_cast(_view_layer->layer_collections.first); + if (lc == nullptr) { + return; + } - if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) { - te_object->flag |= TE_DISABLED; - } + add_layer_collections_recursive(tree, lc->layer_collections, parent); + if (_show_objects) { + add_layer_collection_objects(tree, *lc, parent); } } -static void outliner_add_layer_collections_recursive(SpaceOutliner *space_outliner, - ListBase *tree, - ViewLayer *layer, - ListBase *layer_collections, - TreeElement *parent_ten, - const bool show_objects) +void TreeViewViewLayer::add_layer_collections_recursive(ListBase &tree, + ListBase &layer_collections, + TreeElement &parent_ten) { - LISTBASE_FOREACH (LayerCollection *, lc, layer_collections) { + for (LayerCollection *lc : List(layer_collections)) { const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0; TreeElement *ten; - if (exclude && ((space_outliner->show_restrict_flags & SO_RESTRICT_ENABLE) == 0)) { - ten = parent_ten; + if (exclude && ((_space_outliner.show_restrict_flags & SO_RESTRICT_ENABLE) == 0)) { + ten = &parent_ten; } else { ID *id = &lc->collection->id; - ten = outliner_add_element(space_outliner, tree, id, parent_ten, TSE_LAYER_COLLECTION, 0); + ten = outliner_add_element( + &_space_outliner, &tree, id, &parent_ten, TSE_LAYER_COLLECTION, 0); ten->name = id->name + 2; ten->directdata = lc; @@ -186,73 +147,160 @@ static void outliner_add_layer_collections_recursive(SpaceOutliner *space_outlin } } - outliner_add_layer_collections_recursive( - space_outliner, &ten->subtree, layer, &lc->layer_collections, ten, show_objects); - if (!exclude && show_objects) { - outliner_add_layer_collection_objects(space_outliner, &ten->subtree, layer, lc, ten); + add_layer_collections_recursive(ten->subtree, lc->layer_collections, *ten); + if (!exclude && _show_objects) { + add_layer_collection_objects(ten->subtree, *lc, *ten); } } } -static void outliner_add_view_layer(SpaceOutliner *space_outliner, - ListBase *tree, - TreeElement *parent, - ViewLayer *layer, - const bool show_objects) +void TreeViewViewLayer::add_layer_collection_objects(ListBase &tree, + LayerCollection &lc, + TreeElement &ten) { - /* First layer collection is for master collection, don't show it. */ - LayerCollection *lc = static_cast(layer->layer_collections.first); - if (lc == NULL) { - return; + for (CollectionObject *cob : List(lc.collection->gobject)) { + Base *base = BKE_view_layer_base_find(_view_layer, cob->ob); + TreeElement *te_object = outliner_add_element( + &_space_outliner, &tree, base->object, &ten, 0, 0); + te_object->directdata = base; + + if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) { + te_object->flag |= TE_DISABLED; + } } +} - outliner_add_layer_collections_recursive( - space_outliner, tree, layer, &lc->layer_collections, parent, show_objects); - if (show_objects) { - outliner_add_layer_collection_objects(space_outliner, tree, layer, lc, parent); +void TreeViewViewLayer::add_layer_collection_objects_children(TreeElement &collection_tree_elem) +{ + /* Call helper to add children. */ + ObjectsChildrenBuilder child_builder{_space_outliner}; + child_builder(collection_tree_elem); +} + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Object Chilren helper. + * + * Helper to add child objects to the sub-tree of their parent, recursively covering all nested + * collections. + * + * \{ */ + +ObjectsChildrenBuilder::ObjectsChildrenBuilder(SpaceOutliner &outliner) + : _outliner(outliner), + _object_tree_elements_hash( + *BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__)) +{ +} + +ObjectsChildrenBuilder::~ObjectsChildrenBuilder() +{ + GHASH_FOREACH_BEGIN (ListBase *, tree_elements, &_object_tree_elements_hash) { + BLI_freelistN(tree_elements); + MEM_freeN(tree_elements); } + GHASH_FOREACH_END(); + + BLI_ghash_free(&_object_tree_elements_hash, nullptr, nullptr); } -Tree TreeViewViewLayer::buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) +void ObjectsChildrenBuilder::operator()(TreeElement &collection_tree_elem) { - Tree tree = {nullptr}; + object_tree_elements_lookup_create_recursive(&collection_tree_elem); + make_object_parent_hierarchy_collections(); +} - if (space_outliner.filter & SO_FILTER_NO_COLLECTION) { - /* Show objects in the view layer. */ - LISTBASE_FOREACH (Base *, base, &source_data.view_layer->object_bases) { - TreeElement *te_object = outliner_add_element( - &space_outliner, &tree, base->object, nullptr, 0, 0); - te_object->directdata = base; +/** + * Build a map from Object* to a list of TreeElement* matching the object. + */ +void ObjectsChildrenBuilder::object_tree_elements_lookup_create_recursive(TreeElement *te_parent) +{ + for (TreeElement *te : List(te_parent->subtree)) { + TreeStoreElem *tselem = TREESTORE(te); + + if (tselem->type == TSE_LAYER_COLLECTION) { + object_tree_elements_lookup_create_recursive(te); } + else if (tselem->type == 0 && te->idcode == ID_OB) { + Object *ob = (Object *)tselem->id; + ListBase *tree_elements = static_cast( + BLI_ghash_lookup(&_object_tree_elements_hash, ob)); - if ((space_outliner.filter & SO_FILTER_NO_CHILDREN) == 0) { - outliner_make_object_parent_hierarchy(&tree); + if (tree_elements == nullptr) { + tree_elements = static_cast(MEM_callocN(sizeof(ListBase), __func__)); + BLI_ghash_insert(&_object_tree_elements_hash, ob, tree_elements); + } + + BLI_addtail(tree_elements, BLI_genericNodeN(te)); + object_tree_elements_lookup_create_recursive(te); } } - else { - /* Show collections in the view layer. */ - TreeElement *ten = outliner_add_element( - &space_outliner, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); - ten->name = IFACE_("Scene Collection"); - TREESTORE(ten)->flag &= ~TSE_CLOSED; - - bool show_objects = !(space_outliner.filter & SO_FILTER_NO_OBJECT); - outliner_add_view_layer( - &space_outliner, &ten->subtree, ten, source_data.view_layer, show_objects); - - if ((space_outliner.filter & SO_FILTER_NO_CHILDREN) == 0) { - GHash *object_tree_elements_hash = BLI_ghash_new( - BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__); - outliner_object_tree_elements_lookup_create_recursive(object_tree_elements_hash, ten); - outliner_make_object_parent_hierarchy_collections(&space_outliner, - object_tree_elements_hash); - outliner_object_tree_elements_lookup_free(object_tree_elements_hash); - BLI_ghash_free(object_tree_elements_hash, nullptr, nullptr); +} + +/** + * For all objects in the tree, lookup the parent in this map, + * and move or add tree elements as needed. + */ +void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() +{ + GHashIterator gh_iter; + GHASH_ITER (gh_iter, &_object_tree_elements_hash) { + Object *child = static_cast(BLI_ghashIterator_getKey(&gh_iter)); + + if (child->parent == nullptr) { + continue; } - } - return tree; + ListBase *child_ob_tree_elements = static_cast( + BLI_ghashIterator_getValue(&gh_iter)); + ListBase *parent_ob_tree_elements = static_cast( + BLI_ghash_lookup(&_object_tree_elements_hash, child->parent)); + if (parent_ob_tree_elements == nullptr) { + continue; + } + + for (LinkData *link : List(parent_ob_tree_elements)) { + TreeElement *parent_ob_tree_element = static_cast(link->data); + TreeElement *parent_ob_collection_tree_element = nullptr; + bool found = false; + + /* We always want to remove the child from the direct collection its parent is nested under. + * This is particularly important when dealing with multi-level nesting (grandchildren). */ + parent_ob_collection_tree_element = parent_ob_tree_element->parent; + while (!ELEM(TREESTORE(parent_ob_collection_tree_element)->type, + TSE_VIEW_COLLECTION_BASE, + TSE_LAYER_COLLECTION)) { + parent_ob_collection_tree_element = parent_ob_collection_tree_element->parent; + } + + for (LinkData *link_iter : List(child_ob_tree_elements)) { + TreeElement *child_ob_tree_element = static_cast(link_iter->data); + + if (child_ob_tree_element->parent == parent_ob_collection_tree_element) { + /* Move from the collection subtree into the parent object subtree. */ + BLI_remlink(&parent_ob_collection_tree_element->subtree, child_ob_tree_element); + BLI_addtail(&parent_ob_tree_element->subtree, child_ob_tree_element); + child_ob_tree_element->parent = parent_ob_tree_element; + found = true; + break; + } + } + + if (!found) { + /* We add the child in the tree even if it is not in the collection. + * We deliberately clear its sub-tree though, to make it less prominent. */ + TreeElement *child_ob_tree_element = outliner_add_element( + &_outliner, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); + outliner_free_tree(&child_ob_tree_element->subtree); + child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION; + BLI_addtail(child_ob_tree_elements, BLI_genericNodeN(child_ob_tree_element)); + } + } + } } +/** \} */ + } // namespace outliner } // namespace blender -- cgit v1.2.3 From 6b18e13c5b2fecd6485eaf44a58de5375f175ce9 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 7 Nov 2020 00:15:09 +0100 Subject: UI Code Quality: Use C++ data-structures for Outliner object hierarchy building See https://developer.blender.org/D9499. * Use `blender::Map` over `GHash` * Use `blender::Vector` over allocated `ListBase *` Benefits: * Significantly reduces the amount of heap allocations in large trees (e.g. from O(n) to O(log(n)), where n is number of objects). * Higher type safety (no `void *`, virtually no casts). * More optimized (e.g. small buffer optimization). * More practicable, const-correct APIs with well-defined exception behavior. Code generally becomes more readable (less lines of code, less boilerplate, more logic-focused APIs because of greater language flexibility). --- .../space_outliner/tree/tree_view_view_layer.cc | 64 ++++++++-------------- 1 file changed, 22 insertions(+), 42 deletions(-) diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc index 0d35db36e5b..e8afff12991 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc @@ -24,14 +24,13 @@ #include "BKE_layer.h" -#include "BLI_ghash.h" #include "BLI_listbase.h" #include "BLI_listbase_wrapper.hh" +#include "BLI_map.hh" +#include "BLI_vector.hh" #include "BLT_translation.h" -#include "MEM_guardedalloc.h" - #include "../outliner_intern.h" #include "tree_view.hh" @@ -44,13 +43,16 @@ template using List = ListBaseWrapper; class ObjectsChildrenBuilder { public: ObjectsChildrenBuilder(SpaceOutliner &outliner); - ~ObjectsChildrenBuilder(); + ~ObjectsChildrenBuilder() = default; void operator()(TreeElement &collection_tree_elem); private: + using TreeChildren = Vector; + using ObjectTreeElementsMap = Map; + SpaceOutliner &_outliner; - GHash &_object_tree_elements_hash; + ObjectTreeElementsMap _object_tree_elements_map; void object_tree_elements_lookup_create_recursive(TreeElement *te_parent); void make_object_parent_hierarchy_collections(); @@ -187,22 +189,8 @@ void TreeViewViewLayer::add_layer_collection_objects_children(TreeElement &colle * * \{ */ -ObjectsChildrenBuilder::ObjectsChildrenBuilder(SpaceOutliner &outliner) - : _outliner(outliner), - _object_tree_elements_hash( - *BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__)) -{ -} - -ObjectsChildrenBuilder::~ObjectsChildrenBuilder() +ObjectsChildrenBuilder::ObjectsChildrenBuilder(SpaceOutliner &outliner) : _outliner(outliner) { - GHASH_FOREACH_BEGIN (ListBase *, tree_elements, &_object_tree_elements_hash) { - BLI_freelistN(tree_elements); - MEM_freeN(tree_elements); - } - GHASH_FOREACH_END(); - - BLI_ghash_free(&_object_tree_elements_hash, nullptr, nullptr); } void ObjectsChildrenBuilder::operator()(TreeElement &collection_tree_elem) @@ -221,18 +209,15 @@ void ObjectsChildrenBuilder::object_tree_elements_lookup_create_recursive(TreeEl if (tselem->type == TSE_LAYER_COLLECTION) { object_tree_elements_lookup_create_recursive(te); + continue; } - else if (tselem->type == 0 && te->idcode == ID_OB) { - Object *ob = (Object *)tselem->id; - ListBase *tree_elements = static_cast( - BLI_ghash_lookup(&_object_tree_elements_hash, ob)); - if (tree_elements == nullptr) { - tree_elements = static_cast(MEM_callocN(sizeof(ListBase), __func__)); - BLI_ghash_insert(&_object_tree_elements_hash, ob, tree_elements); - } + if (tselem->type == 0 && te->idcode == ID_OB) { + Object *ob = (Object *)tselem->id; + /* Lookup children or add new, empty children vector. */ + Vector &tree_elements = _object_tree_elements_map.lookup_or_add(ob, {}); - BLI_addtail(tree_elements, BLI_genericNodeN(te)); + tree_elements.append(te); object_tree_elements_lookup_create_recursive(te); } } @@ -244,24 +229,21 @@ void ObjectsChildrenBuilder::object_tree_elements_lookup_create_recursive(TreeEl */ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() { - GHashIterator gh_iter; - GHASH_ITER (gh_iter, &_object_tree_elements_hash) { - Object *child = static_cast(BLI_ghashIterator_getKey(&gh_iter)); + for (ObjectTreeElementsMap::MutableItem item : _object_tree_elements_map.items()) { + Object *child = item.key; if (child->parent == nullptr) { continue; } - ListBase *child_ob_tree_elements = static_cast( - BLI_ghashIterator_getValue(&gh_iter)); - ListBase *parent_ob_tree_elements = static_cast( - BLI_ghash_lookup(&_object_tree_elements_hash, child->parent)); + Vector &child_ob_tree_elements = item.value; + Vector *parent_ob_tree_elements = _object_tree_elements_map.lookup_ptr( + child->parent); if (parent_ob_tree_elements == nullptr) { continue; } - for (LinkData *link : List(parent_ob_tree_elements)) { - TreeElement *parent_ob_tree_element = static_cast(link->data); + for (TreeElement *parent_ob_tree_element : *parent_ob_tree_elements) { TreeElement *parent_ob_collection_tree_element = nullptr; bool found = false; @@ -274,9 +256,7 @@ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() parent_ob_collection_tree_element = parent_ob_collection_tree_element->parent; } - for (LinkData *link_iter : List(child_ob_tree_elements)) { - TreeElement *child_ob_tree_element = static_cast(link_iter->data); - + for (TreeElement *child_ob_tree_element : child_ob_tree_elements) { if (child_ob_tree_element->parent == parent_ob_collection_tree_element) { /* Move from the collection subtree into the parent object subtree. */ BLI_remlink(&parent_ob_collection_tree_element->subtree, child_ob_tree_element); @@ -294,7 +274,7 @@ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() &_outliner, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); outliner_free_tree(&child_ob_tree_element->subtree); child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION; - BLI_addtail(child_ob_tree_elements, BLI_genericNodeN(child_ob_tree_element)); + child_ob_tree_elements.append(child_ob_tree_element); } } } -- cgit v1.2.3 From cad2fd99e7c48101f2e9016931ba6a32f0196f6c Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 7 Nov 2020 01:04:17 +0100 Subject: Cleanup: Comments and style improvements for new Outliner C++ code See https://developer.blender.org/D9499. * Add comments to explain the design ideas better. * Follow code style guide for class layout. * Avoid uninitialized value after construction (general good practice). --- .../editors/space_outliner/tree/tree_view.hh | 26 +++++++++++++++++----- .../space_outliner/tree/tree_view_view_layer.cc | 16 ++++++------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh index 57ee7c58c29..f64e4212e52 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.hh +++ b/source/blender/editors/space_outliner/tree/tree_view.hh @@ -16,6 +16,9 @@ /** \file * \ingroup spoutliner + * + * For now all sub-class declarations of #AbstractTreeView are in this file. They could be moved + * into own headers of course. */ #pragma once @@ -38,6 +41,12 @@ using Tree = ListBase; /* -------------------------------------------------------------------- */ /* Tree-View Interface */ +/** + * Abstract base class defining the interface for tree-view variants. For each Outliner display + * type (e.g View Layer, Scenes, Blender File), a derived class implements a #buildTree() function, + * that based on Blender data (#TreeSourceData), builds a custom tree of whatever data it wants to + * visualize. + */ class AbstractTreeView { public: AbstractTreeView(SpaceOutliner &space_outliner) : _space_outliner(space_outliner) @@ -45,10 +54,14 @@ class AbstractTreeView { } virtual ~AbstractTreeView() = default; - /** Build a tree for this view and the current context. */ + /** + * Build a tree for this view with the Blender context data given in \a source_data and the view + * settings in \a space_outliner. + */ virtual Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) = 0; protected: + /** All derived classes will need a handle to this, so storing it in the base for convenience. */ SpaceOutliner &_space_outliner; }; @@ -56,15 +69,15 @@ class AbstractTreeView { /* View Layer Tree-View */ class TreeViewViewLayer final : public AbstractTreeView { + ViewLayer *_view_layer = nullptr; + bool _show_objects = true; + public: TreeViewViewLayer(SpaceOutliner &space_outliner); Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) override; private: - ViewLayer *_view_layer; - bool _show_objects = true; - void add_view_layer(ListBase &, TreeElement &); void add_layer_collections_recursive(ListBase &, ListBase &, TreeElement &); void add_layer_collection_objects(ListBase &, LayerCollection &, TreeElement &); @@ -80,6 +93,7 @@ extern "C" { /* -------------------------------------------------------------------- */ /* C-API */ +/** There is no actual implementation of this, it's the C name for an #AbstractTreeView handle. */ typedef struct TreeView TreeView; /** @@ -98,8 +112,8 @@ ListBase outliner_tree_view_build_tree(TreeView *tree_view, TreeSourceData *source_data, struct SpaceOutliner *space_outliner); -/* The following functions are needed to build the actual tree. Could be moved to a helper class - * (e.g. TreeBuilder). */ +/* The following functions are needed to build the tree. These are calls back into C; the way + * elements are created should be refactored and ported to C++ with a new design/API too. */ struct TreeElement *outliner_add_element(struct SpaceOutliner *space_outliner, ListBase *lb, void *idv, diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc index e8afff12991..eb7a56a83c0 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc @@ -41,20 +41,20 @@ namespace outliner { template using List = ListBaseWrapper; class ObjectsChildrenBuilder { - public: - ObjectsChildrenBuilder(SpaceOutliner &outliner); - ~ObjectsChildrenBuilder() = default; - - void operator()(TreeElement &collection_tree_elem); - - private: using TreeChildren = Vector; using ObjectTreeElementsMap = Map; SpaceOutliner &_outliner; ObjectTreeElementsMap _object_tree_elements_map; - void object_tree_elements_lookup_create_recursive(TreeElement *te_parent); + public: + ObjectsChildrenBuilder(SpaceOutliner &); + ~ObjectsChildrenBuilder() = default; + + void operator()(TreeElement &collection_tree_elem); + + private: + void object_tree_elements_lookup_create_recursive(TreeElement *); void make_object_parent_hierarchy_collections(); }; -- cgit v1.2.3 From dc9a52a3032cec2553a3315ce0055f28b9959432 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 7 Nov 2020 01:21:47 +0100 Subject: Cleanup: Remove redundant parameter from new Outliner tree building code See https://developer.blender.org/D9499. --- source/blender/editors/space_outliner/outliner_tree.c | 6 +++--- source/blender/editors/space_outliner/tree/tree_view.cc | 6 ++---- source/blender/editors/space_outliner/tree/tree_view.hh | 8 +++----- .../editors/space_outliner/tree/tree_view_view_layer.cc | 12 ++++++------ 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 84b59da26c1..4654377e7e5 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -2320,11 +2320,11 @@ void outliner_build_tree(Main *mainvar, outliner_storage_cleanup(space_outliner); outliner_tree_view_destroy(&space_outliner->runtime->tree_view); - TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; space_outliner->runtime->tree_view = outliner_tree_view_create(space_outliner->outlinevis, space_outliner); - space_outliner->tree = outliner_tree_view_build_tree( - space_outliner->runtime->tree_view, &source_data, space_outliner); + TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; + space_outliner->tree = outliner_tree_view_build_tree(space_outliner->runtime->tree_view, + &source_data); if (!BLI_listbase_is_empty(&space_outliner->tree)) { /* Skip. */ diff --git a/source/blender/editors/space_outliner/tree/tree_view.cc b/source/blender/editors/space_outliner/tree/tree_view.cc index 8352a23080d..629e95b3b6b 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.cc +++ b/source/blender/editors/space_outliner/tree/tree_view.cc @@ -53,9 +53,7 @@ void outliner_tree_view_destroy(TreeView **tree_view) *tree_view = nullptr; } -ListBase outliner_tree_view_build_tree(TreeView *tree_view, - TreeSourceData *source_data, - SpaceOutliner *space_outliner) +ListBase outliner_tree_view_build_tree(TreeView *tree_view, TreeSourceData *source_data) { - return reinterpret_cast(tree_view)->buildTree(*source_data, *space_outliner); + return reinterpret_cast(tree_view)->buildTree(*source_data); } diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh index f64e4212e52..ab23c560b21 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.hh +++ b/source/blender/editors/space_outliner/tree/tree_view.hh @@ -58,7 +58,7 @@ class AbstractTreeView { * Build a tree for this view with the Blender context data given in \a source_data and the view * settings in \a space_outliner. */ - virtual Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) = 0; + virtual Tree buildTree(const TreeSourceData &source_data) = 0; protected: /** All derived classes will need a handle to this, so storing it in the base for convenience. */ @@ -75,7 +75,7 @@ class TreeViewViewLayer final : public AbstractTreeView { public: TreeViewViewLayer(SpaceOutliner &space_outliner); - Tree buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) override; + Tree buildTree(const TreeSourceData &source_data) override; private: void add_view_layer(ListBase &, TreeElement &); @@ -108,9 +108,7 @@ typedef struct TreeSourceData { TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner); void outliner_tree_view_destroy(TreeView **tree_view); -ListBase outliner_tree_view_build_tree(TreeView *tree_view, - TreeSourceData *source_data, - struct SpaceOutliner *space_outliner); +ListBase outliner_tree_view_build_tree(TreeView *tree_view, TreeSourceData *source_data); /* The following functions are needed to build the tree. These are calls back into C; the way * elements are created should be refactored and ported to C++ with a new design/API too. */ diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc index eb7a56a83c0..35c9ff8c882 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc @@ -68,20 +68,20 @@ TreeViewViewLayer::TreeViewViewLayer(SpaceOutliner &space_outliner) { } -Tree TreeViewViewLayer::buildTree(const TreeSourceData &source_data, SpaceOutliner &space_outliner) +Tree TreeViewViewLayer::buildTree(const TreeSourceData &source_data) { Tree tree = {nullptr}; _view_layer = source_data.view_layer; - _show_objects = !(space_outliner.filter & SO_FILTER_NO_OBJECT); + _show_objects = !(_space_outliner.filter & SO_FILTER_NO_OBJECT); - const bool show_children = (space_outliner.filter & SO_FILTER_NO_CHILDREN) == 0; + const bool show_children = (_space_outliner.filter & SO_FILTER_NO_CHILDREN) == 0; - if (space_outliner.filter & SO_FILTER_NO_COLLECTION) { + if (_space_outliner.filter & SO_FILTER_NO_COLLECTION) { /* Show objects in the view layer. */ for (Base *base : List(_view_layer->object_bases)) { TreeElement *te_object = outliner_add_element( - &space_outliner, &tree, base->object, nullptr, 0, 0); + &_space_outliner, &tree, base->object, nullptr, 0, 0); te_object->directdata = base; } @@ -92,7 +92,7 @@ Tree TreeViewViewLayer::buildTree(const TreeSourceData &source_data, SpaceOutlin else { /* Show collections in the view layer. */ TreeElement &ten = *outliner_add_element( - &space_outliner, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); + &_space_outliner, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); ten.name = IFACE_("Scene Collection"); TREESTORE(&ten)->flag &= ~TSE_CLOSED; -- cgit v1.2.3 From 5fb67573b5fb115a7b7f6588ef0fca6f07ee60d0 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 7 Nov 2020 01:23:36 +0100 Subject: Fix possible null-pointer dereference in new Outliner tree building code --- source/blender/editors/space_outliner/outliner_tree.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 4654377e7e5..991d831d6e0 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -2322,9 +2322,11 @@ void outliner_build_tree(Main *mainvar, space_outliner->runtime->tree_view = outliner_tree_view_create(space_outliner->outlinevis, space_outliner); - TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; - space_outliner->tree = outliner_tree_view_build_tree(space_outliner->runtime->tree_view, - &source_data); + if (space_outliner->runtime->tree_view) { + TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; + space_outliner->tree = outliner_tree_view_build_tree(space_outliner->runtime->tree_view, + &source_data); + } if (!BLI_listbase_is_empty(&space_outliner->tree)) { /* Skip. */ -- cgit v1.2.3 From ad0c387fdf6ed8bfdaedb7f40717ce1811c5680a Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 7 Nov 2020 03:02:32 +0100 Subject: Cleanup: Put Outliner C++ namespace into `blender::ed` namespace, add comments See https://developer.blender.org/D9499. Also remove unnecessary forward declaration. --- source/blender/editors/space_outliner/outliner_intern.h | 3 +++ source/blender/editors/space_outliner/tree/tree_view.cc | 4 ++-- source/blender/editors/space_outliner/tree/tree_view.hh | 8 +++++++- .../blender/editors/space_outliner/tree/tree_view_view_layer.cc | 2 ++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 56098d72c8f..adcbcb5a310 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -47,6 +47,9 @@ struct wmKeyConfig; struct wmOperatorType; typedef struct SpaceOutliner_Runtime { + /** + * Internal C++ object to create and manage the tree for a specific display type (View Layers, + * Scenes, Blender File, etc.). */ struct TreeView *tree_view; } SpaceOutliner_Runtime; diff --git a/source/blender/editors/space_outliner/tree/tree_view.cc b/source/blender/editors/space_outliner/tree/tree_view.cc index 629e95b3b6b..8f8e6c606be 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.cc +++ b/source/blender/editors/space_outliner/tree/tree_view.cc @@ -24,9 +24,9 @@ #include "tree_view.hh" -namespace outliner = blender::outliner; +namespace outliner = blender::ed::outliner; /* Convenience. */ -using blender::outliner::AbstractTreeView; +using outliner::AbstractTreeView; TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner) { diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh index ab23c560b21..a4ce0ce6e78 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.hh +++ b/source/blender/editors/space_outliner/tree/tree_view.hh @@ -25,7 +25,6 @@ #include "DNA_space_types.h" -struct bContext; struct ListBase; struct SpaceOutliner; struct TreeElement; @@ -34,6 +33,7 @@ struct TreeSourceData; #ifdef __cplusplus namespace blender { +namespace ed { namespace outliner { using Tree = ListBase; @@ -42,6 +42,8 @@ using Tree = ListBase; /* Tree-View Interface */ /** + * \brief Base Class For Tree-Views + * * Abstract base class defining the interface for tree-view variants. For each Outliner display * type (e.g View Layer, Scenes, Blender File), a derived class implements a #buildTree() function, * that based on Blender data (#TreeSourceData), builds a custom tree of whatever data it wants to @@ -68,6 +70,9 @@ class AbstractTreeView { /* -------------------------------------------------------------------- */ /* View Layer Tree-View */ +/** + * \brief Tree-View for the View Layer display mode. + */ class TreeViewViewLayer final : public AbstractTreeView { ViewLayer *_view_layer = nullptr; bool _show_objects = true; @@ -85,6 +90,7 @@ class TreeViewViewLayer final : public AbstractTreeView { }; } // namespace outliner +} // namespace ed } // namespace blender extern "C" { diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc index 35c9ff8c882..e13fe85f5b0 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc @@ -35,6 +35,7 @@ #include "tree_view.hh" namespace blender { +namespace ed { namespace outliner { /* Convenience/readability. */ @@ -283,4 +284,5 @@ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() /** \} */ } // namespace outliner +} // namespace ed } // namespace blender -- cgit v1.2.3 From 44d8fafd7f0d4f17f1e4c79ec5f9b6154d9bd57c Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 7 Nov 2020 20:13:37 +0100 Subject: UI Code Quality: Convert Outliner Blender File mode to new tree buiding design See https://developer.blender.org/D9499. Also: * Add `space_outliner/tree/common.cc` for functions shared between display modes. * I had to add a cast to `ListBaseWrapper` to make it work with ID lists. * Cleanup: Remove internal `Tree` alias for `ListBase`. That was more confusing than helpful. --- source/blender/blenlib/BLI_listbase_wrapper.hh | 3 +- .../blender/editors/space_outliner/CMakeLists.txt | 2 + .../blender/editors/space_outliner/outliner_tree.c | 160 +--------------- .../blender/editors/space_outliner/tree/common.cc | 41 +++++ .../editors/space_outliner/tree/tree_view.cc | 3 + .../editors/space_outliner/tree/tree_view.hh | 23 ++- .../space_outliner/tree/tree_view_libraries.cc | 204 +++++++++++++++++++++ .../space_outliner/tree/tree_view_view_layer.cc | 4 +- 8 files changed, 277 insertions(+), 163 deletions(-) create mode 100644 source/blender/editors/space_outliner/tree/common.cc create mode 100644 source/blender/editors/space_outliner/tree/tree_view_libraries.cc diff --git a/source/blender/blenlib/BLI_listbase_wrapper.hh b/source/blender/blenlib/BLI_listbase_wrapper.hh index c31694d7d9e..ed2a2b5e5ec 100644 --- a/source/blender/blenlib/BLI_listbase_wrapper.hh +++ b/source/blender/blenlib/BLI_listbase_wrapper.hh @@ -56,7 +56,8 @@ template class ListBaseWrapper { Iterator &operator++() { - current_ = current_->next; + /* Some types store next/prev using `void *`, so cast is necessary. */ + current_ = static_cast(current_->next); return *this; } diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index a0577b1103d..bbcd5a32ad6 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -44,7 +44,9 @@ set(SRC outliner_tree.c outliner_utils.c space_outliner.c + tree/common.cc tree/tree_view.cc + tree/tree_view_libraries.cc tree/tree_view_view_layer.cc outliner_intern.h diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 991d831d6e0..67616db6b3a 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1382,110 +1382,6 @@ static void outliner_add_seq_dup(SpaceOutliner *space_outliner, /* ----------------------------------------------- */ -static const char *outliner_idcode_to_plural(short idcode) -{ - const char *propname = BKE_idtype_idcode_to_name_plural(idcode); - PropertyRNA *prop = RNA_struct_type_find_property(&RNA_BlendData, propname); - return (prop) ? RNA_property_ui_name(prop) : "UNKNOWN"; -} - -static bool outliner_library_id_show(Library *lib, ID *id, short filter_id_type) -{ - if (id->lib != lib) { - return false; - } - - if (filter_id_type == ID_GR) { - /* Don't show child collections of non-scene master collection, - * they are already shown as children. */ - Collection *collection = (Collection *)id; - bool has_non_scene_parent = false; - - LISTBASE_FOREACH (CollectionParent *, cparent, &collection->parents) { - if (!(cparent->collection->flag & COLLECTION_IS_MASTER)) { - has_non_scene_parent = true; - } - } - - if (has_non_scene_parent) { - return false; - } - } - - return true; -} - -static TreeElement *outliner_add_library_contents(Main *mainvar, - SpaceOutliner *space_outliner, - ListBase *lb, - Library *lib) -{ - TreeElement *ten, *tenlib = NULL; - ListBase *lbarray[MAX_LIBARRAY]; - int a, tot; - short filter_id_type = (space_outliner->filter & SO_FILTER_ID_TYPE) ? - space_outliner->filter_id_type : - 0; - - if (filter_id_type) { - lbarray[0] = which_libbase(mainvar, space_outliner->filter_id_type); - tot = 1; - } - else { - tot = set_listbasepointers(mainvar, lbarray); - } - - for (a = 0; a < tot; a++) { - if (lbarray[a] && lbarray[a]->first) { - ID *id = lbarray[a]->first; - const bool is_library = (GS(id->name) == ID_LI) && (lib != NULL); - - /* check if there's data in current lib */ - for (; id; id = id->next) { - if (id->lib == lib) { - break; - } - } - - /* We always want to create an entry for libraries, even if/when we have no more IDs from - * them. This invalid state is important to show to user as well.*/ - if (id != NULL || is_library) { - if (!tenlib) { - /* Create library tree element on demand, depending if there are any data-blocks. */ - if (lib) { - tenlib = outliner_add_element(space_outliner, lb, lib, NULL, 0, 0); - } - else { - tenlib = outliner_add_element(space_outliner, lb, mainvar, NULL, TSE_ID_BASE, 0); - tenlib->name = IFACE_("Current File"); - } - } - - /* Create data-block list parent element on demand. */ - if (id != NULL) { - if (filter_id_type) { - ten = tenlib; - } - else { - ten = outliner_add_element( - space_outliner, &tenlib->subtree, lbarray[a], NULL, TSE_ID_BASE, 0); - ten->directdata = lbarray[a]; - ten->name = outliner_idcode_to_plural(GS(id->name)); - } - - for (id = lbarray[a]->first; id; id = id->next) { - if (outliner_library_id_show(lib, id, filter_id_type)) { - outliner_add_element(space_outliner, &ten->subtree, id, ten, 0, 0); - } - } - } - } - } - } - - return tenlib; -} - static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *space_outliner) { TreeElement *ten; @@ -2328,61 +2224,13 @@ void outliner_build_tree(Main *mainvar, &source_data); } - if (!BLI_listbase_is_empty(&space_outliner->tree)) { - /* Skip. */ + if (space_outliner->runtime->tree_view) { + /* Skip if there's a tree view that's responsible for adding all elements. */ } /* options */ else if (space_outliner->outlinevis == SO_LIBRARIES) { - Library *lib; - - /* current file first - mainvar provides tselem with unique pointer - not used */ - ten = outliner_add_library_contents(mainvar, space_outliner, &space_outliner->tree, NULL); - if (ten) { - tselem = TREESTORE(ten); - if (!tselem->used) { - tselem->flag &= ~TSE_CLOSED; - } - } - - for (lib = mainvar->libraries.first; lib; lib = lib->id.next) { - ten = outliner_add_library_contents(mainvar, space_outliner, &space_outliner->tree, lib); - /* NULL-check matters, due to filtering there may not be a new element. */ - if (ten) { - lib->id.newid = (ID *)ten; - } - } - /* make hierarchy */ - ten = space_outliner->tree.first; - if (ten != NULL) { - ten = ten->next; /* first one is main */ - while (ten) { - TreeElement *nten = ten->next, *par; - tselem = TREESTORE(ten); - lib = (Library *)tselem->id; - if (lib && lib->parent) { - par = (TreeElement *)lib->parent->id.newid; - if (tselem->id->tag & LIB_TAG_INDIRECT) { - /* Only remove from 'first level' if lib is not also directly used. */ - BLI_remlink(&space_outliner->tree, ten); - BLI_addtail(&par->subtree, ten); - ten->parent = par; - } - else { - /* Else, make a new copy of the libtree for our parent. */ - TreeElement *dupten = outliner_add_library_contents( - mainvar, space_outliner, &par->subtree, lib); - if (dupten) { - dupten->parent = par; - } - } - } - ten = nten; - } - } - /* restore newid pointers */ - for (lib = mainvar->libraries.first; lib; lib = lib->id.next) { - lib->id.newid = NULL; - } + /* Ported to new tree-view, should be built there already. */ + BLI_assert(false); } else if (space_outliner->outlinevis == SO_SCENES) { Scene *sce; diff --git a/source/blender/editors/space_outliner/tree/common.cc b/source/blender/editors/space_outliner/tree/common.cc new file mode 100644 index 00000000000..56b5d62195e --- /dev/null +++ b/source/blender/editors/space_outliner/tree/common.cc @@ -0,0 +1,41 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + * + * Functions and helpers shared between tree-view types or other tree related code. + */ + +#include "BKE_idtype.h" + +#include "RNA_access.h" + +#include "tree_view.hh" + +/* -------------------------------------------------------------------- */ +/** \name ID Helpers. + * + * \{ */ + +const char *outliner_idcode_to_plural(short idcode) +{ + const char *propname = BKE_idtype_idcode_to_name_plural(idcode); + PropertyRNA *prop = RNA_struct_type_find_property(&RNA_BlendData, propname); + return (prop) ? RNA_property_ui_name(prop) : "UNKNOWN"; +} + +/** \} */ diff --git a/source/blender/editors/space_outliner/tree/tree_view.cc b/source/blender/editors/space_outliner/tree/tree_view.cc index 8f8e6c606be..f6c3da012f4 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.cc +++ b/source/blender/editors/space_outliner/tree/tree_view.cc @@ -34,7 +34,10 @@ TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *spa switch (mode) { case SO_SCENES: + break; case SO_LIBRARIES: + tree_view = new outliner::TreeViewLibraries(*space_outliner); + break; case SO_SEQUENCE: case SO_DATA_API: case SO_ID_ORPHANS: diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh index a4ce0ce6e78..cb3bb4681c8 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.hh +++ b/source/blender/editors/space_outliner/tree/tree_view.hh @@ -36,8 +36,6 @@ namespace blender { namespace ed { namespace outliner { -using Tree = ListBase; - /* -------------------------------------------------------------------- */ /* Tree-View Interface */ @@ -60,7 +58,7 @@ class AbstractTreeView { * Build a tree for this view with the Blender context data given in \a source_data and the view * settings in \a space_outliner. */ - virtual Tree buildTree(const TreeSourceData &source_data) = 0; + virtual ListBase buildTree(const TreeSourceData &source_data) = 0; protected: /** All derived classes will need a handle to this, so storing it in the base for convenience. */ @@ -80,7 +78,7 @@ class TreeViewViewLayer final : public AbstractTreeView { public: TreeViewViewLayer(SpaceOutliner &space_outliner); - Tree buildTree(const TreeSourceData &source_data) override; + ListBase buildTree(const TreeSourceData &source_data) override; private: void add_view_layer(ListBase &, TreeElement &); @@ -89,6 +87,21 @@ class TreeViewViewLayer final : public AbstractTreeView { void add_layer_collection_objects_children(TreeElement &); }; +/* -------------------------------------------------------------------- */ +/* Library Tree-View */ + +/** + * \brief Tree-View for the Libraries display mode. + */ +class TreeViewLibraries final : public AbstractTreeView { + public: + TreeViewLibraries(SpaceOutliner &space_outliner); + + ListBase buildTree(const TreeSourceData &source_data) override; + + private: +}; + } // namespace outliner } // namespace ed } // namespace blender @@ -126,6 +139,8 @@ struct TreeElement *outliner_add_element(struct SpaceOutliner *space_outliner, short index); void outliner_make_object_parent_hierarchy(ListBase *lb); +const char *outliner_idcode_to_plural(short idcode); + #ifdef __cplusplus } #endif diff --git a/source/blender/editors/space_outliner/tree/tree_view_libraries.cc b/source/blender/editors/space_outliner/tree/tree_view_libraries.cc new file mode 100644 index 00000000000..83f4b93df22 --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_view_libraries.cc @@ -0,0 +1,204 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + */ + +#include "BLI_listbase.h" +#include "BLI_listbase_wrapper.hh" + +#include "BKE_collection.h" +#include "BKE_main.h" + +#include "BLT_translation.h" + +#include "../outliner_intern.h" +#include "tree_view.hh" + +namespace blender { +namespace ed { +namespace outliner { + +/* Convenience/readability. */ +template using List = ListBaseWrapper; + +TreeViewLibraries::TreeViewLibraries(SpaceOutliner &space_outliner) + : AbstractTreeView(space_outliner) +{ +} + +static bool outliner_library_id_show(Library *lib, ID *id, short filter_id_type) +{ + if (id->lib != lib) { + return false; + } + + if (filter_id_type == ID_GR) { + /* Don't show child collections of non-scene master collection, + * they are already shown as children. */ + Collection *collection = (Collection *)id; + bool has_non_scene_parent = false; + + for (CollectionParent *cparent : List(collection->parents)) { + if (!(cparent->collection->flag & COLLECTION_IS_MASTER)) { + has_non_scene_parent = true; + } + } + + if (has_non_scene_parent) { + return false; + } + } + + return true; +} + +static TreeElement *outliner_add_library_contents(Main *mainvar, + SpaceOutliner *space_outliner, + ListBase *lb, + Library *lib) +{ + TreeElement *ten, *tenlib = nullptr; + ListBase *lbarray[MAX_LIBARRAY]; + int a, tot; + short filter_id_type = (space_outliner->filter & SO_FILTER_ID_TYPE) ? + space_outliner->filter_id_type : + 0; + + if (filter_id_type) { + lbarray[0] = which_libbase(mainvar, space_outliner->filter_id_type); + tot = 1; + } + else { + tot = set_listbasepointers(mainvar, lbarray); + } + + for (a = 0; a < tot; a++) { + if (lbarray[a] && lbarray[a]->first) { + ID *id = static_cast(lbarray[a]->first); + const bool is_library = (GS(id->name) == ID_LI) && (lib != nullptr); + + /* check if there's data in current lib */ + for (ID *id_iter : List(lbarray[a])) { + if (id_iter->lib == lib) { + id = id_iter; + break; + } + } + + /* We always want to create an entry for libraries, even if/when we have no more IDs from + * them. This invalid state is important to show to user as well.*/ + if (id != nullptr || is_library) { + if (!tenlib) { + /* Create library tree element on demand, depending if there are any data-blocks. */ + if (lib) { + tenlib = outliner_add_element(space_outliner, lb, lib, nullptr, 0, 0); + } + else { + tenlib = outliner_add_element(space_outliner, lb, mainvar, nullptr, TSE_ID_BASE, 0); + tenlib->name = IFACE_("Current File"); + } + } + + /* Create data-block list parent element on demand. */ + if (id != nullptr) { + if (filter_id_type) { + ten = tenlib; + } + else { + ten = outliner_add_element( + space_outliner, &tenlib->subtree, lbarray[a], nullptr, TSE_ID_BASE, 0); + ten->directdata = lbarray[a]; + ten->name = outliner_idcode_to_plural(GS(id->name)); + } + + for (ID *id : List(lbarray[a])) { + if (outliner_library_id_show(lib, id, filter_id_type)) { + outliner_add_element(space_outliner, &ten->subtree, id, ten, 0, 0); + } + } + } + } + } + } + + return tenlib; +} + +ListBase TreeViewLibraries::buildTree(const TreeSourceData &source_data) +{ + ListBase tree = {nullptr}; + + /* current file first - mainvar provides tselem with unique pointer - not used */ + TreeElement *ten = outliner_add_library_contents( + source_data.bmain, &_space_outliner, &tree, nullptr); + TreeStoreElem *tselem; + + if (ten) { + tselem = TREESTORE(ten); + if (!tselem->used) { + tselem->flag &= ~TSE_CLOSED; + } + } + + for (ID *id : List(source_data.bmain->libraries)) { + Library *lib = reinterpret_cast(id); + ten = outliner_add_library_contents(source_data.bmain, &_space_outliner, &tree, lib); + /* NULL-check matters, due to filtering there may not be a new element. */ + if (ten) { + lib->id.newid = (ID *)ten; + } + } + /* make hierarchy */ + ten = static_cast(tree.first); + if (ten != nullptr) { + ten = ten->next; /* first one is main */ + while (ten) { + TreeElement *nten = ten->next, *par; + tselem = TREESTORE(ten); + Library *lib = (Library *)tselem->id; + if (lib && lib->parent) { + par = (TreeElement *)lib->parent->id.newid; + if (tselem->id->tag & LIB_TAG_INDIRECT) { + /* Only remove from 'first level' if lib is not also directly used. */ + BLI_remlink(&tree, ten); + BLI_addtail(&par->subtree, ten); + ten->parent = par; + } + else { + /* Else, make a new copy of the libtree for our parent. */ + TreeElement *dupten = outliner_add_library_contents( + source_data.bmain, &_space_outliner, &par->subtree, lib); + if (dupten) { + dupten->parent = par; + } + } + } + ten = nten; + } + } + /* restore newid pointers */ + for (ID *library_id : List(source_data.bmain->libraries)) { + library_id->newid = nullptr; + } + + return tree; +} + +} // namespace outliner +} // namespace ed +} // namespace blender diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc index e13fe85f5b0..abfce72d0fb 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc @@ -69,9 +69,9 @@ TreeViewViewLayer::TreeViewViewLayer(SpaceOutliner &space_outliner) { } -Tree TreeViewViewLayer::buildTree(const TreeSourceData &source_data) +ListBase TreeViewViewLayer::buildTree(const TreeSourceData &source_data) { - Tree tree = {nullptr}; + ListBase tree = {nullptr}; _view_layer = source_data.view_layer; _show_objects = !(_space_outliner.filter & SO_FILTER_NO_OBJECT); -- cgit v1.2.3 From 43b4570dcf47e03dbb3c0ae5b8791160ff555c54 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 9 Nov 2020 00:24:14 +0100 Subject: Cleanup: General cleanup of Outliner Blender File display mode building See https://developer.blender.org/D9499. * Turn functions into member functions (makes API for a type more obvious & local, allows implicitly sharing data through member variables, enables order independend definition of functions, allows more natural language for function names because of the obvious context). * Prefer references over pointers for passing by reference (makes clear that NULL is not a valid value and that the current scope is not the owner). * Reduce indentation levels, use `continue` in loops to ensure preconditions are met. * Add asserts for sanity checks. --- .../editors/space_outliner/tree/tree_view.hh | 4 + .../space_outliner/tree/tree_view_libraries.cc | 241 +++++++++++---------- 2 files changed, 131 insertions(+), 114 deletions(-) diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh index cb3bb4681c8..a9aed29abc1 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.hh +++ b/source/blender/editors/space_outliner/tree/tree_view.hh @@ -26,6 +26,7 @@ #include "DNA_space_types.h" struct ListBase; +struct Main; struct SpaceOutliner; struct TreeElement; struct TreeSourceData; @@ -100,6 +101,9 @@ class TreeViewLibraries final : public AbstractTreeView { ListBase buildTree(const TreeSourceData &source_data) override; private: + TreeElement *add_library_contents(Main &, ListBase &, Library *) const; + bool library_id_filter_poll(Library *lib, ID *id) const; + short id_filter_get() const; }; } // namespace outliner diff --git a/source/blender/editors/space_outliner/tree/tree_view_libraries.cc b/source/blender/editors/space_outliner/tree/tree_view_libraries.cc index 83f4b93df22..77fa1fd3990 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_libraries.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_libraries.cc @@ -41,95 +41,134 @@ TreeViewLibraries::TreeViewLibraries(SpaceOutliner &space_outliner) { } -static bool outliner_library_id_show(Library *lib, ID *id, short filter_id_type) +ListBase TreeViewLibraries::buildTree(const TreeSourceData &source_data) { - if (id->lib != lib) { - return false; - } + ListBase tree = {nullptr}; - if (filter_id_type == ID_GR) { - /* Don't show child collections of non-scene master collection, - * they are already shown as children. */ - Collection *collection = (Collection *)id; - bool has_non_scene_parent = false; + { + /* current file first - mainvar provides tselem with unique pointer - not used */ + TreeElement *ten = add_library_contents(*source_data.bmain, tree, nullptr); + TreeStoreElem *tselem; - for (CollectionParent *cparent : List(collection->parents)) { - if (!(cparent->collection->flag & COLLECTION_IS_MASTER)) { - has_non_scene_parent = true; + if (ten) { + tselem = TREESTORE(ten); + if (!tselem->used) { + tselem->flag &= ~TSE_CLOSED; } } + } - if (has_non_scene_parent) { - return false; + for (ID *id : List(source_data.bmain->libraries)) { + Library *lib = reinterpret_cast(id); + TreeElement *ten = add_library_contents(*source_data.bmain, tree, lib); + /* NULL-check matters, due to filtering there may not be a new element. */ + if (ten) { + lib->id.newid = (ID *)ten; } } - return true; + /* make hierarchy */ + for (TreeElement *ten : List(tree)) { + if (ten == tree.first) { + /* First item is main, skip. */ + continue; + } + + TreeStoreElem *tselem = TREESTORE(ten); + Library *lib = (Library *)tselem->id; + BLI_assert(!lib || (GS(lib->id.name) == ID_LI)); + if (!lib || !lib->parent) { + continue; + } + + TreeElement *parent = (TreeElement *)lib->parent->id.newid; + + if (tselem->id->tag & LIB_TAG_INDIRECT) { + /* Only remove from 'first level' if lib is not also directly used. */ + BLI_remlink(&tree, ten); + BLI_addtail(&parent->subtree, ten); + ten->parent = parent; + } + else { + /* Else, make a new copy of the libtree for our parent. */ + TreeElement *dupten = add_library_contents(*source_data.bmain, parent->subtree, lib); + if (dupten) { + dupten->parent = parent; + } + } + } + /* restore newid pointers */ + for (ID *library_id : List(source_data.bmain->libraries)) { + library_id->newid = nullptr; + } + + return tree; } -static TreeElement *outliner_add_library_contents(Main *mainvar, - SpaceOutliner *space_outliner, - ListBase *lb, - Library *lib) +TreeElement *TreeViewLibraries::add_library_contents(Main &mainvar, + ListBase &lb, + Library *lib) const { - TreeElement *ten, *tenlib = nullptr; - ListBase *lbarray[MAX_LIBARRAY]; - int a, tot; - short filter_id_type = (space_outliner->filter & SO_FILTER_ID_TYPE) ? - space_outliner->filter_id_type : - 0; + const short filter_id_type = id_filter_get(); + ListBase *lbarray[MAX_LIBARRAY]; + int tot; if (filter_id_type) { - lbarray[0] = which_libbase(mainvar, space_outliner->filter_id_type); + lbarray[0] = which_libbase(&mainvar, _space_outliner.filter_id_type); tot = 1; } else { - tot = set_listbasepointers(mainvar, lbarray); + tot = set_listbasepointers(&mainvar, lbarray); } - for (a = 0; a < tot; a++) { - if (lbarray[a] && lbarray[a]->first) { - ID *id = static_cast(lbarray[a]->first); - const bool is_library = (GS(id->name) == ID_LI) && (lib != nullptr); + TreeElement *tenlib = nullptr; + for (int a = 0; a < tot; a++) { + if (!lbarray[a] || !lbarray[a]->first) { + continue; + } + + ID *id = static_cast(lbarray[a]->first); + const bool is_library = (GS(id->name) == ID_LI) && (lib != nullptr); - /* check if there's data in current lib */ - for (ID *id_iter : List(lbarray[a])) { - if (id_iter->lib == lib) { - id = id_iter; - break; - } + /* check if there's data in current lib */ + for (ID *id_iter : List(lbarray[a])) { + if (id_iter->lib == lib) { + id = id_iter; + break; } + } - /* We always want to create an entry for libraries, even if/when we have no more IDs from - * them. This invalid state is important to show to user as well.*/ - if (id != nullptr || is_library) { - if (!tenlib) { - /* Create library tree element on demand, depending if there are any data-blocks. */ - if (lib) { - tenlib = outliner_add_element(space_outliner, lb, lib, nullptr, 0, 0); - } - else { - tenlib = outliner_add_element(space_outliner, lb, mainvar, nullptr, TSE_ID_BASE, 0); - tenlib->name = IFACE_("Current File"); - } + /* We always want to create an entry for libraries, even if/when we have no more IDs from + * them. This invalid state is important to show to user as well.*/ + if (id != nullptr || is_library) { + if (!tenlib) { + /* Create library tree element on demand, depending if there are any data-blocks. */ + if (lib) { + tenlib = outliner_add_element(&_space_outliner, &lb, lib, nullptr, 0, 0); + } + else { + tenlib = outliner_add_element(&_space_outliner, &lb, &mainvar, nullptr, TSE_ID_BASE, 0); + tenlib->name = IFACE_("Current File"); } + } - /* Create data-block list parent element on demand. */ - if (id != nullptr) { - if (filter_id_type) { - ten = tenlib; - } - else { - ten = outliner_add_element( - space_outliner, &tenlib->subtree, lbarray[a], nullptr, TSE_ID_BASE, 0); - ten->directdata = lbarray[a]; - ten->name = outliner_idcode_to_plural(GS(id->name)); - } + /* Create data-block list parent element on demand. */ + if (id != nullptr) { + TreeElement *ten; + + if (filter_id_type) { + ten = tenlib; + } + else { + ten = outliner_add_element( + &_space_outliner, &tenlib->subtree, lbarray[a], nullptr, TSE_ID_BASE, 0); + ten->directdata = lbarray[a]; + ten->name = outliner_idcode_to_plural(GS(id->name)); + } - for (ID *id : List(lbarray[a])) { - if (outliner_library_id_show(lib, id, filter_id_type)) { - outliner_add_element(space_outliner, &ten->subtree, id, ten, 0, 0); - } + for (ID *id : List(lbarray[a])) { + if (library_id_filter_poll(lib, id)) { + outliner_add_element(&_space_outliner, &ten->subtree, id, ten, 0, 0); } } } @@ -139,64 +178,38 @@ static TreeElement *outliner_add_library_contents(Main *mainvar, return tenlib; } -ListBase TreeViewLibraries::buildTree(const TreeSourceData &source_data) +short TreeViewLibraries::id_filter_get() const { - ListBase tree = {nullptr}; - - /* current file first - mainvar provides tselem with unique pointer - not used */ - TreeElement *ten = outliner_add_library_contents( - source_data.bmain, &_space_outliner, &tree, nullptr); - TreeStoreElem *tselem; - - if (ten) { - tselem = TREESTORE(ten); - if (!tselem->used) { - tselem->flag &= ~TSE_CLOSED; - } + if (_space_outliner.filter & SO_FILTER_ID_TYPE) { + return _space_outliner.filter_id_type; } + return 0; +} - for (ID *id : List(source_data.bmain->libraries)) { - Library *lib = reinterpret_cast(id); - ten = outliner_add_library_contents(source_data.bmain, &_space_outliner, &tree, lib); - /* NULL-check matters, due to filtering there may not be a new element. */ - if (ten) { - lib->id.newid = (ID *)ten; - } +bool TreeViewLibraries::library_id_filter_poll(Library *lib, ID *id) const +{ + if (id->lib != lib) { + return false; } - /* make hierarchy */ - ten = static_cast(tree.first); - if (ten != nullptr) { - ten = ten->next; /* first one is main */ - while (ten) { - TreeElement *nten = ten->next, *par; - tselem = TREESTORE(ten); - Library *lib = (Library *)tselem->id; - if (lib && lib->parent) { - par = (TreeElement *)lib->parent->id.newid; - if (tselem->id->tag & LIB_TAG_INDIRECT) { - /* Only remove from 'first level' if lib is not also directly used. */ - BLI_remlink(&tree, ten); - BLI_addtail(&par->subtree, ten); - ten->parent = par; - } - else { - /* Else, make a new copy of the libtree for our parent. */ - TreeElement *dupten = outliner_add_library_contents( - source_data.bmain, &_space_outliner, &par->subtree, lib); - if (dupten) { - dupten->parent = par; - } - } + + if (id_filter_get() == ID_GR) { + /* Don't show child collections of non-scene master collection, + * they are already shown as children. */ + Collection *collection = (Collection *)id; + bool has_non_scene_parent = false; + + for (CollectionParent *cparent : List(collection->parents)) { + if (!(cparent->collection->flag & COLLECTION_IS_MASTER)) { + has_non_scene_parent = true; } - ten = nten; } - } - /* restore newid pointers */ - for (ID *library_id : List(source_data.bmain->libraries)) { - library_id->newid = nullptr; + + if (has_non_scene_parent) { + return false; + } } - return tree; + return true; } } // namespace outliner -- cgit v1.2.3 From 01318b3112a6627eec5bb75e867ac4468d5f7604 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 9 Nov 2020 12:21:51 +0100 Subject: Cleanup: Follow C++ code style for new Outliner building code See https://developer.blender.org/D9499. * Use C++17 nested namespaces. * Use `_` suffix rather than prefix for private member variables. Also: Simplify code visually in `tree_view.cc` with `using namespace`. --- .../editors/space_outliner/tree/tree_view.cc | 8 ++-- .../editors/space_outliner/tree/tree_view.hh | 16 +++---- .../space_outliner/tree/tree_view_libraries.cc | 22 ++++----- .../space_outliner/tree/tree_view_view_layer.cc | 52 ++++++++++------------ 4 files changed, 42 insertions(+), 56 deletions(-) diff --git a/source/blender/editors/space_outliner/tree/tree_view.cc b/source/blender/editors/space_outliner/tree/tree_view.cc index f6c3da012f4..7eefae7124c 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.cc +++ b/source/blender/editors/space_outliner/tree/tree_view.cc @@ -24,9 +24,7 @@ #include "tree_view.hh" -namespace outliner = blender::ed::outliner; -/* Convenience. */ -using outliner::AbstractTreeView; +using namespace blender::ed::outliner; TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner) { @@ -36,14 +34,14 @@ TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *spa case SO_SCENES: break; case SO_LIBRARIES: - tree_view = new outliner::TreeViewLibraries(*space_outliner); + tree_view = new TreeViewLibraries(*space_outliner); break; case SO_SEQUENCE: case SO_DATA_API: case SO_ID_ORPHANS: break; case SO_VIEW_LAYER: - tree_view = new outliner::TreeViewViewLayer(*space_outliner); + tree_view = new TreeViewViewLayer(*space_outliner); break; } diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh index a9aed29abc1..63a0826b440 100644 --- a/source/blender/editors/space_outliner/tree/tree_view.hh +++ b/source/blender/editors/space_outliner/tree/tree_view.hh @@ -33,9 +33,7 @@ struct TreeSourceData; #ifdef __cplusplus -namespace blender { -namespace ed { -namespace outliner { +namespace blender::ed::outliner { /* -------------------------------------------------------------------- */ /* Tree-View Interface */ @@ -50,7 +48,7 @@ namespace outliner { */ class AbstractTreeView { public: - AbstractTreeView(SpaceOutliner &space_outliner) : _space_outliner(space_outliner) + AbstractTreeView(SpaceOutliner &space_outliner) : space_outliner_(space_outliner) { } virtual ~AbstractTreeView() = default; @@ -63,7 +61,7 @@ class AbstractTreeView { protected: /** All derived classes will need a handle to this, so storing it in the base for convenience. */ - SpaceOutliner &_space_outliner; + SpaceOutliner &space_outliner_; }; /* -------------------------------------------------------------------- */ @@ -73,8 +71,8 @@ class AbstractTreeView { * \brief Tree-View for the View Layer display mode. */ class TreeViewViewLayer final : public AbstractTreeView { - ViewLayer *_view_layer = nullptr; - bool _show_objects = true; + ViewLayer *view_layer_ = nullptr; + bool show_objects_ = true; public: TreeViewViewLayer(SpaceOutliner &space_outliner); @@ -106,9 +104,7 @@ class TreeViewLibraries final : public AbstractTreeView { short id_filter_get() const; }; -} // namespace outliner -} // namespace ed -} // namespace blender +} // namespace blender::ed::outliner extern "C" { #endif diff --git a/source/blender/editors/space_outliner/tree/tree_view_libraries.cc b/source/blender/editors/space_outliner/tree/tree_view_libraries.cc index 77fa1fd3990..bd75bba83eb 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_libraries.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_libraries.cc @@ -29,9 +29,7 @@ #include "../outliner_intern.h" #include "tree_view.hh" -namespace blender { -namespace ed { -namespace outliner { +namespace blender::ed::outliner { /* Convenience/readability. */ template using List = ListBaseWrapper; @@ -114,7 +112,7 @@ TreeElement *TreeViewLibraries::add_library_contents(Main &mainvar, ListBase *lbarray[MAX_LIBARRAY]; int tot; if (filter_id_type) { - lbarray[0] = which_libbase(&mainvar, _space_outliner.filter_id_type); + lbarray[0] = which_libbase(&mainvar, space_outliner_.filter_id_type); tot = 1; } else { @@ -144,10 +142,10 @@ TreeElement *TreeViewLibraries::add_library_contents(Main &mainvar, if (!tenlib) { /* Create library tree element on demand, depending if there are any data-blocks. */ if (lib) { - tenlib = outliner_add_element(&_space_outliner, &lb, lib, nullptr, 0, 0); + tenlib = outliner_add_element(&space_outliner_, &lb, lib, nullptr, 0, 0); } else { - tenlib = outliner_add_element(&_space_outliner, &lb, &mainvar, nullptr, TSE_ID_BASE, 0); + tenlib = outliner_add_element(&space_outliner_, &lb, &mainvar, nullptr, TSE_ID_BASE, 0); tenlib->name = IFACE_("Current File"); } } @@ -161,14 +159,14 @@ TreeElement *TreeViewLibraries::add_library_contents(Main &mainvar, } else { ten = outliner_add_element( - &_space_outliner, &tenlib->subtree, lbarray[a], nullptr, TSE_ID_BASE, 0); + &space_outliner_, &tenlib->subtree, lbarray[a], nullptr, TSE_ID_BASE, 0); ten->directdata = lbarray[a]; ten->name = outliner_idcode_to_plural(GS(id->name)); } for (ID *id : List(lbarray[a])) { if (library_id_filter_poll(lib, id)) { - outliner_add_element(&_space_outliner, &ten->subtree, id, ten, 0, 0); + outliner_add_element(&space_outliner_, &ten->subtree, id, ten, 0, 0); } } } @@ -180,8 +178,8 @@ TreeElement *TreeViewLibraries::add_library_contents(Main &mainvar, short TreeViewLibraries::id_filter_get() const { - if (_space_outliner.filter & SO_FILTER_ID_TYPE) { - return _space_outliner.filter_id_type; + if (space_outliner_.filter & SO_FILTER_ID_TYPE) { + return space_outliner_.filter_id_type; } return 0; } @@ -212,6 +210,4 @@ bool TreeViewLibraries::library_id_filter_poll(Library *lib, ID *id) const return true; } -} // namespace outliner -} // namespace ed -} // namespace blender +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc index abfce72d0fb..8895673f060 100644 --- a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc @@ -34,9 +34,7 @@ #include "../outliner_intern.h" #include "tree_view.hh" -namespace blender { -namespace ed { -namespace outliner { +namespace blender::ed::outliner { /* Convenience/readability. */ template using List = ListBaseWrapper; @@ -45,8 +43,8 @@ class ObjectsChildrenBuilder { using TreeChildren = Vector; using ObjectTreeElementsMap = Map; - SpaceOutliner &_outliner; - ObjectTreeElementsMap _object_tree_elements_map; + SpaceOutliner &outliner_; + ObjectTreeElementsMap object_tree_elements_map_; public: ObjectsChildrenBuilder(SpaceOutliner &); @@ -73,16 +71,16 @@ ListBase TreeViewViewLayer::buildTree(const TreeSourceData &source_data) { ListBase tree = {nullptr}; - _view_layer = source_data.view_layer; - _show_objects = !(_space_outliner.filter & SO_FILTER_NO_OBJECT); + view_layer_ = source_data.view_layer; + show_objects_ = !(space_outliner_.filter & SO_FILTER_NO_OBJECT); - const bool show_children = (_space_outliner.filter & SO_FILTER_NO_CHILDREN) == 0; + const bool show_children = (space_outliner_.filter & SO_FILTER_NO_CHILDREN) == 0; - if (_space_outliner.filter & SO_FILTER_NO_COLLECTION) { + if (space_outliner_.filter & SO_FILTER_NO_COLLECTION) { /* Show objects in the view layer. */ - for (Base *base : List(_view_layer->object_bases)) { + for (Base *base : List(view_layer_->object_bases)) { TreeElement *te_object = outliner_add_element( - &_space_outliner, &tree, base->object, nullptr, 0, 0); + &space_outliner_, &tree, base->object, nullptr, 0, 0); te_object->directdata = base; } @@ -93,7 +91,7 @@ ListBase TreeViewViewLayer::buildTree(const TreeSourceData &source_data) else { /* Show collections in the view layer. */ TreeElement &ten = *outliner_add_element( - &_space_outliner, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); + &space_outliner_, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); ten.name = IFACE_("Scene Collection"); TREESTORE(&ten)->flag &= ~TSE_CLOSED; @@ -109,13 +107,13 @@ ListBase TreeViewViewLayer::buildTree(const TreeSourceData &source_data) void TreeViewViewLayer::add_view_layer(ListBase &tree, TreeElement &parent) { /* First layer collection is for master collection, don't show it. */ - LayerCollection *lc = static_cast(_view_layer->layer_collections.first); + LayerCollection *lc = static_cast(view_layer_->layer_collections.first); if (lc == nullptr) { return; } add_layer_collections_recursive(tree, lc->layer_collections, parent); - if (_show_objects) { + if (show_objects_) { add_layer_collection_objects(tree, *lc, parent); } } @@ -128,13 +126,13 @@ void TreeViewViewLayer::add_layer_collections_recursive(ListBase &tree, const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0; TreeElement *ten; - if (exclude && ((_space_outliner.show_restrict_flags & SO_RESTRICT_ENABLE) == 0)) { + if (exclude && ((space_outliner_.show_restrict_flags & SO_RESTRICT_ENABLE) == 0)) { ten = &parent_ten; } else { ID *id = &lc->collection->id; ten = outliner_add_element( - &_space_outliner, &tree, id, &parent_ten, TSE_LAYER_COLLECTION, 0); + &space_outliner_, &tree, id, &parent_ten, TSE_LAYER_COLLECTION, 0); ten->name = id->name + 2; ten->directdata = lc; @@ -151,7 +149,7 @@ void TreeViewViewLayer::add_layer_collections_recursive(ListBase &tree, } add_layer_collections_recursive(ten->subtree, lc->layer_collections, *ten); - if (!exclude && _show_objects) { + if (!exclude && show_objects_) { add_layer_collection_objects(ten->subtree, *lc, *ten); } } @@ -162,9 +160,9 @@ void TreeViewViewLayer::add_layer_collection_objects(ListBase &tree, TreeElement &ten) { for (CollectionObject *cob : List(lc.collection->gobject)) { - Base *base = BKE_view_layer_base_find(_view_layer, cob->ob); + Base *base = BKE_view_layer_base_find(view_layer_, cob->ob); TreeElement *te_object = outliner_add_element( - &_space_outliner, &tree, base->object, &ten, 0, 0); + &space_outliner_, &tree, base->object, &ten, 0, 0); te_object->directdata = base; if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) { @@ -176,7 +174,7 @@ void TreeViewViewLayer::add_layer_collection_objects(ListBase &tree, void TreeViewViewLayer::add_layer_collection_objects_children(TreeElement &collection_tree_elem) { /* Call helper to add children. */ - ObjectsChildrenBuilder child_builder{_space_outliner}; + ObjectsChildrenBuilder child_builder{space_outliner_}; child_builder(collection_tree_elem); } @@ -190,7 +188,7 @@ void TreeViewViewLayer::add_layer_collection_objects_children(TreeElement &colle * * \{ */ -ObjectsChildrenBuilder::ObjectsChildrenBuilder(SpaceOutliner &outliner) : _outliner(outliner) +ObjectsChildrenBuilder::ObjectsChildrenBuilder(SpaceOutliner &outliner) : outliner_(outliner) { } @@ -216,7 +214,7 @@ void ObjectsChildrenBuilder::object_tree_elements_lookup_create_recursive(TreeEl if (tselem->type == 0 && te->idcode == ID_OB) { Object *ob = (Object *)tselem->id; /* Lookup children or add new, empty children vector. */ - Vector &tree_elements = _object_tree_elements_map.lookup_or_add(ob, {}); + Vector &tree_elements = object_tree_elements_map_.lookup_or_add(ob, {}); tree_elements.append(te); object_tree_elements_lookup_create_recursive(te); @@ -230,7 +228,7 @@ void ObjectsChildrenBuilder::object_tree_elements_lookup_create_recursive(TreeEl */ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() { - for (ObjectTreeElementsMap::MutableItem item : _object_tree_elements_map.items()) { + for (ObjectTreeElementsMap::MutableItem item : object_tree_elements_map_.items()) { Object *child = item.key; if (child->parent == nullptr) { @@ -238,7 +236,7 @@ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() } Vector &child_ob_tree_elements = item.value; - Vector *parent_ob_tree_elements = _object_tree_elements_map.lookup_ptr( + Vector *parent_ob_tree_elements = object_tree_elements_map_.lookup_ptr( child->parent); if (parent_ob_tree_elements == nullptr) { continue; @@ -272,7 +270,7 @@ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() /* We add the child in the tree even if it is not in the collection. * We deliberately clear its sub-tree though, to make it less prominent. */ TreeElement *child_ob_tree_element = outliner_add_element( - &_outliner, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); + &outliner_, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); outliner_free_tree(&child_ob_tree_element->subtree); child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION; child_ob_tree_elements.append(child_ob_tree_element); @@ -283,6 +281,4 @@ void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() /** \} */ -} // namespace outliner -} // namespace ed -} // namespace blender +} // namespace blender::ed::outliner -- cgit v1.2.3 From c2b3a68f248e67c9dc1289f289d998785d780175 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 9 Nov 2020 13:25:59 +0100 Subject: Cleanup: Rename Outliner "tree-view" types to "tree-display" & update comments See https://developer.blender.org/D9499. "View" leads to weird names like `TreeViewViewLayer` and after all they are specific to what we call a "display mode", so "display" is more appropriate. Also add, update and correct comments. --- .../blender/editors/space_outliner/CMakeLists.txt | 8 +- .../editors/space_outliner/outliner_intern.h | 2 +- .../blender/editors/space_outliner/outliner_tree.c | 22 +- .../blender/editors/space_outliner/tree/common.cc | 4 +- .../editors/space_outliner/tree/tree_display.cc | 60 +++++ .../editors/space_outliner/tree/tree_display.hh | 154 +++++++++++ .../space_outliner/tree/tree_display_libraries.cc | 213 ++++++++++++++++ .../space_outliner/tree/tree_display_view_layer.cc | 284 +++++++++++++++++++++ .../editors/space_outliner/tree/tree_view.cc | 60 ----- .../editors/space_outliner/tree/tree_view.hh | 146 ----------- .../space_outliner/tree/tree_view_libraries.cc | 213 ---------------- .../space_outliner/tree/tree_view_view_layer.cc | 284 --------------------- 12 files changed, 729 insertions(+), 721 deletions(-) create mode 100644 source/blender/editors/space_outliner/tree/tree_display.cc create mode 100644 source/blender/editors/space_outliner/tree/tree_display.hh create mode 100644 source/blender/editors/space_outliner/tree/tree_display_libraries.cc create mode 100644 source/blender/editors/space_outliner/tree/tree_display_view_layer.cc delete mode 100644 source/blender/editors/space_outliner/tree/tree_view.cc delete mode 100644 source/blender/editors/space_outliner/tree/tree_view.hh delete mode 100644 source/blender/editors/space_outliner/tree/tree_view_libraries.cc delete mode 100644 source/blender/editors/space_outliner/tree/tree_view_view_layer.cc diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index bbcd5a32ad6..ec95b0da39f 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -45,12 +45,12 @@ set(SRC outliner_utils.c space_outliner.c tree/common.cc - tree/tree_view.cc - tree/tree_view_libraries.cc - tree/tree_view_view_layer.cc + tree/tree_display.cc + tree/tree_display_libraries.cc + tree/tree_display_view_layer.cc outliner_intern.h - tree/tree_view.hh + tree/tree_display.hh ) set(LIB diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index adcbcb5a310..0459d669789 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -50,7 +50,7 @@ typedef struct SpaceOutliner_Runtime { /** * Internal C++ object to create and manage the tree for a specific display type (View Layers, * Scenes, Blender File, etc.). */ - struct TreeView *tree_view; + struct TreeDisplay *tree_display; } SpaceOutliner_Runtime; typedef enum TreeElementInsertType { diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 67616db6b3a..26871ef14a0 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -85,7 +85,7 @@ #include "UI_interface.h" #include "outliner_intern.h" -#include "tree/tree_view.hh" +#include "tree/tree_display.hh" #ifdef WIN32 # include "BLI_math_base.h" /* M_PI */ @@ -2214,22 +2214,22 @@ void outliner_build_tree(Main *mainvar, outliner_free_tree(&space_outliner->tree); outliner_storage_cleanup(space_outliner); - outliner_tree_view_destroy(&space_outliner->runtime->tree_view); + outliner_tree_display_destroy(&space_outliner->runtime->tree_display); - space_outliner->runtime->tree_view = outliner_tree_view_create(space_outliner->outlinevis, - space_outliner); - if (space_outliner->runtime->tree_view) { + space_outliner->runtime->tree_display = outliner_tree_display_create(space_outliner->outlinevis, + space_outliner); + if (space_outliner->runtime->tree_display) { TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; - space_outliner->tree = outliner_tree_view_build_tree(space_outliner->runtime->tree_view, - &source_data); + space_outliner->tree = outliner_tree_display_build_tree(space_outliner->runtime->tree_display, + &source_data); } - if (space_outliner->runtime->tree_view) { - /* Skip if there's a tree view that's responsible for adding all elements. */ + if (space_outliner->runtime->tree_display) { + /* Skip if there's a tree-display that's responsible for adding all elements. */ } /* options */ else if (space_outliner->outlinevis == SO_LIBRARIES) { - /* Ported to new tree-view, should be built there already. */ + /* Ported to new tree-display, should be built there already. */ BLI_assert(false); } else if (space_outliner->outlinevis == SO_SCENES) { @@ -2291,7 +2291,7 @@ void outliner_build_tree(Main *mainvar, outliner_add_orphaned_datablocks(mainvar, space_outliner); } else if (space_outliner->outlinevis == SO_VIEW_LAYER) { - /* Ported to new tree-view, should be built there already. */ + /* Ported to new tree-display, should be built there already. */ BLI_assert(false); } diff --git a/source/blender/editors/space_outliner/tree/common.cc b/source/blender/editors/space_outliner/tree/common.cc index 56b5d62195e..65c9448634c 100644 --- a/source/blender/editors/space_outliner/tree/common.cc +++ b/source/blender/editors/space_outliner/tree/common.cc @@ -17,14 +17,14 @@ /** \file * \ingroup spoutliner * - * Functions and helpers shared between tree-view types or other tree related code. + * Functions and helpers shared between tree-display types or other tree related code. */ #include "BKE_idtype.h" #include "RNA_access.h" -#include "tree_view.hh" +#include "tree_display.hh" /* -------------------------------------------------------------------- */ /** \name ID Helpers. diff --git a/source/blender/editors/space_outliner/tree/tree_display.cc b/source/blender/editors/space_outliner/tree/tree_display.cc new file mode 100644 index 00000000000..12599733275 --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_display.cc @@ -0,0 +1,60 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + */ + +#include "BLI_listbase.h" + +#include "DNA_listBase.h" + +#include "tree_display.hh" + +using namespace blender::ed::outliner; + +TreeDisplay *outliner_tree_display_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner) +{ + AbstractTreeDisplay *tree_display = nullptr; + + switch (mode) { + case SO_SCENES: + break; + case SO_LIBRARIES: + tree_display = new TreeDisplayLibraries(*space_outliner); + break; + case SO_SEQUENCE: + case SO_DATA_API: + case SO_ID_ORPHANS: + break; + case SO_VIEW_LAYER: + tree_display = new TreeDisplayViewLayer(*space_outliner); + break; + } + + return reinterpret_cast(tree_display); +} + +void outliner_tree_display_destroy(TreeDisplay **tree_display) +{ + delete reinterpret_cast(*tree_display); + *tree_display = nullptr; +} + +ListBase outliner_tree_display_build_tree(TreeDisplay *tree_display, TreeSourceData *source_data) +{ + return reinterpret_cast(tree_display)->buildTree(*source_data); +} diff --git a/source/blender/editors/space_outliner/tree/tree_display.hh b/source/blender/editors/space_outliner/tree/tree_display.hh new file mode 100644 index 00000000000..1aefc49d8e8 --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_display.hh @@ -0,0 +1,154 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + * + * \brief Establish and manage Outliner trees for different display modes. + * + * Each Outliner display mode (e.g View Layer, Scenes, Blender File) is implemented as a + * tree-display class with the #AbstractTreeDisplay interface. + * + * Their main responsibility is building the Outliner tree for a display mode. For that, they + * implement the #buildTree() function, which based on Blender data (#TreeSourceData), builds a + * custom tree of whatever data it wants to visualize. + * Further, they can implement display mode dependent queries and general operations using the + * #AbstractTreeDisplay abstraction as common interface. + * + * Outliners keep the current tree-display object alive until the next full tree rebuild to keep + * access to it. + */ + +#pragma once + +#include "DNA_space_types.h" + +struct ListBase; +struct Main; +struct SpaceOutliner; +struct TreeElement; +struct TreeSourceData; + +#ifdef __cplusplus + +namespace blender::ed::outliner { + +/* -------------------------------------------------------------------- */ +/* Tree-Display Interface */ + +/** + * \brief Base Class For Tree-Displays + * + * Abstract base class defining the interface for tree-display variants. + */ +class AbstractTreeDisplay { + public: + AbstractTreeDisplay(SpaceOutliner &space_outliner) : space_outliner_(space_outliner) + { + } + virtual ~AbstractTreeDisplay() = default; + + /** + * Build a tree for this display mode with the Blender context data given in \a source_data and + * the view settings in \a space_outliner. + */ + virtual ListBase buildTree(const TreeSourceData &source_data) = 0; + + protected: + /** All derived classes will need a handle to this, so storing it in the base for convenience. */ + SpaceOutliner &space_outliner_; +}; + +/* -------------------------------------------------------------------- */ +/* View Layer Tree-Display */ + +/** + * \brief Tree-Display for the View Layer display mode. + */ +class TreeDisplayViewLayer final : public AbstractTreeDisplay { + ViewLayer *view_layer_ = nullptr; + bool show_objects_ = true; + + public: + TreeDisplayViewLayer(SpaceOutliner &space_outliner); + + ListBase buildTree(const TreeSourceData &source_data) override; + + private: + void add_view_layer(ListBase &, TreeElement &); + void add_layer_collections_recursive(ListBase &, ListBase &, TreeElement &); + void add_layer_collection_objects(ListBase &, LayerCollection &, TreeElement &); + void add_layer_collection_objects_children(TreeElement &); +}; + +/* -------------------------------------------------------------------- */ +/* Library Tree-Display */ + +/** + * \brief Tree-Display for the Libraries display mode. + */ +class TreeDisplayLibraries final : public AbstractTreeDisplay { + public: + TreeDisplayLibraries(SpaceOutliner &space_outliner); + + ListBase buildTree(const TreeSourceData &source_data) override; + + private: + TreeElement *add_library_contents(Main &, ListBase &, Library *) const; + bool library_id_filter_poll(Library *lib, ID *id) const; + short id_filter_get() const; +}; + +} // namespace blender::ed::outliner + +extern "C" { +#endif + +/* -------------------------------------------------------------------- */ +/* C-API */ + +/** C alias for an #AbstractTreeDisplay handle. */ +typedef struct TreeDisplay TreeDisplay; + +/** + * \brief The data to build the tree from. + */ +typedef struct TreeSourceData { + struct Main *bmain; + struct Scene *scene; + struct ViewLayer *view_layer; +} TreeSourceData; + +TreeDisplay *outliner_tree_display_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner); +void outliner_tree_display_destroy(TreeDisplay **tree_display); + +ListBase outliner_tree_display_build_tree(TreeDisplay *tree_display, TreeSourceData *source_data); + +/* The following functions are needed to build the tree. They are calls back into C; the way + * elements are created should be refactored and ported to C++ with a new design/API too. */ +struct TreeElement *outliner_add_element(struct SpaceOutliner *space_outliner, + ListBase *lb, + void *idv, + struct TreeElement *parent, + short type, + short index); +void outliner_make_object_parent_hierarchy(ListBase *lb); + +const char *outliner_idcode_to_plural(short idcode); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc new file mode 100644 index 00000000000..bd0870c837c --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc @@ -0,0 +1,213 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + */ + +#include "BLI_listbase.h" +#include "BLI_listbase_wrapper.hh" + +#include "BKE_collection.h" +#include "BKE_main.h" + +#include "BLT_translation.h" + +#include "../outliner_intern.h" +#include "tree_display.hh" + +namespace blender::ed::outliner { + +/* Convenience/readability. */ +template using List = ListBaseWrapper; + +TreeDisplayLibraries::TreeDisplayLibraries(SpaceOutliner &space_outliner) + : AbstractTreeDisplay(space_outliner) +{ +} + +ListBase TreeDisplayLibraries::buildTree(const TreeSourceData &source_data) +{ + ListBase tree = {nullptr}; + + { + /* current file first - mainvar provides tselem with unique pointer - not used */ + TreeElement *ten = add_library_contents(*source_data.bmain, tree, nullptr); + TreeStoreElem *tselem; + + if (ten) { + tselem = TREESTORE(ten); + if (!tselem->used) { + tselem->flag &= ~TSE_CLOSED; + } + } + } + + for (ID *id : List(source_data.bmain->libraries)) { + Library *lib = reinterpret_cast(id); + TreeElement *ten = add_library_contents(*source_data.bmain, tree, lib); + /* NULL-check matters, due to filtering there may not be a new element. */ + if (ten) { + lib->id.newid = (ID *)ten; + } + } + + /* make hierarchy */ + for (TreeElement *ten : List(tree)) { + if (ten == tree.first) { + /* First item is main, skip. */ + continue; + } + + TreeStoreElem *tselem = TREESTORE(ten); + Library *lib = (Library *)tselem->id; + BLI_assert(!lib || (GS(lib->id.name) == ID_LI)); + if (!lib || !lib->parent) { + continue; + } + + TreeElement *parent = (TreeElement *)lib->parent->id.newid; + + if (tselem->id->tag & LIB_TAG_INDIRECT) { + /* Only remove from 'first level' if lib is not also directly used. */ + BLI_remlink(&tree, ten); + BLI_addtail(&parent->subtree, ten); + ten->parent = parent; + } + else { + /* Else, make a new copy of the libtree for our parent. */ + TreeElement *dupten = add_library_contents(*source_data.bmain, parent->subtree, lib); + if (dupten) { + dupten->parent = parent; + } + } + } + /* restore newid pointers */ + for (ID *library_id : List(source_data.bmain->libraries)) { + library_id->newid = nullptr; + } + + return tree; +} + +TreeElement *TreeDisplayLibraries::add_library_contents(Main &mainvar, + ListBase &lb, + Library *lib) const +{ + const short filter_id_type = id_filter_get(); + + ListBase *lbarray[MAX_LIBARRAY]; + int tot; + if (filter_id_type) { + lbarray[0] = which_libbase(&mainvar, space_outliner_.filter_id_type); + tot = 1; + } + else { + tot = set_listbasepointers(&mainvar, lbarray); + } + + TreeElement *tenlib = nullptr; + for (int a = 0; a < tot; a++) { + if (!lbarray[a] || !lbarray[a]->first) { + continue; + } + + ID *id = static_cast(lbarray[a]->first); + const bool is_library = (GS(id->name) == ID_LI) && (lib != nullptr); + + /* check if there's data in current lib */ + for (ID *id_iter : List(lbarray[a])) { + if (id_iter->lib == lib) { + id = id_iter; + break; + } + } + + /* We always want to create an entry for libraries, even if/when we have no more IDs from + * them. This invalid state is important to show to user as well.*/ + if (id != nullptr || is_library) { + if (!tenlib) { + /* Create library tree element on demand, depending if there are any data-blocks. */ + if (lib) { + tenlib = outliner_add_element(&space_outliner_, &lb, lib, nullptr, 0, 0); + } + else { + tenlib = outliner_add_element(&space_outliner_, &lb, &mainvar, nullptr, TSE_ID_BASE, 0); + tenlib->name = IFACE_("Current File"); + } + } + + /* Create data-block list parent element on demand. */ + if (id != nullptr) { + TreeElement *ten; + + if (filter_id_type) { + ten = tenlib; + } + else { + ten = outliner_add_element( + &space_outliner_, &tenlib->subtree, lbarray[a], nullptr, TSE_ID_BASE, 0); + ten->directdata = lbarray[a]; + ten->name = outliner_idcode_to_plural(GS(id->name)); + } + + for (ID *id : List(lbarray[a])) { + if (library_id_filter_poll(lib, id)) { + outliner_add_element(&space_outliner_, &ten->subtree, id, ten, 0, 0); + } + } + } + } + } + + return tenlib; +} + +short TreeDisplayLibraries::id_filter_get() const +{ + if (space_outliner_.filter & SO_FILTER_ID_TYPE) { + return space_outliner_.filter_id_type; + } + return 0; +} + +bool TreeDisplayLibraries::library_id_filter_poll(Library *lib, ID *id) const +{ + if (id->lib != lib) { + return false; + } + + if (id_filter_get() == ID_GR) { + /* Don't show child collections of non-scene master collection, + * they are already shown as children. */ + Collection *collection = (Collection *)id; + bool has_non_scene_parent = false; + + for (CollectionParent *cparent : List(collection->parents)) { + if (!(cparent->collection->flag & COLLECTION_IS_MASTER)) { + has_non_scene_parent = true; + } + } + + if (has_non_scene_parent) { + return false; + } + } + + return true; +} + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc new file mode 100644 index 00000000000..123c47b8556 --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc @@ -0,0 +1,284 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + */ + +#include + +#include "DNA_scene_types.h" + +#include "BKE_layer.h" + +#include "BLI_listbase.h" +#include "BLI_listbase_wrapper.hh" +#include "BLI_map.hh" +#include "BLI_vector.hh" + +#include "BLT_translation.h" + +#include "../outliner_intern.h" +#include "tree_display.hh" + +namespace blender::ed::outliner { + +/* Convenience/readability. */ +template using List = ListBaseWrapper; + +class ObjectsChildrenBuilder { + using TreeChildren = Vector; + using ObjectTreeElementsMap = Map; + + SpaceOutliner &outliner_; + ObjectTreeElementsMap object_tree_elements_map_; + + public: + ObjectsChildrenBuilder(SpaceOutliner &); + ~ObjectsChildrenBuilder() = default; + + void operator()(TreeElement &collection_tree_elem); + + private: + void object_tree_elements_lookup_create_recursive(TreeElement *); + void make_object_parent_hierarchy_collections(); +}; + +/* -------------------------------------------------------------------- */ +/** \name Tree-Display for a View Layer. + * + * \{ */ + +TreeDisplayViewLayer::TreeDisplayViewLayer(SpaceOutliner &space_outliner) + : AbstractTreeDisplay(space_outliner) +{ +} + +ListBase TreeDisplayViewLayer::buildTree(const TreeSourceData &source_data) +{ + ListBase tree = {nullptr}; + + view_layer_ = source_data.view_layer; + show_objects_ = !(space_outliner_.filter & SO_FILTER_NO_OBJECT); + + const bool show_children = (space_outliner_.filter & SO_FILTER_NO_CHILDREN) == 0; + + if (space_outliner_.filter & SO_FILTER_NO_COLLECTION) { + /* Show objects in the view layer. */ + for (Base *base : List(view_layer_->object_bases)) { + TreeElement *te_object = outliner_add_element( + &space_outliner_, &tree, base->object, nullptr, 0, 0); + te_object->directdata = base; + } + + if (show_children) { + outliner_make_object_parent_hierarchy(&tree); + } + } + else { + /* Show collections in the view layer. */ + TreeElement &ten = *outliner_add_element( + &space_outliner_, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); + ten.name = IFACE_("Scene Collection"); + TREESTORE(&ten)->flag &= ~TSE_CLOSED; + + add_view_layer(ten.subtree, ten); + if (show_children) { + add_layer_collection_objects_children(ten); + } + } + + return tree; +} + +void TreeDisplayViewLayer::add_view_layer(ListBase &tree, TreeElement &parent) +{ + /* First layer collection is for master collection, don't show it. */ + LayerCollection *lc = static_cast(view_layer_->layer_collections.first); + if (lc == nullptr) { + return; + } + + add_layer_collections_recursive(tree, lc->layer_collections, parent); + if (show_objects_) { + add_layer_collection_objects(tree, *lc, parent); + } +} + +void TreeDisplayViewLayer::add_layer_collections_recursive(ListBase &tree, + ListBase &layer_collections, + TreeElement &parent_ten) +{ + for (LayerCollection *lc : List(layer_collections)) { + const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0; + TreeElement *ten; + + if (exclude && ((space_outliner_.show_restrict_flags & SO_RESTRICT_ENABLE) == 0)) { + ten = &parent_ten; + } + else { + ID *id = &lc->collection->id; + ten = outliner_add_element( + &space_outliner_, &tree, id, &parent_ten, TSE_LAYER_COLLECTION, 0); + + ten->name = id->name + 2; + ten->directdata = lc; + + /* Open by default, except linked collections, which may contain many elements. */ + TreeStoreElem *tselem = TREESTORE(ten); + if (!(tselem->used || ID_IS_LINKED(id) || ID_IS_OVERRIDE_LIBRARY(id))) { + tselem->flag &= ~TSE_CLOSED; + } + + if (exclude || (lc->runtime_flag & LAYER_COLLECTION_VISIBLE_VIEW_LAYER) == 0) { + ten->flag |= TE_DISABLED; + } + } + + add_layer_collections_recursive(ten->subtree, lc->layer_collections, *ten); + if (!exclude && show_objects_) { + add_layer_collection_objects(ten->subtree, *lc, *ten); + } + } +} + +void TreeDisplayViewLayer::add_layer_collection_objects(ListBase &tree, + LayerCollection &lc, + TreeElement &ten) +{ + for (CollectionObject *cob : List(lc.collection->gobject)) { + Base *base = BKE_view_layer_base_find(view_layer_, cob->ob); + TreeElement *te_object = outliner_add_element( + &space_outliner_, &tree, base->object, &ten, 0, 0); + te_object->directdata = base; + + if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) { + te_object->flag |= TE_DISABLED; + } + } +} + +void TreeDisplayViewLayer::add_layer_collection_objects_children(TreeElement &collection_tree_elem) +{ + /* Call helper to add children. */ + ObjectsChildrenBuilder child_builder{space_outliner_}; + child_builder(collection_tree_elem); +} + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Object Children helper. + * + * Helper to add child objects to the sub-tree of their parent, recursively covering all nested + * collections. + * + * \{ */ + +ObjectsChildrenBuilder::ObjectsChildrenBuilder(SpaceOutliner &outliner) : outliner_(outliner) +{ +} + +void ObjectsChildrenBuilder::operator()(TreeElement &collection_tree_elem) +{ + object_tree_elements_lookup_create_recursive(&collection_tree_elem); + make_object_parent_hierarchy_collections(); +} + +/** + * Build a map from Object* to a list of TreeElement* matching the object. + */ +void ObjectsChildrenBuilder::object_tree_elements_lookup_create_recursive(TreeElement *te_parent) +{ + for (TreeElement *te : List(te_parent->subtree)) { + TreeStoreElem *tselem = TREESTORE(te); + + if (tselem->type == TSE_LAYER_COLLECTION) { + object_tree_elements_lookup_create_recursive(te); + continue; + } + + if (tselem->type == 0 && te->idcode == ID_OB) { + Object *ob = (Object *)tselem->id; + /* Lookup children or add new, empty children vector. */ + Vector &tree_elements = object_tree_elements_map_.lookup_or_add(ob, {}); + + tree_elements.append(te); + object_tree_elements_lookup_create_recursive(te); + } + } +} + +/** + * For all objects in the tree, lookup the parent in this map, + * and move or add tree elements as needed. + */ +void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() +{ + for (ObjectTreeElementsMap::MutableItem item : object_tree_elements_map_.items()) { + Object *child = item.key; + + if (child->parent == nullptr) { + continue; + } + + Vector &child_ob_tree_elements = item.value; + Vector *parent_ob_tree_elements = object_tree_elements_map_.lookup_ptr( + child->parent); + if (parent_ob_tree_elements == nullptr) { + continue; + } + + for (TreeElement *parent_ob_tree_element : *parent_ob_tree_elements) { + TreeElement *parent_ob_collection_tree_element = nullptr; + bool found = false; + + /* We always want to remove the child from the direct collection its parent is nested under. + * This is particularly important when dealing with multi-level nesting (grandchildren). */ + parent_ob_collection_tree_element = parent_ob_tree_element->parent; + while (!ELEM(TREESTORE(parent_ob_collection_tree_element)->type, + TSE_VIEW_COLLECTION_BASE, + TSE_LAYER_COLLECTION)) { + parent_ob_collection_tree_element = parent_ob_collection_tree_element->parent; + } + + for (TreeElement *child_ob_tree_element : child_ob_tree_elements) { + if (child_ob_tree_element->parent == parent_ob_collection_tree_element) { + /* Move from the collection subtree into the parent object subtree. */ + BLI_remlink(&parent_ob_collection_tree_element->subtree, child_ob_tree_element); + BLI_addtail(&parent_ob_tree_element->subtree, child_ob_tree_element); + child_ob_tree_element->parent = parent_ob_tree_element; + found = true; + break; + } + } + + if (!found) { + /* We add the child in the tree even if it is not in the collection. + * We deliberately clear its sub-tree though, to make it less prominent. */ + TreeElement *child_ob_tree_element = outliner_add_element( + &outliner_, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); + outliner_free_tree(&child_ob_tree_element->subtree); + child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION; + child_ob_tree_elements.append(child_ob_tree_element); + } + } + } +} + +/** \} */ + +} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/tree/tree_view.cc b/source/blender/editors/space_outliner/tree/tree_view.cc deleted file mode 100644 index 7eefae7124c..00000000000 --- a/source/blender/editors/space_outliner/tree/tree_view.cc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/** \file - * \ingroup spoutliner - */ - -#include "BLI_listbase.h" - -#include "DNA_listBase.h" - -#include "tree_view.hh" - -using namespace blender::ed::outliner; - -TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner) -{ - AbstractTreeView *tree_view = nullptr; - - switch (mode) { - case SO_SCENES: - break; - case SO_LIBRARIES: - tree_view = new TreeViewLibraries(*space_outliner); - break; - case SO_SEQUENCE: - case SO_DATA_API: - case SO_ID_ORPHANS: - break; - case SO_VIEW_LAYER: - tree_view = new TreeViewViewLayer(*space_outliner); - break; - } - - return reinterpret_cast(tree_view); -} - -void outliner_tree_view_destroy(TreeView **tree_view) -{ - delete reinterpret_cast(*tree_view); - *tree_view = nullptr; -} - -ListBase outliner_tree_view_build_tree(TreeView *tree_view, TreeSourceData *source_data) -{ - return reinterpret_cast(tree_view)->buildTree(*source_data); -} diff --git a/source/blender/editors/space_outliner/tree/tree_view.hh b/source/blender/editors/space_outliner/tree/tree_view.hh deleted file mode 100644 index 63a0826b440..00000000000 --- a/source/blender/editors/space_outliner/tree/tree_view.hh +++ /dev/null @@ -1,146 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/** \file - * \ingroup spoutliner - * - * For now all sub-class declarations of #AbstractTreeView are in this file. They could be moved - * into own headers of course. - */ - -#pragma once - -#include "DNA_space_types.h" - -struct ListBase; -struct Main; -struct SpaceOutliner; -struct TreeElement; -struct TreeSourceData; - -#ifdef __cplusplus - -namespace blender::ed::outliner { - -/* -------------------------------------------------------------------- */ -/* Tree-View Interface */ - -/** - * \brief Base Class For Tree-Views - * - * Abstract base class defining the interface for tree-view variants. For each Outliner display - * type (e.g View Layer, Scenes, Blender File), a derived class implements a #buildTree() function, - * that based on Blender data (#TreeSourceData), builds a custom tree of whatever data it wants to - * visualize. - */ -class AbstractTreeView { - public: - AbstractTreeView(SpaceOutliner &space_outliner) : space_outliner_(space_outliner) - { - } - virtual ~AbstractTreeView() = default; - - /** - * Build a tree for this view with the Blender context data given in \a source_data and the view - * settings in \a space_outliner. - */ - virtual ListBase buildTree(const TreeSourceData &source_data) = 0; - - protected: - /** All derived classes will need a handle to this, so storing it in the base for convenience. */ - SpaceOutliner &space_outliner_; -}; - -/* -------------------------------------------------------------------- */ -/* View Layer Tree-View */ - -/** - * \brief Tree-View for the View Layer display mode. - */ -class TreeViewViewLayer final : public AbstractTreeView { - ViewLayer *view_layer_ = nullptr; - bool show_objects_ = true; - - public: - TreeViewViewLayer(SpaceOutliner &space_outliner); - - ListBase buildTree(const TreeSourceData &source_data) override; - - private: - void add_view_layer(ListBase &, TreeElement &); - void add_layer_collections_recursive(ListBase &, ListBase &, TreeElement &); - void add_layer_collection_objects(ListBase &, LayerCollection &, TreeElement &); - void add_layer_collection_objects_children(TreeElement &); -}; - -/* -------------------------------------------------------------------- */ -/* Library Tree-View */ - -/** - * \brief Tree-View for the Libraries display mode. - */ -class TreeViewLibraries final : public AbstractTreeView { - public: - TreeViewLibraries(SpaceOutliner &space_outliner); - - ListBase buildTree(const TreeSourceData &source_data) override; - - private: - TreeElement *add_library_contents(Main &, ListBase &, Library *) const; - bool library_id_filter_poll(Library *lib, ID *id) const; - short id_filter_get() const; -}; - -} // namespace blender::ed::outliner - -extern "C" { -#endif - -/* -------------------------------------------------------------------- */ -/* C-API */ - -/** There is no actual implementation of this, it's the C name for an #AbstractTreeView handle. */ -typedef struct TreeView TreeView; - -/** - * \brief The data to build the tree from. - */ -typedef struct TreeSourceData { - struct Main *bmain; - struct Scene *scene; - struct ViewLayer *view_layer; -} TreeSourceData; - -TreeView *outliner_tree_view_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner); -void outliner_tree_view_destroy(TreeView **tree_view); - -ListBase outliner_tree_view_build_tree(TreeView *tree_view, TreeSourceData *source_data); - -/* The following functions are needed to build the tree. These are calls back into C; the way - * elements are created should be refactored and ported to C++ with a new design/API too. */ -struct TreeElement *outliner_add_element(struct SpaceOutliner *space_outliner, - ListBase *lb, - void *idv, - struct TreeElement *parent, - short type, - short index); -void outliner_make_object_parent_hierarchy(ListBase *lb); - -const char *outliner_idcode_to_plural(short idcode); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/editors/space_outliner/tree/tree_view_libraries.cc b/source/blender/editors/space_outliner/tree/tree_view_libraries.cc deleted file mode 100644 index bd75bba83eb..00000000000 --- a/source/blender/editors/space_outliner/tree/tree_view_libraries.cc +++ /dev/null @@ -1,213 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/** \file - * \ingroup spoutliner - */ - -#include "BLI_listbase.h" -#include "BLI_listbase_wrapper.hh" - -#include "BKE_collection.h" -#include "BKE_main.h" - -#include "BLT_translation.h" - -#include "../outliner_intern.h" -#include "tree_view.hh" - -namespace blender::ed::outliner { - -/* Convenience/readability. */ -template using List = ListBaseWrapper; - -TreeViewLibraries::TreeViewLibraries(SpaceOutliner &space_outliner) - : AbstractTreeView(space_outliner) -{ -} - -ListBase TreeViewLibraries::buildTree(const TreeSourceData &source_data) -{ - ListBase tree = {nullptr}; - - { - /* current file first - mainvar provides tselem with unique pointer - not used */ - TreeElement *ten = add_library_contents(*source_data.bmain, tree, nullptr); - TreeStoreElem *tselem; - - if (ten) { - tselem = TREESTORE(ten); - if (!tselem->used) { - tselem->flag &= ~TSE_CLOSED; - } - } - } - - for (ID *id : List(source_data.bmain->libraries)) { - Library *lib = reinterpret_cast(id); - TreeElement *ten = add_library_contents(*source_data.bmain, tree, lib); - /* NULL-check matters, due to filtering there may not be a new element. */ - if (ten) { - lib->id.newid = (ID *)ten; - } - } - - /* make hierarchy */ - for (TreeElement *ten : List(tree)) { - if (ten == tree.first) { - /* First item is main, skip. */ - continue; - } - - TreeStoreElem *tselem = TREESTORE(ten); - Library *lib = (Library *)tselem->id; - BLI_assert(!lib || (GS(lib->id.name) == ID_LI)); - if (!lib || !lib->parent) { - continue; - } - - TreeElement *parent = (TreeElement *)lib->parent->id.newid; - - if (tselem->id->tag & LIB_TAG_INDIRECT) { - /* Only remove from 'first level' if lib is not also directly used. */ - BLI_remlink(&tree, ten); - BLI_addtail(&parent->subtree, ten); - ten->parent = parent; - } - else { - /* Else, make a new copy of the libtree for our parent. */ - TreeElement *dupten = add_library_contents(*source_data.bmain, parent->subtree, lib); - if (dupten) { - dupten->parent = parent; - } - } - } - /* restore newid pointers */ - for (ID *library_id : List(source_data.bmain->libraries)) { - library_id->newid = nullptr; - } - - return tree; -} - -TreeElement *TreeViewLibraries::add_library_contents(Main &mainvar, - ListBase &lb, - Library *lib) const -{ - const short filter_id_type = id_filter_get(); - - ListBase *lbarray[MAX_LIBARRAY]; - int tot; - if (filter_id_type) { - lbarray[0] = which_libbase(&mainvar, space_outliner_.filter_id_type); - tot = 1; - } - else { - tot = set_listbasepointers(&mainvar, lbarray); - } - - TreeElement *tenlib = nullptr; - for (int a = 0; a < tot; a++) { - if (!lbarray[a] || !lbarray[a]->first) { - continue; - } - - ID *id = static_cast(lbarray[a]->first); - const bool is_library = (GS(id->name) == ID_LI) && (lib != nullptr); - - /* check if there's data in current lib */ - for (ID *id_iter : List(lbarray[a])) { - if (id_iter->lib == lib) { - id = id_iter; - break; - } - } - - /* We always want to create an entry for libraries, even if/when we have no more IDs from - * them. This invalid state is important to show to user as well.*/ - if (id != nullptr || is_library) { - if (!tenlib) { - /* Create library tree element on demand, depending if there are any data-blocks. */ - if (lib) { - tenlib = outliner_add_element(&space_outliner_, &lb, lib, nullptr, 0, 0); - } - else { - tenlib = outliner_add_element(&space_outliner_, &lb, &mainvar, nullptr, TSE_ID_BASE, 0); - tenlib->name = IFACE_("Current File"); - } - } - - /* Create data-block list parent element on demand. */ - if (id != nullptr) { - TreeElement *ten; - - if (filter_id_type) { - ten = tenlib; - } - else { - ten = outliner_add_element( - &space_outliner_, &tenlib->subtree, lbarray[a], nullptr, TSE_ID_BASE, 0); - ten->directdata = lbarray[a]; - ten->name = outliner_idcode_to_plural(GS(id->name)); - } - - for (ID *id : List(lbarray[a])) { - if (library_id_filter_poll(lib, id)) { - outliner_add_element(&space_outliner_, &ten->subtree, id, ten, 0, 0); - } - } - } - } - } - - return tenlib; -} - -short TreeViewLibraries::id_filter_get() const -{ - if (space_outliner_.filter & SO_FILTER_ID_TYPE) { - return space_outliner_.filter_id_type; - } - return 0; -} - -bool TreeViewLibraries::library_id_filter_poll(Library *lib, ID *id) const -{ - if (id->lib != lib) { - return false; - } - - if (id_filter_get() == ID_GR) { - /* Don't show child collections of non-scene master collection, - * they are already shown as children. */ - Collection *collection = (Collection *)id; - bool has_non_scene_parent = false; - - for (CollectionParent *cparent : List(collection->parents)) { - if (!(cparent->collection->flag & COLLECTION_IS_MASTER)) { - has_non_scene_parent = true; - } - } - - if (has_non_scene_parent) { - return false; - } - } - - return true; -} - -} // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc deleted file mode 100644 index 8895673f060..00000000000 --- a/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc +++ /dev/null @@ -1,284 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/** \file - * \ingroup spoutliner - */ - -#include - -#include "DNA_scene_types.h" - -#include "BKE_layer.h" - -#include "BLI_listbase.h" -#include "BLI_listbase_wrapper.hh" -#include "BLI_map.hh" -#include "BLI_vector.hh" - -#include "BLT_translation.h" - -#include "../outliner_intern.h" -#include "tree_view.hh" - -namespace blender::ed::outliner { - -/* Convenience/readability. */ -template using List = ListBaseWrapper; - -class ObjectsChildrenBuilder { - using TreeChildren = Vector; - using ObjectTreeElementsMap = Map; - - SpaceOutliner &outliner_; - ObjectTreeElementsMap object_tree_elements_map_; - - public: - ObjectsChildrenBuilder(SpaceOutliner &); - ~ObjectsChildrenBuilder() = default; - - void operator()(TreeElement &collection_tree_elem); - - private: - void object_tree_elements_lookup_create_recursive(TreeElement *); - void make_object_parent_hierarchy_collections(); -}; - -/* -------------------------------------------------------------------- */ -/** \name Tree View for a View Layer. - * - * \{ */ - -TreeViewViewLayer::TreeViewViewLayer(SpaceOutliner &space_outliner) - : AbstractTreeView(space_outliner) -{ -} - -ListBase TreeViewViewLayer::buildTree(const TreeSourceData &source_data) -{ - ListBase tree = {nullptr}; - - view_layer_ = source_data.view_layer; - show_objects_ = !(space_outliner_.filter & SO_FILTER_NO_OBJECT); - - const bool show_children = (space_outliner_.filter & SO_FILTER_NO_CHILDREN) == 0; - - if (space_outliner_.filter & SO_FILTER_NO_COLLECTION) { - /* Show objects in the view layer. */ - for (Base *base : List(view_layer_->object_bases)) { - TreeElement *te_object = outliner_add_element( - &space_outliner_, &tree, base->object, nullptr, 0, 0); - te_object->directdata = base; - } - - if (show_children) { - outliner_make_object_parent_hierarchy(&tree); - } - } - else { - /* Show collections in the view layer. */ - TreeElement &ten = *outliner_add_element( - &space_outliner_, &tree, source_data.scene, nullptr, TSE_VIEW_COLLECTION_BASE, 0); - ten.name = IFACE_("Scene Collection"); - TREESTORE(&ten)->flag &= ~TSE_CLOSED; - - add_view_layer(ten.subtree, ten); - if (show_children) { - add_layer_collection_objects_children(ten); - } - } - - return tree; -} - -void TreeViewViewLayer::add_view_layer(ListBase &tree, TreeElement &parent) -{ - /* First layer collection is for master collection, don't show it. */ - LayerCollection *lc = static_cast(view_layer_->layer_collections.first); - if (lc == nullptr) { - return; - } - - add_layer_collections_recursive(tree, lc->layer_collections, parent); - if (show_objects_) { - add_layer_collection_objects(tree, *lc, parent); - } -} - -void TreeViewViewLayer::add_layer_collections_recursive(ListBase &tree, - ListBase &layer_collections, - TreeElement &parent_ten) -{ - for (LayerCollection *lc : List(layer_collections)) { - const bool exclude = (lc->flag & LAYER_COLLECTION_EXCLUDE) != 0; - TreeElement *ten; - - if (exclude && ((space_outliner_.show_restrict_flags & SO_RESTRICT_ENABLE) == 0)) { - ten = &parent_ten; - } - else { - ID *id = &lc->collection->id; - ten = outliner_add_element( - &space_outliner_, &tree, id, &parent_ten, TSE_LAYER_COLLECTION, 0); - - ten->name = id->name + 2; - ten->directdata = lc; - - /* Open by default, except linked collections, which may contain many elements. */ - TreeStoreElem *tselem = TREESTORE(ten); - if (!(tselem->used || ID_IS_LINKED(id) || ID_IS_OVERRIDE_LIBRARY(id))) { - tselem->flag &= ~TSE_CLOSED; - } - - if (exclude || (lc->runtime_flag & LAYER_COLLECTION_VISIBLE_VIEW_LAYER) == 0) { - ten->flag |= TE_DISABLED; - } - } - - add_layer_collections_recursive(ten->subtree, lc->layer_collections, *ten); - if (!exclude && show_objects_) { - add_layer_collection_objects(ten->subtree, *lc, *ten); - } - } -} - -void TreeViewViewLayer::add_layer_collection_objects(ListBase &tree, - LayerCollection &lc, - TreeElement &ten) -{ - for (CollectionObject *cob : List(lc.collection->gobject)) { - Base *base = BKE_view_layer_base_find(view_layer_, cob->ob); - TreeElement *te_object = outliner_add_element( - &space_outliner_, &tree, base->object, &ten, 0, 0); - te_object->directdata = base; - - if (!(base->flag & BASE_VISIBLE_VIEWLAYER)) { - te_object->flag |= TE_DISABLED; - } - } -} - -void TreeViewViewLayer::add_layer_collection_objects_children(TreeElement &collection_tree_elem) -{ - /* Call helper to add children. */ - ObjectsChildrenBuilder child_builder{space_outliner_}; - child_builder(collection_tree_elem); -} - -/** \} */ - -/* -------------------------------------------------------------------- */ -/** \name Object Chilren helper. - * - * Helper to add child objects to the sub-tree of their parent, recursively covering all nested - * collections. - * - * \{ */ - -ObjectsChildrenBuilder::ObjectsChildrenBuilder(SpaceOutliner &outliner) : outliner_(outliner) -{ -} - -void ObjectsChildrenBuilder::operator()(TreeElement &collection_tree_elem) -{ - object_tree_elements_lookup_create_recursive(&collection_tree_elem); - make_object_parent_hierarchy_collections(); -} - -/** - * Build a map from Object* to a list of TreeElement* matching the object. - */ -void ObjectsChildrenBuilder::object_tree_elements_lookup_create_recursive(TreeElement *te_parent) -{ - for (TreeElement *te : List(te_parent->subtree)) { - TreeStoreElem *tselem = TREESTORE(te); - - if (tselem->type == TSE_LAYER_COLLECTION) { - object_tree_elements_lookup_create_recursive(te); - continue; - } - - if (tselem->type == 0 && te->idcode == ID_OB) { - Object *ob = (Object *)tselem->id; - /* Lookup children or add new, empty children vector. */ - Vector &tree_elements = object_tree_elements_map_.lookup_or_add(ob, {}); - - tree_elements.append(te); - object_tree_elements_lookup_create_recursive(te); - } - } -} - -/** - * For all objects in the tree, lookup the parent in this map, - * and move or add tree elements as needed. - */ -void ObjectsChildrenBuilder::make_object_parent_hierarchy_collections() -{ - for (ObjectTreeElementsMap::MutableItem item : object_tree_elements_map_.items()) { - Object *child = item.key; - - if (child->parent == nullptr) { - continue; - } - - Vector &child_ob_tree_elements = item.value; - Vector *parent_ob_tree_elements = object_tree_elements_map_.lookup_ptr( - child->parent); - if (parent_ob_tree_elements == nullptr) { - continue; - } - - for (TreeElement *parent_ob_tree_element : *parent_ob_tree_elements) { - TreeElement *parent_ob_collection_tree_element = nullptr; - bool found = false; - - /* We always want to remove the child from the direct collection its parent is nested under. - * This is particularly important when dealing with multi-level nesting (grandchildren). */ - parent_ob_collection_tree_element = parent_ob_tree_element->parent; - while (!ELEM(TREESTORE(parent_ob_collection_tree_element)->type, - TSE_VIEW_COLLECTION_BASE, - TSE_LAYER_COLLECTION)) { - parent_ob_collection_tree_element = parent_ob_collection_tree_element->parent; - } - - for (TreeElement *child_ob_tree_element : child_ob_tree_elements) { - if (child_ob_tree_element->parent == parent_ob_collection_tree_element) { - /* Move from the collection subtree into the parent object subtree. */ - BLI_remlink(&parent_ob_collection_tree_element->subtree, child_ob_tree_element); - BLI_addtail(&parent_ob_tree_element->subtree, child_ob_tree_element); - child_ob_tree_element->parent = parent_ob_tree_element; - found = true; - break; - } - } - - if (!found) { - /* We add the child in the tree even if it is not in the collection. - * We deliberately clear its sub-tree though, to make it less prominent. */ - TreeElement *child_ob_tree_element = outliner_add_element( - &outliner_, &parent_ob_tree_element->subtree, child, parent_ob_tree_element, 0, 0); - outliner_free_tree(&child_ob_tree_element->subtree); - child_ob_tree_element->flag |= TE_CHILD_NOT_IN_COLLECTION; - child_ob_tree_elements.append(child_ob_tree_element); - } - } - } -} - -/** \} */ - -} // namespace blender::ed::outliner -- cgit v1.2.3 From 40aa69e2eb6896f559153f48a83c870691f2f86a Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 9 Nov 2020 13:50:19 +0100 Subject: Cleanup: Split header for Outliner tree building into C and C++ headers See https://developer.blender.org/D9499. It's odd to include a C++ header (".hh") in C code, we should avoid that. All of the Outliner code should be moved to C++, I don't expect this C header to stay for long. --- .../blender/editors/space_outliner/CMakeLists.txt | 1 + .../blender/editors/space_outliner/outliner_tree.c | 2 +- .../editors/space_outliner/tree/tree_display.h | 64 ++++++++++++++++++++++ .../editors/space_outliner/tree/tree_display.hh | 43 +-------------- 4 files changed, 67 insertions(+), 43 deletions(-) create mode 100644 source/blender/editors/space_outliner/tree/tree_display.h diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index ec95b0da39f..996570fae25 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -50,6 +50,7 @@ set(SRC tree/tree_display_view_layer.cc outliner_intern.h + tree/tree_display.h tree/tree_display.hh ) diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 26871ef14a0..83be26793ee 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -85,7 +85,7 @@ #include "UI_interface.h" #include "outliner_intern.h" -#include "tree/tree_display.hh" +#include "tree/tree_display.h" #ifdef WIN32 # include "BLI_math_base.h" /* M_PI */ diff --git a/source/blender/editors/space_outliner/tree/tree_display.h b/source/blender/editors/space_outliner/tree/tree_display.h new file mode 100644 index 00000000000..4ef71ded133 --- /dev/null +++ b/source/blender/editors/space_outliner/tree/tree_display.h @@ -0,0 +1,64 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** \file + * \ingroup spoutliner + * + * C-API for the Tree-Display types. + */ + +#pragma once + +#include "DNA_space_types.h" + +struct ListBase; + +#ifdef __cplusplus +extern "C" { +#endif + +/** C alias for an #AbstractTreeDisplay handle. */ +typedef struct TreeDisplay TreeDisplay; + +/** + * \brief The data to build the tree from. + */ +typedef struct TreeSourceData { + struct Main *bmain; + struct Scene *scene; + struct ViewLayer *view_layer; +} TreeSourceData; + +TreeDisplay *outliner_tree_display_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner); +void outliner_tree_display_destroy(TreeDisplay **tree_display); + +ListBase outliner_tree_display_build_tree(TreeDisplay *tree_display, TreeSourceData *source_data); + +/* The following functions are needed to build the tree. They are calls back into C; the way + * elements are created should be refactored and ported to C++ with a new design/API too. */ +struct TreeElement *outliner_add_element(SpaceOutliner *space_outliner, + ListBase *lb, + void *idv, + struct TreeElement *parent, + short type, + short index); +void outliner_make_object_parent_hierarchy(ListBase *lb); + +const char *outliner_idcode_to_plural(short idcode); + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/editors/space_outliner/tree/tree_display.hh b/source/blender/editors/space_outliner/tree/tree_display.hh index 1aefc49d8e8..a3d9a626d1d 100644 --- a/source/blender/editors/space_outliner/tree/tree_display.hh +++ b/source/blender/editors/space_outliner/tree/tree_display.hh @@ -34,7 +34,7 @@ #pragma once -#include "DNA_space_types.h" +#include "tree_display.h" struct ListBase; struct Main; @@ -42,8 +42,6 @@ struct SpaceOutliner; struct TreeElement; struct TreeSourceData; -#ifdef __cplusplus - namespace blender::ed::outliner { /* -------------------------------------------------------------------- */ @@ -113,42 +111,3 @@ class TreeDisplayLibraries final : public AbstractTreeDisplay { }; } // namespace blender::ed::outliner - -extern "C" { -#endif - -/* -------------------------------------------------------------------- */ -/* C-API */ - -/** C alias for an #AbstractTreeDisplay handle. */ -typedef struct TreeDisplay TreeDisplay; - -/** - * \brief The data to build the tree from. - */ -typedef struct TreeSourceData { - struct Main *bmain; - struct Scene *scene; - struct ViewLayer *view_layer; -} TreeSourceData; - -TreeDisplay *outliner_tree_display_create(eSpaceOutliner_Mode mode, SpaceOutliner *space_outliner); -void outliner_tree_display_destroy(TreeDisplay **tree_display); - -ListBase outliner_tree_display_build_tree(TreeDisplay *tree_display, TreeSourceData *source_data); - -/* The following functions are needed to build the tree. They are calls back into C; the way - * elements are created should be refactored and ported to C++ with a new design/API too. */ -struct TreeElement *outliner_add_element(struct SpaceOutliner *space_outliner, - ListBase *lb, - void *idv, - struct TreeElement *parent, - short type, - short index); -void outliner_make_object_parent_hierarchy(ListBase *lb); - -const char *outliner_idcode_to_plural(short idcode); - -#ifdef __cplusplus -} -#endif -- cgit v1.2.3 From 88e6341ce84851132ceba8407fb2c3058f34b6dd Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 11 Nov 2020 14:57:07 -0500 Subject: UI: Tooltips: dont add period to labels These are generally only one or two word phrases and are not sentences. This change slightly improves readability. Note, the check when display labels: ``` Tip Label (only for buttons not already showing the label). ``` Could be improved here because there are a lot of false positives. --- source/blender/editors/interface/interface_region_tooltip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index 5c3f00201a2..12f3ba609f0 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -800,7 +800,7 @@ static uiTooltipData *ui_tooltip_data_from_button(bContext *C, uiBut *but) .style = UI_TIP_STYLE_HEADER, .color_id = UI_TIP_LC_NORMAL, }); - field->text = BLI_sprintfN("%s.", but_label.strinfo); + field->text = BLI_sprintfN("%s", but_label.strinfo); } /* Tip */ -- cgit v1.2.3 From b99faa0f567fdf139a8e357112f9b2c7a0458aa5 Mon Sep 17 00:00:00 2001 From: Howard Trickey Date: Wed, 11 Nov 2020 16:22:13 -0500 Subject: Fix T80475, bad bevel: side vertex in bad plane in some cases. Needed a better normal to for plane to offset into when there are non in-plane edges between two beveled edges. It was using the vertex normal, which is just wrong. Differential Revision: https://developer.blender.org/D9508 --- source/blender/bmesh/tools/bmesh_bevel.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index e8ded83dfbe..309b6547a39 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -1334,7 +1334,21 @@ static void offset_meet(BevelParams *bp, copy_v3_v3(norm_v, f->no); } else { - copy_v3_v3(norm_v, v->no); + /* Get average of face norms of faces between e and e2. */ + int fcount = 0; + zero_v3(norm_v); + for (EdgeHalf *eloop = e1; eloop != e2; eloop = eloop->next) { + if (eloop->fnext != NULL) { + add_v3_v3(norm_v, eloop->fnext->no); + fcount++; + } + } + if (fcount == 0) { + copy_v3_v3(norm_v, v->no); + } + else { + mul_v3_fl(norm_v, 1.0f / fcount); + } } add_v3_v3(dir1, dir2); cross_v3_v3v3(norm_perp1, dir1, norm_v); -- cgit v1.2.3 From 2ef2b3e0fd0080f7d22d91b1026ce0706b66ee52 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 11 Nov 2020 17:08:04 -0500 Subject: Cleanup: Remove SSE math optimization i386 macOS builds We haven't supported 32bit mac builds for a while so this should be safe to remove. Reviewed By: #platform_macos, brecht Differential Revision: https://developer.blender.org/D9489 --- source/blender/render/CMakeLists.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt index 2516c015924..d1f69ddfc02 100644 --- a/source/blender/render/CMakeLists.txt +++ b/source/blender/render/CMakeLists.txt @@ -98,13 +98,5 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() -if(APPLE) - # SSE math is enabled by default on x86_64 - if(CMAKE_OSX_ARCHITECTURES MATCHES "i386") - string(APPEND CMAKE_C_FLAGS_RELEASE " -mfpmath=sse") - string(APPEND CMAKE_CXX_FLAGS_RELEASE " -mfpmath=sse") - endif() -endif() - blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") -- cgit v1.2.3 From 9e1e9516a08d94059b113fb3ac0d37b5ec3eaca0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Nov 2020 11:23:21 +1100 Subject: Cleanup: warnings --- source/blender/draw/engines/gpencil/gpencil_cache_utils.c | 2 +- source/blender/editors/space_outliner/tree/tree_display_view_layer.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index cdcfd569fff..f2472699300 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -62,7 +62,7 @@ GPENCIL_tObject *gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob) tgp_ob->do_mat_holdout = false; for (int i = 0; i < ob->totcol; i++) { MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, i + 1); - if ((gp_style != NULL) && (gp_style->flag & GP_MATERIAL_IS_STROKE_HOLDOUT) || + if (((gp_style != NULL) && (gp_style->flag & GP_MATERIAL_IS_STROKE_HOLDOUT)) || ((gp_style->flag & GP_MATERIAL_IS_FILL_HOLDOUT))) { tgp_ob->do_mat_holdout = true; break; diff --git a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc index 123c47b8556..c88eb957dd1 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc @@ -47,13 +47,13 @@ class ObjectsChildrenBuilder { ObjectTreeElementsMap object_tree_elements_map_; public: - ObjectsChildrenBuilder(SpaceOutliner &); + ObjectsChildrenBuilder(SpaceOutliner &soutliner); ~ObjectsChildrenBuilder() = default; void operator()(TreeElement &collection_tree_elem); private: - void object_tree_elements_lookup_create_recursive(TreeElement *); + void object_tree_elements_lookup_create_recursive(TreeElement *te_parent); void make_object_parent_hierarchy_collections(); }; -- cgit v1.2.3 From e00bb5a4b730475fba8e2d14c9f2645af9b88f51 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Nov 2020 11:35:31 +1100 Subject: Cleanup: spelling --- source/blender/blenkernel/intern/lib_override.c | 8 ++++---- source/blender/blenloader/intern/writefile.c | 2 +- source/blender/draw/engines/overlay/overlay_image.c | 4 ++-- source/blender/editors/space_outliner/outliner_sync.c | 6 +++--- source/blender/imbuf/intern/rectop.c | 8 ++++---- source/blender/render/intern/texture_image.c | 14 ++++++++------ source/blender/sequencer/intern/render.c | 15 +++++++-------- 7 files changed, 29 insertions(+), 28 deletions(-) diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 15736011f6f..8825d71fc3c 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -528,7 +528,7 @@ static bool lib_override_library_create_do(Main *bmain, ID *id_root) } /* Now tag all non-object/collection IDs 'in-between' two tagged ones, as those are part of an - * override chain and therefore alos need to be overridden. + * override chain and therefore also need to be overridden. * One very common cases are e.g. drivers on geometry or materials of an overridden object, that * are using another overridden object as parameter. */ /* Note that this call will also free the main relations data we created above. */ @@ -1714,7 +1714,7 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) /* XXX We need a way to get off-Main copies of IDs (similar to localized mats/texts/ etc.)! * However, this is whole bunch of code work in itself, so for now plain stupid ID copy - * will do, as innefficient as it is. :/ + * will do, as inefficient as it is. :/ * Actually, maybe not! Since we are swapping with original ID's local content, we want to * keep user-count in correct state when freeing tmp_id * (and that user-counts of IDs used by 'new' local data also remain correct). */ @@ -1770,8 +1770,8 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) tmp_key->from = tmp_id; } - /* Again, horribly innefficient in our case, we need something off-Main (aka more generic nolib - * copy/free stuff)! */ + /* Again, horribly inefficient in our case, we need something off-Main + * (aka more generic nolib copy/free stuff)! */ BKE_id_free_ex(bmain, tmp_id, LIB_ID_FREE_NO_UI_USER, true); if (GS(local->name) == ID_AR) { diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index b640c9f5788..11fe240620a 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -935,7 +935,7 @@ static bool write_file_handle(Main *mainvar, write_thumb(wd, thumb); write_global(wd, write_flags, mainvar); - /* The windowmanager and screen often change, + /* The window-manager and screen often change, * avoid thumbnail detecting changes because of this. */ mywrite_flush(wd); diff --git a/source/blender/draw/engines/overlay/overlay_image.c b/source/blender/draw/engines/overlay/overlay_image.c index 9695f8616a5..844a0eb8351 100644 --- a/source/blender/draw/engines/overlay/overlay_image.c +++ b/source/blender/draw/engines/overlay/overlay_image.c @@ -346,9 +346,9 @@ void OVERLAY_image_camera_cache_populate(OVERLAY_Data *vedata, Object *ob) mul_m4_m4m4(mat, modelmat, mat); const bool is_foreground = (bgpic->flag & CAM_BGIMG_FLAG_FOREGROUND) != 0; - /* Alpha is clamped just below 1.0 to fix background images to intefere with foreground + /* Alpha is clamped just below 1.0 to fix background images to interfere with foreground * images. Without this a background image with 1.0 will be rendered on top of a transparent - * foreground image due to the differnet blending modes they use. */ + * foreground image due to the different blending modes they use. */ const float color_premult_alpha[4] = {1.0f, 1.0f, 1.0f, MIN2(bgpic->alpha, 0.999999)}; DRWPass *pass = is_foreground ? (use_view_transform ? psl->image_foreground_scene_ps : diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c index 4591a545783..0f5c74a9168 100644 --- a/source/blender/editors/space_outliner/outliner_sync.c +++ b/source/blender/editors/space_outliner/outliner_sync.c @@ -257,9 +257,9 @@ static void outliner_select_sync_to_edit_bone(ViewLayer *view_layer, add_selected_item(selected_ebones, ebone); } else if (!is_edit_bone_selected(selected_ebones, ebone)) { - /* Dont flush to parent bone tip, synced selection is iterating the whole tree so deselecting - * potential children with 'ED_armature_ebone_select_set(ebone, false)' would leave own tip - * deselected. */ + /* Don't flush to parent bone tip, synced selection is iterating the whole tree so + * deselecting potential children with `ED_armature_ebone_select_set(ebone, false)` + * would leave own tip deselected. */ ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } } diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index cdc8cd1068c..6ae93def50f 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -1275,9 +1275,9 @@ void buf_rectfill_area(unsigned char *rect, /** * Blend pixels of image area with solid color. * - * For images with `uchar` buffer use color matching image colorspace. - * For images with float buffer use color display colorspace. - * If display colorspace can not be referenced, use color in SRGB colorspace. + * For images with `uchar` buffer use color matching image color-space. + * For images with float buffer use color display color-space. + * If display color-space can not be referenced, use color in SRGB color-space. * * \param ibuf: an image to be filled with color. It must be 4 channel image. * \param col: RGBA color. @@ -1285,7 +1285,7 @@ void buf_rectfill_area(unsigned char *rect, * (x2, y2) is the end point. Note that values are allowed to be loosely ordered, which means that * x2 is allowed to be lower than x1, as well as y2 is allowed to be lower than y1. No matter the * order the area between x1 and x2, and y1 and y2 is filled. - * \param display: colorspace reference for display space. + * \param display: color-space reference for display space. */ void IMB_rectfill_area(ImBuf *ibuf, const float col[4], diff --git a/source/blender/render/intern/texture_image.c b/source/blender/render/intern/texture_image.c index cd34226920d..f0663b07a3c 100644 --- a/source/blender/render/intern/texture_image.c +++ b/source/blender/render/intern/texture_image.c @@ -742,8 +742,10 @@ typedef struct afdata_t { /* this only used here to make it easier to pass extend flags as single int */ enum { TXC_XMIR = 1, TXC_YMIR, TXC_REPT, TXC_EXTD }; -/* similar to ibuf_get_color() but clips/wraps coords according to repeat/extend flags - * returns true if out of range in clipmode */ +/** + * Similar to `ibuf_get_color()` but clips/wraps coords according to repeat/extend flags + * returns true if out of range in clip-mode. + */ static int ibuf_get_color_clip(float col[4], ImBuf *ibuf, int x, int y, int extflag) { int clip = 0; @@ -1114,7 +1116,7 @@ static int imagewraposa_aniso(Tex *tex, float t; SWAP(float, minx, miny); /* must rotate dxt/dyt 90 deg - * yet another blender problem is that swapping X/Y axes (or any tex proj switches) + * yet another blender problem is that swapping X/Y axes (or any tex projection switches) * should do something similar, but it doesn't, it only swaps coords, * so filter area will be incorrect in those cases. */ t = dxt[0]; @@ -1257,9 +1259,9 @@ static int imagewraposa_aniso(Tex *tex, int maxlev; ImBuf *mipmaps[IMB_MIPMAP_LEVELS + 1]; - /* modify ellipse minor axis if too eccentric, use for area sampling as well - * scaling dxt/dyt as done in pbrt is not the same - * (as in ewa_eval(), scale by sqrt(ibuf->x) to maximize precision) */ + /* Modify ellipse minor axis if too eccentric, use for area sampling as well + * scaling `dxt/dyt` as done in PBRT is not the same + * (as in `ewa_eval()`, scale by `sqrt(ibuf->x)` to maximize precision). */ const float ff = sqrtf(ibuf->x), q = ibuf->y / ff; const float Ux = dxt[0] * ff, Vx = dxt[1] * q, Uy = dyt[0] * ff, Vy = dyt[1] * q; const float A = Vx * Vx + Vy * Vy; diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index f6d80602f4c..ecfd230be18 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -80,7 +80,7 @@ static ThreadMutex seq_render_mutex = BLI_MUTEX_INITIALIZER; SequencerDrawView sequencer_view3d_fn = NULL; /* NULL in background mode */ /* -------------------------------------------------------------------- */ -/** \name Colorspace utility functions +/** \name Color-space utility functions * \{ */ void seq_imbuf_assign_spaces(Scene *scene, ImBuf *ibuf) { @@ -1778,9 +1778,8 @@ static ImBuf *do_render_strip_uncached(const SeqRenderData *context, state->scene_parents = &scene_parent; /* end check */ - /* Use the Scene Seq's scene for the context when rendering the scene's sequences - * (necessary for Multicam Selector among others). - */ + /* Use the Scene sequence-strip's scene for the context when rendering the + * scene's sequences (necessary for multi-cam selector among others). */ SeqRenderData local_context = *context; local_context.scene = seq->scene; local_context.skip_cache = true; @@ -2040,11 +2039,11 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, return out; } -/* - * returned ImBuf is refed! - * you have to free after usage! +/** + * \return The image buffer or NULL. + * + * \note The returned #ImBuf is has it's reference increased, free after usage! */ - ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, int chanshown) { Scene *scene = context->scene; -- cgit v1.2.3 From fa81a425392e334be5e4b9fd0b4c06cb8a2ad00b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Nov 2020 11:43:35 +1100 Subject: Cleanup: RNA ID enum utility function - Avoid calling `GS(id->name)` on each iteration. - Remove unused arguments. - Pass `const ID *` to the filter callback. --- source/blender/windowmanager/intern/wm_operators.c | 99 ++++++++++------------ 1 file changed, 46 insertions(+), 53 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 50b4f39d8e1..9eedd5b2faa 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3968,39 +3968,40 @@ void wm_window_keymap(wmKeyConfig *keyconf) * * \{ */ -static bool rna_id_enum_filter_single(ID *id, void *user_data) +static bool rna_id_enum_filter_single(const ID *id, void *user_data) { return (id != user_data); } /* Generic itemf's for operators that take library args */ -static const EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), - PointerRNA *UNUSED(ptr), - bool *r_free, +static const EnumPropertyItem *rna_id_itemf(bool *r_free, ID *id, bool local, - bool (*filter_ids)(ID *id, void *user_data), + bool (*filter_ids)(const ID *id, void *user_data), void *user_data) { EnumPropertyItem item_tmp = {0}, *item = NULL; int totitem = 0; int i = 0; - for (; id; id = id->next) { - if ((filter_ids != NULL) && filter_ids(id, user_data) == false) { - i++; - continue; - } - if (local == false || !ID_IS_LINKED(id)) { - item_tmp.identifier = item_tmp.name = id->name + 2; - item_tmp.value = i++; - - /* Show collection color tag icons in menus. */ - if (GS(id->name) == ID_GR) { - item_tmp.icon = UI_icon_color_from_collection((Collection *)id); + if (id != NULL) { + const short id_type = GS(id->name); + for (; id; id = id->next) { + if ((filter_ids != NULL) && filter_ids(id, user_data) == false) { + i++; + continue; } + if (local == false || !ID_IS_LINKED(id)) { + item_tmp.identifier = item_tmp.name = id->name + 2; + item_tmp.value = i++; - RNA_enum_item_add(&item, &totitem, &item_tmp); + /* Show collection color tag icons in menus. */ + if (id_type == ID_GR) { + item_tmp.icon = UI_icon_color_from_collection((Collection *)id); + } + + RNA_enum_item_add(&item, &totitem, &item_tmp); + } } } @@ -4012,119 +4013,111 @@ static const EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), /* can add more as needed */ const EnumPropertyItem *RNA_action_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->actions.first : NULL, false, NULL, NULL); + + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->actions.first : NULL, false, NULL, NULL); } #if 0 /* UNUSED */ const EnumPropertyItem *RNA_action_local_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, true); + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, true); } #endif const EnumPropertyItem *RNA_collection_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->collections.first : NULL, false, NULL, NULL); + r_free, C ? (ID *)CTX_data_main(C)->collections.first : NULL, false, NULL, NULL); } const EnumPropertyItem *RNA_collection_local_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->collections.first : NULL, true, NULL, NULL); + r_free, C ? (ID *)CTX_data_main(C)->collections.first : NULL, true, NULL, NULL); } const EnumPropertyItem *RNA_image_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->images.first : NULL, false, NULL, NULL); + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->images.first : NULL, false, NULL, NULL); } const EnumPropertyItem *RNA_image_local_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->images.first : NULL, true, NULL, NULL); + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->images.first : NULL, true, NULL, NULL); } const EnumPropertyItem *RNA_scene_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->scenes.first : NULL, false, NULL, NULL); + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->scenes.first : NULL, false, NULL, NULL); } const EnumPropertyItem *RNA_scene_local_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->scenes.first : NULL, true, NULL, NULL); + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->scenes.first : NULL, true, NULL, NULL); } const EnumPropertyItem *RNA_scene_without_active_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { Scene *scene_active = C ? CTX_data_scene(C) : NULL; - return rna_id_itemf(C, - ptr, - r_free, + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->scenes.first : NULL, false, rna_id_enum_filter_single, scene_active); } const EnumPropertyItem *RNA_movieclip_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->movieclips.first : NULL, false, NULL, NULL); + r_free, C ? (ID *)CTX_data_main(C)->movieclips.first : NULL, false, NULL, NULL); } const EnumPropertyItem *RNA_movieclip_local_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->movieclips.first : NULL, true, NULL, NULL); + r_free, C ? (ID *)CTX_data_main(C)->movieclips.first : NULL, true, NULL, NULL); } const EnumPropertyItem *RNA_mask_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->masks.first : NULL, false, NULL, NULL); + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->masks.first : NULL, false, NULL, NULL); } const EnumPropertyItem *RNA_mask_local_itemf(bContext *C, - PointerRNA *ptr, + PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf( - C, ptr, r_free, C ? (ID *)CTX_data_main(C)->masks.first : NULL, true, NULL, NULL); + return rna_id_itemf(r_free, C ? (ID *)CTX_data_main(C)->masks.first : NULL, true, NULL, NULL); } /** \} */ -- cgit v1.2.3 From f284a40385422465bb91fe0a313317f74844b338 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Nov 2020 12:19:12 +1100 Subject: ImBuf: pass the number of bytes read to 'is_a' callbacks Previously the header was a fixed size and assumed to be zeroed. Now read in bytes up to `HEADER_SIZE`, pass the number or bytes read to the callback which must not read past those bytes. --- source/blender/imbuf/intern/util.c | 58 +++++++++++++++----------------------- 1 file changed, 22 insertions(+), 36 deletions(-) diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 1741d3f20b7..5b9aa9ed88a 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -120,8 +120,8 @@ const char *imb_ext_audio[] = { /* Increased from 32 to 64 because of the bitmaps header size. */ #define HEADER_SIZE 64 -static bool imb_ispic_read_header_from_filepath(const char *filepath, - unsigned char buf[HEADER_SIZE]) +static ssize_t imb_ispic_read_header_from_filepath(const char *filepath, + unsigned char buf[HEADER_SIZE]) { BLI_stat_t st; int fp; @@ -133,43 +133,27 @@ static bool imb_ispic_read_header_from_filepath(const char *filepath, } if (BLI_stat(filepath, &st) == -1) { - return false; + return -1; } if (((st.st_mode) & S_IFMT) != S_IFREG) { - return false; + return -1; } if ((fp = BLI_open(filepath, O_BINARY | O_RDONLY, 0)) == -1) { - return false; + return -1; } - memset(buf, 0, HEADER_SIZE); - if (read(fp, buf, HEADER_SIZE) <= 0) { - close(fp); - return false; - } + const ssize_t size = read(fp, buf, HEADER_SIZE); close(fp); - return true; + return size; } -int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size) +int IMB_ispic_type_from_memory(const unsigned char *buf, const size_t buf_size) { - unsigned char buf_static[HEADER_SIZE]; - const unsigned char *buf; - - if (mem_size >= HEADER_SIZE) { - buf = buf_static; - } - else { - memset(buf_static, 0, HEADER_SIZE); - memcpy(buf_static, mem, mem_size); - buf = buf_static; - } - for (const ImFileType *type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { if (type->is_a != NULL) { - if (type->is_a(buf, HEADER_SIZE)) { + if (type->is_a(buf, buf_size)) { return type->filetype; } } @@ -181,17 +165,19 @@ int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size) int IMB_ispic_type(const char *filepath) { unsigned char buf[HEADER_SIZE]; - if (!imb_ispic_read_header_from_filepath(filepath, buf)) { + const ssize_t buf_size = imb_ispic_read_header_from_filepath(filepath, buf); + if (buf_size <= 0) { return 0; } - return IMB_ispic_type_from_memory(buf, HEADER_SIZE); + return IMB_ispic_type_from_memory(buf, (size_t)buf_size); } bool IMB_ispic_type_matches(const char *filepath, int filetype) { unsigned char buf[HEADER_SIZE]; - if (!imb_ispic_read_header_from_filepath(filepath, buf)) { - return 0; + const ssize_t buf_size = imb_ispic_read_header_from_filepath(filepath, buf); + if (buf_size <= 0) { + return false; } for (const ImFileType *type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { @@ -200,11 +186,11 @@ bool IMB_ispic_type_matches(const char *filepath, int filetype) * Keep the check for developers. */ BLI_assert(type->is_a != NULL); if (type->is_a != NULL) { - return type->is_a(buf, HEADER_SIZE); + return type->is_a(buf, (size_t)buf_size); } } } - return 0; + return false; } #undef HEADER_SIZE @@ -360,7 +346,6 @@ static int isffmpeg(const char *filepath) int imb_get_anim_type(const char *filepath) { - int type; BLI_stat_t st; BLI_assert(!BLI_path_is_rel(filepath)); @@ -390,7 +375,7 @@ int imb_get_anim_type(const char *filepath) if (ismovie(filepath)) { return ANIM_MOVIE; } -#else +#else /* !_WIN32 */ if (BLI_stat(filepath, &st) == -1) { return 0; } @@ -410,9 +395,10 @@ int imb_get_anim_type(const char *filepath) if (isavi(filepath)) { return ANIM_AVI; } -#endif - type = IMB_ispic(filepath); - if (type) { +#endif /* !_WIN32 */ + + /* Assume a single image is part of an image sequence. */ + if (IMB_ispic(filepath)) { return ANIM_SEQUENCE; } -- cgit v1.2.3 From 977b6ca3058f752ba42f354ec746237eb1ee7d3f Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Thu, 12 Nov 2020 04:56:39 +0100 Subject: Cleanup: Imperative tense in property description --- source/blender/makesrna/intern/rna_modifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index e2b09b1c055..2df42b87c07 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -197,7 +197,7 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = { "WELD", ICON_AUTOMERGE_OFF, "Weld", - "Find groups of vertices closer than dist and merges them together"}, + "Find groups of vertices closer than dist and merge them together"}, {eModifierType_Wireframe, "WIREFRAME", ICON_MOD_WIREFRAME, -- cgit v1.2.3 From 934c2c8ac58c10a2b729435c40c96443371bc21b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Nov 2020 15:17:07 +1100 Subject: Cleanup: clang-tidy, remove invalid comments --- source/blender/editors/space_outliner/outliner_intern.h | 4 +++- source/blender/imbuf/IMB_imbuf.h | 2 +- source/blender/imbuf/intern/dds/dds_api.cpp | 1 - source/blender/imbuf/intern/dds/dds_api.h | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 0459d669789..23a92903d66 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -538,7 +538,9 @@ bool outliner_tree_traverse(const SpaceOutliner *space_outliner, float outliner_restrict_columns_width(const struct SpaceOutliner *space_outliner); TreeElement *outliner_find_element_with_flag(const ListBase *lb, short flag); bool outliner_is_element_visible(const TreeElement *te); -void outliner_scroll_view(struct SpaceOutliner *space_outliner, struct ARegion *region, int delta_y); +void outliner_scroll_view(struct SpaceOutliner *space_outliner, + struct ARegion *region, + int delta_y); void outliner_tag_redraw_avoid_rebuild_on_open_change(const struct SpaceOutliner *space_outliner, struct ARegion *region); diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index d947f4229a0..957352595ed 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -475,7 +475,7 @@ bool IMB_prepare_write_ImBuf(const bool isfloat, struct ImBuf *ibuf); */ bool IMB_ispic(const char *filepath); bool IMB_ispic_type_matches(const char *filepath, int filetype); -int IMB_ispic_type_from_memory(const unsigned char *mem, const size_t mem_size); +int IMB_ispic_type_from_memory(const unsigned char *buf, const size_t buf_size); int IMB_ispic_type(const char *filepath); /** diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index 5687824f9fd..804d8130b4c 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -72,7 +72,6 @@ bool imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) return true; } -/* note: use at most first 32 bytes */ bool imb_is_a_dds(const unsigned char *mem, const size_t size) { if (size < 8) { diff --git a/source/blender/imbuf/intern/dds/dds_api.h b/source/blender/imbuf/intern/dds/dds_api.h index 9020529f210..931c4f267f9 100644 --- a/source/blender/imbuf/intern/dds/dds_api.h +++ b/source/blender/imbuf/intern/dds/dds_api.h @@ -26,7 +26,6 @@ extern "C" { #endif -/* use only first 32 bytes of mem */ bool imb_is_a_dds(const unsigned char *mem, const size_t size); bool imb_save_dds(struct ImBuf *ibuf, const char *name, int flags); struct ImBuf *imb_load_dds(const unsigned char *mem, -- cgit v1.2.3 From 89c8b074e78d1e98f7e3931ddbc7dbed7f6c4183 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Nov 2020 16:15:02 +1100 Subject: Cleanup: split view3d_placement depth & orientation calculation Split out functionality needed for preview plane drawing. --- .../editors/space_view3d/view3d_placement.c | 259 +++++++++++---------- 1 file changed, 140 insertions(+), 119 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c index 25634d9f221..5a0ca8e7d75 100644 --- a/source/blender/editors/space_view3d/view3d_placement.c +++ b/source/blender/editors/space_view3d/view3d_placement.c @@ -610,135 +610,62 @@ static void draw_primitive_view(const struct bContext *C, ARegion *UNUSED(region /** \} */ /* -------------------------------------------------------------------- */ -/** \name Add Object Modal Operator +/** \name Calculate The Initial Placement Plane + * + * Use by both the operator and placement cursor. * \{ */ -/** - * - * */ -static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEvent *event) +static void view3d_interactive_add_calc_plane(bContext *C, + Scene *scene, + View3D *v3d, + ARegion *region, + wmGizmo *snap_gizmo, + const float mval_fl[2], + const enum ePlace_Depth plane_depth, + const enum ePlace_Orient plane_orient, + const int plane_axis, + float r_co_src[3], + float r_matrix_orient[3][3]) { - - const int plane_axis = RNA_enum_get(op->ptr, "plane_axis"); - const enum ePlace_Depth plane_depth = RNA_enum_get(op->ptr, "plane_depth"); - const enum ePlace_Origin plane_origin = RNA_enum_get(op->ptr, "plane_origin"); - const enum ePlace_Orient plane_orient = RNA_enum_get(op->ptr, "plane_orientation"); - - const float mval_fl[2] = {UNPACK2(event->mval)}; - - struct InteractivePlaceData *ipd = op->customdata; - - RegionView3D *rv3d = ipd->region->regiondata; - - /* Assign snap gizmo which is may be used as part of the tool. */ - { - wmGizmoMap *gzmap = ipd->region->gizmo_map; - wmGizmoGroup *gzgroup = gzmap ? WM_gizmomap_group_find(gzmap, view3d_gzgt_placement_id) : NULL; - if ((gzgroup != NULL) && gzgroup->gizmos.first) { - ipd->snap_gizmo = gzgroup->gizmos.first; - } - } + const RegionView3D *rv3d = region->regiondata; + ED_transform_calc_orientation_from_type(C, r_matrix_orient); SnapObjectContext *snap_context = NULL; bool snap_context_free = false; + + /* Set the orientation. */ if ((plane_orient == PLACE_ORIENT_SURFACE) || (plane_depth == PLACE_DEPTH_SURFACE)) { - /* Need# snap_context */ - if (ipd->snap_gizmo) { - snap_context = ED_gizmotypes_snap_3d_context_ensure( - ipd->scene, ipd->region, ipd->v3d, ipd->snap_gizmo); - } - else { - snap_context = ED_transform_snap_object_context_create_view3d( - ipd->scene, 0, ipd->region, ipd->v3d); + snap_context = (snap_gizmo ? + ED_gizmotypes_snap_3d_context_ensure(scene, region, v3d, snap_gizmo) : + NULL); + if (snap_context == NULL) { + snap_context = ED_transform_snap_object_context_create_view3d(scene, 0, region, v3d); snap_context_free = true; } } - ipd->launch_event = WM_userdef_event_type_from_keymap_type(event->type); - - ED_transform_calc_orientation_from_type(C, ipd->matrix_orient); - - /* Set the orientation. */ - if (snap_context && (plane_orient == PLACE_ORIENT_SURFACE)) { + if (plane_orient == PLACE_ORIENT_SURFACE) { float matrix_orient_surface[3][3]; /* Use the snap normal as a fallback in case the cursor isn't over a surface * but snapping is enabled. */ float normal_fallback[3]; - bool use_normal_fallback = ipd->snap_gizmo ? - idp_snap_normal_from_gizmo(ipd->snap_gizmo, normal_fallback) : + bool use_normal_fallback = snap_gizmo ? + idp_snap_normal_from_gizmo(snap_gizmo, normal_fallback) : false; - if (idp_poject_surface_normal(snap_context, + if ((snap_context != NULL) && + idp_poject_surface_normal(snap_context, CTX_data_ensure_evaluated_depsgraph(C), mval_fl, - use_normal_fallback ? ipd->matrix_orient : NULL, + use_normal_fallback ? r_matrix_orient : NULL, use_normal_fallback ? normal_fallback : NULL, matrix_orient_surface)) { - copy_m3_m3(ipd->matrix_orient, matrix_orient_surface); + copy_m3_m3(r_matrix_orient, matrix_orient_surface); } } - ipd->orient_axis = plane_axis; - ipd->is_centered_init = (plane_origin == PLACE_ORIGIN_CENTER); - ipd->step[0].is_centered = ipd->is_centered_init; - ipd->step[1].is_centered = ipd->is_centered_init; - ipd->step_index = STEP_BASE; - - { - PropertyRNA *prop = RNA_struct_find_property(op->ptr, "primitive_type"); - if (RNA_property_is_set(op->ptr, prop)) { - ipd->primitive_type = RNA_property_enum_get(op->ptr, prop); - ipd->use_tool = false; - } - else { - ipd->use_tool = true; - - /* Get from the tool, a bit of a non-standard way of operating. */ - const bToolRef *tref = ipd->area->runtime.tool; - if (tref && STREQ(tref->idname, "builtin.primitive_cube_add")) { - ipd->primitive_type = PLACE_PRIMITIVE_TYPE_CUBE; - } - else if (tref && STREQ(tref->idname, "builtin.primitive_cylinder_add")) { - ipd->primitive_type = PLACE_PRIMITIVE_TYPE_CYLINDER; - } - else if (tref && STREQ(tref->idname, "builtin.primitive_cone_add")) { - ipd->primitive_type = PLACE_PRIMITIVE_TYPE_CONE; - } - else if (tref && STREQ(tref->idname, "builtin.primitive_uv_sphere_add")) { - ipd->primitive_type = PLACE_PRIMITIVE_TYPE_SPHERE_UV; - } - else if (tref && STREQ(tref->idname, "builtin.primitive_ico_sphere_add")) { - ipd->primitive_type = PLACE_PRIMITIVE_TYPE_SPHERE_ICO; - } - else { - /* If the user runs this as an operator they should set the 'primitive_type', - * however running from operator search will end up at this point. */ - ipd->primitive_type = PLACE_PRIMITIVE_TYPE_CUBE; - ipd->use_tool = false; - } - } - } - - UNUSED_VARS(C, event); - - ipd->draw_handle_view = ED_region_draw_cb_activate( - ipd->region->type, draw_primitive_view, ipd, REGION_DRAW_POST_VIEW); - - ED_region_tag_redraw(ipd->region); - - plane_from_point_normal_v3( - ipd->step[0].plane, ipd->scene->cursor.location, ipd->matrix_orient[ipd->orient_axis]); - - const bool is_snap_found = ipd->snap_gizmo ? - idp_snap_point_from_gizmo(ipd->snap_gizmo, ipd->co_src) : - false; - ipd->is_snap_invert = ipd->snap_gizmo ? ED_gizmotypes_snap_3d_invert_snap_get(ipd->snap_gizmo) : - false; - { - const ToolSettings *ts = ipd->scene->toolsettings; - ipd->use_snap = (ipd->is_snap_invert == !(ts->snap_flag & SCE_SNAP)); - } + const bool is_snap_found = snap_gizmo ? idp_snap_point_from_gizmo(snap_gizmo, r_co_src) : false; if (is_snap_found) { /* pass */ @@ -747,12 +674,12 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv bool use_depth_fallback = true; if (plane_depth == PLACE_DEPTH_CURSOR_VIEW) { /* View plane. */ - ED_view3d_win_to_3d( - ipd->v3d, ipd->region, ipd->scene->cursor.location, mval_fl, ipd->co_src); + ED_view3d_win_to_3d(v3d, region, scene->cursor.location, mval_fl, r_co_src); use_depth_fallback = false; } - else if (snap_context && (plane_depth == PLACE_DEPTH_SURFACE)) { - if (ED_transform_snap_object_project_view3d(snap_context, + else if (plane_depth == PLACE_DEPTH_SURFACE) { + if ((snap_context != NULL) && + ED_transform_snap_object_project_view3d(snap_context, CTX_data_ensure_evaluated_depsgraph(C), SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ @@ -762,7 +689,7 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv mval_fl, NULL, NULL, - ipd->co_src, + r_co_src, NULL)) { use_depth_fallback = false; } @@ -772,16 +699,15 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv if (use_depth_fallback || (plane_depth == PLACE_DEPTH_CURSOR_PLANE)) { /* Cursor plane. */ float plane[4]; - plane_from_point_normal_v3( - plane, ipd->scene->cursor.location, ipd->matrix_orient[ipd->orient_axis]); - if (ED_view3d_win_to_3d_on_plane(ipd->region, plane, mval_fl, false, ipd->co_src)) { + plane_from_point_normal_v3(plane, scene->cursor.location, r_matrix_orient[plane_axis]); + if (ED_view3d_win_to_3d_on_plane(region, plane, mval_fl, false, r_co_src)) { use_depth_fallback = false; } /* Even if the calculation works, it's possible the point found is behind the view. */ if (rv3d->is_persp) { float dir[3]; - sub_v3_v3v3(dir, rv3d->viewinv[3], ipd->co_src); - if (dot_v3v3(dir, rv3d->viewinv[2]) < ipd->v3d->clip_start) { + sub_v3_v3v3(dir, rv3d->viewinv[3], r_co_src); + if (dot_v3v3(dir, rv3d->viewinv[2]) < v3d->clip_start) { use_depth_fallback = true; } } @@ -791,17 +717,112 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv float co_depth[3]; /* Fallback to view center. */ negate_v3_v3(co_depth, rv3d->ofs); - ED_view3d_win_to_3d(ipd->v3d, ipd->region, co_depth, mval_fl, ipd->co_src); + ED_view3d_win_to_3d(v3d, region, co_depth, mval_fl, r_co_src); + } + } + + if (snap_context_free) { + ED_transform_snap_object_context_destroy(snap_context); + } +} + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Object Modal Operator + * \{ */ + +static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEvent *event) +{ + + const int plane_axis = RNA_enum_get(op->ptr, "plane_axis"); + const enum ePlace_Depth plane_depth = RNA_enum_get(op->ptr, "plane_depth"); + const enum ePlace_Origin plane_origin = RNA_enum_get(op->ptr, "plane_origin"); + const enum ePlace_Orient plane_orient = RNA_enum_get(op->ptr, "plane_orientation"); + + const float mval_fl[2] = {UNPACK2(event->mval)}; + + struct InteractivePlaceData *ipd = op->customdata; + + /* Assign snap gizmo which is may be used as part of the tool. */ + { + wmGizmoMap *gzmap = ipd->region->gizmo_map; + wmGizmoGroup *gzgroup = gzmap ? WM_gizmomap_group_find(gzmap, view3d_gzgt_placement_id) : NULL; + if ((gzgroup != NULL) && gzgroup->gizmos.first) { + ipd->snap_gizmo = gzgroup->gizmos.first; } } - plane_from_point_normal_v3( - ipd->step[0].plane, ipd->co_src, ipd->matrix_orient[ipd->orient_axis]); + ipd->launch_event = WM_userdef_event_type_from_keymap_type(event->type); + + view3d_interactive_add_calc_plane(C, + ipd->scene, + ipd->v3d, + ipd->region, + ipd->snap_gizmo, + mval_fl, + plane_depth, + plane_orient, + plane_axis, + ipd->co_src, + ipd->matrix_orient); + + ipd->orient_axis = plane_axis; + ipd->is_centered_init = (plane_origin == PLACE_ORIGIN_CENTER); + ipd->step[0].is_centered = ipd->is_centered_init; + ipd->step[1].is_centered = ipd->is_centered_init; + ipd->step_index = STEP_BASE; + + plane_from_point_normal_v3(ipd->step[0].plane, ipd->co_src, ipd->matrix_orient[plane_axis]); copy_v3_v3(ipd->step[0].co_dst, ipd->co_src); - if (snap_context_free) { - ED_transform_snap_object_context_destroy(snap_context); + ipd->is_snap_invert = ipd->snap_gizmo ? ED_gizmotypes_snap_3d_invert_snap_get(ipd->snap_gizmo) : + false; + { + const ToolSettings *ts = ipd->scene->toolsettings; + ipd->use_snap = (ipd->is_snap_invert == !(ts->snap_flag & SCE_SNAP)); + } + + ipd->draw_handle_view = ED_region_draw_cb_activate( + ipd->region->type, draw_primitive_view, ipd, REGION_DRAW_POST_VIEW); + + ED_region_tag_redraw(ipd->region); + + /* Setup the primitive type. */ + { + PropertyRNA *prop = RNA_struct_find_property(op->ptr, "primitive_type"); + if (RNA_property_is_set(op->ptr, prop)) { + ipd->primitive_type = RNA_property_enum_get(op->ptr, prop); + ipd->use_tool = false; + } + else { + ipd->use_tool = true; + + /* Get from the tool, a bit of a non-standard way of operating. */ + const bToolRef *tref = ipd->area->runtime.tool; + if (tref && STREQ(tref->idname, "builtin.primitive_cube_add")) { + ipd->primitive_type = PLACE_PRIMITIVE_TYPE_CUBE; + } + else if (tref && STREQ(tref->idname, "builtin.primitive_cylinder_add")) { + ipd->primitive_type = PLACE_PRIMITIVE_TYPE_CYLINDER; + } + else if (tref && STREQ(tref->idname, "builtin.primitive_cone_add")) { + ipd->primitive_type = PLACE_PRIMITIVE_TYPE_CONE; + } + else if (tref && STREQ(tref->idname, "builtin.primitive_uv_sphere_add")) { + ipd->primitive_type = PLACE_PRIMITIVE_TYPE_SPHERE_UV; + } + else if (tref && STREQ(tref->idname, "builtin.primitive_ico_sphere_add")) { + ipd->primitive_type = PLACE_PRIMITIVE_TYPE_SPHERE_ICO; + } + else { + /* If the user runs this as an operator they should set the 'primitive_type', + * however running from operator search will end up at this point. */ + ipd->primitive_type = PLACE_PRIMITIVE_TYPE_CUBE; + ipd->use_tool = false; + } + } } } -- cgit v1.2.3 From f93081a01b7bf484f51fb7d70ac8a8fd90a59d8c Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 12 Nov 2020 09:04:50 +0100 Subject: Fix T81673: Color picker picks up UI and Overlay There are two implementations of the Sample Color operation. One is used by the paint texture and one by the image editor. The image editor variant sampled from the ibuf directly, but the paint texture variant was sampling from the screen front buffer. This can lead into incorrect samples due to color pipeline. This patch will use the image editor variant when sampling a color for 2d texture painting Reviewed By: Pablo Dobarro Differential Revision: https://developer.blender.org/D9408 --- source/blender/editors/sculpt_paint/paint_utils.c | 54 +++++++++++++---------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index fa79bd8ee93..9855f8e9d40 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -66,6 +66,7 @@ #include "RE_render_ext.h" +#include "ED_image.h" #include "ED_screen.h" #include "ED_view3d.h" @@ -458,8 +459,6 @@ void paint_sample_color( Palette *palette = BKE_paint_palette(paint); PaletteColor *color = NULL; Brush *br = BKE_paint_brush(BKE_paint_get_active_from_context(C)); - uint col; - const uchar *cp; CLAMP(x, 0, region->winx); CLAMP(y, 0, region->winy); @@ -474,12 +473,14 @@ void paint_sample_color( palette->active_color = BLI_listbase_count(&palette->colors) - 1; } - if (CTX_wm_view3d(C) && texpaint_proj) { + SpaceImage *sima = CTX_wm_space_image(C); + const View3D *v3d = CTX_wm_view3d(C); + + if (v3d && texpaint_proj) { /* first try getting a color directly from the mesh faces if possible */ ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob = OBACT(view_layer); Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); - bool sample_success = false; ImagePaintSettings *imapaint = &scene->toolsettings->imapaint; bool use_material = (imapaint->mode == IMAGEPAINT_MODE_MATERIAL); @@ -539,8 +540,6 @@ void paint_sample_color( ImBuf *ibuf = BKE_image_acquire_ibuf(image, &iuser, NULL); if (ibuf && (ibuf->rect || ibuf->rect_float)) { - sample_success = true; - u = u * ibuf->x; v = v * ibuf->y; @@ -568,6 +567,8 @@ void paint_sample_color( BKE_brush_color_set(scene, br, rgba_f); } } + BKE_image_release_ibuf(image, ibuf, NULL); + return; } BKE_image_release_ibuf(image, ibuf, NULL); @@ -575,28 +576,35 @@ void paint_sample_color( } } } - - if (!sample_success) { - GPU_frontbuffer_read_pixels( - x + region->winrct.xmin, y + region->winrct.ymin, 1, 1, 4, GPU_DATA_UNSIGNED_BYTE, &col); - } - else { + } + else if (sima != NULL) { + /* Sample from the active image buffer. The sampled color is in + * Linear Scene Reference Space. */ + float rgba_f[3]; + if (ED_space_image_color_sample(sima, region, (int[2]){x, y}, rgba_f)) { + linearrgb_to_srgb_v3_v3(rgba_f, rgba_f); + if (use_palette) { + copy_v3_v3(color->rgb, rgba_f); + } + else { + BKE_brush_color_set(scene, br, rgba_f); + } return; } } - else { + + /* No sample found; sample directly from the GPU front buffer. */ + { + float rgba_f[4]; GPU_frontbuffer_read_pixels( - x + region->winrct.xmin, y + region->winrct.ymin, 1, 1, 4, GPU_DATA_UNSIGNED_BYTE, &col); - } - cp = (uchar *)&col; + x + region->winrct.xmin, y + region->winrct.ymin, 1, 1, 4, GPU_DATA_FLOAT, &rgba_f); - if (use_palette) { - rgb_uchar_to_float(color->rgb, cp); - } - else { - float rgba_f[3]; - rgb_uchar_to_float(rgba_f, cp); - BKE_brush_color_set(scene, br, rgba_f); + if (use_palette) { + copy_v3_v3(color->rgb, rgba_f); + } + else { + BKE_brush_color_set(scene, br, rgba_f); + } } } -- cgit v1.2.3 From c08827e659e5f48034b4f9d4612bd309ea63ff03 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 12 Nov 2020 09:10:26 +0100 Subject: Fix T82093: Sampled Colors Mismatch When Painting (Partial) When painting in the image editor on data images (Non-color, Raw) the color mismatched between the sampled color and the actual effect that the painting has on the image. The root cause is that the sampling is color managed, but the painting still uses a fixed color management pipeline with a lot of assumptions. Due to recent changes the drawing of the image editor is color managed, but the painting isn't what made these changes show up. This patch is a work-a-round so that the sampled colors and the effect the paint has on the texture matches. This isn't the correct solution as that would be to migrate all the painting tools to use proper color management. Reviewed By: Pablo Dobarro Differential Revision: https://developer.blender.org/D9411 --- source/blender/editors/include/ED_image.h | 3 ++- source/blender/editors/interface/interface_eyedropper_color.c | 2 +- source/blender/editors/sculpt_paint/paint_utils.c | 8 ++++++-- source/blender/editors/space_image/image_ops.c | 10 +++++++++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 01040949a0a..4835d2118d9 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -58,7 +58,8 @@ void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct bool ED_space_image_color_sample(struct SpaceImage *sima, struct ARegion *region, int mval[2], - float r_col[3]); + float r_col[3], + bool *r_is_data); struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile); int ED_space_image_get_display_channel_mask(struct ImBuf *ibuf); void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock); diff --git a/source/blender/editors/interface/interface_eyedropper_color.c b/source/blender/editors/interface/interface_eyedropper_color.c index c86e35f91db..5af290db037 100644 --- a/source/blender/editors/interface/interface_eyedropper_color.c +++ b/source/blender/editors/interface/interface_eyedropper_color.c @@ -163,7 +163,7 @@ void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3]) SpaceImage *sima = area->spacedata.first; int mval[2] = {mx - region->winrct.xmin, my - region->winrct.ymin}; - if (ED_space_image_color_sample(sima, region, mval, r_col)) { + if (ED_space_image_color_sample(sima, region, mval, r_col, NULL)) { return; } } diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 9855f8e9d40..7be84a5e191 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -581,8 +581,12 @@ void paint_sample_color( /* Sample from the active image buffer. The sampled color is in * Linear Scene Reference Space. */ float rgba_f[3]; - if (ED_space_image_color_sample(sima, region, (int[2]){x, y}, rgba_f)) { - linearrgb_to_srgb_v3_v3(rgba_f, rgba_f); + bool is_data; + if (ED_space_image_color_sample(sima, region, (int[2]){x, y}, rgba_f, &is_data)) { + if (!is_data) { + linearrgb_to_srgb_v3_v3(rgba_f, rgba_f); + } + if (use_palette) { copy_v3_v3(color->rgb, rgba_f); } diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index e36c7d6b6e7..d95f643d7f9 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -3057,8 +3057,12 @@ void IMAGE_OT_unpack(wmOperatorType *ot) * \{ */ /* Returns color in linear space, matching ED_space_node_color_sample(). */ -bool ED_space_image_color_sample(SpaceImage *sima, ARegion *region, int mval[2], float r_col[3]) +bool ED_space_image_color_sample( + SpaceImage *sima, ARegion *region, int mval[2], float r_col[3], bool *r_is_data) { + if (r_is_data) { + *r_is_data = false; + } if (sima->image == NULL) { return false; } @@ -3096,6 +3100,10 @@ bool ED_space_image_color_sample(SpaceImage *sima, ARegion *region, int mval[2], } } + if (r_is_data) { + *r_is_data = (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) != 0; + } + ED_space_image_release_buffer(sima, ibuf, lock); return ret; } -- cgit v1.2.3 From 88bb29dea668df8cc46aa7f55895f229748bdbb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Thu, 12 Nov 2020 08:55:18 +0100 Subject: Fix T82617: artifacts in Cycles viewport when changing subdivision attributes The old attributes were not cleared when synchronizing the geometries, this could also lead to crashes in other cases. Ref T82608. --- intern/cycles/blender/blender_curves.cpp | 1 + intern/cycles/blender/blender_mesh.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index 8344684ac64..964241e9904 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -855,6 +855,7 @@ void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BL::Object b_ob, Hair *ha hair->set_value(socket, new_hair, socket); } + hair->attributes.clear(); foreach (Attribute &attr, new_hair.attributes.attributes) { hair->attributes.attributes.push_back(std::move(attr)); } diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index 4bd4baec2e4..e85b4ee1fc6 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -1073,10 +1073,12 @@ void BlenderSync::sync_mesh(BL::Depsgraph b_depsgraph, BL::Object b_ob, Mesh *me mesh->set_value(socket, new_mesh, socket); } + mesh->attributes.clear(); foreach (Attribute &attr, new_mesh.attributes.attributes) { mesh->attributes.attributes.push_back(std::move(attr)); } + mesh->subd_attributes.clear(); foreach (Attribute &attr, new_mesh.subd_attributes.attributes) { mesh->subd_attributes.attributes.push_back(std::move(attr)); } -- cgit v1.2.3 From fb4113defb46cf7ae0409336a714eb1a79cd6817 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 12 Nov 2020 10:12:45 +0100 Subject: Codesign: Report codesign errors from server to worker Pass codesign errors (if any) from codesign buildbot server to the buildbot worker, so that the latter one can abort build process if the error happens. This solves issues when non-properly-notarized DMG package gets uploaded to the buildbot website. --- .../buildbot/codesign/archive_with_indicator.py | 116 ++++++++++++++++++--- build_files/buildbot/codesign/base_code_signer.py | 29 +++++- build_files/buildbot/codesign/exception.py | 26 +++++ build_files/buildbot/codesign/macos_code_signer.py | 95 +++++++++-------- .../buildbot/codesign/windows_code_signer.py | 40 +++++-- 5 files changed, 233 insertions(+), 73 deletions(-) create mode 100644 build_files/buildbot/codesign/exception.py diff --git a/build_files/buildbot/codesign/archive_with_indicator.py b/build_files/buildbot/codesign/archive_with_indicator.py index e5c4be885bc..aebf5a15417 100644 --- a/build_files/buildbot/codesign/archive_with_indicator.py +++ b/build_files/buildbot/codesign/archive_with_indicator.py @@ -18,12 +18,72 @@ # +import dataclasses +import json import os + from pathlib import Path +from typing import Optional import codesign.util as util +class ArchiveStateError(Exception): + message: str + + def __init__(self, message): + self.message = message + super().__init__(self.message) + + +@dataclasses.dataclass +class ArchiveState: + """ + Additional information (state) of the archive + + Includes information like expected file size of the archive file in the case + the archive file is expected to be successfully created. + + If the archive can not be created, this state will contain error message + indicating details of error. + """ + + # Size in bytes of the corresponding archive. + file_size: Optional[int] = None + + # Non-empty value indicates that error has happenned. + error_message: str = '' + + def has_error(self) -> bool: + """ + Check whether the archive is at error state + """ + + return self.error_message + + def serialize_to_string(self) -> str: + payload = dataclasses.asdict(self) + return json.dumps(payload, sort_keys=True, indent=4) + + def serialize_to_file(self, filepath: Path) -> None: + string = self.serialize_to_string() + filepath.write_text(string) + + @classmethod + def deserialize_from_string(cls, string: str) -> 'ArchiveState': + try: + object_as_dict = json.loads(string) + except json.decoder.JSONDecodeError: + raise ArchiveStateError('Error parsing JSON') + + return cls(**object_as_dict) + + @classmethod + def deserialize_from_file(cls, filepath: Path): + string = filepath.read_text() + return cls.deserialize_from_string(string) + + class ArchiveWithIndicator: """ The idea of this class is to wrap around logic which takes care of keeping @@ -79,6 +139,19 @@ class ArchiveWithIndicator: if not self.ready_indicator_filepath.exists(): return False + try: + archive_state = ArchiveState.deserialize_from_file( + self.ready_indicator_filepath) + except ArchiveStateError as error: + print(f'Error deserializing archive state: {error.message}') + return False + + if archive_state.has_error(): + # If the error did happen during codesign procedure there will be no + # corresponding archive file. + # The caller code will deal with the error check further. + return True + # Sometimes on macOS indicator file appears prior to the actual archive # despite the order of creation and os.sync() used in tag_ready(). # So consider archive not ready if there is an indicator without an @@ -88,23 +161,11 @@ class ArchiveWithIndicator: f'({self.archive_filepath}) to appear.') return False - # Read archive size from indicator/ - # - # Assume that file is either empty or is fully written. This is being checked - # by performing ValueError check since empty string will throw this exception - # when attempted to be converted to int. - expected_archive_size_str = self.ready_indicator_filepath.read_text() - try: - expected_archive_size = int(expected_archive_size_str) - except ValueError: - print(f'Invalid archive size "{expected_archive_size_str}"') - return False - # Wait for until archive is fully stored. actual_archive_size = self.archive_filepath.stat().st_size - if actual_archive_size != expected_archive_size: + if actual_archive_size != archive_state.file_size: print('Partial/invalid archive size (expected ' - f'{expected_archive_size} got {actual_archive_size})') + f'{archive_state.file_size} got {actual_archive_size})') return False return True @@ -129,7 +190,7 @@ class ArchiveWithIndicator: print(f'Exception checking archive: {e}') return False - def tag_ready(self) -> None: + def tag_ready(self, error_message='') -> None: """ Tag the archive as ready by creating the corresponding indication file. @@ -138,13 +199,34 @@ class ArchiveWithIndicator: If it is violated, an assert will fail. """ assert not self.is_ready() + # Try the best to make sure everything is synced to the file system, # to avoid any possibility of stamp appearing on a network share prior to # an actual file. if util.get_current_platform() != util.Platform.WINDOWS: os.sync() - archive_size = self.archive_filepath.stat().st_size - self.ready_indicator_filepath.write_text(str(archive_size)) + + archive_size = -1 + if self.archive_filepath.exists(): + archive_size = self.archive_filepath.stat().st_size + + archive_info = ArchiveState( + file_size=archive_size, error_message=error_message) + + self.ready_indicator_filepath.write_text( + archive_info.serialize_to_string()) + + def get_state(self) -> ArchiveState: + """ + Get state object for this archive + + The state is read from the corresponding state file. + """ + + try: + return ArchiveState.deserialize_from_file(self.ready_indicator_filepath) + except ArchiveStateError as error: + return ArchiveState(error_message=f'Error in information format: {error}') def clean(self) -> None: """ diff --git a/build_files/buildbot/codesign/base_code_signer.py b/build_files/buildbot/codesign/base_code_signer.py index dca771cdbaf..f045e9c8242 100644 --- a/build_files/buildbot/codesign/base_code_signer.py +++ b/build_files/buildbot/codesign/base_code_signer.py @@ -58,6 +58,7 @@ import codesign.util as util from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.archive_with_indicator import ArchiveWithIndicator +from codesign.exception import CodeSignException logger = logging.getLogger(__name__) @@ -145,13 +146,13 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): def cleanup_environment_for_builder(self) -> None: # TODO(sergey): Revisit need of cleaning up the existing files. # In practice it wasn't so helpful, and with multiple clients - # talking to the same server it becomes even mor etricky. + # talking to the same server it becomes even more tricky. pass def cleanup_environment_for_signing_server(self) -> None: # TODO(sergey): Revisit need of cleaning up the existing files. # In practice it wasn't so helpful, and with multiple clients - # talking to the same server it becomes even mor etricky. + # talking to the same server it becomes even more tricky. pass def generate_request_id(self) -> str: @@ -220,9 +221,15 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): """ Wait until archive with signed files is available. + Will only return if the archive with signed files is available. If there + was an error during code sign procedure the SystemExit exception is + raised, with the message set to the error reported by the codesign + server. + Will only wait for the configured time. If that time exceeds and there is still no responce from the signing server the application will exit with a non-zero exit code. + """ signed_archive_info = self.signed_archive_info_for_request_id( @@ -236,9 +243,17 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): time.sleep(1) time_slept_in_seconds = time.monotonic() - time_start if time_slept_in_seconds > timeout_in_seconds: + signed_archive_info.clean() unsigned_archive_info.clean() raise SystemExit("Signing server didn't finish signing in " - f"{timeout_in_seconds} seconds, dying :(") + f'{timeout_in_seconds} seconds, dying :(') + + archive_state = signed_archive_info.get_state() + if archive_state.has_error(): + signed_archive_info.clean() + unsigned_archive_info.clean() + raise SystemExit( + f'Error happenned during codesign procedure: {archive_state.error_message}') def copy_signed_files_to_directory( self, signed_dir: Path, destination_dir: Path) -> None: @@ -396,7 +411,13 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): temp_dir) logger_server.info('Signing all requested files...') - self.sign_all_files(files) + try: + self.sign_all_files(files) + except CodeSignException as error: + signed_archive_info.tag_ready(error_message=error.message) + unsigned_archive_info.clean() + logger_server.info('Signing is complete with errors.') + return logger_server.info('Packing signed files...') pack_files(files=files, diff --git a/build_files/buildbot/codesign/exception.py b/build_files/buildbot/codesign/exception.py new file mode 100644 index 00000000000..6c8a9f262a5 --- /dev/null +++ b/build_files/buildbot/codesign/exception.py @@ -0,0 +1,26 @@ +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# + +class CodeSignException(Exception): + message: str + + def __init__(self, message): + self.message = message + super().__init__(self.message) diff --git a/build_files/buildbot/codesign/macos_code_signer.py b/build_files/buildbot/codesign/macos_code_signer.py index 44677339afa..f03dad8e1d6 100644 --- a/build_files/buildbot/codesign/macos_code_signer.py +++ b/build_files/buildbot/codesign/macos_code_signer.py @@ -33,6 +33,7 @@ from buildbot_utils import Builder from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.base_code_signer import BaseCodeSigner +from codesign.exception import CodeSignException logger = logging.getLogger(__name__) logger_server = logger.getChild('server') @@ -45,6 +46,10 @@ EXTENSIONS_TO_BE_SIGNED = {'.dylib', '.so', '.dmg'} NAME_PREFIXES_TO_BE_SIGNED = {'python'} +class NotarizationException(CodeSignException): + pass + + def is_file_from_bundle(file: AbsoluteAndRelativeFileName) -> bool: """ Check whether file is coming from an .app bundle @@ -186,7 +191,7 @@ class MacOSCodeSigner(BaseCodeSigner): file.absolute_filepath] self.run_command_or_mock(command, util.Platform.MACOS) - def codesign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> bool: + def codesign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: """ Run codesign tool on all eligible files in the given list. @@ -225,8 +230,6 @@ class MacOSCodeSigner(BaseCodeSigner): file_index + 1, num_signed_files, signed_file.relative_filepath) - return True - def codesign_bundles( self, files: List[AbsoluteAndRelativeFileName]) -> None: """ @@ -273,8 +276,6 @@ class MacOSCodeSigner(BaseCodeSigner): files.extend(extra_files) - return True - ############################################################################ # Notarization. @@ -334,7 +335,40 @@ class MacOSCodeSigner(BaseCodeSigner): logger_server.error('xcrun command did not report RequestUUID') return None - def notarize_wait_result(self, request_uuid: str) -> bool: + def notarize_review_status(self, xcrun_output: str) -> bool: + """ + Review status returned by xcrun's notarization info + + Returns truth if the notarization process has finished. + If there are errors during notarization, a NotarizationException() + exception is thrown with status message from the notarial office. + """ + + # Parse status and message + status = xcrun_field_value_from_output('Status', xcrun_output) + status_message = xcrun_field_value_from_output( + 'Status Message', xcrun_output) + + if status == 'success': + logger_server.info( + 'Package successfully notarized: %s', status_message) + return True + + if status == 'invalid': + logger_server.error(xcrun_output) + logger_server.error( + 'Package notarization has failed: %s', status_message) + raise NotarizationException(status_message) + + if status == 'in progress': + return False + + logger_server.info( + 'Unknown notarization status %s (%s)', status, status_message) + + return False + + def notarize_wait_result(self, request_uuid: str) -> None: """ Wait for until notarial office have a reply """ @@ -351,29 +385,11 @@ class MacOSCodeSigner(BaseCodeSigner): timeout_in_seconds = self.config.MACOS_NOTARIZE_TIMEOUT_IN_SECONDS while True: - output = self.check_output_or_mock( + xcrun_output = self.check_output_or_mock( command, util.Platform.MACOS, allow_nonzero_exit_code=True) - # Parse status and message - status = xcrun_field_value_from_output('Status', output) - status_message = xcrun_field_value_from_output( - 'Status Message', output) - - # Review status. - if status: - if status == 'success': - logger_server.info( - 'Package successfully notarized: %s', status_message) - return True - elif status == 'invalid': - logger_server.error(output) - logger_server.error( - 'Package notarization has failed: %s', status_message) - return False - elif status == 'in progress': - pass - else: - logger_server.info( - 'Unknown notarization status %s (%s)', status, status_message) + + if self.notarize_review_status(xcrun_output): + break logger_server.info('Keep waiting for notarization office.') time.sleep(30) @@ -394,8 +410,6 @@ class MacOSCodeSigner(BaseCodeSigner): command = ['xcrun', 'stapler', 'staple', '-v', file.absolute_filepath] self.check_output_or_mock(command, util.Platform.MACOS) - return True - def notarize_dmg(self, file: AbsoluteAndRelativeFileName) -> bool: """ Run entire pipeline to get DMG notarized. @@ -414,10 +428,7 @@ class MacOSCodeSigner(BaseCodeSigner): return False # Staple. - if not self.notarize_staple(file): - return False - - return True + self.notarize_staple(file) def notarize_all_dmg( self, files: List[AbsoluteAndRelativeFileName]) -> bool: @@ -432,10 +443,7 @@ class MacOSCodeSigner(BaseCodeSigner): if not self.check_file_is_to_be_signed(file): continue - if not self.notarize_dmg(file): - return False - - return True + self.notarize_dmg(file) ############################################################################ # Entry point. @@ -443,11 +451,6 @@ class MacOSCodeSigner(BaseCodeSigner): def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: # TODO(sergey): Handle errors somehow. - if not self.codesign_all_files(files): - return - - if not self.codesign_bundles(files): - return - - if not self.notarize_all_dmg(files): - return + self.codesign_all_files(files) + self.codesign_bundles(files) + self.notarize_all_dmg(files) diff --git a/build_files/buildbot/codesign/windows_code_signer.py b/build_files/buildbot/codesign/windows_code_signer.py index 2557d3c0b68..251dd856c8a 100644 --- a/build_files/buildbot/codesign/windows_code_signer.py +++ b/build_files/buildbot/codesign/windows_code_signer.py @@ -29,6 +29,7 @@ from buildbot_utils import Builder from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.base_code_signer import BaseCodeSigner +from codesign.exception import CodeSignException logger = logging.getLogger(__name__) logger_server = logger.getChild('server') @@ -40,6 +41,9 @@ BLACKLIST_FILE_PREFIXES = ( 'api-ms-', 'concrt', 'msvcp', 'ucrtbase', 'vcomp', 'vcruntime') +class SigntoolException(CodeSignException): + pass + class WindowsCodeSigner(BaseCodeSigner): def check_file_is_to_be_signed( self, file: AbsoluteAndRelativeFileName) -> bool: @@ -50,12 +54,41 @@ class WindowsCodeSigner(BaseCodeSigner): return file.relative_filepath.suffix in EXTENSIONS_TO_BE_SIGNED + def get_sign_command_prefix(self) -> List[str]: return [ 'signtool', 'sign', '/v', '/f', self.config.WIN_CERTIFICATE_FILEPATH, '/tr', self.config.WIN_TIMESTAMP_AUTHORITY_URL] + + def run_codesign_tool(self, filepath: Path) -> None: + command = self.get_sign_command_prefix() + [filepath] + codesign_output = self.check_output_or_mock(command, util.Platform.WINDOWS) + logger_server.info(f'signtool output:\n{codesign_output}') + + got_number_of_success = False + + for line in codesign_output.split('\n'): + line_clean = line.strip() + line_clean_lower = line_clean.lower() + + if line_clean_lower.startswith('number of warnings') or \ + line_clean_lower.startswith('number of errors'): + number = int(line_clean_lower.split(':')[1]) + if number != 0: + raise SigntoolException('Non-clean success of signtool') + + if line_clean_lower.startswith('number of files successfully signed'): + got_number_of_success = True + number = int(line_clean_lower.split(':')[1]) + if number != 1: + raise SigntoolException('Signtool did not consider codesign a success') + + if not got_number_of_success: + raise SigntoolException('Signtool did not report number of files signed') + + def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: # NOTE: Sign files one by one to avoid possible command line length # overflow (which could happen if we ever decide to sign every binary @@ -73,12 +106,7 @@ class WindowsCodeSigner(BaseCodeSigner): file_index + 1, num_files, file.relative_filepath) continue - command = self.get_sign_command_prefix() - command.append(file.absolute_filepath) logger_server.info( 'Running signtool command for file [%d/%d] %s...', file_index + 1, num_files, file.relative_filepath) - # TODO(sergey): Check the status somehow. With a missing certificate - # the command still exists with a zero code. - self.run_command_or_mock(command, util.Platform.WINDOWS) - # TODO(sergey): Report number of signed and ignored files. + self.run_codesign_tool(file.absolute_filepath) -- cgit v1.2.3 From bc090387ace9cf041455fa01e68d61551c47e18f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 12 Nov 2020 10:41:33 +0100 Subject: Fix T82388: Sculpt mode: Unexpected undo behavior. Issue exposed by rB4c7b1766a7f1. Main idea is that non-memfile first undo step should check into previous memfile and tag the ID it is editing as `future_changed`. That way, when we go back and undo to the memfile, said IDs are properly detected as changed and re-read from the memfile. Otherwise, undo system sees them as unchanged, and just re-use the current data instead. Note that currently only Sculpt mode seems affected (probably because it is storing the mode switch itself as a Sculpt undo step instead of a memfile one), but similar action might be needed in some other cases too. Maniphest Tasks: T82388 Differential Revision: https://developer.blender.org/D9510 --- source/blender/editors/include/ED_undo.h | 1 + source/blender/editors/sculpt_paint/paint_hide.c | 4 +-- source/blender/editors/sculpt_paint/paint_mask.c | 4 +-- source/blender/editors/sculpt_paint/sculpt.c | 10 +++---- source/blender/editors/sculpt_paint/sculpt_cloth.c | 2 +- .../blender/editors/sculpt_paint/sculpt_detail.c | 2 +- .../blender/editors/sculpt_paint/sculpt_dyntopo.c | 4 +-- .../blender/editors/sculpt_paint/sculpt_face_set.c | 8 ++--- .../editors/sculpt_paint/sculpt_filter_color.c | 2 +- .../editors/sculpt_paint/sculpt_filter_mask.c | 4 +-- .../editors/sculpt_paint/sculpt_filter_mesh.c | 2 +- .../blender/editors/sculpt_paint/sculpt_intern.h | 2 +- .../editors/sculpt_paint/sculpt_mask_expand.c | 2 +- .../editors/sculpt_paint/sculpt_transform.c | 2 +- source/blender/editors/sculpt_paint/sculpt_undo.c | 13 ++++++-- source/blender/editors/undo/memfile_undo.c | 35 ++++++++++++++++++++++ 16 files changed, 70 insertions(+), 27 deletions(-) diff --git a/source/blender/editors/include/ED_undo.h b/source/blender/editors/include/ED_undo.h index 989854872f3..7b643e7c764 100644 --- a/source/blender/editors/include/ED_undo.h +++ b/source/blender/editors/include/ED_undo.h @@ -87,6 +87,7 @@ void ED_undosys_type_free(void); /* memfile_undo.c */ struct MemFile *ED_undosys_stack_memfile_get_active(struct UndoStack *ustack); +void ED_undosys_stack_memfile_id_changed_tag(struct UndoStack *ustack, struct ID *id); #ifdef __cplusplus } diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c index e5d682c27d9..da627c6b7db 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.c +++ b/source/blender/editors/sculpt_paint/paint_hide.c @@ -366,10 +366,10 @@ static int hide_show_exec(bContext *C, wmOperator *op) /* Start undo. */ switch (action) { case PARTIALVIS_HIDE: - SCULPT_undo_push_begin("Hide area"); + SCULPT_undo_push_begin(ob, "Hide area"); break; case PARTIALVIS_SHOW: - SCULPT_undo_push_begin("Show area"); + SCULPT_undo_push_begin(ob, "Show area"); break; } diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index ad7b29ae33a..4dd7ecb09ca 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -169,7 +169,7 @@ static int mask_flood_fill_exec(bContext *C, wmOperator *op) BKE_pbvh_search_gather(pbvh, NULL, NULL, &nodes, &totnode); - SCULPT_undo_push_begin("Mask flood fill"); + SCULPT_undo_push_begin(ob, "Mask flood fill"); MaskTaskData data = { .ob = ob, @@ -707,7 +707,7 @@ static bool sculpt_gesture_is_vertex_effected(SculptGestureContext *sgcontext, P static void sculpt_gesture_apply(bContext *C, SculptGestureContext *sgcontext) { SculptGestureOperation *operation = sgcontext->operation; - SCULPT_undo_push_begin("Sculpt Gesture Apply"); + SCULPT_undo_push_begin(CTX_data_active_object(C), "Sculpt Gesture Apply"); operation->sculpt_gesture_begin(C, sgcontext); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 087cee52585..c33dfecd52c 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -7698,7 +7698,7 @@ static bool sculpt_stroke_test_start(bContext *C, struct wmOperator *op, const f sculpt_update_cache_invariants(C, sd, ss, op, mouse); - SCULPT_undo_push_begin(sculpt_tool_name(sd)); + SCULPT_undo_push_begin(ob, sculpt_tool_name(sd)); return true; } @@ -8057,7 +8057,7 @@ static int sculpt_symmetrize_exec(bContext *C, wmOperator *op) * as deleted, then after symmetrize operation all BMesh elements * are logged as added (as opposed to attempting to store just the * parts that symmetrize modifies). */ - SCULPT_undo_push_begin("Dynamic topology symmetrize"); + SCULPT_undo_push_begin(ob, "Dynamic topology symmetrize"); SCULPT_undo_push_node(ob, NULL, SCULPT_UNDO_DYNTOPO_SYMMETRIZE); BM_log_before_all_removed(ss->bm, ss->bm_log); @@ -8297,7 +8297,7 @@ void ED_object_sculptmode_enter_ex(Main *bmain, bool has_undo = wm->undo_stack != NULL; /* Undo push is needed to prevent memory leak. */ if (has_undo) { - SCULPT_undo_push_begin("Dynamic topology enable"); + SCULPT_undo_push_begin(ob, "Dynamic topology enable"); } SCULPT_dynamic_topology_enable_ex(bmain, depsgraph, scene, ob); if (has_undo) { @@ -8413,7 +8413,7 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op) * while it works it causes lag when undoing the first undo step, see T71564. */ wmWindowManager *wm = CTX_wm_manager(C); if (wm->op_undo_depth <= 1) { - SCULPT_undo_push_begin(op->type->name); + SCULPT_undo_push_begin(ob, op->type->name); } } } @@ -9206,7 +9206,7 @@ static int sculpt_mask_by_color_invoke(bContext *C, wmOperator *op, const wmEven mouse[1] = event->mval[1]; SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false); - SCULPT_undo_push_begin("Mask by color"); + SCULPT_undo_push_begin(ob, "Mask by color"); const int active_vertex = SCULPT_active_vertex_get(ss); const float threshold = RNA_float_get(op->ptr, "threshold"); diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c index 20b164fa80c..f8165890cc4 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.c +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c @@ -1548,7 +1548,7 @@ static int sculpt_cloth_filter_invoke(bContext *C, wmOperator *op, const wmEvent /* Needs mask data to be available as it is used when solving the constraints. */ BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false); - SCULPT_undo_push_begin("Cloth filter"); + SCULPT_undo_push_begin(ob, "Cloth filter"); SCULPT_filter_cache_init(C, ob, sd, SCULPT_UNDO_COORDS); ss->filter_cache->automasking = SCULPT_automasking_cache_init(sd, NULL, ob); diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.c b/source/blender/editors/sculpt_paint/sculpt_detail.c index da51d3184b5..cdfcdbc4660 100644 --- a/source/blender/editors/sculpt_paint/sculpt_detail.c +++ b/source/blender/editors/sculpt_paint/sculpt_detail.c @@ -122,7 +122,7 @@ static int sculpt_detail_flood_fill_exec(bContext *C, wmOperator *UNUSED(op)) float object_space_constant_detail = 1.0f / (sd->constant_detail * mat4_to_scale(ob->obmat)); BKE_pbvh_bmesh_detail_size_set(ss->pbvh, object_space_constant_detail); - SCULPT_undo_push_begin("Dynamic topology flood fill"); + SCULPT_undo_push_begin(ob, "Dynamic topology flood fill"); SCULPT_undo_push_node(ob, NULL, SCULPT_UNDO_COORDS); while (BKE_pbvh_bmesh_update_topology( diff --git a/source/blender/editors/sculpt_paint/sculpt_dyntopo.c b/source/blender/editors/sculpt_paint/sculpt_dyntopo.c index 22bcbcc3bf1..87e0ea7f6a9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_dyntopo.c +++ b/source/blender/editors/sculpt_paint/sculpt_dyntopo.c @@ -291,7 +291,7 @@ void sculpt_dynamic_topology_disable_with_undo(Main *bmain, /* May be false in background mode. */ const bool use_undo = G.background ? (ED_undo_stack_get() != NULL) : true; if (use_undo) { - SCULPT_undo_push_begin("Dynamic topology disable"); + SCULPT_undo_push_begin(ob, "Dynamic topology disable"); SCULPT_undo_push_node(ob, NULL, SCULPT_UNDO_DYNTOPO_END); } SCULPT_dynamic_topology_disable_ex(bmain, depsgraph, scene, ob, NULL); @@ -311,7 +311,7 @@ static void sculpt_dynamic_topology_enable_with_undo(Main *bmain, /* May be false in background mode. */ const bool use_undo = G.background ? (ED_undo_stack_get() != NULL) : true; if (use_undo) { - SCULPT_undo_push_begin("Dynamic topology enable"); + SCULPT_undo_push_begin(ob, "Dynamic topology enable"); } SCULPT_dynamic_topology_enable_ex(bmain, depsgraph, scene, ob); if (use_undo) { diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c index 6eb51c77aef..f803bccde43 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.c +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c @@ -328,7 +328,7 @@ static int sculpt_face_set_create_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - SCULPT_undo_push_begin("face set change"); + SCULPT_undo_push_begin(ob, "face set change"); SCULPT_undo_push_node(ob, nodes[0], SCULPT_UNDO_FACE_SETS); const int next_face_set = SCULPT_face_set_next_available_get(ss); @@ -684,7 +684,7 @@ static int sculpt_face_set_init_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - SCULPT_undo_push_begin("face set change"); + SCULPT_undo_push_begin(ob, "face set change"); SCULPT_undo_push_node(ob, nodes[0], SCULPT_UNDO_FACE_SETS); const float threshold = RNA_float_get(op->ptr, "threshold"); @@ -829,7 +829,7 @@ static int sculpt_face_sets_change_visibility_exec(bContext *C, wmOperator *op) const int mode = RNA_enum_get(op->ptr, "mode"); const int active_face_set = SCULPT_active_face_set_get(ss); - SCULPT_undo_push_begin("Hide area"); + SCULPT_undo_push_begin(ob, "Hide area"); PBVH *pbvh = ob->sculpt->pbvh; PBVHNode **nodes; @@ -1276,7 +1276,7 @@ static void sculpt_face_set_edit_modify_face_sets(Object *ob, if (!nodes) { return; } - SCULPT_undo_push_begin("face set edit"); + SCULPT_undo_push_begin(ob, "face set edit"); SCULPT_undo_push_node(ob, nodes[0], SCULPT_UNDO_FACE_SETS); sculpt_face_set_apply_edit(ob, abs(active_face_set), mode, modify_hidden); SCULPT_undo_push_end(); diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c index 07986bbb032..f3c07a86201 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c @@ -290,7 +290,7 @@ static int sculpt_color_filter_invoke(bContext *C, wmOperator *op, const wmEvent return OPERATOR_CANCELLED; } - SCULPT_undo_push_begin("color filter"); + SCULPT_undo_push_begin(ob, "color filter"); BKE_sculpt_color_layer_create_if_needed(ob); diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c index 8fa20aaae50..ddad6bef7fd 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c @@ -212,7 +212,7 @@ static int sculpt_mask_filter_exec(bContext *C, wmOperator *op) int num_verts = SCULPT_vertex_count_get(ss); BKE_pbvh_search_gather(pbvh, NULL, NULL, &nodes, &totnode); - SCULPT_undo_push_begin("Mask filter"); + SCULPT_undo_push_begin(ob, "Mask filter"); for (int i = 0; i < totnode; i++) { SCULPT_undo_push_node(ob, nodes[i], SCULPT_UNDO_MASK); @@ -440,7 +440,7 @@ static int sculpt_dirty_mask_exec(bContext *C, wmOperator *op) } BKE_pbvh_search_gather(pbvh, NULL, NULL, &nodes, &totnode); - SCULPT_undo_push_begin("Dirty Mask"); + SCULPT_undo_push_begin(ob, "Dirty Mask"); for (int i = 0; i < totnode; i++) { SCULPT_undo_push_node(ob, nodes[i], SCULPT_UNDO_MASK); diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index 349e492a496..11af63c6e47 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -703,7 +703,7 @@ static int sculpt_mesh_filter_invoke(bContext *C, wmOperator *op, const wmEvent SCULPT_boundary_info_ensure(ob); } - SCULPT_undo_push_begin("Mesh Filter"); + SCULPT_undo_push_begin(ob, "Mesh Filter"); SCULPT_filter_cache_init(C, ob, sd, SCULPT_UNDO_COORDS); diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 1a596909d8d..c5db078617f 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -1085,7 +1085,7 @@ void SCULPT_cache_free(StrokeCache *cache); SculptUndoNode *SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type); SculptUndoNode *SCULPT_undo_get_node(PBVHNode *node); SculptUndoNode *SCULPT_undo_get_first_node(void); -void SCULPT_undo_push_begin(const char *name); +void SCULPT_undo_push_begin(struct Object *ob, const char *name); void SCULPT_undo_push_end(void); void SCULPT_undo_push_end_ex(const bool use_nested_undo); diff --git a/source/blender/editors/sculpt_paint/sculpt_mask_expand.c b/source/blender/editors/sculpt_paint/sculpt_mask_expand.c index 5a921383ac3..39432dbbca4 100644 --- a/source/blender/editors/sculpt_paint/sculpt_mask_expand.c +++ b/source/blender/editors/sculpt_paint/sculpt_mask_expand.c @@ -378,7 +378,7 @@ static int sculpt_mask_expand_invoke(bContext *C, wmOperator *op, const wmEvent BKE_pbvh_search_gather(pbvh, NULL, NULL, &ss->filter_cache->nodes, &ss->filter_cache->totnode); - SCULPT_undo_push_begin("Mask Expand"); + SCULPT_undo_push_begin(ob, "Mask Expand"); if (create_face_set) { SCULPT_undo_push_node(ob, ss->filter_cache->nodes[0], SCULPT_UNDO_FACE_SETS); diff --git a/source/blender/editors/sculpt_paint/sculpt_transform.c b/source/blender/editors/sculpt_paint/sculpt_transform.c index 479f70b5ff1..c1281c98deb 100644 --- a/source/blender/editors/sculpt_paint/sculpt_transform.c +++ b/source/blender/editors/sculpt_paint/sculpt_transform.c @@ -70,7 +70,7 @@ void ED_sculpt_init_transform(struct bContext *C) copy_v3_v3(ss->init_pivot_pos, ss->pivot_pos); copy_v4_v4(ss->init_pivot_rot, ss->pivot_rot); - SCULPT_undo_push_begin("Transform"); + SCULPT_undo_push_begin(ob, "Transform"); BKE_sculpt_update_object_for_edit(depsgraph, ob, false, false, false); ss->pivot_rot[3] = 1.0f; diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index f4f30c903aa..af2aad14008 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -1334,10 +1334,17 @@ SculptUndoNode *SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType return unode; } -void SCULPT_undo_push_begin(const char *name) +void SCULPT_undo_push_begin(Object *ob, const char *name) { UndoStack *ustack = ED_undo_stack_get(); + if (ob != NULL) { + /* If possible, we need to tag the object and its geometry data as 'changed in the future' in + * the previous undo step if it's a memfile one. */ + ED_undosys_stack_memfile_id_changed_tag(ustack, &ob->id); + ED_undosys_stack_memfile_id_changed_tag(ustack, ob->data); + } + /* Special case, we never read from this. */ bContext *C = NULL; @@ -1525,7 +1532,7 @@ static void sculpt_undosys_step_free(UndoStep *us_p) void ED_sculpt_undo_geometry_begin(struct Object *ob, const char *name) { - SCULPT_undo_push_begin(name); + SCULPT_undo_push_begin(ob, name); SCULPT_undo_push_node(ob, NULL, SCULPT_UNDO_GEOMETRY); } @@ -1638,7 +1645,7 @@ void ED_sculpt_undo_push_multires_mesh_begin(bContext *C, const char *str) Object *object = CTX_data_active_object(C); - SCULPT_undo_push_begin(str); + SCULPT_undo_push_begin(object, str); SculptUndoNode *geometry_unode = SCULPT_undo_push_node(object, NULL, SCULPT_UNDO_GEOMETRY); geometry_unode->geometry_clear_pbvh = false; diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c index 2df26abe8b3..ace82f82a78 100644 --- a/source/blender/editors/undo/memfile_undo.c +++ b/source/blender/editors/undo/memfile_undo.c @@ -24,7 +24,9 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" +#include "BLI_listbase.h" +#include "DNA_ID.h" #include "DNA_node_types.h" #include "DNA_object_enums.h" #include "DNA_object_types.h" @@ -52,6 +54,8 @@ #include "undo_intern.h" +#include + /* -------------------------------------------------------------------- */ /** \name Implements ED Undo System * \{ */ @@ -307,4 +311,35 @@ struct MemFile *ED_undosys_stack_memfile_get_active(UndoStack *ustack) return NULL; } +/** + * If the last undo step is a memfile one, find the first memchunk matching given ID (using its + * seesion uuid), and tag it as 'changed in the future'. + * + * Since non-memfile undos cannot automatically set this flag in the previous step as done with + * memfile ones, this has to be called manually by relevant undo code. + * + * \note Only current known case for this is undoing a switch from Pbject to Sculpt mode (see + * T82388). + * + * \note Calling this ID by ID is not optimal, as it will loop over all memchunks until it find + * expected one. If this becomes an issue we'll have to add a mapping from session uuid to first + * memchunk in #MemFile itself (currently we only do that in #MemFileWriteData when writing a new + * step). + */ +void ED_undosys_stack_memfile_id_changed_tag(UndoStack *ustack, ID *id) +{ + UndoStep *us = ustack->step_active; + if (id == NULL || us == NULL || us->type != BKE_UNDOSYS_TYPE_MEMFILE) { + return; + } + + MemFile *memfile = &((MemFileUndoStep *)us)->data->memfile; + LISTBASE_FOREACH (MemFileChunk *, mem_chunk, &memfile->chunks) { + if (mem_chunk->id_session_uuid == id->session_uuid) { + mem_chunk->is_identical_future = false; + break; + } + } +} + /** \} */ -- cgit v1.2.3 From eaf9ae643bfacfac9055db87c1daadc79e1e92e5 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 11 Nov 2020 18:07:53 +0100 Subject: Fix T82624: Skin modifiers root bone cannot be moved When creating an armature from the skin modifier, resulting bones would always be flagged BONE_CONNECTED. Those bones cannot be transformed (just rotated). Now only flag bones that really have a parent BONE_CONNECTED. Maniphest Tasks: T82624 Differential Revision: https://developer.blender.org/D9534 --- source/blender/editors/object/object_modifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 4eed9187d66..7f87577b630 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -2308,7 +2308,9 @@ static void skin_armature_bone_create(Object *skin_ob, EditBone *bone = ED_armature_ebone_add(arm, "Bone"); bone->parent = parent_bone; - bone->flag |= BONE_CONNECTED; + if (parent_bone != NULL) { + bone->flag |= BONE_CONNECTED; + } copy_v3_v3(bone->head, mvert[parent_v].co); copy_v3_v3(bone->tail, mvert[v].co); -- cgit v1.2.3 From beb1460f8e100462b1b42b793adfb6886c15ed19 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 12 Nov 2020 10:12:45 +0100 Subject: Codesign: Report codesign errors from server to worker Pass codesign errors (if any) from codesign buildbot server to the buildbot worker, so that the latter one can abort build process if the error happens. This solves issues when non-properly-notarized DMG package gets uploaded to the buildbot website. --- .../buildbot/codesign/archive_with_indicator.py | 116 ++++++++++++++++++--- build_files/buildbot/codesign/base_code_signer.py | 29 +++++- build_files/buildbot/codesign/exception.py | 26 +++++ build_files/buildbot/codesign/macos_code_signer.py | 95 +++++++++-------- .../buildbot/codesign/windows_code_signer.py | 40 +++++-- 5 files changed, 233 insertions(+), 73 deletions(-) create mode 100644 build_files/buildbot/codesign/exception.py diff --git a/build_files/buildbot/codesign/archive_with_indicator.py b/build_files/buildbot/codesign/archive_with_indicator.py index e5c4be885bc..aebf5a15417 100644 --- a/build_files/buildbot/codesign/archive_with_indicator.py +++ b/build_files/buildbot/codesign/archive_with_indicator.py @@ -18,12 +18,72 @@ # +import dataclasses +import json import os + from pathlib import Path +from typing import Optional import codesign.util as util +class ArchiveStateError(Exception): + message: str + + def __init__(self, message): + self.message = message + super().__init__(self.message) + + +@dataclasses.dataclass +class ArchiveState: + """ + Additional information (state) of the archive + + Includes information like expected file size of the archive file in the case + the archive file is expected to be successfully created. + + If the archive can not be created, this state will contain error message + indicating details of error. + """ + + # Size in bytes of the corresponding archive. + file_size: Optional[int] = None + + # Non-empty value indicates that error has happenned. + error_message: str = '' + + def has_error(self) -> bool: + """ + Check whether the archive is at error state + """ + + return self.error_message + + def serialize_to_string(self) -> str: + payload = dataclasses.asdict(self) + return json.dumps(payload, sort_keys=True, indent=4) + + def serialize_to_file(self, filepath: Path) -> None: + string = self.serialize_to_string() + filepath.write_text(string) + + @classmethod + def deserialize_from_string(cls, string: str) -> 'ArchiveState': + try: + object_as_dict = json.loads(string) + except json.decoder.JSONDecodeError: + raise ArchiveStateError('Error parsing JSON') + + return cls(**object_as_dict) + + @classmethod + def deserialize_from_file(cls, filepath: Path): + string = filepath.read_text() + return cls.deserialize_from_string(string) + + class ArchiveWithIndicator: """ The idea of this class is to wrap around logic which takes care of keeping @@ -79,6 +139,19 @@ class ArchiveWithIndicator: if not self.ready_indicator_filepath.exists(): return False + try: + archive_state = ArchiveState.deserialize_from_file( + self.ready_indicator_filepath) + except ArchiveStateError as error: + print(f'Error deserializing archive state: {error.message}') + return False + + if archive_state.has_error(): + # If the error did happen during codesign procedure there will be no + # corresponding archive file. + # The caller code will deal with the error check further. + return True + # Sometimes on macOS indicator file appears prior to the actual archive # despite the order of creation and os.sync() used in tag_ready(). # So consider archive not ready if there is an indicator without an @@ -88,23 +161,11 @@ class ArchiveWithIndicator: f'({self.archive_filepath}) to appear.') return False - # Read archive size from indicator/ - # - # Assume that file is either empty or is fully written. This is being checked - # by performing ValueError check since empty string will throw this exception - # when attempted to be converted to int. - expected_archive_size_str = self.ready_indicator_filepath.read_text() - try: - expected_archive_size = int(expected_archive_size_str) - except ValueError: - print(f'Invalid archive size "{expected_archive_size_str}"') - return False - # Wait for until archive is fully stored. actual_archive_size = self.archive_filepath.stat().st_size - if actual_archive_size != expected_archive_size: + if actual_archive_size != archive_state.file_size: print('Partial/invalid archive size (expected ' - f'{expected_archive_size} got {actual_archive_size})') + f'{archive_state.file_size} got {actual_archive_size})') return False return True @@ -129,7 +190,7 @@ class ArchiveWithIndicator: print(f'Exception checking archive: {e}') return False - def tag_ready(self) -> None: + def tag_ready(self, error_message='') -> None: """ Tag the archive as ready by creating the corresponding indication file. @@ -138,13 +199,34 @@ class ArchiveWithIndicator: If it is violated, an assert will fail. """ assert not self.is_ready() + # Try the best to make sure everything is synced to the file system, # to avoid any possibility of stamp appearing on a network share prior to # an actual file. if util.get_current_platform() != util.Platform.WINDOWS: os.sync() - archive_size = self.archive_filepath.stat().st_size - self.ready_indicator_filepath.write_text(str(archive_size)) + + archive_size = -1 + if self.archive_filepath.exists(): + archive_size = self.archive_filepath.stat().st_size + + archive_info = ArchiveState( + file_size=archive_size, error_message=error_message) + + self.ready_indicator_filepath.write_text( + archive_info.serialize_to_string()) + + def get_state(self) -> ArchiveState: + """ + Get state object for this archive + + The state is read from the corresponding state file. + """ + + try: + return ArchiveState.deserialize_from_file(self.ready_indicator_filepath) + except ArchiveStateError as error: + return ArchiveState(error_message=f'Error in information format: {error}') def clean(self) -> None: """ diff --git a/build_files/buildbot/codesign/base_code_signer.py b/build_files/buildbot/codesign/base_code_signer.py index dca771cdbaf..f045e9c8242 100644 --- a/build_files/buildbot/codesign/base_code_signer.py +++ b/build_files/buildbot/codesign/base_code_signer.py @@ -58,6 +58,7 @@ import codesign.util as util from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.archive_with_indicator import ArchiveWithIndicator +from codesign.exception import CodeSignException logger = logging.getLogger(__name__) @@ -145,13 +146,13 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): def cleanup_environment_for_builder(self) -> None: # TODO(sergey): Revisit need of cleaning up the existing files. # In practice it wasn't so helpful, and with multiple clients - # talking to the same server it becomes even mor etricky. + # talking to the same server it becomes even more tricky. pass def cleanup_environment_for_signing_server(self) -> None: # TODO(sergey): Revisit need of cleaning up the existing files. # In practice it wasn't so helpful, and with multiple clients - # talking to the same server it becomes even mor etricky. + # talking to the same server it becomes even more tricky. pass def generate_request_id(self) -> str: @@ -220,9 +221,15 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): """ Wait until archive with signed files is available. + Will only return if the archive with signed files is available. If there + was an error during code sign procedure the SystemExit exception is + raised, with the message set to the error reported by the codesign + server. + Will only wait for the configured time. If that time exceeds and there is still no responce from the signing server the application will exit with a non-zero exit code. + """ signed_archive_info = self.signed_archive_info_for_request_id( @@ -236,9 +243,17 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): time.sleep(1) time_slept_in_seconds = time.monotonic() - time_start if time_slept_in_seconds > timeout_in_seconds: + signed_archive_info.clean() unsigned_archive_info.clean() raise SystemExit("Signing server didn't finish signing in " - f"{timeout_in_seconds} seconds, dying :(") + f'{timeout_in_seconds} seconds, dying :(') + + archive_state = signed_archive_info.get_state() + if archive_state.has_error(): + signed_archive_info.clean() + unsigned_archive_info.clean() + raise SystemExit( + f'Error happenned during codesign procedure: {archive_state.error_message}') def copy_signed_files_to_directory( self, signed_dir: Path, destination_dir: Path) -> None: @@ -396,7 +411,13 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): temp_dir) logger_server.info('Signing all requested files...') - self.sign_all_files(files) + try: + self.sign_all_files(files) + except CodeSignException as error: + signed_archive_info.tag_ready(error_message=error.message) + unsigned_archive_info.clean() + logger_server.info('Signing is complete with errors.') + return logger_server.info('Packing signed files...') pack_files(files=files, diff --git a/build_files/buildbot/codesign/exception.py b/build_files/buildbot/codesign/exception.py new file mode 100644 index 00000000000..6c8a9f262a5 --- /dev/null +++ b/build_files/buildbot/codesign/exception.py @@ -0,0 +1,26 @@ +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# + +class CodeSignException(Exception): + message: str + + def __init__(self, message): + self.message = message + super().__init__(self.message) diff --git a/build_files/buildbot/codesign/macos_code_signer.py b/build_files/buildbot/codesign/macos_code_signer.py index 44677339afa..f03dad8e1d6 100644 --- a/build_files/buildbot/codesign/macos_code_signer.py +++ b/build_files/buildbot/codesign/macos_code_signer.py @@ -33,6 +33,7 @@ from buildbot_utils import Builder from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.base_code_signer import BaseCodeSigner +from codesign.exception import CodeSignException logger = logging.getLogger(__name__) logger_server = logger.getChild('server') @@ -45,6 +46,10 @@ EXTENSIONS_TO_BE_SIGNED = {'.dylib', '.so', '.dmg'} NAME_PREFIXES_TO_BE_SIGNED = {'python'} +class NotarizationException(CodeSignException): + pass + + def is_file_from_bundle(file: AbsoluteAndRelativeFileName) -> bool: """ Check whether file is coming from an .app bundle @@ -186,7 +191,7 @@ class MacOSCodeSigner(BaseCodeSigner): file.absolute_filepath] self.run_command_or_mock(command, util.Platform.MACOS) - def codesign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> bool: + def codesign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: """ Run codesign tool on all eligible files in the given list. @@ -225,8 +230,6 @@ class MacOSCodeSigner(BaseCodeSigner): file_index + 1, num_signed_files, signed_file.relative_filepath) - return True - def codesign_bundles( self, files: List[AbsoluteAndRelativeFileName]) -> None: """ @@ -273,8 +276,6 @@ class MacOSCodeSigner(BaseCodeSigner): files.extend(extra_files) - return True - ############################################################################ # Notarization. @@ -334,7 +335,40 @@ class MacOSCodeSigner(BaseCodeSigner): logger_server.error('xcrun command did not report RequestUUID') return None - def notarize_wait_result(self, request_uuid: str) -> bool: + def notarize_review_status(self, xcrun_output: str) -> bool: + """ + Review status returned by xcrun's notarization info + + Returns truth if the notarization process has finished. + If there are errors during notarization, a NotarizationException() + exception is thrown with status message from the notarial office. + """ + + # Parse status and message + status = xcrun_field_value_from_output('Status', xcrun_output) + status_message = xcrun_field_value_from_output( + 'Status Message', xcrun_output) + + if status == 'success': + logger_server.info( + 'Package successfully notarized: %s', status_message) + return True + + if status == 'invalid': + logger_server.error(xcrun_output) + logger_server.error( + 'Package notarization has failed: %s', status_message) + raise NotarizationException(status_message) + + if status == 'in progress': + return False + + logger_server.info( + 'Unknown notarization status %s (%s)', status, status_message) + + return False + + def notarize_wait_result(self, request_uuid: str) -> None: """ Wait for until notarial office have a reply """ @@ -351,29 +385,11 @@ class MacOSCodeSigner(BaseCodeSigner): timeout_in_seconds = self.config.MACOS_NOTARIZE_TIMEOUT_IN_SECONDS while True: - output = self.check_output_or_mock( + xcrun_output = self.check_output_or_mock( command, util.Platform.MACOS, allow_nonzero_exit_code=True) - # Parse status and message - status = xcrun_field_value_from_output('Status', output) - status_message = xcrun_field_value_from_output( - 'Status Message', output) - - # Review status. - if status: - if status == 'success': - logger_server.info( - 'Package successfully notarized: %s', status_message) - return True - elif status == 'invalid': - logger_server.error(output) - logger_server.error( - 'Package notarization has failed: %s', status_message) - return False - elif status == 'in progress': - pass - else: - logger_server.info( - 'Unknown notarization status %s (%s)', status, status_message) + + if self.notarize_review_status(xcrun_output): + break logger_server.info('Keep waiting for notarization office.') time.sleep(30) @@ -394,8 +410,6 @@ class MacOSCodeSigner(BaseCodeSigner): command = ['xcrun', 'stapler', 'staple', '-v', file.absolute_filepath] self.check_output_or_mock(command, util.Platform.MACOS) - return True - def notarize_dmg(self, file: AbsoluteAndRelativeFileName) -> bool: """ Run entire pipeline to get DMG notarized. @@ -414,10 +428,7 @@ class MacOSCodeSigner(BaseCodeSigner): return False # Staple. - if not self.notarize_staple(file): - return False - - return True + self.notarize_staple(file) def notarize_all_dmg( self, files: List[AbsoluteAndRelativeFileName]) -> bool: @@ -432,10 +443,7 @@ class MacOSCodeSigner(BaseCodeSigner): if not self.check_file_is_to_be_signed(file): continue - if not self.notarize_dmg(file): - return False - - return True + self.notarize_dmg(file) ############################################################################ # Entry point. @@ -443,11 +451,6 @@ class MacOSCodeSigner(BaseCodeSigner): def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: # TODO(sergey): Handle errors somehow. - if not self.codesign_all_files(files): - return - - if not self.codesign_bundles(files): - return - - if not self.notarize_all_dmg(files): - return + self.codesign_all_files(files) + self.codesign_bundles(files) + self.notarize_all_dmg(files) diff --git a/build_files/buildbot/codesign/windows_code_signer.py b/build_files/buildbot/codesign/windows_code_signer.py index 2557d3c0b68..251dd856c8a 100644 --- a/build_files/buildbot/codesign/windows_code_signer.py +++ b/build_files/buildbot/codesign/windows_code_signer.py @@ -29,6 +29,7 @@ from buildbot_utils import Builder from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName from codesign.base_code_signer import BaseCodeSigner +from codesign.exception import CodeSignException logger = logging.getLogger(__name__) logger_server = logger.getChild('server') @@ -40,6 +41,9 @@ BLACKLIST_FILE_PREFIXES = ( 'api-ms-', 'concrt', 'msvcp', 'ucrtbase', 'vcomp', 'vcruntime') +class SigntoolException(CodeSignException): + pass + class WindowsCodeSigner(BaseCodeSigner): def check_file_is_to_be_signed( self, file: AbsoluteAndRelativeFileName) -> bool: @@ -50,12 +54,41 @@ class WindowsCodeSigner(BaseCodeSigner): return file.relative_filepath.suffix in EXTENSIONS_TO_BE_SIGNED + def get_sign_command_prefix(self) -> List[str]: return [ 'signtool', 'sign', '/v', '/f', self.config.WIN_CERTIFICATE_FILEPATH, '/tr', self.config.WIN_TIMESTAMP_AUTHORITY_URL] + + def run_codesign_tool(self, filepath: Path) -> None: + command = self.get_sign_command_prefix() + [filepath] + codesign_output = self.check_output_or_mock(command, util.Platform.WINDOWS) + logger_server.info(f'signtool output:\n{codesign_output}') + + got_number_of_success = False + + for line in codesign_output.split('\n'): + line_clean = line.strip() + line_clean_lower = line_clean.lower() + + if line_clean_lower.startswith('number of warnings') or \ + line_clean_lower.startswith('number of errors'): + number = int(line_clean_lower.split(':')[1]) + if number != 0: + raise SigntoolException('Non-clean success of signtool') + + if line_clean_lower.startswith('number of files successfully signed'): + got_number_of_success = True + number = int(line_clean_lower.split(':')[1]) + if number != 1: + raise SigntoolException('Signtool did not consider codesign a success') + + if not got_number_of_success: + raise SigntoolException('Signtool did not report number of files signed') + + def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None: # NOTE: Sign files one by one to avoid possible command line length # overflow (which could happen if we ever decide to sign every binary @@ -73,12 +106,7 @@ class WindowsCodeSigner(BaseCodeSigner): file_index + 1, num_files, file.relative_filepath) continue - command = self.get_sign_command_prefix() - command.append(file.absolute_filepath) logger_server.info( 'Running signtool command for file [%d/%d] %s...', file_index + 1, num_files, file.relative_filepath) - # TODO(sergey): Check the status somehow. With a missing certificate - # the command still exists with a zero code. - self.run_command_or_mock(command, util.Platform.WINDOWS) - # TODO(sergey): Report number of signed and ignored files. + self.run_codesign_tool(file.absolute_filepath) -- cgit v1.2.3 From b4b4532ce08d10468b04c42b092ef9cff603958d Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 11 Nov 2020 15:32:40 +0100 Subject: Sculpt: use ESC key in addition to RMB to cancel eyedropper This is more in line to other eyedropper usages throughout blender. Affected operators: - Sample Dyntopo detail - Extract Face Set (as reported in T82615) ref T82615 Maniphest Tasks: T82615 Differential Revision: https://developer.blender.org/D9531 --- source/blender/editors/mesh/editmesh_mask_extract.c | 2 +- source/blender/editors/sculpt_paint/sculpt_detail.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c index 8ef1f9ee176..be9314ad2fd 100644 --- a/source/blender/editors/mesh/editmesh_mask_extract.c +++ b/source/blender/editors/mesh/editmesh_mask_extract.c @@ -408,7 +408,7 @@ static int face_set_extract_modal(bContext *C, wmOperator *op, const wmEvent *ev return geometry_extract_apply(C, op, geometry_extract_tag_face_set, ¶ms); } break; - + case EVT_ESCKEY: case RIGHTMOUSE: { WM_cursor_modal_restore(CTX_wm_window(C)); ED_workspace_status_text(C, NULL); diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.c b/source/blender/editors/sculpt_paint/sculpt_detail.c index da51d3184b5..8bbd90daaf8 100644 --- a/source/blender/editors/sculpt_paint/sculpt_detail.c +++ b/source/blender/editors/sculpt_paint/sculpt_detail.c @@ -329,7 +329,7 @@ static int sculpt_sample_detail_size_modal(bContext *C, wmOperator *op, const wm return OPERATOR_FINISHED; } break; - + case EVT_ESCKEY: case RIGHTMOUSE: { WM_cursor_modal_restore(CTX_wm_window(C)); ED_workspace_status_text(C, NULL); -- cgit v1.2.3 From 12dd26a2bbb37fc369956d9e2bcd7d851aafafde Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 11 Nov 2020 16:05:15 +0100 Subject: Sculpt: fix face set extract clicking in empty space Should not do anything in that case. ref T82615 Maniphest Tasks: T82615 Differential Revision: https://developer.blender.org/D9532 --- source/blender/editors/sculpt_paint/sculpt_face_set.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c index bfe741d2625..a9a2b1af2b1 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.c +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c @@ -110,7 +110,10 @@ int ED_sculpt_face_sets_active_update_and_get(bContext *C, Object *ob, const flo } SculptCursorGeometryInfo gi; - SCULPT_cursor_geometry_info_update(C, &gi, mval, false); + if (!SCULPT_cursor_geometry_info_update(C, &gi, mval, false)) { + return SCULPT_FACE_SET_NONE; + } + return SCULPT_active_face_set_get(ss); } -- cgit v1.2.3 From 9067cd64a5083c214fd37fd65bea374312abad10 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 12 Nov 2020 11:48:59 +0100 Subject: Fix T82466: Library Overrides: overrides disappear when appending. `BKE_library_make_local` was not properly checking for tags and/or libs in liboverrides case. --- source/blender/blenkernel/intern/lib_id.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c index ae6ee71da82..b0f38001d01 100644 --- a/source/blender/blenkernel/intern/lib_id.c +++ b/source/blender/blenkernel/intern/lib_id.c @@ -1884,7 +1884,9 @@ void BKE_library_make_local(Main *bmain, if (id->lib == NULL) { id->tag &= ~(LIB_TAG_EXTERN | LIB_TAG_INDIRECT | LIB_TAG_NEW); id->flag &= ~LIB_INDIRECT_WEAK_LINK; - if (ID_IS_OVERRIDE_LIBRARY_REAL(id)) { + if (ID_IS_OVERRIDE_LIBRARY_REAL(id) && + ELEM(lib, NULL, id->override_library->reference->lib) && + ((untagged_only == false) || !(id->tag & LIB_TAG_PRE_EXISTING))) { BKE_lib_override_library_free(&id->override_library, true); } } -- cgit v1.2.3 From dbbfba942867d907706222e3b0094cb18f517352 Mon Sep 17 00:00:00 2001 From: Wayde Moss Date: Thu, 12 Nov 2020 11:53:12 +0100 Subject: Fix T81813: Keyframe handles don't follow keyframes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new property `co_ui` to Keyframes, the modification of which will apply to the keyframe itself as well as its Bézier handles. Dragging the "Keyframe" slider in the properties panel now maintains the deltas between the keyframe and its handles, just like moving the key in the graph editor would. Reviewed by @sybren in T81813. --- source/blender/editors/space_graph/graph_buttons.c | 7 ++--- source/blender/makesrna/intern/rna_fcurve.c | 33 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index a491ce29bd4..3a4e1883cee 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -423,13 +423,14 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel) but_max_width, UI_UNIT_Y, &bezt_ptr, - "co", + "co_ui", 0, 0, 0, 0, 0, NULL); + UI_but_func_set(but, graphedit_activekey_update_cb, fcu, bezt); uiItemL_respect_property_split(col, IFACE_("Value"), ICON_NONE); but = uiDefButR(block, @@ -441,7 +442,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel) but_max_width, UI_UNIT_Y, &bezt_ptr, - "co", + "co_ui", 1, 0, 0, @@ -450,8 +451,6 @@ static void graph_panel_key_properties(const bContext *C, Panel *panel) NULL); UI_but_func_set(but, graphedit_activekey_update_cb, fcu, bezt); UI_but_unit_type_set(but, unit); - - UI_but_func_set(but, graphedit_activekey_update_cb, fcu, bezt); } /* previous handle - only if previous was Bezier interpolation */ diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 1c5e3688312..38328628f11 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -463,6 +463,27 @@ static void rna_FKeyframe_ctrlpoint_set(PointerRNA *ptr, const float *values) bezt->vec[1][1] = values[1]; } +static void rna_FKeyframe_ctrlpoint_ui_set(PointerRNA *ptr, const float *values) +{ + BezTriple *bezt = (BezTriple *)ptr->data; + + const float frame_delta = values[0] - bezt->vec[1][0]; + const float value_delta = values[1] - bezt->vec[1][1]; + + /** To match the behavior of transforming the keyframe Co using the Graph Editor + * (transform_convert_graph.c) flushTransGraphData(), we will also move the handles by + * the same amount as the Co delta. */ + + bezt->vec[0][0] += frame_delta; + bezt->vec[0][1] += value_delta; + + bezt->vec[1][0] = values[0]; + bezt->vec[1][1] = values[1]; + + bezt->vec[2][0] += frame_delta; + bezt->vec[2][1] += value_delta; +} + /* ****************************** */ static void rna_FCurve_RnaPath_get(PointerRNA *ptr, char *value) @@ -2098,6 +2119,18 @@ static void rna_def_fkeyframe(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Control Point", "Coordinates of the control point"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_Keyframe_update"); + prop = RNA_def_property( + srna, "co_ui", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */ + RNA_def_property_array(prop, 2); + RNA_def_property_float_funcs( + prop, "rna_FKeyframe_ctrlpoint_get", "rna_FKeyframe_ctrlpoint_ui_set", NULL); + RNA_def_property_ui_text( + prop, + "Control Point", + "Coordinates of the control point. Note: Changing this value also updates the handles " + "similar to using the graph editor transform operator"); + RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_Keyframe_update"); + prop = RNA_def_property( srna, "handle_right", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */ RNA_def_property_array(prop, 2); -- cgit v1.2.3 From a8f1bea5901c2cccf9b1408090f85ee072589cce Mon Sep 17 00:00:00 2001 From: Patrick Mours Date: Thu, 12 Nov 2020 12:49:12 +0100 Subject: Fix NanoVDB not being enabled/disabled correctly in CMake profiles This caused warnings when e.g. building the lite profile because NanoVDB was not disabled, but OpenVDB was. This Fixes this by setting the "WITH_NANOVDB" flag too. --- build_files/cmake/config/blender_full.cmake | 1 + build_files/cmake/config/blender_lite.cmake | 1 + build_files/cmake/config/blender_release.cmake | 1 + build_files/cmake/config/bpy_module.cmake | 1 + 4 files changed, 4 insertions(+) diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake index c5ed59dfaa5..08065ec0276 100644 --- a/build_files/cmake/config/blender_full.cmake +++ b/build_files/cmake/config/blender_full.cmake @@ -44,6 +44,7 @@ set(WITH_OPENMP ON CACHE BOOL "" FORCE) set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE) set(WITH_OPENVDB ON CACHE BOOL "" FORCE) set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE) +set(WITH_NANOVDB ON CACHE BOOL "" FORCE) set(WITH_POTRACE ON CACHE BOOL "" FORCE) set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE) set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE) diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake index f53bdaac41e..4150094e9f5 100644 --- a/build_files/cmake/config/blender_lite.cmake +++ b/build_files/cmake/config/blender_lite.cmake @@ -51,6 +51,7 @@ set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE) set(WITH_OPENMP OFF CACHE BOOL "" FORCE) set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE) set(WITH_OPENVDB OFF CACHE BOOL "" FORCE) +set(WITH_NANOVDB OFF CACHE BOOL "" FORCE) set(WITH_QUADRIFLOW OFF CACHE BOOL "" FORCE) set(WITH_SDL OFF CACHE BOOL "" FORCE) set(WITH_TBB OFF CACHE BOOL "" FORCE) diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake index f8f7b730efe..fd3225b0287 100644 --- a/build_files/cmake/config/blender_release.cmake +++ b/build_files/cmake/config/blender_release.cmake @@ -45,6 +45,7 @@ set(WITH_OPENMP ON CACHE BOOL "" FORCE) set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE) set(WITH_OPENVDB ON CACHE BOOL "" FORCE) set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE) +set(WITH_NANOVDB ON CACHE BOOL "" FORCE) set(WITH_POTRACE ON CACHE BOOL "" FORCE) set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE) set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE) diff --git a/build_files/cmake/config/bpy_module.cmake b/build_files/cmake/config/bpy_module.cmake index 2c0da81a1ea..7fc68f97f29 100644 --- a/build_files/cmake/config/bpy_module.cmake +++ b/build_files/cmake/config/bpy_module.cmake @@ -28,6 +28,7 @@ set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE) set(WITH_BULLET OFF CACHE BOOL "" FORCE) set(WITH_OPENVDB OFF CACHE BOOL "" FORCE) +set(WITH_NANOVDB OFF CACHE BOOL "" FORCE) set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE) # Depends on Python install, do this to quiet warning. -- cgit v1.2.3 From d0c1d93b7e7b453016ac83b3b1a57a220618a835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastia=CC=81n=20Barschkis?= Date: Thu, 12 Nov 2020 14:03:03 +0100 Subject: Fluid: Removed clamp from force assignment The clamp is too aggressive and results in forces being too weak. --- source/blender/blenkernel/intern/fluid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index d93b635d67d..b9f201d8ada 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -3195,8 +3195,7 @@ static void update_effectors_task_cb(void *__restrict userdata, normalize_v3(retvel); mul_v3_fl(retvel, mag); - /* Constrain forces to interval -1 to 1. */ - CLAMP3(retvel, -1.0f, 1.0f); + /* Copy computed force to fluid solver forces. */ data->force_x[index] = retvel[0]; data->force_y[index] = retvel[1]; data->force_z[index] = retvel[2]; -- cgit v1.2.3 From dad228a19cc4b2ae8436eeb927fb42b32d4e1824 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 5 Nov 2020 16:00:16 +0100 Subject: Fix asserts when two (or more) SplineIK constraints have the same root Only a single DEG operation node `POSE_SPLINE_IK_SOLVER` should be added in this case [ see `build_splineik_pose`, same is already done for overlapping IK in `build_ik_pose`] ref T82347. Reviewers: sybren Maniphest Tasks: T82347 Differential Revision: https://developer.blender.org/D9471 --- source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc index 62282ac4d37..6143b4472d7 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -119,6 +119,11 @@ void DepsgraphNodeBuilder::build_splineik_pose(Object *object, /* Find the chain's root. */ bPoseChannel *rootchan = BKE_armature_splineik_solver_find_root(pchan, data); + if (has_operation_node( + &object->id, NodeType::EVAL_POSE, rootchan->name, OperationCode::POSE_SPLINE_IK_SOLVER)) { + return; + } + /* Operation node for evaluating/running Spline IK Solver. * Store the "root bone" of this chain in the solver, so it knows where to * start. */ -- cgit v1.2.3