diff options
author | Julian Eisel <julian@blender.org> | 2020-11-11 19:35:26 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-11-11 19:35:26 +0300 |
commit | ca7079a44e773a26d6f6aa6730f53a16e7de6cd5 (patch) | |
tree | b58ff6ccca5e2afd18da8365705f47112eac0a38 | |
parent | fdd9cb713e2e96e430eb022f034bfa9973afc75c (diff) | |
parent | 5b5ec0a2e910a42d7c02774a47fd9c70b6f16f06 (diff) |
Merge branch 'master' into outliner-cpp-refactoroutliner-cpp-refactor
291 files changed, 7795 insertions, 5771 deletions
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) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index c2114eba53a..c065b48f6ea 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. @@ -435,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 @@ -676,6 +679,10 @@ while true; do --with-oidn) WITH_OIDN=true; shift; continue ;; + --with-nanovdb) + 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 @@ -1029,11 +1041,15 @@ 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" +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 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) diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index 20637af96df..4bd4baec2e4 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -347,7 +347,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); } } } @@ -369,9 +369,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/graph/node.cpp b/intern/cycles/graph/node.cpp index 0f073ed9b63..c926f6ab8ef 100644 --- a/intern/cycles/graph/node.cpp +++ b/intern/cycles/graph/node.cpp @@ -35,7 +35,7 @@ Node::Node(const NodeType *type_, ustring name_) : name(name_), type(type_) assert(type); owner = nullptr; - socket_modified = ~0; + tag_modified(); /* assign non-empty name, convenient for debugging */ if (name.empty()) { @@ -785,7 +785,7 @@ bool Node::is_modified() void Node::tag_modified() { - socket_modified = ~0u; + socket_modified = ~0ull; } void Node::clear_modified() diff --git a/intern/cycles/kernel/geom/geom_patch.h b/intern/cycles/kernel/geom/geom_patch.h index 1de05fa9e0d..9c1768f05db 100644 --- a/intern/cycles/kernel/geom/geom_patch.h +++ b/intern/cycles/kernel/geom/geom_patch.h @@ -442,7 +442,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 2a569852659..9eceb996926 100644 --- a/intern/cycles/kernel/geom/geom_subd_triangle.h +++ b/intern/cycles/kernel/geom/geom_subd_triangle.h @@ -627,10 +627,14 @@ ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals *kg, float4 f0, f1, f2, f3; if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { - f0 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[0] + desc.offset)); - f1 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[1] + desc.offset)); - f2 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[2] + desc.offset)); - f3 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[3] + desc.offset)); + f0 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[0] + desc.offset))); + f1 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[1] + desc.offset))); + f2 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[2] + desc.offset))); + f3 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[3] + desc.offset))); } else { f0 = kernel_tex_fetch(__attributes_float3, corners[0] + desc.offset); diff --git a/intern/cycles/kernel/geom/geom_subd_triangle.h.orig b/intern/cycles/kernel/geom/geom_subd_triangle.h.orig new file mode 100644 index 00000000000..cce71b0bec1 --- /dev/null +++ b/intern/cycles/kernel/geom/geom_subd_triangle.h.orig @@ -0,0 +1,698 @@ +/* + * Copyright 2011-2016 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Functions for retrieving attributes on triangles produced from subdivision meshes */ + +CCL_NAMESPACE_BEGIN + +/* Patch index for triangle, -1 if not subdivision triangle */ + +ccl_device_inline uint subd_triangle_patch(KernelGlobals *kg, const ShaderData *sd) +{ + return (sd->prim != PRIM_NONE) ? kernel_tex_fetch(__tri_patch, sd->prim) : ~0; +} + +/* UV coords of triangle within patch */ + +ccl_device_inline void subd_triangle_patch_uv(KernelGlobals *kg, + const ShaderData *sd, + float2 uv[3]) +{ + uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, sd->prim); + + uv[0] = kernel_tex_fetch(__tri_patch_uv, tri_vindex.x); + uv[1] = kernel_tex_fetch(__tri_patch_uv, tri_vindex.y); + uv[2] = kernel_tex_fetch(__tri_patch_uv, tri_vindex.z); +} + +/* Vertex indices of patch */ + +ccl_device_inline uint4 subd_triangle_patch_indices(KernelGlobals *kg, int patch) +{ + uint4 indices; + + indices.x = kernel_tex_fetch(__patches, patch + 0); + indices.y = kernel_tex_fetch(__patches, patch + 1); + indices.z = kernel_tex_fetch(__patches, patch + 2); + indices.w = kernel_tex_fetch(__patches, patch + 3); + + return indices; +} + +/* Originating face for patch */ + +ccl_device_inline uint subd_triangle_patch_face(KernelGlobals *kg, int patch) +{ + return kernel_tex_fetch(__patches, patch + 4); +} + +/* Number of corners on originating face */ + +ccl_device_inline uint subd_triangle_patch_num_corners(KernelGlobals *kg, int patch) +{ + return kernel_tex_fetch(__patches, patch + 5) & 0xffff; +} + +/* Indices of the four corners that are used by the patch */ + +ccl_device_inline void subd_triangle_patch_corners(KernelGlobals *kg, int patch, int corners[4]) +{ + uint4 data; + + data.x = kernel_tex_fetch(__patches, patch + 4); + data.y = kernel_tex_fetch(__patches, patch + 5); + data.z = kernel_tex_fetch(__patches, patch + 6); + data.w = kernel_tex_fetch(__patches, patch + 7); + + int num_corners = data.y & 0xffff; + + if (num_corners == 4) { + /* quad */ + corners[0] = data.z; + corners[1] = data.z + 1; + corners[2] = data.z + 2; + corners[3] = data.z + 3; + } + else { + /* ngon */ + int c = data.y >> 16; + + corners[0] = data.z + c; + corners[1] = data.z + mod(c + 1, num_corners); + corners[2] = data.w; + corners[3] = data.z + mod(c - 1, num_corners); + } +} + +/* Reading attributes on various subdivision triangle elements */ + +ccl_device_noinline float subd_triangle_attribute_float( + KernelGlobals *kg, const ShaderData *sd, const AttributeDescriptor desc, float *dx, float *dy) +{ + int patch = subd_triangle_patch(kg, sd); + +#ifdef __PATCH_EVAL__ + if (desc.flags & ATTR_SUBDIVIDED) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + float2 dpdu = uv[0] - uv[2]; + float2 dpdv = uv[1] - uv[2]; + + /* p is [s, t] */ + float2 p = dpdu * sd->u + dpdv * sd->v + uv[2]; + + float a, dads, dadt; + a = patch_eval_float(kg, sd, desc.offset, patch, p.x, p.y, 0, &dads, &dadt); + +# ifdef __RAY_DIFFERENTIALS__ + if (dx || dy) { + float dsdu = dpdu.x; + float dtdu = dpdu.y; + float dsdv = dpdv.x; + float dtdv = dpdv.y; + + if (dx) { + float dudx = sd->du.dx; + float dvdx = sd->dv.dx; + + float dsdx = dsdu * dudx + dsdv * dvdx; + float dtdx = dtdu * dudx + dtdv * dvdx; + + *dx = dads * dsdx + dadt * dtdx; + } + if (dy) { + float dudy = sd->du.dy; + float dvdy = sd->dv.dy; + + float dsdy = dsdu * dudy + dsdv * dvdy; + float dtdy = dtdu * dudy + dtdv * dvdy; + + *dy = dads * dsdy + dadt * dtdy; + } + } +# endif + + return a; + } + else +#endif /* __PATCH_EVAL__ */ + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; + + return kernel_tex_fetch(__attributes_float, desc.offset + subd_triangle_patch_face(kg, patch)); + } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + uint4 v = subd_triangle_patch_indices(kg, patch); + + float f0 = kernel_tex_fetch(__attributes_float, desc.offset + v.x); + float f1 = kernel_tex_fetch(__attributes_float, desc.offset + v.y); + float f2 = kernel_tex_fetch(__attributes_float, desc.offset + v.z); + float f3 = kernel_tex_fetch(__attributes_float, desc.offset + v.w); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * a + sd->dv.dx * b - (sd->du.dx + sd->dv.dx) * c; + if (dy) + *dy = sd->du.dy * a + sd->dv.dy * b - (sd->du.dy + sd->dv.dy) * c; +#endif + + return sd->u * a + sd->v * b + (1.0f - sd->u - sd->v) * c; + } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); + + float f0 = kernel_tex_fetch(__attributes_float, corners[0] + desc.offset); + float f1 = kernel_tex_fetch(__attributes_float, corners[1] + desc.offset); + float f2 = kernel_tex_fetch(__attributes_float, corners[2] + desc.offset); + float f3 = kernel_tex_fetch(__attributes_float, corners[3] + desc.offset); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * a + sd->dv.dx * b - (sd->du.dx + sd->dv.dx) * c; + if (dy) + *dy = sd->du.dy * a + sd->dv.dy * b - (sd->du.dy + sd->dv.dy) * c; +#endif + + return sd->u * a + sd->v * b + (1.0f - sd->u - sd->v) * c; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; + + return kernel_tex_fetch(__attributes_float, desc.offset); + } + else { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; + + return 0.0f; + } +} + +ccl_device_noinline float2 subd_triangle_attribute_float2(KernelGlobals *kg, + const ShaderData *sd, + const AttributeDescriptor desc, + float2 *dx, + float2 *dy) +{ + int patch = subd_triangle_patch(kg, sd); + +#ifdef __PATCH_EVAL__ + if (desc.flags & ATTR_SUBDIVIDED) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + float2 dpdu = uv[0] - uv[2]; + float2 dpdv = uv[1] - uv[2]; + + /* p is [s, t] */ + float2 p = dpdu * sd->u + dpdv * sd->v + uv[2]; + + float2 a, dads, dadt; + + a = patch_eval_float2(kg, sd, desc.offset, patch, p.x, p.y, 0, &dads, &dadt); + +# ifdef __RAY_DIFFERENTIALS__ + if (dx || dy) { + float dsdu = dpdu.x; + float dtdu = dpdu.y; + float dsdv = dpdv.x; + float dtdv = dpdv.y; + + if (dx) { + float dudx = sd->du.dx; + float dvdx = sd->dv.dx; + + float dsdx = dsdu * dudx + dsdv * dvdx; + float dtdx = dtdu * dudx + dtdv * dvdx; + + *dx = dads * dsdx + dadt * dtdx; + } + if (dy) { + float dudy = sd->du.dy; + float dvdy = sd->dv.dy; + + float dsdy = dsdu * dudy + dsdv * dvdy; + float dtdy = dtdu * dudy + dtdv * dvdy; + + *dy = dads * dsdy + dadt * dtdy; + } + } +# endif + + return a; + } + else +#endif /* __PATCH_EVAL__ */ + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); + + return kernel_tex_fetch(__attributes_float2, + desc.offset + subd_triangle_patch_face(kg, patch)); + } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + uint4 v = subd_triangle_patch_indices(kg, patch); + + float2 f0 = kernel_tex_fetch(__attributes_float2, desc.offset + v.x); + float2 f1 = kernel_tex_fetch(__attributes_float2, desc.offset + v.y); + float2 f2 = kernel_tex_fetch(__attributes_float2, desc.offset + v.z); + float2 f3 = kernel_tex_fetch(__attributes_float2, desc.offset + v.w); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * a + sd->dv.dx * b - (sd->du.dx + sd->dv.dx) * c; + if (dy) + *dy = sd->du.dy * a + sd->dv.dy * b - (sd->du.dy + sd->dv.dy) * c; +#endif + + return sd->u * a + sd->v * b + (1.0f - sd->u - sd->v) * c; + } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); + + float2 f0, f1, f2, f3; + + f0 = kernel_tex_fetch(__attributes_float2, corners[0] + desc.offset); + f1 = kernel_tex_fetch(__attributes_float2, corners[1] + desc.offset); + f2 = kernel_tex_fetch(__attributes_float2, corners[2] + desc.offset); + f3 = kernel_tex_fetch(__attributes_float2, corners[3] + desc.offset); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * a + sd->dv.dx * b - (sd->du.dx + sd->dv.dx) * c; + if (dy) + *dy = sd->du.dy * a + sd->dv.dy * b - (sd->du.dy + sd->dv.dy) * c; +#endif + + return sd->u * a + sd->v * b + (1.0f - sd->u - sd->v) * c; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); + + return kernel_tex_fetch(__attributes_float2, desc.offset); + } + else { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); + + return make_float2(0.0f, 0.0f); + } +} + +ccl_device_noinline float3 subd_triangle_attribute_float3(KernelGlobals *kg, + const ShaderData *sd, + const AttributeDescriptor desc, + float3 *dx, + float3 *dy) +{ + int patch = subd_triangle_patch(kg, sd); + +#ifdef __PATCH_EVAL__ + if (desc.flags & ATTR_SUBDIVIDED) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + float2 dpdu = uv[0] - uv[2]; + float2 dpdv = uv[1] - uv[2]; + + /* p is [s, t] */ + float2 p = dpdu * sd->u + dpdv * sd->v + uv[2]; + + float3 a, dads, dadt; + a = patch_eval_float3(kg, sd, desc.offset, patch, p.x, p.y, 0, &dads, &dadt); + +# ifdef __RAY_DIFFERENTIALS__ + if (dx || dy) { + float dsdu = dpdu.x; + float dtdu = dpdu.y; + float dsdv = dpdv.x; + float dtdv = dpdv.y; + + if (dx) { + float dudx = sd->du.dx; + float dvdx = sd->dv.dx; + + float dsdx = dsdu * dudx + dsdv * dvdx; + float dtdx = dtdu * dudx + dtdv * dvdx; + + *dx = dads * dsdx + dadt * dtdx; + } + if (dy) { + float dudy = sd->du.dy; + float dvdy = sd->dv.dy; + + float dsdy = dsdu * dudy + dsdv * dvdy; + float dtdy = dtdu * dudy + dtdv * dvdy; + + *dy = dads * dsdy + dadt * dtdy; + } + } +# endif + + return a; + } + else +#endif /* __PATCH_EVAL__ */ + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); + + return float4_to_float3( + kernel_tex_fetch(__attributes_float3, desc.offset + subd_triangle_patch_face(kg, patch))); + } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + uint4 v = subd_triangle_patch_indices(kg, patch); + + float3 f0 = float4_to_float3(kernel_tex_fetch(__attributes_float3, desc.offset + v.x)); + float3 f1 = float4_to_float3(kernel_tex_fetch(__attributes_float3, desc.offset + v.y)); + float3 f2 = float4_to_float3(kernel_tex_fetch(__attributes_float3, desc.offset + v.z)); + float3 f3 = float4_to_float3(kernel_tex_fetch(__attributes_float3, desc.offset + v.w)); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * a + sd->dv.dx * b - (sd->du.dx + sd->dv.dx) * c; + if (dy) + *dy = sd->du.dy * a + sd->dv.dy * b - (sd->du.dy + sd->dv.dy) * c; +#endif + + return sd->u * a + sd->v * b + (1.0f - sd->u - sd->v) * c; + } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); + + float3 f0, f1, f2, f3; + + f0 = float4_to_float3(kernel_tex_fetch(__attributes_float3, corners[0] + desc.offset)); + f1 = float4_to_float3(kernel_tex_fetch(__attributes_float3, corners[1] + desc.offset)); + f2 = float4_to_float3(kernel_tex_fetch(__attributes_float3, corners[2] + desc.offset)); + f3 = float4_to_float3(kernel_tex_fetch(__attributes_float3, corners[3] + desc.offset)); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * a + sd->dv.dx * b - (sd->du.dx + sd->dv.dx) * c; + if (dy) + *dy = sd->du.dy * a + sd->dv.dy * b - (sd->du.dy + sd->dv.dy) * c; +#endif + + return sd->u * a + sd->v * b + (1.0f - sd->u - sd->v) * c; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); + + return float4_to_float3(kernel_tex_fetch(__attributes_float3, desc.offset)); + } + else { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); + + return make_float3(0.0f, 0.0f, 0.0f); + } +} + +ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals *kg, + const ShaderData *sd, + const AttributeDescriptor desc, + float4 *dx, + float4 *dy) +{ + int patch = subd_triangle_patch(kg, sd); + +#ifdef __PATCH_EVAL__ + if (desc.flags & ATTR_SUBDIVIDED) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + float2 dpdu = uv[0] - uv[2]; + float2 dpdv = uv[1] - uv[2]; + + /* p is [s, t] */ + float2 p = dpdu * sd->u + dpdv * sd->v + uv[2]; + + float4 a, dads, dadt; + if (desc.type == NODE_ATTR_RGBA) { + a = patch_eval_uchar4(kg, sd, desc.offset, patch, p.x, p.y, 0, &dads, &dadt); + } + else { + a = patch_eval_float4(kg, sd, desc.offset, patch, p.x, p.y, 0, &dads, &dadt); + } + +# ifdef __RAY_DIFFERENTIALS__ + if (dx || dy) { + float dsdu = dpdu.x; + float dtdu = dpdu.y; + float dsdv = dpdv.x; + float dtdv = dpdv.y; + + if (dx) { + float dudx = sd->du.dx; + float dvdx = sd->dv.dx; + + float dsdx = dsdu * dudx + dsdv * dvdx; + float dtdx = dtdu * dudx + dtdv * dvdx; + + *dx = dads * dsdx + dadt * dtdx; + } + if (dy) { + float dudy = sd->du.dy; + float dvdy = sd->dv.dy; + + float dsdy = dsdu * dudy + dsdv * dvdy; + float dtdy = dtdu * dudy + dtdv * dvdy; + + *dy = dads * dsdy + dadt * dtdy; + } + } +# endif + + return a; + } + else +#endif /* __PATCH_EVAL__ */ + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + + return kernel_tex_fetch(__attributes_float3, + desc.offset + subd_triangle_patch_face(kg, patch)); + } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + uint4 v = subd_triangle_patch_indices(kg, patch); + + float4 f0 = kernel_tex_fetch(__attributes_float3, desc.offset + v.x); + float4 f1 = kernel_tex_fetch(__attributes_float3, desc.offset + v.y); + float4 f2 = kernel_tex_fetch(__attributes_float3, desc.offset + v.z); + float4 f3 = kernel_tex_fetch(__attributes_float3, desc.offset + v.w); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * a + sd->dv.dx * b - (sd->du.dx + sd->dv.dx) * c; + if (dy) + *dy = sd->du.dy * a + sd->dv.dy * b - (sd->du.dy + sd->dv.dy) * c; +#endif + + return sd->u * a + sd->v * b + (1.0f - sd->u - sd->v) * c; + } + else if (desc.element == ATTR_ELEMENT_CORNER || desc.element == ATTR_ELEMENT_CORNER_BYTE) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); + + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); + +<<<<<<< HEAD + float4 f0, f1, f2, f3; + + if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { + f0 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[0] + desc.offset))); + f1 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[1] + desc.offset))); + f2 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[2] + desc.offset))); + f3 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[3] + desc.offset))); + } + else { + f0 = kernel_tex_fetch(__attributes_float3, corners[0] + desc.offset); + f1 = kernel_tex_fetch(__attributes_float3, corners[1] + desc.offset); + f2 = kernel_tex_fetch(__attributes_float3, corners[2] + desc.offset); + f3 = kernel_tex_fetch(__attributes_float3, 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))); +>>>>>>> blender-v2.91-release + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * a + sd->dv.dx * b - (sd->du.dx + sd->dv.dx) * c; + if (dy) + *dy = sd->du.dy * a + sd->dv.dy * b - (sd->du.dy + sd->dv.dy) * c; +#endif + + return sd->u * a + sd->v * b + (1.0f - sd->u - sd->v) * c; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + +<<<<<<< HEAD + return kernel_tex_fetch(__attributes_float3, desc.offset); +======= + return color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, desc.offset))); +>>>>>>> blender-v2.91-release + } + else { + if (dx) + *dx = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + + return make_float4(0.0f, 0.0f, 0.0f, 0.0f); + } +} + +CCL_NAMESPACE_END diff --git a/intern/cycles/kernel/geom/geom_triangle.h b/intern/cycles/kernel/geom/geom_triangle.h index 2d9da23371e..e8e5d8c5b34 100644 --- a/intern/cycles/kernel/geom/geom_triangle.h +++ b/intern/cycles/kernel/geom/geom_triangle.h @@ -282,9 +282,12 @@ ccl_device float4 triangle_attribute_float4(KernelGlobals *kg, f2 = kernel_tex_fetch(__attributes_float3, tri + 2); } else { - 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))); } } diff --git a/intern/cycles/kernel/geom/geom_triangle.h.orig b/intern/cycles/kernel/geom/geom_triangle.h.orig new file mode 100644 index 00000000000..768c168327e --- /dev/null +++ b/intern/cycles/kernel/geom/geom_triangle.h.orig @@ -0,0 +1,348 @@ +/* + * Copyright 2011-2013 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Triangle Primitive + * + * Basic triangle with 3 vertices is used to represent mesh surfaces. For BVH + * ray intersection we use a precomputed triangle storage to accelerate + * intersection at the cost of more memory usage */ + +CCL_NAMESPACE_BEGIN + +/* normal on triangle */ +ccl_device_inline float3 triangle_normal(KernelGlobals *kg, ShaderData *sd) +{ + /* load triangle vertices */ + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, sd->prim); + const float3 v0 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 0)); + const float3 v1 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 1)); + const float3 v2 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 2)); + + /* return normal */ + if (sd->object_flag & SD_OBJECT_NEGATIVE_SCALE_APPLIED) { + return normalize(cross(v2 - v0, v1 - v0)); + } + else { + return normalize(cross(v1 - v0, v2 - v0)); + } +} + +/* point and normal on triangle */ +ccl_device_inline void triangle_point_normal( + KernelGlobals *kg, int object, int prim, float u, float v, float3 *P, float3 *Ng, int *shader) +{ + /* load triangle vertices */ + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, prim); + float3 v0 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 0)); + float3 v1 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 1)); + float3 v2 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 2)); + /* compute point */ + float t = 1.0f - u - v; + *P = (u * v0 + v * v1 + t * v2); + /* get object flags */ + int object_flag = kernel_tex_fetch(__object_flag, object); + /* compute normal */ + if (object_flag & SD_OBJECT_NEGATIVE_SCALE_APPLIED) { + *Ng = normalize(cross(v2 - v0, v1 - v0)); + } + else { + *Ng = normalize(cross(v1 - v0, v2 - v0)); + } + /* shader`*/ + *shader = kernel_tex_fetch(__tri_shader, prim); +} + +/* Triangle vertex locations */ + +ccl_device_inline void triangle_vertices(KernelGlobals *kg, int prim, float3 P[3]) +{ + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, prim); + P[0] = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 0)); + P[1] = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 1)); + P[2] = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 2)); +} + +/* Interpolate smooth vertex normal from vertices */ + +ccl_device_inline float3 +triangle_smooth_normal(KernelGlobals *kg, float3 Ng, int prim, float u, float v) +{ + /* load triangle vertices */ + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, prim); + float3 n0 = float4_to_float3(kernel_tex_fetch(__tri_vnormal, tri_vindex.x)); + float3 n1 = float4_to_float3(kernel_tex_fetch(__tri_vnormal, tri_vindex.y)); + float3 n2 = float4_to_float3(kernel_tex_fetch(__tri_vnormal, tri_vindex.z)); + + float3 N = safe_normalize((1.0f - u - v) * n2 + u * n0 + v * n1); + + return is_zero(N) ? Ng : N; +} + +/* Ray differentials on triangle */ + +ccl_device_inline void triangle_dPdudv(KernelGlobals *kg, + int prim, + ccl_addr_space float3 *dPdu, + ccl_addr_space float3 *dPdv) +{ + /* fetch triangle vertex coordinates */ + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, prim); + const float3 p0 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 0)); + const float3 p1 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 1)); + const float3 p2 = float4_to_float3(kernel_tex_fetch(__prim_tri_verts, tri_vindex.w + 2)); + + /* compute derivatives of P w.r.t. uv */ + *dPdu = (p0 - p2); + *dPdv = (p1 - p2); +} + +/* Reading attributes on various triangle elements */ + +ccl_device float triangle_attribute_float( + KernelGlobals *kg, const ShaderData *sd, const AttributeDescriptor desc, float *dx, float *dy) +{ + if (desc.element & (ATTR_ELEMENT_VERTEX | ATTR_ELEMENT_VERTEX_MOTION | ATTR_ELEMENT_CORNER)) { + float f0, f1, f2; + + if (desc.element & (ATTR_ELEMENT_VERTEX | ATTR_ELEMENT_VERTEX_MOTION)) { + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, sd->prim); + f0 = kernel_tex_fetch(__attributes_float, desc.offset + tri_vindex.x); + f1 = kernel_tex_fetch(__attributes_float, desc.offset + tri_vindex.y); + f2 = kernel_tex_fetch(__attributes_float, desc.offset + tri_vindex.z); + } + else { + const int tri = desc.offset + sd->prim * 3; + f0 = kernel_tex_fetch(__attributes_float, tri + 0); + f1 = kernel_tex_fetch(__attributes_float, tri + 1); + f2 = kernel_tex_fetch(__attributes_float, tri + 2); + } + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * f0 + sd->dv.dx * f1 - (sd->du.dx + sd->dv.dx) * f2; + if (dy) + *dy = sd->du.dy * f0 + sd->dv.dy * f1 - (sd->du.dy + sd->dv.dy) * f2; +#endif + + return sd->u * f0 + sd->v * f1 + (1.0f - sd->u - sd->v) * f2; + } + else { +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; +#endif + + if (desc.element & (ATTR_ELEMENT_FACE | ATTR_ELEMENT_OBJECT | ATTR_ELEMENT_MESH)) { + const int offset = (desc.element == ATTR_ELEMENT_FACE) ? desc.offset + sd->prim : + desc.offset; + return kernel_tex_fetch(__attributes_float, offset); + } + else { + return 0.0f; + } + } +} + +ccl_device float2 triangle_attribute_float2(KernelGlobals *kg, + const ShaderData *sd, + const AttributeDescriptor desc, + float2 *dx, + float2 *dy) +{ + if (desc.element & (ATTR_ELEMENT_VERTEX | ATTR_ELEMENT_VERTEX_MOTION | ATTR_ELEMENT_CORNER)) { + float2 f0, f1, f2; + + if (desc.element & (ATTR_ELEMENT_VERTEX | ATTR_ELEMENT_VERTEX_MOTION)) { + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, sd->prim); + f0 = kernel_tex_fetch(__attributes_float2, desc.offset + tri_vindex.x); + f1 = kernel_tex_fetch(__attributes_float2, desc.offset + tri_vindex.y); + f2 = kernel_tex_fetch(__attributes_float2, desc.offset + tri_vindex.z); + } + else { + const int tri = desc.offset + sd->prim * 3; + f0 = kernel_tex_fetch(__attributes_float2, tri + 0); + f1 = kernel_tex_fetch(__attributes_float2, tri + 1); + f2 = kernel_tex_fetch(__attributes_float2, tri + 2); + } + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * f0 + sd->dv.dx * f1 - (sd->du.dx + sd->dv.dx) * f2; + if (dy) + *dy = sd->du.dy * f0 + sd->dv.dy * f1 - (sd->du.dy + sd->dv.dy) * f2; +#endif + + return sd->u * f0 + sd->v * f1 + (1.0f - sd->u - sd->v) * f2; + } + else { +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); +#endif + + if (desc.element & (ATTR_ELEMENT_FACE | ATTR_ELEMENT_OBJECT | ATTR_ELEMENT_MESH)) { + const int offset = (desc.element == ATTR_ELEMENT_FACE) ? desc.offset + sd->prim : + desc.offset; + return kernel_tex_fetch(__attributes_float2, offset); + } + else { + return make_float2(0.0f, 0.0f); + } + } +} + +ccl_device float3 triangle_attribute_float3(KernelGlobals *kg, + const ShaderData *sd, + const AttributeDescriptor desc, + float3 *dx, + float3 *dy) +{ + if (desc.element & (ATTR_ELEMENT_VERTEX | ATTR_ELEMENT_VERTEX_MOTION | ATTR_ELEMENT_CORNER)) { + float3 f0, f1, f2; + + if (desc.element & (ATTR_ELEMENT_VERTEX | ATTR_ELEMENT_VERTEX_MOTION)) { + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, sd->prim); + f0 = float4_to_float3(kernel_tex_fetch(__attributes_float3, desc.offset + tri_vindex.x)); + f1 = float4_to_float3(kernel_tex_fetch(__attributes_float3, desc.offset + tri_vindex.y)); + f2 = float4_to_float3(kernel_tex_fetch(__attributes_float3, desc.offset + tri_vindex.z)); + } + else { + const int tri = desc.offset + sd->prim * 3; + f0 = float4_to_float3(kernel_tex_fetch(__attributes_float3, tri + 0)); + f1 = float4_to_float3(kernel_tex_fetch(__attributes_float3, tri + 1)); + f2 = float4_to_float3(kernel_tex_fetch(__attributes_float3, tri + 2)); + } + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * f0 + sd->dv.dx * f1 - (sd->du.dx + sd->dv.dx) * f2; + if (dy) + *dy = sd->du.dy * f0 + sd->dv.dy * f1 - (sd->du.dy + sd->dv.dy) * f2; +#endif + + return sd->u * f0 + sd->v * f1 + (1.0f - sd->u - sd->v) * f2; + } + else { +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); +#endif + + if (desc.element & (ATTR_ELEMENT_FACE | ATTR_ELEMENT_OBJECT | ATTR_ELEMENT_MESH)) { + const int offset = (desc.element == ATTR_ELEMENT_FACE) ? desc.offset + sd->prim : + desc.offset; + return float4_to_float3(kernel_tex_fetch(__attributes_float3, offset)); + } + else { + return make_float3(0.0f, 0.0f, 0.0f); + } + } +} + +ccl_device float4 triangle_attribute_float4(KernelGlobals *kg, + const ShaderData *sd, + const AttributeDescriptor desc, + float4 *dx, + float4 *dy) +{ + if (desc.element & (ATTR_ELEMENT_VERTEX | ATTR_ELEMENT_VERTEX_MOTION | ATTR_ELEMENT_CORNER | + ATTR_ELEMENT_CORNER_BYTE)) { + float4 f0, f1, f2; + +<<<<<<< HEAD + if (desc.element & (ATTR_ELEMENT_VERTEX | ATTR_ELEMENT_VERTEX_MOTION)) { + const uint4 tri_vindex = kernel_tex_fetch(__tri_vindex, sd->prim); +======= + if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { + int tri = desc.offset + sd->prim * 3; + 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); +>>>>>>> blender-v2.91-release + f0 = kernel_tex_fetch(__attributes_float3, desc.offset + tri_vindex.x); + f1 = kernel_tex_fetch(__attributes_float3, desc.offset + tri_vindex.y); + f2 = kernel_tex_fetch(__attributes_float3, desc.offset + tri_vindex.z); + } + else { + const int tri = desc.offset + sd->prim * 3; + if (desc.element == ATTR_ELEMENT_CORNER) { + f0 = kernel_tex_fetch(__attributes_float3, tri + 0); + f1 = kernel_tex_fetch(__attributes_float3, tri + 1); + f2 = kernel_tex_fetch(__attributes_float3, tri + 2); + } + else { + 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))); + } + } + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * f0 + sd->dv.dx * f1 - (sd->du.dx + sd->dv.dx) * f2; + if (dy) + *dy = sd->du.dy * f0 + sd->dv.dy * f1 - (sd->du.dy + sd->dv.dy) * f2; +#endif + + return sd->u * f0 + sd->v * f1 + (1.0f - sd->u - sd->v) * f2; + } +<<<<<<< HEAD +======= + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + + return color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, desc.offset))); + } +>>>>>>> blender-v2.91-release + else { +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float4(0.0f, 0.0f, 0.0f, 0.0f); +#endif + + if (desc.element & (ATTR_ELEMENT_FACE | ATTR_ELEMENT_OBJECT | ATTR_ELEMENT_MESH)) { + const int offset = (desc.element == ATTR_ELEMENT_FACE) ? desc.offset + sd->prim : + desc.offset; + return kernel_tex_fetch(__attributes_float3, offset); + } + else { + return make_float4(0.0f, 0.0f, 0.0f, 0.0f); + } + } +} + +CCL_NAMESPACE_END diff --git a/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h b/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h index b97400a443a..44c658d4cab 100644 --- a/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h +++ b/intern/cycles/kernel/kernels/cpu/kernel_cpu_image.h @@ -37,7 +37,7 @@ namespace { } \ (void)0 -ccl_always_inline float frac(float x, int *ix) +ccl_device_inline float frac(float x, int *ix) { int i = float_to_int(x) - ((x < 0.0f) ? 1 : 0); *ix = i; @@ -478,7 +478,7 @@ template<typename T> struct TextureInterpolator { #ifdef WITH_NANOVDB template<typename T> struct NanoVDBInterpolator { - typedef nanovdb::ReadAccessor<nanovdb::NanoRoot<T>> ReadAccessorT; + typedef typename nanovdb::NanoGrid<T>::AccessorType AccessorType; static ccl_always_inline float4 read(float r) { @@ -490,16 +490,22 @@ template<typename T> 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<ReadAccessorT, false>(acc)(xyz)); + return read(nanovdb::SampleFromVoxels<AccessorType, 0, false>(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<ReadAccessorT, false>(acc)(xyz)); + return read(nanovdb::SampleFromVoxels<AccessorType, 1, false>(acc)(xyz)); } # if defined(__GNUC__) || defined(__clang__) @@ -508,7 +514,7 @@ template<typename T> 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<typename T> struct NanoVDBInterpolator { using namespace nanovdb; NanoGrid<T> *const grid = (NanoGrid<T> *)info.data; - const NanoRoot<T> &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<NanoRoot<T>> ReadAccessorT; NanoGrid<T> *const grid = (NanoGrid<T> *)info.data; - const NanoRoot<T> &root = grid->tree().root(); + typedef typename nanovdb::NanoGrid<T>::AccessorType AccessorType; + AccessorType acc = grid->getAccessor(); switch (interpolation) { case INTERPOLATION_CLOSEST: - return NearestNeighborSampler<ReadAccessorT, false>(root)(Vec3f(x, y, z)); + return SampleFromVoxels<AccessorType, 0, false>(acc)(Vec3f(x, y, z)); case INTERPOLATION_LINEAR: - return TrilinearSampler<ReadAccessorT, false>(root)(Vec3f(x - 0.5f, y - 0.5f, z - 0.5f)); + return SampleFromVoxels<AccessorType, 1, false>(acc)(Vec3f(x - 0.5f, y - 0.5f, z - 0.5f)); default: - TrilinearSampler<ReadAccessorT, false> s(root); + SampleFromVoxels<AccessorType, 1, false> s(acc); return kernel_tex_image_interp_tricubic_nanovdb<T>(s, x - 0.5f, y - 0.5f, z - 0.5f); } } diff --git a/intern/cycles/kernel/shaders/node_clamp.osl b/intern/cycles/kernel/shaders/node_clamp.osl index ce9392a0d98..b600fb7c455 100644 --- a/intern/cycles/kernel/shaders/node_clamp.osl +++ b/intern/cycles/kernel/shaders/node_clamp.osl @@ -16,11 +16,12 @@ #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, 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"); 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/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/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index a64662f29a0..40b2d62baac 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -210,7 +210,7 @@ set(SRC intern/pbvh.c intern/pbvh_bmesh.c intern/pointcache.c - intern/pointcloud.c + intern/pointcloud.cc intern/report.c intern/rigidbody.c intern/scene.c diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 71c859e1514..f4f25c3a153 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -58,7 +58,7 @@ #include "DEG_depsgraph.h" #include "RE_pipeline.h" -#include "RE_render_ext.h" +#include "RE_texture.h" #include "SEQ_sequencer.h" diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 806b9ca1416..1b77989c2b8 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -50,7 +50,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -#include "RE_render_ext.h" /* RE_texture_evaluate */ +#include "RE_texture.h" /* RE_texture_evaluate */ #include "BLO_read_write.h" diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 95408c7d01f..b56a15b3d45 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -76,9 +76,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -/* to read material/texture color */ -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "atomic_ops.h" diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index f9d3fff1cec..13e9bb1bf24 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -68,8 +68,7 @@ #include "DEG_depsgraph_physics.h" #include "DEG_depsgraph_query.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" EffectorWeights *BKE_effector_add_weights(Collection *collection) { diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 47d4b70fef5..e6d3696b198 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) || !"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/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 00a81e6ea2d..eb1d77eb0f4 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -80,7 +80,7 @@ # include "DEG_depsgraph.h" # include "DEG_depsgraph_query.h" -# include "RE_shader_ext.h" +# include "RE_texture.h" # include "CLG_log.h" @@ -3207,9 +3207,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 } } 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/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; + } } } diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index aa5e28b35bf..15736011f6f 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; @@ -882,14 +884,9 @@ 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... */ + /* Should not actually be needed here. */ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); } @@ -1069,7 +1066,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 +1227,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 +1287,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 +1329,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 +1338,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 +1349,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 +1563,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 +1606,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 +1696,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 +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 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 +1735,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 +1759,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 +1770,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 +1799,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 +1830,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 @@ -1881,15 +1876,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 +1923,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; } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index f9aa6dcca6a..5b0b1f333f4 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -4868,8 +4868,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; } /** diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index 6c770e53000..1d62a1cce2a 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -47,7 +47,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -#include "RE_render_ext.h" +#include "RE_texture.h" #include "BLI_hash.h" diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 222325727c1..0b331fb88d2 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -83,7 +83,7 @@ #include "DEG_depsgraph_build.h" #include "DEG_depsgraph_query.h" -#include "RE_render_ext.h" +#include "RE_texture.h" #include "BLO_read_write.h" diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 91bdfaeae95..4117dfc0b23 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -83,7 +83,7 @@ #include "PIL_time.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" /* FLUID sim particle import */ #ifdef WITH_FLUID diff --git a/source/blender/blenkernel/intern/pointcloud.c b/source/blender/blenkernel/intern/pointcloud.cc index 62c4c4441ba..cbfb1086e8d 100644 --- a/source/blender/blenkernel/intern/pointcloud.c +++ b/source/blender/blenkernel/intern/pointcloud.cc @@ -67,7 +67,7 @@ static void pointcloud_init_data(ID *id) CustomData_add_layer_named(&pointcloud->pdata, CD_PROP_FLOAT3, CD_CALLOC, - NULL, + nullptr, pointcloud->totpoint, POINTCLOUD_ATTR_POSITION); BKE_pointcloud_update_customdata_pointers(pointcloud); @@ -77,7 +77,7 @@ static void pointcloud_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_s { PointCloud *pointcloud_dst = (PointCloud *)id_dst; const PointCloud *pointcloud_src = (const PointCloud *)id_src; - pointcloud_dst->mat = MEM_dupallocN(pointcloud_dst->mat); + pointcloud_dst->mat = static_cast<Material **>(MEM_dupallocN(pointcloud_dst->mat)); const eCDAllocType alloc_type = (flag & LIB_ID_COPY_CD_REFERENCE) ? CD_REFERENCE : CD_DUPLICATE; CustomData_copy(&pointcloud_src->pdata, @@ -109,7 +109,7 @@ static void pointcloud_blend_write(BlendWriter *writer, ID *id, const void *id_a { PointCloud *pointcloud = (PointCloud *)id; if (pointcloud->id.us > 0 || BLO_write_is_undo(writer)) { - CustomDataLayer *players = NULL, players_buff[CD_TEMP_CHUNK_SIZE]; + CustomDataLayer *players = nullptr, players_buff[CD_TEMP_CHUNK_SIZE]; CustomData_blend_write_prepare( &pointcloud->pdata, &players, players_buff, ARRAY_SIZE(players_buff)); @@ -164,28 +164,28 @@ static void pointcloud_blend_read_expand(BlendExpander *expander, ID *id) } IDTypeInfo IDType_ID_PT = { - .id_code = ID_PT, - .id_filter = FILTER_ID_PT, - .main_listbase_index = INDEX_ID_PT, - .struct_size = sizeof(PointCloud), - .name = "PointCloud", - .name_plural = "pointclouds", - .translation_context = BLT_I18NCONTEXT_ID_POINTCLOUD, - .flags = 0, - - .init_data = pointcloud_init_data, - .copy_data = pointcloud_copy_data, - .free_data = pointcloud_free_data, - .make_local = NULL, - .foreach_id = pointcloud_foreach_id, - .foreach_cache = NULL, - - .blend_write = pointcloud_blend_write, - .blend_read_data = pointcloud_blend_read_data, - .blend_read_lib = pointcloud_blend_read_lib, - .blend_read_expand = pointcloud_blend_read_expand, - - .blend_read_undo_preserve = NULL, + /* id_code */ ID_PT, + /* id_filter */ FILTER_ID_PT, + /* main_listbase_index */ INDEX_ID_PT, + /* struct_size */ sizeof(PointCloud), + /* name */ "PointCloud", + /* name_plural */ "pointclouds", + /* translation_context */ BLT_I18NCONTEXT_ID_POINTCLOUD, + /* flags */ 0, + + /* init_data */ pointcloud_init_data, + /* copy_data */ pointcloud_copy_data, + /* free_data */ pointcloud_free_data, + /* make_local */ nullptr, + /* foreach_id */ pointcloud_foreach_id, + /* foreach_cache */ nullptr, + + /* blend_write */ pointcloud_blend_write, + /* blend_read_data */ pointcloud_blend_read_data, + /* blend_read_lib */ pointcloud_blend_read_lib, + /* blend_read_expand */ pointcloud_blend_read_expand, + + /* blend_read_undo_preserve */ nullptr, }; static void pointcloud_random(PointCloud *pointcloud) @@ -208,21 +208,21 @@ static void pointcloud_random(PointCloud *pointcloud) void *BKE_pointcloud_add(Main *bmain, const char *name) { - PointCloud *pointcloud = BKE_id_new(bmain, ID_PT, name); + PointCloud *pointcloud = static_cast<PointCloud *>(BKE_id_new(bmain, ID_PT, name)); return pointcloud; } void *BKE_pointcloud_add_default(Main *bmain, const char *name) { - PointCloud *pointcloud = BKE_libblock_alloc(bmain, ID_PT, name, 0); + PointCloud *pointcloud = static_cast<PointCloud *>(BKE_libblock_alloc(bmain, ID_PT, name, 0)); pointcloud_init_data(&pointcloud->id); CustomData_add_layer_named(&pointcloud->pdata, CD_PROP_FLOAT, CD_CALLOC, - NULL, + nullptr, pointcloud->totpoint, POINTCLOUD_ATTR_RADIUS); pointcloud_random(pointcloud); @@ -233,14 +233,14 @@ void *BKE_pointcloud_add_default(Main *bmain, const char *name) BoundBox *BKE_pointcloud_boundbox_get(Object *ob) { BLI_assert(ob->type == OB_POINTCLOUD); - PointCloud *pointcloud = ob->data; + PointCloud *pointcloud = static_cast<PointCloud *>(ob->data); - if (ob->runtime.bb != NULL && (ob->runtime.bb->flag & BOUNDBOX_DIRTY) == 0) { + if (ob->runtime.bb != nullptr && (ob->runtime.bb->flag & BOUNDBOX_DIRTY) == 0) { return ob->runtime.bb; } - if (ob->runtime.bb == NULL) { - ob->runtime.bb = MEM_callocN(sizeof(BoundBox), "pointcloud boundbox"); + if (ob->runtime.bb == nullptr) { + ob->runtime.bb = static_cast<BoundBox *>(MEM_callocN(sizeof(BoundBox), "pointcloud boundbox")); float min[3], max[3]; INIT_MINMAX(min, max); @@ -264,10 +264,10 @@ BoundBox *BKE_pointcloud_boundbox_get(Object *ob) void BKE_pointcloud_update_customdata_pointers(PointCloud *pointcloud) { - pointcloud->co = CustomData_get_layer_named( - &pointcloud->pdata, CD_PROP_FLOAT3, POINTCLOUD_ATTR_POSITION); - pointcloud->radius = CustomData_get_layer_named( - &pointcloud->pdata, CD_PROP_FLOAT, POINTCLOUD_ATTR_RADIUS); + pointcloud->co = static_cast<float(*)[3]>( + CustomData_get_layer_named(&pointcloud->pdata, CD_PROP_FLOAT3, POINTCLOUD_ATTR_POSITION)); + pointcloud->radius = static_cast<float *>( + CustomData_get_layer_named(&pointcloud->pdata, CD_PROP_FLOAT, POINTCLOUD_ATTR_RADIUS)); } bool BKE_pointcloud_customdata_required(PointCloud *UNUSED(pointcloud), CustomDataLayer *layer) @@ -279,11 +279,11 @@ bool BKE_pointcloud_customdata_required(PointCloud *UNUSED(pointcloud), CustomDa PointCloud *BKE_pointcloud_new_for_eval(const PointCloud *pointcloud_src, int totpoint) { - PointCloud *pointcloud_dst = BKE_id_new_nomain(ID_PT, NULL); + PointCloud *pointcloud_dst = static_cast<PointCloud *>(BKE_id_new_nomain(ID_PT, nullptr)); CustomData_free(&pointcloud_dst->pdata, pointcloud_dst->totpoint); STRNCPY(pointcloud_dst->id.name, pointcloud_src->id.name); - pointcloud_dst->mat = MEM_dupallocN(pointcloud_src->mat); + pointcloud_dst->mat = static_cast<Material **>(MEM_dupallocN(pointcloud_src->mat)); pointcloud_dst->totcol = pointcloud_src->totcol; pointcloud_dst->totpoint = totpoint; @@ -302,7 +302,7 @@ PointCloud *BKE_pointcloud_copy_for_eval(struct PointCloud *pointcloud_src, bool flags |= LIB_ID_COPY_CD_REFERENCE; } - PointCloud *result = (PointCloud *)BKE_id_copy_ex(NULL, &pointcloud_src->id, NULL, flags); + PointCloud *result = (PointCloud *)BKE_id_copy_ex(nullptr, &pointcloud_src->id, nullptr, flags); return result; } @@ -326,7 +326,7 @@ static PointCloud *pointcloud_evaluate_modifiers(struct Depsgraph *depsgraph, /* Evaluate modifiers. */ for (; md; md = md->next) { - const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type); + const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type); if (!BKE_modifier_is_enabled(scene, md, required_mode)) { continue; @@ -345,7 +345,7 @@ static PointCloud *pointcloud_evaluate_modifiers(struct Depsgraph *depsgraph, BKE_pointcloud_update_customdata_pointers(pointcloud); /* Created deformed coordinates array on demand. */ - mti->deformVerts(md, &mectx, NULL, pointcloud->co, pointcloud->totpoint); + mti->deformVerts(md, &mectx, nullptr, pointcloud->co, pointcloud->totpoint); } else if (mti->modifyPointCloud) { /* Ensure we are not modifying the input. */ @@ -358,7 +358,7 @@ static PointCloud *pointcloud_evaluate_modifiers(struct Depsgraph *depsgraph, if (pointcloud_next && pointcloud_next != pointcloud) { /* If the modifier returned a new pointcloud, release the old one. */ if (pointcloud != pointcloud_input) { - BKE_id_free(NULL, pointcloud); + BKE_id_free(nullptr, pointcloud); } pointcloud = pointcloud_next; } @@ -374,7 +374,7 @@ void BKE_pointcloud_data_update(struct Depsgraph *depsgraph, struct Scene *scene BKE_object_free_derived_caches(object); /* Evaluate modifiers. */ - PointCloud *pointcloud = object->data; + PointCloud *pointcloud = static_cast<PointCloud *>(object->data); PointCloud *pointcloud_eval = pointcloud_evaluate_modifiers( depsgraph, scene, object, pointcloud); @@ -384,8 +384,8 @@ void BKE_pointcloud_data_update(struct Depsgraph *depsgraph, struct Scene *scene } /* Draw Cache */ -void (*BKE_pointcloud_batch_cache_dirty_tag_cb)(PointCloud *pointcloud, int mode) = NULL; -void (*BKE_pointcloud_batch_cache_free_cb)(PointCloud *pointcloud) = NULL; +void (*BKE_pointcloud_batch_cache_dirty_tag_cb)(PointCloud *pointcloud, int mode) = nullptr; +void (*BKE_pointcloud_batch_cache_free_cb)(PointCloud *pointcloud) = nullptr; void BKE_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode) { 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/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; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index a77e0ed2b7d..4c2e4a82acb 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -67,7 +67,7 @@ #include "BKE_scene.h" #include "BKE_texture.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "BLO_read_write.h" 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/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 <tbb/tbb.h> # 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 diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc index 58f78be13b6..1eea58e4eb2 100644 --- a/source/blender/blenlib/intern/mesh_intersect.cc +++ b/source/blender/blenlib/intern/mesh_intersect.cc @@ -24,6 +24,7 @@ # include <algorithm> # include <fstream> # include <iostream> +# include <memory> # include "BLI_allocator.hh" # include "BLI_array.hh" diff --git a/source/blender/blenlib/tests/BLI_map_test.cc b/source/blender/blenlib/tests/BLI_map_test.cc index ecdf2627520..323ced87d9e 100644 --- a/source/blender/blenlib/tests/BLI_map_test.cc +++ b/source/blender/blenlib/tests/BLI_map_test.cc @@ -8,6 +8,7 @@ #include "BLI_timeit.hh" #include "BLI_vector.hh" #include "testing/testing.h" +#include <memory> namespace blender::tests { @@ -419,9 +420,9 @@ TEST(map, Clear) TEST(map, UniquePtrValue) { - auto value1 = std::unique_ptr<int>(std::make_unique<int>()); - auto value2 = std::unique_ptr<int>(std::make_unique<int>()); - auto value3 = std::unique_ptr<int>(std::make_unique<int>()); + auto value1 = std::make_unique<int>(); + auto value2 = std::make_unique<int>(); + auto value3 = std::make_unique<int>(); int *value1_ptr = value1.get(); @@ -429,12 +430,12 @@ TEST(map, UniquePtrValue) map.add_new(1, std::move(value1)); map.add(2, std::move(value2)); map.add_overwrite(3, std::move(value3)); - map.lookup_or_add_cb(4, []() { return std::unique_ptr<int>(std::make_unique<int>()); }); - map.add_new(5, std::unique_ptr<int>(std::make_unique<int>())); - map.add(6, std::unique_ptr<int>(std::make_unique<int>())); - map.add_overwrite(7, std::unique_ptr<int>(std::make_unique<int>())); - map.lookup_or_add(8, std::unique_ptr<int>(std::make_unique<int>())); - map.pop_default(9, std::unique_ptr<int>(std::make_unique<int>())); + map.lookup_or_add_cb(4, []() { return std::make_unique<int>(); }); + map.add_new(5, std::make_unique<int>()); + map.add(6, std::make_unique<int>()); + map.add_overwrite(7, std::make_unique<int>()); + map.lookup_or_add(8, std::make_unique<int>()); + map.pop_default(9, std::make_unique<int>()); EXPECT_EQ(map.lookup(1).get(), value1_ptr); EXPECT_EQ(map.lookup_ptr(100), nullptr); diff --git a/source/blender/blenlib/tests/BLI_set_test.cc b/source/blender/blenlib/tests/BLI_set_test.cc index 840472e4c0b..ea4369d6b8f 100644 --- a/source/blender/blenlib/tests/BLI_set_test.cc +++ b/source/blender/blenlib/tests/BLI_set_test.cc @@ -221,10 +221,10 @@ TEST(set, OftenAddRemoveContained) TEST(set, UniquePtrValues) { Set<std::unique_ptr<int>> set; - set.add_new(std::unique_ptr<int>(std::make_unique<int>())); - auto value1 = std::unique_ptr<int>(std::make_unique<int>()); + set.add_new(std::make_unique<int>()); + auto value1 = std::make_unique<int>(); set.add_new(std::move(value1)); - set.add(std::unique_ptr<int>(std::make_unique<int>())); + set.add(std::make_unique<int>()); EXPECT_EQ(set.size(), 3); } diff --git a/source/blender/blenlib/tests/BLI_stack_cxx_test.cc b/source/blender/blenlib/tests/BLI_stack_cxx_test.cc index 57e7bfdfdce..f1fcdae3a52 100644 --- a/source/blender/blenlib/tests/BLI_stack_cxx_test.cc +++ b/source/blender/blenlib/tests/BLI_stack_cxx_test.cc @@ -170,8 +170,8 @@ TEST(stack, Peek) TEST(stack, UniquePtrValues) { Stack<std::unique_ptr<int>> stack; - stack.push(std::unique_ptr<int>(std::make_unique<int>())); - stack.push(std::unique_ptr<int>(std::make_unique<int>())); + stack.push(std::make_unique<int>()); + stack.push(std::make_unique<int>()); std::unique_ptr<int> a = stack.pop(); std::unique_ptr<int> &b = stack.peek(); UNUSED_VARS(a, b); diff --git a/source/blender/blenlib/tests/BLI_vector_set_test.cc b/source/blender/blenlib/tests/BLI_vector_set_test.cc index cbdc597255a..bbbe96f9b7e 100644 --- a/source/blender/blenlib/tests/BLI_vector_set_test.cc +++ b/source/blender/blenlib/tests/BLI_vector_set_test.cc @@ -142,9 +142,9 @@ TEST(vector_set, AddMultipleTimes) TEST(vector_set, UniquePtrValue) { VectorSet<std::unique_ptr<int>> set; - set.add_new(std::unique_ptr<int>(std::make_unique<int>())); - set.add(std::unique_ptr<int>(std::make_unique<int>())); - set.index_of_try(std::unique_ptr<int>(std::make_unique<int>())); + set.add_new(std::make_unique<int>()); + set.add(std::make_unique<int>()); + set.index_of_try(std::make_unique<int>()); std::unique_ptr<int> value = set.pop(); UNUSED_VARS(value); } diff --git a/source/blender/blenlib/tests/BLI_vector_test.cc b/source/blender/blenlib/tests/BLI_vector_test.cc index 0088ae21983..462f13c15ab 100644 --- a/source/blender/blenlib/tests/BLI_vector_test.cc +++ b/source/blender/blenlib/tests/BLI_vector_test.cc @@ -456,10 +456,10 @@ TEST(vector, AppendNTimes) TEST(vector, UniquePtrValue) { Vector<std::unique_ptr<int>> vec; - vec.append(std::unique_ptr<int>(std::make_unique<int>())); - vec.append(std::unique_ptr<int>(std::make_unique<int>())); - vec.append(std::unique_ptr<int>(std::make_unique<int>())); - vec.append(std::unique_ptr<int>(std::make_unique<int>())); + vec.append(std::make_unique<int>()); + vec.append(std::make_unique<int>()); + vec.append(std::make_unique<int>()); + vec.append(std::make_unique<int>()); EXPECT_EQ(vec.size(), 4); std::unique_ptr<int> &a = vec.last(); 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); 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; diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp index b0d63d7b791..684485c40cb 100644 --- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp +++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp @@ -22,7 +22,7 @@ #include "MEM_guardedalloc.h" -#include "RE_render_ext.h" +#include "RE_texture.h" /* An implementation of the Scale3X edge-extrapolation algorithm. * diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index 3ec54b1c04d..6a16872cae2 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -25,8 +25,7 @@ #include "BLI_threads.h" #include "RE_pipeline.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "render_types.h" diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp index f8fe4eb883c..ae5b7293a8c 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.cpp +++ b/source/blender/compositor/operations/COM_ImageOperation.cpp @@ -27,9 +27,9 @@ #include "IMB_colormanagement.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" + #include "RE_pipeline.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" BaseImageOperation::BaseImageOperation() { diff --git a/source/blender/compositor/operations/COM_ImageOperation.h b/source/blender/compositor/operations/COM_ImageOperation.h index fcffdc7aae9..bff8dcc1cea 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.h +++ b/source/blender/compositor/operations/COM_ImageOperation.h @@ -25,8 +25,7 @@ #include "MEM_guardedalloc.h" #include "RE_pipeline.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" /** * \brief Base class for all image operations diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index 40a68d4f9e2..11f64aa4d6a 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -23,8 +23,7 @@ #include "DNA_scene_types.h" #include "RE_pipeline.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" /* ******** Render Layers Base Prog ******** */ diff --git a/source/blender/compositor/operations/COM_TextureOperation.h b/source/blender/compositor/operations/COM_TextureOperation.h index 7fa85922b0b..a40dafd14cf 100644 --- a/source/blender/compositor/operations/COM_TextureOperation.h +++ b/source/blender/compositor/operations/COM_TextureOperation.h @@ -24,8 +24,7 @@ #include "MEM_guardedalloc.h" #include "RE_pipeline.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" /** * Base class for all renderlayeroperations 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; diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index f51328e9bc9..5a25de1a3ca 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1740,11 +1740,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/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. diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index c8367c720a7..b961f81e16a 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -75,7 +75,7 @@ #include "ED_uvedit.h" #include "ED_view3d.h" -#include "RE_render_ext.h" +#include "RE_texture.h" #include "UI_interface.h" #include "UI_resources.h" diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index bb8597bf02c..008498a1735 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -53,7 +53,7 @@ #include "RE_multires_bake.h" #include "RE_pipeline.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "PIL_time.h" diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 4afa45893f9..095deccada0 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -86,7 +86,7 @@ #include "RE_engine.h" #include "RE_pipeline.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index fa79bd8ee93..6139adaea1a 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -64,7 +64,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -#include "RE_render_ext.h" +#include "RE_texture.h" #include "ED_screen.h" #include "ED_view3d.h" diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 421a3653d8c..087cee52585 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2828,9 +2828,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); } 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 0d7255b5558..8de7c233728 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; @@ -1343,7 +1356,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 +1388,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 +1398,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 fb8168511c3..0459d669789 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -262,6 +262,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, @@ -536,7 +538,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 703624f5735..044d75b4722 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1494,6 +1494,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, * @@ -1516,7 +1527,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; } @@ -1686,7 +1697,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; } @@ -1880,7 +1891,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; @@ -1888,10 +1899,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)); } } @@ -1918,7 +1929,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; 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) 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, diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp index e61ab2fe8c4..d66a74bc83f 100644 --- a/source/blender/freestyle/intern/python/BPy_BBox.cpp +++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp @@ -80,7 +80,11 @@ PyTypeObject BBox_Type = { sizeof(BPy_BBox), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BBox_dealloc, /* tp_dealloc */ - 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 a24a0308017..2359d79f7d0 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -153,39 +153,43 @@ PyTypeObject BinaryPredicate0D_Type = { sizeof(BPy_BinaryPredicate0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)BinaryPredicate0D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)BinaryPredicate0D___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + BinaryPredicate0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_BinaryPredicate0D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BinaryPredicate0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 0120f325f7b..7d554e0abe1 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -187,39 +187,43 @@ PyTypeObject BinaryPredicate1D_Type = { sizeof(BPy_BinaryPredicate1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)BinaryPredicate1D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)BinaryPredicate1D___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + BinaryPredicate1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_BinaryPredicate1D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BinaryPredicate1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index 4df4031e7ce..2aa08ec3ab5 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -538,39 +538,43 @@ PyTypeObject FrsMaterial_Type = { sizeof(BPy_FrsMaterial), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)FrsMaterial_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)FrsMaterial_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + (hashfunc)FrsMaterial_hash, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FrsMaterial_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + (richcmpfunc)BPy_FrsMaterial_richcmpr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_FrsMaterial_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FrsMaterial_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp index a62b5896164..943a9ca0e64 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp @@ -330,39 +330,43 @@ PyTypeObject FrsNoise_Type = { sizeof(BPy_FrsNoise), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)FrsNoise_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)FrsNoise_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + 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 a9baef10383..323e76fe249 100644 --- a/source/blender/freestyle/intern/python/BPy_Id.cpp +++ b/source/blender/freestyle/intern/python/BPy_Id.cpp @@ -167,11 +167,15 @@ 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 */ - 0, /* tp_print */ + PyVarObject_HEAD_INIT(nullptr, 0) "Id", /* tp_name */ + sizeof(BPy_Id), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)Id_dealloc, /* tp_dealloc */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif nullptr, /* tp_getattr */ nullptr, /* tp_setattr */ nullptr, /* tp_reserved */ diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp index ea3be83ba8d..25f3c54ea7d 100644 --- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp @@ -153,39 +153,43 @@ PyTypeObject IntegrationType_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + IntegrationType_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &PyLong_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /*-----------------------BPy_IntegrationType instance definitions -------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index 3f55795ad75..3d0c57d5509 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -313,39 +313,43 @@ PyTypeObject Interface0D_Type = { sizeof(BPy_Interface0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Interface0D_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)Interface0D_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Interface0D_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Interface0D_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Interface0D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Interface0D_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index d34468d4e25..8a4a6eb61db 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -341,39 +341,43 @@ PyTypeObject Interface1D_Type = { sizeof(BPy_Interface1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Interface1D_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)Interface1D_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Interface1D_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Interface1D_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Interface1D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Interface1D_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index e0645a19e61..bee30aa9e8c 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -228,39 +228,43 @@ PyTypeObject Iterator_Type = { sizeof(BPy_Iterator), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Iterator_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)Iterator_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Iterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Iterator_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Iterator_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Iterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp index b00cbecb4b4..547f46839b8 100644 --- a/source/blender/freestyle/intern/python/BPy_MediumType.cpp +++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp @@ -45,39 +45,43 @@ PyTypeObject MediumType_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + MediumType_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &PyLong_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /*-----------------------BPy_IntegrationType instance definitions -------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp index af4d26586b4..b0a620803d1 100644 --- a/source/blender/freestyle/intern/python/BPy_Nature.cpp +++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp @@ -107,39 +107,43 @@ PyTypeObject Nature_Type = { sizeof(PyLongObject), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + &nature_as_number, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + Nature_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &PyLong_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /*-----------------------BPy_Nature instance definitions ----------------------------------*/ diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 2106842c0e9..5fd02e4a9dd 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -770,39 +770,43 @@ PyTypeObject Operators_Type = { sizeof(BPy_Operators), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)Operators_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + Operators_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_Operators_methods, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index a4517ce5669..ed83e76559f 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -281,39 +281,43 @@ PyTypeObject SShape_Type = { sizeof(BPy_SShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SShape_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)SShape_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + 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 cba9c778f34..8f706f56f7d 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -677,39 +677,43 @@ PyTypeObject StrokeAttribute_Type = { sizeof(BPy_StrokeAttribute), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)StrokeAttribute_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)StrokeAttribute_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + StrokeAttribute_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_StrokeAttribute_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_StrokeAttribute_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeAttribute_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index 4da327f32e4..b55da256c22 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -282,39 +282,43 @@ PyTypeObject StrokeShader_Type = { sizeof(BPy_StrokeShader), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)StrokeShader___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)StrokeShader___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + StrokeShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_StrokeShader_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_StrokeShader_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index 2d0c6f14452..78c93ddce31 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -124,39 +124,43 @@ PyTypeObject UnaryFunction0D_Type = { sizeof(BPy_UnaryFunction0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction0D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index 9fe12559f23..365850b748c 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -118,39 +118,43 @@ PyTypeObject UnaryFunction1D_Type = { sizeof(BPy_UnaryFunction1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + nullptr, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index 63dbaa68095..e3076d4615f 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -167,39 +167,43 @@ PyTypeObject UnaryPredicate0D_Type = { sizeof(BPy_UnaryPredicate0D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryPredicate0D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryPredicate0D___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryPredicate0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryPredicate0D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryPredicate0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index cdc14cbaa86..4b5269a1434 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -225,39 +225,43 @@ PyTypeObject UnaryPredicate1D_Type = { sizeof(BPy_UnaryPredicate1D), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryPredicate1D___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryPredicate1D___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryPredicate1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryPredicate1D_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryPredicate1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp index f4a980bd095..8565a95fc1a 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp @@ -184,39 +184,43 @@ PyTypeObject ViewMap_Type = { sizeof(BPy_ViewMap), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ViewMap_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)ViewMap_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + 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 7eae62117be..6c8551867fd 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -352,39 +352,43 @@ PyTypeObject ViewShape_Type = { sizeof(BPy_ViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ViewShape_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)ViewShape_repr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ViewShape_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewShape_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewShape_getseters, /* tp_getset */ + nullptr, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewShape_init, /* tp_init */ + nullptr, /* tp_alloc */ + PyType_GenericNew, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp index 0c01f4c7349..e284f28cd0b 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp @@ -59,39 +59,43 @@ PyTypeObject FalseBP1D_Type = { sizeof(BPy_FalseBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FalseBP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FalseBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp index 661470d1956..2c84f69dd6e 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp @@ -61,39 +61,43 @@ PyTypeObject Length2DBP1D_Type = { sizeof(BPy_Length2DBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Length2DBP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Length2DBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp index a1477f4ca49..ab79ae4e209 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp @@ -60,39 +60,43 @@ PyTypeObject SameShapeIdBP1D_Type = { sizeof(BPy_SameShapeIdBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SameShapeIdBP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SameShapeIdBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp index 089d72c11f8..47c3c6b53aa 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp @@ -60,39 +60,43 @@ PyTypeObject TrueBP1D_Type = { sizeof(BPy_TrueBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + TrueBP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TrueBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index 21b9fcc2ef6..9d69b1c902c 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -90,39 +90,43 @@ PyTypeObject ViewMapGradientNormBP1D_Type = { sizeof(BPy_ViewMapGradientNormBP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ViewMapGradientNormBP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &BinaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewMapGradientNormBP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index 8ae5bbb14fe..f70f70275df 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -242,39 +242,43 @@ PyTypeObject CurvePoint_Type = { sizeof(BPy_CurvePoint), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + CurvePoint_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_CurvePoint_getseters, /* tp_getset */ + &Interface0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CurvePoint_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index 1931889df4c..b245ecd81f1 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -455,39 +455,43 @@ PyTypeObject SVertex_Type = { sizeof(BPy_SVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SVertex_doc, /* tp_doc */ + 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 c273cb6446a..696b3022e85 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -164,39 +164,43 @@ PyTypeObject ViewVertex_Type = { sizeof(BPy_ViewVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ViewVertex_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewVertex_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewVertex_getseters, /* tp_getset */ + &Interface0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewVertex_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index 805b6a933fa..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,39 +361,43 @@ PyTypeObject StrokeVertex_Type = { sizeof(BPy_StrokeVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + StrokeVertex_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_StrokeVertex_getseters, /* tp_getset */ + &CurvePoint_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeVertex_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp index 6713106d323..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,39 +109,43 @@ PyTypeObject NonTVertex_Type = { sizeof(BPy_NonTVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + NonTVertex_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_NonTVertex_getseters, /* tp_getset */ + &ViewVertex_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)NonTVertex_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp index cc413b26fcd..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,39 +219,43 @@ PyTypeObject TVertex_Type = { sizeof(BPy_TVertex), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + TVertex_doc, /* tp_doc */ + 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 9d16e88f305..0438abfd38c 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -358,39 +358,43 @@ PyTypeObject FEdge_Type = { sizeof(BPy_FEdge), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + &BPy_FEdge_as_sequence, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + 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 4fedbcf1513..d77a8007b1a 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp @@ -190,39 +190,43 @@ PyTypeObject FrsCurve_Type = { sizeof(BPy_FrsCurve), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FrsCurve_doc, /* tp_doc */ + 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 87d0899746e..90cc3e4f1ab 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -501,39 +501,43 @@ PyTypeObject Stroke_Type = { sizeof(BPy_Stroke), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + &BPy_Stroke_as_sequence, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + 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 fbc65fb67b8..c416d860c77 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -386,39 +386,43 @@ PyTypeObject ViewEdge_Type = { sizeof(BPy_ViewEdge), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ViewEdge_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewEdge_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewEdge_getseters, /* tp_getset */ + &Interface1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewEdge_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp index f932b13a232..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,39 +150,43 @@ PyTypeObject Chain_Type = { sizeof(BPy_Chain), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Chain_doc, /* tp_doc */ + 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 df270da2791..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,39 +408,43 @@ PyTypeObject FEdgeSharp_Type = { sizeof(BPy_FEdgeSharp), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FEdgeSharp_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_FEdgeSharp_getseters, /* tp_getset */ + &FEdge_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FEdgeSharp_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index f9144e3f15e..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,39 +253,43 @@ PyTypeObject FEdgeSmooth_Type = { sizeof(BPy_FEdgeSmooth), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FEdgeSmooth_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_FEdgeSmooth_getseters, /* tp_getset */ + &FEdge_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FEdgeSmooth_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index 778129653fb..9f5f8d07e26 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -186,39 +186,43 @@ PyTypeObject AdjacencyIterator_Type = { sizeof(BPy_AdjacencyIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + AdjacencyIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)AdjacencyIterator_iter, /* tp_iter */ + (iternextfunc)AdjacencyIterator_iternext, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_AdjacencyIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)AdjacencyIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index 18124567f7d..e4cd1cd073b 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -167,39 +167,43 @@ PyTypeObject ChainPredicateIterator_Type = { sizeof(BPy_ChainPredicateIterator), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)ChainPredicateIterator_dealloc, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ChainPredicateIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &ChainingIterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ChainPredicateIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index 8f7d6a6221d..9aa8984f4af 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -121,39 +121,43 @@ PyTypeObject ChainSilhouetteIterator_Type = { sizeof(BPy_ChainSilhouetteIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ChainSilhouetteIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &ChainingIterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ChainSilhouetteIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index 25cde7da48c..f2441fa9d18 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -255,39 +255,43 @@ PyTypeObject ChainingIterator_Type = { sizeof(BPy_ChainingIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ChainingIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ChainingIterator_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ChainingIterator_getseters, /* tp_getset */ + &ViewEdgeIterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ChainingIterator___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index 0f27b7f0a62..ff710e931d4 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -135,39 +135,43 @@ PyTypeObject CurvePointIterator_Type = { sizeof(BPy_CurvePointIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + CurvePointIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_CurvePointIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CurvePointIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index d16f06bbbbb..d0de53fa424 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -210,39 +210,43 @@ PyTypeObject Interface0DIterator_Type = { sizeof(BPy_Interface0DIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Interface0DIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)Interface0DIterator_iter, /* tp_iter */ + (iternextfunc)Interface0DIterator_iternext, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_Interface0DIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Interface0DIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp index 00dcafcbcbf..c0db79858b7 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -162,39 +162,43 @@ PyTypeObject SVertexIterator_Type = { sizeof(BPy_SVertexIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SVertexIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_SVertexIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SVertexIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 8bc95394725..ceb0d2a7546 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -293,39 +293,43 @@ PyTypeObject StrokeVertexIterator_Type = { sizeof(BPy_StrokeVertexIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + StrokeVertexIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)StrokeVertexIterator_iter, /* tp_iter */ + (iternextfunc)StrokeVertexIterator_iternext, /* tp_iternext */ + BPy_StrokeVertexIterator_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_StrokeVertexIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeVertexIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index e24314594a4..e01bbe928ce 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -240,39 +240,43 @@ PyTypeObject ViewEdgeIterator_Type = { sizeof(BPy_ViewEdgeIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ViewEdgeIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + BPy_ViewEdgeIterator_methods, /* tp_methods */ + nullptr, /* tp_members */ + BPy_ViewEdgeIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ViewEdgeIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index 70bea8a0d44..735746e33be 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -144,39 +144,43 @@ PyTypeObject orientedViewEdgeIterator_Type = { sizeof(BPy_orientedViewEdgeIterator), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + orientedViewEdgeIterator_doc, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc)orientedViewEdgeIterator_iter, /* tp_iter */ + (iternextfunc)orientedViewEdgeIterator_iternext, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_orientedViewEdgeIterator_getseters, /* tp_getset */ + &Iterator_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)orientedViewEdgeIterator_init, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp index 55dcafb187e..c3b98d12918 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp @@ -71,39 +71,43 @@ PyTypeObject BackboneStretcherShader_Type = { sizeof(BPy_BackboneStretcherShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + BackboneStretcherShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BackboneStretcherShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp index 94b7a32b6f2..50fc9938a87 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp @@ -71,39 +71,43 @@ PyTypeObject BezierCurveShader_Type = { sizeof(BPy_BezierCurveShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + BezierCurveShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BezierCurveShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp index 525681d16ea..e1198266a98 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.cpp @@ -91,39 +91,43 @@ PyTypeObject BlenderTextureShader_Type = { sizeof(BPy_BlenderTextureShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + BlenderTextureShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)BlenderTextureShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp index 79084843443..e8790df2dd0 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp @@ -89,39 +89,43 @@ PyTypeObject CalligraphicShader_Type = { sizeof(BPy_CalligraphicShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + CalligraphicShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CalligraphicShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp index 50af76a06b9..8fb6e26d8d7 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp @@ -70,39 +70,43 @@ PyTypeObject ColorNoiseShader_Type = { sizeof(BPy_ColorNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ColorNoiseShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ColorNoiseShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp index 7c6c4da80ec..2b108226e90 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp @@ -76,39 +76,43 @@ PyTypeObject ConstantColorShader_Type = { sizeof(BPy_ConstantColorShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ConstantColorShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ConstantColorShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp index 2db898f2e36..0174107f27f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp @@ -70,39 +70,43 @@ PyTypeObject ConstantThicknessShader_Type = { sizeof(BPy_ConstantThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ConstantThicknessShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ConstantThicknessShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp index 8a6ccc61a1a..b5c200c17b1 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp @@ -76,25 +76,29 @@ PyTypeObject ConstrainedIncreasingThicknessShader_Type = { sizeof(BPy_ConstrainedIncreasingThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ConstrainedIncreasingThicknessShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ 0, /* tp_weaklistoffset */ nullptr, /* tp_iter */ nullptr, /* tp_iternext */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp index 0a5486aeb75..d1c3219b079 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp @@ -78,39 +78,43 @@ PyTypeObject GuidingLinesShader_Type = { sizeof(BPy_GuidingLinesShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GuidingLinesShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GuidingLinesShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp index 9f9dfd8c633..7d1efebe71f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp @@ -98,39 +98,43 @@ PyTypeObject IncreasingColorShader_Type = { sizeof(BPy_IncreasingColorShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + IncreasingColorShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)IncreasingColorShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp index a807fd821bc..f13930bd4b3 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp @@ -76,39 +76,43 @@ PyTypeObject IncreasingThicknessShader_Type = { sizeof(BPy_IncreasingThicknessShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + IncreasingThicknessShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)IncreasingThicknessShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp index 6e0b3614114..48c63554f06 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp @@ -77,39 +77,43 @@ PyTypeObject PolygonalizationShader_Type = { sizeof(BPy_PolygonalizationShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + PolygonalizationShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)PolygonalizationShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp index 3b976450464..5f0a0bfb305 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp @@ -68,39 +68,43 @@ PyTypeObject SamplingShader_Type = { sizeof(BPy_SamplingShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SamplingShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SamplingShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp index 968abb9d75e..3d30fb4e11b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp @@ -100,39 +100,43 @@ PyTypeObject SmoothingShader_Type = { sizeof(BPy_SmoothingShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SmoothingShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SmoothingShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp index bdff11f347c..876dd5f2f63 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp @@ -94,39 +94,43 @@ PyTypeObject SpatialNoiseShader_Type = { sizeof(BPy_SpatialNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SpatialNoiseShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)SpatialNoiseShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp index 8f8ef76dc69..bd70d41717b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureStepShader.cpp @@ -70,39 +70,43 @@ PyTypeObject StrokeTextureStepShader_Type = { sizeof(BPy_StrokeTextureStepShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + StrokeTextureStepShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)StrokeTextureStepShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp index e601028a1e2..fd7f5fabe77 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp @@ -72,39 +72,43 @@ PyTypeObject ThicknessNoiseShader_Type = { sizeof(BPy_ThicknessNoiseShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ThicknessNoiseShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ThicknessNoiseShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp index be563b641d7..ed575b12b8d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp @@ -69,39 +69,43 @@ PyTypeObject TipRemoverShader_Type = { sizeof(BPy_TipRemoverShader), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + TipRemoverShader___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &StrokeShader_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TipRemoverShader___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index 8507b525cfb..5ce96212031 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -187,39 +187,43 @@ PyTypeObject UnaryFunction0DDouble_Type = { sizeof(BPy_UnaryFunction0DDouble), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DDouble___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DDouble___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DDouble___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DDouble___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index f48bc871855..8c988d55c91 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -126,39 +126,43 @@ PyTypeObject UnaryFunction0DEdgeNature_Type = { sizeof(BPy_UnaryFunction0DEdgeNature), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DEdgeNature___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DEdgeNature___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DEdgeNature___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DEdgeNature___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index 6bf545d217d..25b19e84b60 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -163,39 +163,43 @@ PyTypeObject UnaryFunction0DFloat_Type = { sizeof(BPy_UnaryFunction0DFloat), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DFloat___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DFloat___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DFloat___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DFloat___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index 39c73e2545c..b2426cab572 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -122,39 +122,43 @@ PyTypeObject UnaryFunction0DId_Type = { sizeof(BPy_UnaryFunction0DId), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DId___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DId___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DId___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DId___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index dcebed1ec9f..77f89265ba4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -125,39 +125,43 @@ PyTypeObject UnaryFunction0DMaterial_Type = { sizeof(BPy_UnaryFunction0DMaterial), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DMaterial___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DMaterial___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DMaterial___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DMaterial___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index f93eeb0fc88..52f990502ef 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -126,39 +126,43 @@ PyTypeObject UnaryFunction0DUnsigned_Type = { sizeof(BPy_UnaryFunction0DUnsigned), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DUnsigned___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DUnsigned___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DUnsigned___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DUnsigned___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index 6ba95a3f080..45e1144cd32 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -131,39 +131,43 @@ PyTypeObject UnaryFunction0DVec2f_Type = { sizeof(BPy_UnaryFunction0DVec2f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DVec2f___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DVec2f___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DVec2f___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DVec2f___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index f6e4f281f34..18eeae86dd7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -124,39 +124,43 @@ PyTypeObject UnaryFunction0DVec3f_Type = { sizeof(BPy_UnaryFunction0DVec3f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DVec3f___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DVec3f___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DVec3f___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DVec3f___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 53a838e8d42..28c4425b2a4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -135,39 +135,43 @@ PyTypeObject UnaryFunction0DVectorViewShape_Type = { sizeof(BPy_UnaryFunction0DVectorViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DVectorViewShape___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DVectorViewShape___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index 9ad621da7c5..75773aaa8d0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -133,39 +133,43 @@ PyTypeObject UnaryFunction0DViewShape_Type = { sizeof(BPy_UnaryFunction0DViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction0DViewShape___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction0DViewShape___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction0DViewShape___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction0DViewShape___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp index 066ce2a8da4..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,39 +74,43 @@ PyTypeObject ShapeIdF0D_Type = { sizeof(BPy_ShapeIdF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ShapeIdF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DId_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ShapeIdF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp index a9a4a897b29..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,39 +77,43 @@ PyTypeObject MaterialF0D_Type = { sizeof(BPy_MaterialF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + MaterialF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DMaterial_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)MaterialF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp index bf57da163e8..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,39 +68,43 @@ PyTypeObject CurveNatureF0D_Type = { sizeof(BPy_CurveNatureF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + CurveNatureF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DEdgeNature_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CurveNatureF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp index eadf190c6ea..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,39 +70,43 @@ PyTypeObject Normal2DF0D_Type = { sizeof(BPy_Normal2DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Normal2DF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DVec2f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Normal2DF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp index 54621c3b5d8..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,39 +72,43 @@ PyTypeObject VertexOrientation2DF0D_Type = { sizeof(BPy_VertexOrientation2DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + VertexOrientation2DF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DVec2f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)VertexOrientation2DF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp index 1a1143a561f..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,39 +72,43 @@ PyTypeObject VertexOrientation3DF0D_Type = { sizeof(BPy_VertexOrientation3DF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + VertexOrientation3DF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DVec3f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)VertexOrientation3DF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp index 6220ac22a59..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,39 +67,43 @@ PyTypeObject GetOccludeeF0D_Type = { sizeof(BPy_GetOccludeeF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetOccludeeF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetOccludeeF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp index 98c5bc1936f..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,39 +67,43 @@ PyTypeObject GetShapeF0D_Type = { sizeof(BPy_GetShapeF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetShapeF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetShapeF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp index fd14c6475e1..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,39 +72,43 @@ PyTypeObject Curvature2DAngleF0D_Type = { sizeof(BPy_Curvature2DAngleF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Curvature2DAngleF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Curvature2DAngleF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp index 8a77e417ab9..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,39 +77,43 @@ PyTypeObject DensityF0D_Type = { sizeof(BPy_DensityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + DensityF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)DensityF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp index 8d981cabe0d..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,39 +67,43 @@ PyTypeObject GetProjectedXF0D_Type = { sizeof(BPy_GetProjectedXF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetProjectedXF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedXF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp index 4bbb9c0a547..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,39 +67,43 @@ PyTypeObject GetProjectedYF0D_Type = { sizeof(BPy_GetProjectedYF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetProjectedYF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedYF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp index 9b1182f3b94..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,39 +67,43 @@ PyTypeObject GetProjectedZF0D_Type = { sizeof(BPy_GetProjectedZF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetProjectedZF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedZF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp index ec9bc953786..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,39 +67,43 @@ PyTypeObject GetXF0D_Type = { sizeof(BPy_GetXF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetXF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + 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 3d194d5465a..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,39 +67,43 @@ PyTypeObject GetYF0D_Type = { sizeof(BPy_GetYF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetYF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + 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 3b72e1beb39..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,39 +67,43 @@ PyTypeObject GetZF0D_Type = { sizeof(BPy_GetZF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetZF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + 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 df2bf54354e..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,39 +75,43 @@ PyTypeObject LocalAverageDepthF0D_Type = { sizeof(BPy_LocalAverageDepthF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + LocalAverageDepthF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)LocalAverageDepthF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp index f4c95cdc765..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,39 +72,43 @@ PyTypeObject ZDiscontinuityF0D_Type = { sizeof(BPy_ZDiscontinuityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ZDiscontinuityF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ZDiscontinuityF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp index 71353f8772e..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,39 +70,43 @@ PyTypeObject GetCurvilinearAbscissaF0D_Type = { sizeof(BPy_GetCurvilinearAbscissaF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetCurvilinearAbscissaF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetCurvilinearAbscissaF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp index d8bb89a3d1c..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,39 +66,43 @@ PyTypeObject GetParameterF0D_Type = { sizeof(BPy_GetParameterF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetParameterF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetParameterF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp index c08cdd544f8..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,39 +75,43 @@ PyTypeObject GetViewMapGradientNormF0D_Type = { sizeof(BPy_GetViewMapGradientNormF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetViewMapGradientNormF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetViewMapGradientNormF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp index fa4a7f997fd..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,39 +73,43 @@ PyTypeObject ReadCompleteViewMapPixelF0D_Type = { sizeof(BPy_ReadCompleteViewMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ReadCompleteViewMapPixelF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ReadCompleteViewMapPixelF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp index 4a7617a2f4e..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,39 +74,43 @@ PyTypeObject ReadMapPixelF0D_Type = { sizeof(BPy_ReadMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ReadMapPixelF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ReadMapPixelF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp index 980d5d20d69..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,39 +77,43 @@ PyTypeObject ReadSteerableViewMapPixelF0D_Type = { sizeof(BPy_ReadSteerableViewMapPixelF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ReadSteerableViewMapPixelF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DFloat_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ReadSteerableViewMapPixelF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp index 4741bdaa1ad..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,39 +75,43 @@ PyTypeObject QuantitativeInvisibilityF0D_Type = { sizeof(BPy_QuantitativeInvisibilityF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + QuantitativeInvisibilityF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DUnsigned_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)QuantitativeInvisibilityF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp index 7f07b70fc1b..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,39 +68,43 @@ PyTypeObject GetOccludersF0D_Type = { sizeof(BPy_GetOccludersF0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetOccludersF0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction0DVectorViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetOccludersF0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index eb7e36ba42c..57b2d61d5c1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -268,39 +268,43 @@ PyTypeObject UnaryFunction1DDouble_Type = { sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DDouble___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DDouble_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DDouble___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index 7f9285f0a96..a987dbb67f5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -175,39 +175,43 @@ PyTypeObject UnaryFunction1DEdgeNature_Type = { sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DEdgeNature___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DEdgeNature_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DEdgeNature___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index e547aec8922..66499c68c65 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -164,39 +164,43 @@ PyTypeObject UnaryFunction1DFloat_Type = { sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DFloat___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DFloat_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DFloat___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index 911659bbd5c..54c5c786367 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -175,39 +175,43 @@ PyTypeObject UnaryFunction1DUnsigned_Type = { sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DUnsigned___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DUnsigned_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DUnsigned___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index 11139df39d1..8b23163fc95 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -179,39 +179,43 @@ PyTypeObject UnaryFunction1DVec2f_Type = { sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DVec2f___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DVec2f_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DVec2f___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index 7ae93b8301f..9b6a2445588 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -172,39 +172,43 @@ PyTypeObject UnaryFunction1DVec3f_Type = { sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DVec3f___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DVec3f_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DVec3f___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index 4d7fe673066..c95595dc953 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -200,39 +200,43 @@ PyTypeObject UnaryFunction1DVectorViewShape_Type = { sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DVectorViewShape___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DVectorViewShape___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index 6c16226881a..b258b0b27f7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -187,39 +187,43 @@ PyTypeObject UnaryFunction1DVoid_Type = { sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + (reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + (ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + UnaryFunction1DVoid___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + BPy_UnaryFunction1DVoid_getseters, /* tp_getset */ + &UnaryFunction1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)UnaryFunction1DVoid___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp index 483dbc09ff7..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,39 +80,43 @@ PyTypeObject CurveNatureF1D_Type = { sizeof(BPy_CurveNatureF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + CurveNatureF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DEdgeNature_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)CurveNatureF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp index 1f4a7c9b143..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,39 +74,43 @@ PyTypeObject Normal2DF1D_Type = { sizeof(BPy_Normal2DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Normal2DF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVec2f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Normal2DF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp index 43f2aee965b..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,39 +74,43 @@ PyTypeObject Orientation2DF1D_Type = { sizeof(BPy_Orientation2DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Orientation2DF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVec2f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Orientation2DF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp index 439b1eeb230..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,39 +74,43 @@ PyTypeObject Orientation3DF1D_Type = { sizeof(BPy_Orientation3DF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Orientation3DF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVec3f_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Orientation3DF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp index 8c5cdb83fa5..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,39 +75,43 @@ PyTypeObject Curvature2DAngleF1D_Type = { sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + Curvature2DAngleF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)Curvature2DAngleF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp index 5b428c7f70d..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,39 +88,43 @@ PyTypeObject DensityF1D_Type = { sizeof(BPy_DensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + DensityF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)DensityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp index b9fb654b582..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,39 +92,43 @@ PyTypeObject GetCompleteViewMapDensityF1D_Type = { sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetCompleteViewMapDensityF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp index 287015da8b8..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,39 +99,43 @@ PyTypeObject GetDirectionalViewMapDensityF1D_Type = { sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetDirectionalViewMapDensityF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetDirectionalViewMapDensityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp index 8183c73ddde..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,39 +74,43 @@ PyTypeObject GetProjectedXF1D_Type = { sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetProjectedXF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedXF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp index 41b72616140..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,39 +74,43 @@ PyTypeObject GetProjectedYF1D_Type = { sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetProjectedYF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedYF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp index cc1a4f82a18..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,39 +74,43 @@ PyTypeObject GetProjectedZF1D_Type = { sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetProjectedZF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetProjectedZF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp index ee258bc5a88..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,39 +89,43 @@ PyTypeObject GetSteerableViewMapDensityF1D_Type = { sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetSteerableViewMapDensityF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetSteerableViewMapDensityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp index 2c2b07ef45b..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,39 +89,43 @@ PyTypeObject GetViewMapGradientNormF1D_Type = { sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetViewMapGradientNormF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetViewMapGradientNormF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp index 3e7ead21171..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,39 +74,43 @@ PyTypeObject GetXF1D_Type = { sizeof(BPy_GetXF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetXF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + 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 26192555156..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,39 +73,43 @@ PyTypeObject GetYF1D_Type = { sizeof(BPy_GetYF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetYF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + 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 8426a067dff..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,39 +74,43 @@ PyTypeObject GetZF1D_Type = { sizeof(BPy_GetZF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetZF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + 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 6e31d2828f5..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,39 +84,43 @@ PyTypeObject LocalAverageDepthF1D_Type = { sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + LocalAverageDepthF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)LocalAverageDepthF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp index f30641f1134..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,39 +78,43 @@ PyTypeObject ZDiscontinuityF1D_Type = { sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ZDiscontinuityF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DDouble_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ZDiscontinuityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp index ae079b7a955..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,39 +80,43 @@ PyTypeObject QuantitativeInvisibilityF1D_Type = { sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + QuantitativeInvisibilityF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DUnsigned_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)QuantitativeInvisibilityF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp index af7b658db5a..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,39 +67,43 @@ PyTypeObject GetOccludeeF1D_Type = { sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetOccludeeF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVectorViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetOccludeeF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp index 2f38dda2533..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,39 +67,43 @@ PyTypeObject GetOccludersF1D_Type = { sizeof(BPy_GetOccludersF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetOccludersF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVectorViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetOccludersF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp index 8d53edbb6cc..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,39 +67,43 @@ PyTypeObject GetShapeF1D_Type = { sizeof(BPy_GetShapeF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + GetShapeF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVectorViewShape_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)GetShapeF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp index 43f20a66841..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,39 +67,43 @@ PyTypeObject ChainingTimeStampF1D_Type = { sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ChainingTimeStampF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVoid_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ChainingTimeStampF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp index e607166d7f7..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,39 +67,43 @@ PyTypeObject IncrementChainingTimeStampF1D_Type = { sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + IncrementChainingTimeStampF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVoid_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)IncrementChainingTimeStampF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp index 6ec5de9f6b1..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,39 +65,43 @@ PyTypeObject TimeStampF1D_Type = { sizeof(BPy_TimeStampF1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + TimeStampF1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryFunction1DVoid_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TimeStampF1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp index eef09cdf0c7..227aca2b5c6 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp @@ -58,39 +58,43 @@ PyTypeObject FalseUP0D_Type = { sizeof(BPy_FalseUP0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FalseUP0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FalseUP0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp index c1db96b4ecf..5f5c756b28d 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp @@ -58,39 +58,43 @@ PyTypeObject TrueUP0D_Type = { sizeof(BPy_TrueUP0D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + TrueUP0D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate0D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TrueUP0D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp index 6552a165a1c..b3f9c225931 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp @@ -59,39 +59,43 @@ PyTypeObject ContourUP1D_Type = { sizeof(BPy_ContourUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ContourUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ContourUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp index b76c3c670ed..f865fe5013d 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp @@ -75,39 +75,43 @@ PyTypeObject DensityLowerThanUP1D_Type = { sizeof(BPy_DensityLowerThanUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + DensityLowerThanUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)DensityLowerThanUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp index 0200c52b70c..154b44ff81a 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp @@ -70,39 +70,43 @@ PyTypeObject EqualToChainingTimeStampUP1D_Type = { sizeof(BPy_EqualToChainingTimeStampUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + EqualToChainingTimeStampUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)EqualToChainingTimeStampUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp index b7d0f0d8221..2bb9dbaf484 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp @@ -69,39 +69,43 @@ PyTypeObject EqualToTimeStampUP1D_Type = { sizeof(BPy_EqualToTimeStampUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + EqualToTimeStampUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)EqualToTimeStampUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp index d5d79fefe7c..7b9923d7b6c 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp @@ -63,39 +63,43 @@ PyTypeObject ExternalContourUP1D_Type = { sizeof(BPy_ExternalContourUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ExternalContourUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ExternalContourUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp index 11dafb7bd0f..ec1a02e13aa 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp @@ -58,39 +58,43 @@ PyTypeObject FalseUP1D_Type = { sizeof(BPy_FalseUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + FalseUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)FalseUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp index 335df44ff5f..b9a76f91c21 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp @@ -74,39 +74,43 @@ PyTypeObject QuantitativeInvisibilityUP1D_Type = { sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + QuantitativeInvisibilityUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)QuantitativeInvisibilityUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp index 13ffba9924b..68f0ea7a913 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp @@ -70,39 +70,43 @@ PyTypeObject ShapeUP1D_Type = { sizeof(BPy_ShapeUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + ShapeUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)ShapeUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp index 9388edf4d74..362bcc4cea8 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp @@ -58,39 +58,43 @@ PyTypeObject TrueUP1D_Type = { sizeof(BPy_TrueUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + TrueUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)TrueUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp index 84da1f2e280..9329e3a7628 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp @@ -71,39 +71,43 @@ PyTypeObject WithinImageBoundaryUP1D_Type = { sizeof(BPy_WithinImageBoundaryUP1D), /* tp_basicsize */ 0, /* tp_itemsize */ nullptr, /* tp_dealloc */ - 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 */ +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall_offset */ +#else + nullptr, /* tp_print */ +#endif + nullptr, /* tp_getattr */ + nullptr, /* tp_setattr */ + nullptr, /* tp_reserved */ + nullptr, /* tp_repr */ + nullptr, /* tp_as_number */ + nullptr, /* tp_as_sequence */ + nullptr, /* tp_as_mapping */ + nullptr, /* tp_hash */ + nullptr, /* tp_call */ + nullptr, /* tp_str */ + nullptr, /* tp_getattro */ + nullptr, /* tp_setattro */ + nullptr, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + WithinImageBoundaryUP1D___doc__, /* tp_doc */ + nullptr, /* tp_traverse */ + nullptr, /* tp_clear */ + nullptr, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + nullptr, /* tp_iter */ + nullptr, /* tp_iternext */ + nullptr, /* tp_methods */ + nullptr, /* tp_members */ + nullptr, /* tp_getset */ + &UnaryPredicate1D_Type, /* tp_base */ + nullptr, /* tp_dict */ + nullptr, /* tp_descr_get */ + nullptr, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)WithinImageBoundaryUP1D___init__, /* tp_init */ + nullptr, /* tp_alloc */ + nullptr, /* tp_new */ }; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 2f848b5be08..d947f4229a0 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -466,27 +466,29 @@ 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); /** * * \attention Defined in util.c */ -bool IMB_ispic(const char *name); -int IMB_ispic_type(const char *name); +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 *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/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index 53d9a1a2919..7bdbbb03227 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -32,15 +32,14 @@ typedef struct ImFileType { void (*init)(void); void (*exit)(void); - int (*is_a)(const unsigned char *buf); - int (*is_a_filepath)(const char *filepath); + 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, 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, @@ -68,31 +67,31 @@ 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, 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); +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, 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); +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, 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); +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, @@ -100,55 +99,55 @@ 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_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, int flags, 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, 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_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, int flags, char colorspace[IM_MAX_SPACE]); /* dpx */ -int imb_is_a_dpx(const unsigned char *buf); -int imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags); +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, int flags, 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, 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); -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, 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 f897b1c6df3..58ce02f28ae 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -72,43 +72,43 @@ 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, const size_t size) { + if (size < BMP_FILEHEADER_SIZE) { + return false; + } + + if (!CHECK_HEADER_FIELD_BMP(mem)) { + return false; + } - int ret_val = 0; + bool ok = false; 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) { + 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 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]) @@ -124,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; } @@ -296,7 +296,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..de54e6dab9d 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -183,14 +183,14 @@ 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); } -int imb_is_a_cineon(const unsigned char *buf) +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, @@ -198,20 +198,20 @@ 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; } -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); } -int imb_is_a_dpx(const unsigned char *buf) +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, @@ -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/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 e620c968f1c..5687824f9fd 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,21 +69,25 @@ 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 */ +/* note: use at most first 32 bytes */ +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] != ' ')) { - 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 +112,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 930205c9efb..9020529f210 100644 --- a/source/blender/imbuf/intern/dds/dds_api.h +++ b/source/blender/imbuf/intern/dds/dds_api.h @@ -26,8 +26,9 @@ 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); +/* 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, int flags, 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/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) { diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 214cdf1b63b..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]) -int imb_is_a_iris(const uchar *mem) +bool imb_is_a_iris(const uchar *mem, size_t size) { + if (size < 2) { + return false; + } return ((GS(mem) == IMAGIC) || (GSS(mem) == IMAGIC)); } @@ -271,7 +274,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; } @@ -807,7 +810,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 +972,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 +984,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..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; } -int imb_is_a_jp2(const unsigned char *buf) +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; @@ -1194,22 +1201,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 +1237,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..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; -int imb_is_a_jpeg(const unsigned char *mem) +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; } /*---------------------------------------------------------- @@ -429,7 +430,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; } @@ -608,7 +609,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 +643,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/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp index 9d8c5d50a89..1e8c3c25778 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp +++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp @@ -163,16 +163,13 @@ static ImBuf *imb_oiio_load_image_float( extern "C" { -int imb_is_a_filepath_photoshop(const char *filename) +bool imb_is_a_photoshop(const unsigned char *mem, size_t size) { - 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'}; + if (size < sizeof(magic)) { + return false; + } + return memcmp(magic, mem, sizeof(magic)) == 0; } int imb_save_photoshop(struct ImBuf *ibuf, const char * /*name*/, int flags) @@ -198,7 +195,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..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_filepath_photoshop(const char *name); +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 40a502a14db..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 */ -int imb_is_a_openexr(const unsigned char *mem) +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); } @@ -586,7 +590,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 +598,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 ************************************ */ @@ -1905,7 +1909,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 73db146849b..940715690a7 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.h +++ b/source/blender/imbuf/intern/openexr/openexr_api.h @@ -32,9 +32,9 @@ 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); -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/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*/) diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index c4fbd3f7563..25fc6a1cddf 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -59,19 +59,21 @@ 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 size) { - int ret_val = 0; + const int num_to_check = 8; + if (size < num_to_check) { + return false; + } + bool ok = false; - 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. */ + 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) @@ -119,7 +121,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; @@ -549,7 +551,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 4cd44a25cb8..285b18595f7 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -197,17 +197,22 @@ 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, const size_t size) { - /* 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 (strstr((char *)buf, "#?")) { - return 1; + /* 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] = {'#', '?'}; + if (size < sizeof(magic)) { + return false; } - // if (strstr((char *)buf, "32-bit_rle_rgbe")) return 1; - return 0; + return memcmp(buf, magic, sizeof(magic)) == 0; } struct ImBuf *imb_loadhdr(const unsigned char *mem, @@ -224,7 +229,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, size)) { colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_FLOAT); /* find empty line, next line is resolution info */ @@ -409,7 +414,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 5a3cbd375b6..a9833623250 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) +bool imb_savetarga(struct ImBuf *ibuf, const char *filepath, int UNUSED(flags)) { - char buf[20] = {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; } @@ -355,8 +361,12 @@ int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags) return ok; } -static int 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]; @@ -372,7 +382,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 */ @@ -383,31 +393,31 @@ 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 size) { TARGA tga; - return checktarga(&tga, buf); + return checktarga(&tga, buf, size); } static void complete_partial_load(struct ImBuf *ibuf, unsigned int *rect) @@ -627,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; } @@ -647,7 +657,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; diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index bc69a14fa47..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 */ -int imb_is_a_tiff(const unsigned char *buf) +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)); @@ -578,7 +581,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; } @@ -759,8 +762,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/util.c b/source/blender/imbuf/intern/util.c index 64b03f332a8..1741d3f20b7 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -117,75 +117,109 @@ 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_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; } - 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; +} + +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; - /* XXX move this exception */ - if ((BIG_LONG(((int *)buf)[0]) & 0xfffffff0) == 0xffd8ffe0) { - return IMB_FTYPE_JPG; + 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 (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { - if (type->is_a) { - if (type->is_a(buf)) { + 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)) { return type->filetype; } } - else if (type->is_a_filepath) { - if (type->is_a_filepath(name)) { - return type->filetype; + } + + return 0; +} + +int IMB_ispic_type(const char *filepath) +{ + unsigned char buf[HEADER_SIZE]; + 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 *filepath, int filetype) +{ + unsigned char buf[HEADER_SIZE]; + if (!imb_ispic_read_header_from_filepath(filepath, buf)) { + return 0; + } + + 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); + if (type->is_a != NULL) { + return type->is_a(buf, HEADER_SIZE); } } } - return 0; +} #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 int 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 } @@ -244,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; @@ -252,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", @@ -269,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"); } @@ -285,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 */ @@ -324,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; } @@ -385,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); } 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/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index ca42e2b1cba..028e150d904 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -2207,7 +2207,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 */ 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, diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 6ac3f1dd424..e91b0d860c6 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -55,7 +55,7 @@ #include "MEM_guardedalloc.h" -#include "RE_render_ext.h" +#include "RE_texture.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" 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); diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c index b000565ed09..13b561f9dd6 100644 --- a/source/blender/makesrna/intern/rna_texture_api.c +++ b/source/blender/makesrna/intern/rna_texture_api.c @@ -36,7 +36,7 @@ # include "IMB_imbuf.h" # include "IMB_imbuf_types.h" # include "RE_pipeline.h" -# include "RE_shader_ext.h" +# include "RE_texture.h" static void texture_evaluate(struct Tex *tex, float value[3], float r_color[4]) { diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index efd46f53eb6..d432559fcfa 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -61,7 +61,7 @@ #include "MOD_ui_common.h" #include "MOD_util.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" /* Displace */ diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc index 1b1d4187899..f4e1936713c 100644 --- a/source/blender/modifiers/intern/MOD_volume_displace.cc +++ b/source/blender/modifiers/intern/MOD_volume_displace.cc @@ -45,7 +45,7 @@ #include "MOD_modifiertypes.h" #include "MOD_ui_common.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "RNA_access.h" diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index 4d1e2cea86f..53e41484606 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -57,7 +57,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "MOD_ui_common.h" #include "MOD_util.h" diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index 4c8b511f19a..45f06a7778c 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -51,7 +51,8 @@ #include "RNA_access.h" #include "MEM_guardedalloc.h" -#include "RE_shader_ext.h" + +#include "RE_texture.h" #include "MOD_modifiertypes.h" #include "MOD_ui_common.h" diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 1c1ca08183d..c5e2ecb9660 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -55,7 +55,7 @@ #include "MOD_ui_common.h" #include "MOD_util.h" #include "MOD_weightvg_util.h" -#include "RE_shader_ext.h" /* Texture masking. */ +#include "RE_texture.h" /* Texture masking. */ /* Maps new_w weights in place, using either one of the predefined functions, or a custom curve. * Return values are in new_w. diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c index ae5da4d2fd2..efd0e48f41a 100644 --- a/source/blender/nodes/shader/node_shader_tree.c +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -50,7 +50,7 @@ #include "GPU_material.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "NOD_common.h" diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h index c1687e1a349..91454c3c982 100644 --- a/source/blender/nodes/shader/node_shader_util.h +++ b/source/blender/nodes/shader/node_shader_util.h @@ -63,7 +63,7 @@ #include "IMB_colormanagement.h" #include "RE_pipeline.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "GPU_material.h" #include "GPU_texture.h" diff --git a/source/blender/nodes/shader/nodes/node_shader_particle_info.c b/source/blender/nodes/shader/nodes/node_shader_particle_info.c index b646e806e6e..c6eabc3b2cb 100644 --- a/source/blender/nodes/shader/nodes/node_shader_particle_info.c +++ b/source/blender/nodes/shader/nodes/node_shader_particle_info.c @@ -18,7 +18,7 @@ */ #include "../node_shader_util.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" static bNodeSocketTemplate outputs[] = { {SOCK_FLOAT, "Index"}, diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c b/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c index fae1fb283ed..14cd1fd4c0c 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c @@ -19,7 +19,7 @@ #include "../node_shader_util.h" -#include "RE_render_ext.h" +#include "RE_texture.h" /* **************** OUTPUT ******************** */ diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c index 2d593c6218a..48027dc847b 100644 --- a/source/blender/nodes/texture/node_texture_tree.c +++ b/source/blender/nodes/texture/node_texture_tree.c @@ -48,7 +48,7 @@ #include "RNA_access.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" static void texture_get_from_context(const bContext *C, bNodeTreeType *UNUSED(treetype), diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h index 01d1aa5cd62..74f27ef3974 100644 --- a/source/blender/nodes/texture/node_texture_util.h +++ b/source/blender/nodes/texture/node_texture_util.h @@ -61,7 +61,7 @@ #include "IMB_imbuf_types.h" #include "RE_pipeline.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c index 2cd4e31feb3..a8a82153e58 100644 --- a/source/blender/nodes/texture/nodes/node_texture_proc.c +++ b/source/blender/nodes/texture/nodes/node_texture_proc.c @@ -24,7 +24,7 @@ #include "NOD_texture.h" #include "node_texture_util.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" /* * In this file: wrappers to use procedural textures as nodes diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c index 9551a10ee57..59e2e9be581 100644 --- a/source/blender/nodes/texture/nodes/node_texture_texture.c +++ b/source/blender/nodes/texture/nodes/node_texture_texture.c @@ -24,7 +24,7 @@ #include "NOD_texture.h" #include "node_texture_util.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" static bNodeSocketTemplate inputs[] = { {SOCK_RGBA, N_("Color1"), 1.0f, 1.0f, 1.0f, 1.0f}, diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c index 2168e0d1730..03a890d315c 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.c +++ b/source/blender/python/bmesh/bmesh_py_ops.c @@ -166,10 +166,14 @@ static PyTypeObject bmesh_op_Type = { sizeof(BPy_BMeshOpFunc), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + 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, /* 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 6f5f36ec42f..a8b66f3f2fe 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -1197,8 +1197,12 @@ PyTypeObject BPy_IDGroup_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ + NULL, /* destructor 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, /* cmpfunc tp_compare; */ @@ -1606,8 +1610,12 @@ PyTypeObject BPy_IDArray_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ + NULL, /* destructor 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, /* cmpfunc tp_compare; */ @@ -1723,8 +1731,12 @@ PyTypeObject BPy_IDGroup_Iter_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ + NULL, /* destructor 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, /* 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..3ea4550dd50 100644 --- a/source/blender/python/generic/imbuf_py_api.c +++ b/source/blender/python/generic/imbuf_py_api.c @@ -342,11 +342,15 @@ PyTypeObject Py_ImBuf_Type = { /* Methods to implement standard operations */ (destructor)py_imbuf_dealloc, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* cmpfunc tp_compare; */ - (reprfunc)py_imbuf_repr, /* reprfunc tp_repr; */ +#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)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 30e0d94939d..ee64d0a409c 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -794,10 +794,14 @@ static PyTypeObject BlenderAppTranslationsType = { 0, /* tp_itemsize */ /* methods */ /* No destructor, this is a singleton! */ - NULL, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + 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, /* 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 061595a6c5d..bc3d8b2c360 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -92,9 +92,13 @@ static PyTypeObject bpy_lib_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)bpy_lib_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ +#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, /* 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 c16715b46fb..6e41bc96eed 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6403,10 +6403,14 @@ PyTypeObject pyrna_struct_meta_idprop_Type = { 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + 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, /* tp_compare */ /* deprecated in Python 3.0! */ NULL, /* tp_repr */ @@ -6456,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; */ @@ -6485,9 +6489,13 @@ PyTypeObject pyrna_struct_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_struct_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ +#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, /* tp_compare */ /* DEPRECATED in Python 3.0! */ (reprfunc)pyrna_struct_repr, /* tp_repr */ @@ -6521,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; */ @@ -6574,9 +6582,13 @@ PyTypeObject pyrna_prop_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ +#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, /* tp_compare */ /* DEPRECATED in Python 3.0! */ (reprfunc)pyrna_prop_repr, /* tp_repr */ @@ -6658,9 +6670,13 @@ PyTypeObject pyrna_prop_array_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_array_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ +#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, /* tp_compare */ /* DEPRECATED in Python 3.0! */ (reprfunc)pyrna_prop_array_repr, /* tp_repr */ @@ -6741,9 +6757,13 @@ PyTypeObject pyrna_prop_collection_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ +#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, /* tp_compare */ /* DEPRECATED in Python 3.0! */ NULL, @@ -6827,9 +6847,13 @@ static PyTypeObject pyrna_prop_collection_idprop_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ +#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, /* tp_compare */ /* DEPRECATED in Python 3.0! */ NULL, @@ -6912,10 +6936,14 @@ PyTypeObject pyrna_func_Type = { sizeof(BPy_FunctionRNA), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + 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, /* tp_compare */ /* DEPRECATED in Python 3.0! */ (reprfunc)pyrna_func_repr, /* tp_repr */ @@ -7009,9 +7037,13 @@ static PyTypeObject pyrna_prop_collection_iter_Type = { 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_collection_iter_dealloc, /* tp_dealloc */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ +# 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, /* 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 80efbf6fbac..61487df1ab5 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -3042,11 +3042,15 @@ PyTypeObject vector_Type = { /* Methods to implement standard operations */ (destructor)BaseMathObject_dealloc, /* destructor tp_dealloc; */ - (printfunc)NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* cmpfunc tp_compare; */ - (reprfunc)Vector_repr, /* reprfunc tp_repr; */ +#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; */ /* Method suites for standard classes */ @@ -3061,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; */ diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt index 6e229fd25b7..2516c015924 100644 --- a/source/blender/render/CMakeLists.txt +++ b/source/blender/render/CMakeLists.txt @@ -42,8 +42,8 @@ set(INC set(SRC - intern/bake_api.c - intern/external_engine.c + intern/bake.c + intern/engine.c intern/initrender.c intern/multires_bake.c intern/pipeline.c @@ -57,8 +57,7 @@ set(SRC RE_engine.h RE_multires_bake.h RE_pipeline.h - RE_render_ext.h - RE_shader_ext.h + RE_texture.h intern/initrender.h intern/render_result.h diff --git a/source/blender/render/RE_engine.h b/source/blender/render/RE_engine.h index e53f33eacff..a153c622af8 100644 --- a/source/blender/render/RE_engine.h +++ b/source/blender/render/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/RE_shader_ext.h b/source/blender/render/RE_shader_ext.h deleted file mode 100644 index d9d5a924949..00000000000 --- a/source/blender/render/RE_shader_ext.h +++ /dev/null @@ -1,83 +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. - * - * The Original Code is Copyright (C) 2006 by Blender Foundation - * All rights reserved. - */ -/** \file - * \ingroup render - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -/* this include is for texture exports */ -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -/* localized texture result data */ -/* note; tr tg tb ta has to remain in this order */ -typedef struct TexResult { - float tin, tr, tg, tb, ta; - int talpha; - float *nor; -} TexResult; - -typedef struct BakeImBufuserData { - float *displacement_buffer; - char *mask_buffer; -} BakeImBufuserData; - -/* node shaders... */ -struct ImagePool; -struct MTex; -struct Tex; - -/* this one uses nodes */ -int multitex_ext(struct Tex *tex, - float texvec[3], - float dxt[3], - float dyt[3], - int osatex, - struct TexResult *texres, - const short thread, - struct ImagePool *pool, - bool scene_color_manage, - const bool skip_load_image); -/* nodes disabled */ -int multitex_ext_safe(struct Tex *tex, - const float texvec[3], - struct TexResult *texres, - struct ImagePool *pool, - bool scene_color_manage, - const bool skip_load_image); -/* only for internal node usage */ -int multitex_nodes(struct Tex *tex, - const float texvec[3], - float dxt[3], - float dyt[3], - int osatex, - struct TexResult *texres, - const short thread, - short which_output, - struct MTex *mtex, - struct ImagePool *pool); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/render/RE_render_ext.h b/source/blender/render/RE_texture.h index 28a22399892..b394cfeee75 100644 --- a/source/blender/render/RE_render_ext.h +++ b/source/blender/render/RE_texture.h @@ -30,6 +30,7 @@ struct Depsgraph; struct ImagePool; struct MTex; +struct Tex; #ifdef __cplusplus extern "C" { @@ -75,6 +76,46 @@ void RE_point_density_free(struct PointDensity *pd); void RE_point_density_fix_linking(void); +/* texture_procedural.c */ + +/* Texture evaluation result. + * Note; tr tg tb ta has to remain in this order for array access. */ +typedef struct TexResult { + float tin, tr, tg, tb, ta; + int talpha; + float *nor; +} TexResult; + +/* This one uses nodes. */ +int multitex_ext(struct Tex *tex, + float texvec[3], + float dxt[3], + float dyt[3], + int osatex, + struct TexResult *texres, + const short thread, + struct ImagePool *pool, + bool scene_color_manage, + const bool skip_load_image); +/* Nodes disabled. */ +int multitex_ext_safe(struct Tex *tex, + const float texvec[3], + struct TexResult *texres, + struct ImagePool *pool, + bool scene_color_manage, + const bool skip_load_image); +/* Only for internal node usage. */ +int multitex_nodes(struct Tex *tex, + const float texvec[3], + float dxt[3], + float dyt[3], + int osatex, + struct TexResult *texres, + const short thread, + short which_output, + struct MTex *mtex, + struct ImagePool *pool); + #ifdef __cplusplus } #endif diff --git a/source/blender/render/intern/bake_api.c b/source/blender/render/intern/bake.c index 6f5db4986f2..6f5db4986f2 100644 --- a/source/blender/render/intern/bake_api.c +++ b/source/blender/render/intern/bake.c diff --git a/source/blender/render/intern/external_engine.c b/source/blender/render/intern/engine.c index 9a3dc0d000c..84f12b7873b 100644 --- a/source/blender/render/intern/external_engine.c +++ b/source/blender/render/intern/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) @@ -748,10 +750,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 */ @@ -813,7 +868,7 @@ int RE_engine_render(Render *re, int do_all) BLI_strncpy(re->i.scene_name, re->scene->id.name + 2, sizeof(re->i.scene_name)); /* render */ - engine = re->engine; + RenderEngine *engine = re->engine; if (!engine) { engine = RE_engine_create(type); @@ -851,45 +906,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; @@ -898,6 +924,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; @@ -906,10 +933,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); @@ -981,7 +1024,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); diff --git a/source/blender/render/intern/multires_bake.c b/source/blender/render/intern/multires_bake.c index ea18f151e1e..a4f68419c67 100644 --- a/source/blender/render/intern/multires_bake.c +++ b/source/blender/render/intern/multires_bake.c @@ -46,7 +46,7 @@ #include "RE_multires_bake.h" #include "RE_pipeline.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -111,6 +111,11 @@ typedef struct { const int *orig_index_mp_to_orig; } MNormalBakeData; +typedef struct BakeImBufuserData { + float *displacement_buffer; + char *mask_buffer; +} BakeImBufuserData; + static void multiresbake_get_normal(const MResolvePixelData *data, float norm[], const int tri_num, diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index 1bc6a056cda..3d19e5e6c15 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -86,7 +86,7 @@ #include "RE_engine.h" #include "RE_pipeline.h" -#include "RE_render_ext.h" +#include "RE_texture.h" #include "SEQ_sequencer.h" diff --git a/source/blender/render/intern/texture_image.c b/source/blender/render/intern/texture_image.c index 26d9f12c91e..cd34226920d 100644 --- a/source/blender/render/intern/texture_image.c +++ b/source/blender/render/intern/texture_image.c @@ -46,8 +46,7 @@ #include "BKE_image.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" #include "render_types.h" #include "texture_common.h" diff --git a/source/blender/render/intern/texture_pointdensity.c b/source/blender/render/intern/texture_pointdensity.c index 0e62eea5b11..e2568e0a013 100644 --- a/source/blender/render/intern/texture_pointdensity.c +++ b/source/blender/render/intern/texture_pointdensity.c @@ -56,8 +56,7 @@ #include "render_types.h" #include "texture_common.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" static ThreadMutex sample_mutex = PTHREAD_MUTEX_INITIALIZER; diff --git a/source/blender/render/intern/texture_procedural.c b/source/blender/render/intern/texture_procedural.c index 7f93addb76d..a98f29a705d 100644 --- a/source/blender/render/intern/texture_procedural.c +++ b/source/blender/render/intern/texture_procedural.c @@ -57,8 +57,7 @@ #include "render_types.h" #include "texture_common.h" -#include "RE_render_ext.h" -#include "RE_shader_ext.h" +#include "RE_texture.h" static RNG_THREAD_ARRAY *random_tex_array; 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); } 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; } diff --git a/source/creator/creator.c b/source/creator/creator.c index fee97e5090f..fbc97028d35 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -72,7 +72,7 @@ #include "IMB_imbuf.h" /* For #IMB_init. */ #include "RE_engine.h" -#include "RE_render_ext.h" +#include "RE_texture.h" #include "ED_datafiles.h" 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__ |