Armature drawing code refactor #106232

Manually merged
Sybren A. Stüvel merged 3 commits from dr.sybren/blender:anim/armature-drawing-refactor into main 2023-07-21 15:04:10 +02:00
268 changed files with 9678 additions and 7708 deletions
Showing only changes of commit 4684b94201 - Show all commits

View File

@ -474,7 +474,7 @@ check_struct_comments: .FORCE
@cd "$(BUILD_DIR)" ; \
$(PYTHON) \
"$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang.py" \
--checks=struct_comments --match=".*"
--checks=struct_comments --match=".*" --jobs=$(NPROCS)
check_clang_array: .FORCE
@$(CMAKE_CONFIG)

View File

@ -174,4 +174,5 @@ include(cmake/shaderc.cmake)
include(cmake/vulkan.cmake)
include(cmake/pybind11.cmake)
include(cmake/harvest.cmake)
include(cmake/deps_html.cmake)
include(cmake/cve_check.cmake)

View File

@ -0,0 +1,7 @@
<html>
<body>
<table border=1>
@HTMLCONTENTS@
<table>
</body>
</html>

View File

@ -0,0 +1,30 @@
# SPDX-FileCopyrightText: 2023 Ray Molenkamp
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
# This outputs an html file with the name, version and homepage for
# every dependency we have, this is used by the release manager to
# update the licensing document.
set(HTMLCONTENTS)
get_cmake_property(_variableNames VARIABLES)
foreach(_variableName ${_variableNames})
if(_variableName MATCHES "_URI$")
string(REPLACE "_URI" "" DEP_NAME ${_variableName})
set(DEP_VERSION "${${DEP_NAME}_VERSION}")
# First see if DEP_HOMEPAGE is set, if it is use that.
set(DEP_HOMEPAGE ${${DEP_NAME}_HOMEPAGE})
if(NOT DEP_HOMEPAGE)
# If the xxx_HOMEPAGE is not set but the URI for the archive is a known github format extract the reprository/project from the URI
string(REGEX MATCH "https:\/\/(.*)github\.com\/(.+)\/(archive|releases|release|tar.gz)\/(.*)" DEP_PROJECT "${${_variableName}}")
if(CMAKE_MATCH_2)
set(DEP_HOMEPAGE "https://www.github.com/${CMAKE_MATCH_2}")
else() # If that is also not set, error out to ensure this information is supplied
message(FATAL_ERROR "${DEP_NAME} No homepage set, please set ${DEP_NAME}_HOMEPAGE in versions.cmake")
endif()
endif()
set(HTMLCONTENTS "${HTMLCONTENTS}<tr><td>${DEP_NAME}</td><td>${DEP_VERSION}</td><td><a href=\"${DEP_HOMEPAGE}\" target=\"_blank\">${DEP_HOMEPAGE}</a></td></tr>\n")
endif()
endforeach()
configure_file(${CMAKE_SOURCE_DIR}/cmake/deps.html.in ${CMAKE_CURRENT_BINARY_DIR}/deps.html @ONLY)

View File

@ -16,12 +16,14 @@ set(ZLIB_HASH 9b8aa094c4e5765dabf4da391f00d15c)
set(ZLIB_HASH_TYPE MD5)
set(ZLIB_FILE zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_CPE "cpe:2.3:a:zlib:zlib:${ZLIB_VERSION}:*:*:*:*:*:*:*")
#set(ZLIB_HOMEPAGE https://zlib.net)
set(OPENAL_VERSION 1.21.1)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH a936806ebd8de417b0ffd8cf3f48f456)
set(OPENAL_HASH_TYPE MD5)
set(OPENAL_FILE openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HOMEPAGE https://openal-soft.org/)
set(PNG_VERSION 1.6.37)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
@ -29,6 +31,7 @@ set(PNG_HASH 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca)
set(PNG_HASH_TYPE SHA256)
set(PNG_FILE libpng-${PNG_VERSION}.tar.xz)
set(PNG_CPE "cpe:2.3:a:libpng:libpng:${PNG_VERSION}:*:*:*:*:*:*:*")
set(PNG_HOMEPAGE http://www.libpng.org/pub/png/libpng.html)
set(JPEG_VERSION 2.1.3)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
@ -46,6 +49,7 @@ set(BOOST_HASH 077f074743ea7b0cb49c6ed43953ae95)
set(BOOST_HASH_TYPE MD5)
set(BOOST_FILE boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_CPE "cpe:2.3:a:boost:boost:${BOOST_VERSION}:*:*:*:*:*:*:*")
SET(BOOST_HOMEPAGE https://www.boost.org/)
set(BLOSC_VERSION 1.21.1)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
@ -59,6 +63,7 @@ set(PTHREADS_URI http://prdownloads.sourceforge.net/pthreads4w/pthreads4w-code-v
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(PTHREADS_HASH_TYPE MD5)
set(PTHREADS_FILE pthreads4w-code-${PTHREADS_VERSION}.zip)
set(PTHREADS_HOMEPAGE https://github.com/fwbuilder/pthreads4w)
set(OPENEXR_VERSION 3.1.7)
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
@ -96,6 +101,7 @@ set(FREETYPE_HASH 98bc3cf234fe88ef3cf24569251fe0a4)
set(FREETYPE_HASH_TYPE MD5)
set(FREETYPE_FILE freetype-${FREETYPE_VERSION}.tar.gz)
SET(FREETYPE_CPE "cpe:2.3:a:freetype:freetype:${FREETYPE_VERSION}:*:*:*:*:*:*:*")
set(FREETYPE_HOMEPAGE https://freetype.org/)
set(EPOXY_VERSION 1.5.10)
set(EPOXY_URI https://github.com/anholt/libepoxy/archive/refs/tags/${EPOXY_VERSION}.tar.gz)
@ -108,6 +114,7 @@ set(FREEGLUT_URI http://prdownloads.sourceforge.net/freeglut/freeglut/${FREEGLUT
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(FREEGLUT_HASH_TYPE MD5)
set(FREEGLUT_FILE freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_HOMEPAGE https://freeglut.sourceforge.net/)
set(ALEMBIC_VERSION 1.8.3)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
@ -127,6 +134,7 @@ set(SDL_HASH a53acc02e1cca98c4123229069b67c9e)
set(SDL_HASH_TYPE MD5)
set(SDL_FILE SDL2-${SDL_VERSION}.tar.gz)
set(SDL_CPE "cpe:2.3:a:libsdl:sdl:${SDL_VERSION}:*:*:*:*:*:*:*")
set(SDL_HOMEPAGE https://www.libsdl.org)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
@ -195,6 +203,7 @@ set(TIFF_HASH d08c5f9eee6350fffc239e5993d92779)
set(TIFF_HASH_TYPE MD5)
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
set(TIFF_HOMEPAGE http://www.simplesystems.org/libtiff/)
# Recent commit from 1.13.0.2 under development, which includes string table
# changes that make the Cycles OptiX implementation work. Official 1.12 OSL
@ -218,6 +227,7 @@ set(PYTHON_HASH 49b0342476b984e106d308c25d657f12)
set(PYTHON_HASH_TYPE MD5)
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_CPE "cpe:2.3:a:python:python:${PYTHON_VERSION}:-:*:*:*:*:*:*")
set(PYTHON_HOMEPAGE https://www.python.org/)
set(TBB_YEAR 2020)
set(TBB_VERSION ${TBB_YEAR}_U3)
@ -277,12 +287,14 @@ set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
set(LAME_HASH_TYPE MD5)
set(LAME_FILE lame-${LAME_VERSION}.tar.gz)
set(LAME_CPE "cpe:2.3:a:lame_project:lame:${LAME_VERSION}:*:*:*:*:*:*:*")
set(LAME_HOMEPAGE https://lame.sourceforge.io/)
set(OGG_VERSION 1.3.5)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH 0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664)
set(OGG_HASH_TYPE SHA256)
set(OGG_FILE libogg-${OGG_VERSION}.tar.gz)
set(OGG_HOMEPAGE https://xiph.org/ogg/)
set(VORBIS_VERSION 1.3.7)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
@ -290,12 +302,14 @@ set(VORBIS_HASH 0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab
set(VORBIS_HASH_TYPE SHA256)
set(VORBIS_FILE libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_CPE "cpe:2.3:a:xiph.org:libvorbis:${VORBIS_VERSION}:*:*:*:*:*:*:*")
set(VORBIS_HOMEPAGE https://xiph.org/vorbis/)
set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(THEORA_HASH_TYPE SHA256)
set(THEORA_FILE libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HOMEPAGE https://xiph.org/theora/)
set(FLAC_VERSION 1.4.2)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
@ -303,6 +317,7 @@ set(FLAC_HASH e322d58a1f48d23d9dd38f432672865f6f79e73a6f9cc5a5f57fcaa83eb5a8e4 )
set(FLAC_HASH_TYPE SHA256)
set(FLAC_FILE flac-${FLAC_VERSION}.tar.xz)
set(FLAC_CPE "cpe:2.3:a:flac_project:flac:${FLAC_VERSION}:*:*:*:*:*:*:*")
set(FLAC_HOMEPAGE https://xiph.org/flac/)
set(VPX_VERSION 1.11.0)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
@ -316,12 +331,14 @@ set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(OPUS_HASH_TYPE SHA256)
set(OPUS_FILE opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HOMEPAGE https://opus-codec.org/)
set(X264_VERSION 35fe20d1ba49918ec739a5b068c208ca82f977f7)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/${X264_VERSION}/x264-${X264_VERSION}.tar.gz)
set(X264_HASH bb4f7da03936b5a030ed5827133b58eb3f701d7e5dce32cca4ba6df93797d42e)
set(X264_HASH_TYPE SHA256)
set(X264_FILE x264-${X264_VERSION}.tar.gz)
set(X264_HOMEPAGE https://www.videolan.org/developers/x264.html)
set(OPENJPEG_VERSION 2.5.0)
set(OPENJPEG_SHORT_VERSION 2.5)
@ -337,18 +354,21 @@ set(FFMPEG_HASH 47d062731c9f66a78380e35a19aac77cebceccd1c7cc309b9c82343ffc430c3d
set(FFMPEG_HASH_TYPE SHA256)
set(FFMPEG_FILE ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_CPE "cpe:2.3:a:ffmpeg:ffmpeg:${FFMPEG_VERSION}:*:*:*:*:*:*:*")
set(FFMPEG_HOMEPAGE https://ffmpeg.org/)
set(FFTW_VERSION 3.3.10)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 8ccbf6a5ea78a16dbc3e1306e234cc5c)
set(FFTW_HASH_TYPE MD5)
set(FFTW_FILE fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HOMEPAGE https://www.fftw.org/)
set(ICONV_VERSION 1.16)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
set(ICONV_HASH_TYPE MD5)
set(ICONV_FILE libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HOMEPAGE https://www.gnu.org/software/libiconv/)
set(SNDFILE_VERSION 1.1.0)
set(SNDFILE_URI https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-${SNDFILE_VERSION}.tar.xz)
@ -363,6 +383,7 @@ set(WEBP_HASH b5e2e414a8adee4c25fe56b18dd9c549)
set(WEBP_HASH_TYPE MD5)
set(WEBP_FILE libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_CPE "cpe:2.3:a:webmproject:libwebp:${WEBP_VERSION}:*:*:*:*:*:*:*")
set(WEBP_HOMEPAGE https://developers.google.com/speed/webp)
set(SPNAV_VERSION 1.1)
set(SPNAV_URI https://github.com/FreeSpacenav/libspnav/releases/download/v${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
@ -382,6 +403,7 @@ set(XML2_HASH 76808c467a58c31e2dbd511e71d5fd13)
set(XML2_HASH_TYPE MD5)
set(XML2_FILE libxml2-${XML2_VERSION}.tar.xz)
set(XML2_CPE "cpe:2.3:a:xmlsoft:libxml2:${XML2_VERSION}:*:*:*:*:*:*:*")
set(XML2_HOMEPAGE https://gitlab.gnome.org/GNOME/libxml2)
set(YAMLCPP_VERSION 0.7.0)
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
@ -416,6 +438,7 @@ set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison/win_flex_bison
set(FLEXBISON_HASH 6b549d43e34ece0e8ed05af92daa31c4)
set(FLEXBISON_HASH_TYPE MD5)
set(FLEXBISON_FILE win_flex_bison-${FLEXBISON_VERSION}.zip)
set(FLEXBISON_HOMEPAGE https://github.com/lexxmark/winflexbison)
set(FLEX_VERSION 2.6.4)
set(FLEX_URI https://github.com/westes/flex/releases/download/v${FLEX_VERSION}/flex-${FLEX_VERSION}.tar.gz)
@ -437,6 +460,7 @@ set(BZIP2_HASH ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269)
set(BZIP2_HASH_TYPE SHA256)
set(BZIP2_FILE bzip2_${BZIP2_VERSION}.orig.tar.gz)
set(BZIP2_CPE "cpe:2.3:a:bzip:bzip2:${BZIP2_VERSION}:*:*:*:*:*:*:*")
SET(BZIP2_HOMEPAGE https://sourceware.org/bzip2/)
# NOTE: This will *HAVE* to match the version python ships on windows which
# is hardcoded in pythons PCbuild/get_externals.bat. For compliance reasons there
@ -447,12 +471,14 @@ set(FFI_HASH 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056)
set(FFI_HASH_TYPE SHA256)
set(FFI_FILE libffi-${FFI_VERSION}.tar.gz)
set(FFI_CPE "cpe:2.3:a:libffi_project:libffi:${FFI_VERSION}:*:*:*:*:*:*:*")
SET(FFI_HOMEPAGE https://sourceware.org/libffi/)
set(LZMA_VERSION 5.2.5)
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
set(LZMA_HASH_TYPE SHA256)
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HOMEPAGE https://tukaani.org/lzma/)
# NOTE: Python's build has been modified to use our ssl version.
set(SSL_VERSION 3.0.9)
@ -461,6 +487,7 @@ set(SSL_HASH eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90)
set(SSL_HASH_TYPE SHA256)
set(SSL_FILE openssl-${SSL_VERSION}.tar.gz)
set(SSL_CPE "cpe:2.3:a:openssl:openssl:${SSL_VERSION}:*:*:*:*:*:*:*")
set(SSL_HOMEPAGE https://www.openssl.org)
# Note: This will *HAVE* to match the version python ships on windows which
# is hardcoded in pythons PCbuild/get_externals.bat for compliance reasons there
@ -472,6 +499,7 @@ set(SQLITE_HASH b8c2d4bc0094f5c0ce985dc0e237dfcbaa1f6275)
set(SQLITE_HASH_TYPE SHA1)
set(SQLITE_FILE sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
set(SQLITE_CPE "cpe:2.3:a:sqlite:sqlite:${SQLITE_VERSION}:*:*:*:*:*:*:*")
set(SQLITE_HOMEPAGE https://www.sqlite.org)
set(EMBREE_VERSION 4.1.0)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
@ -502,6 +530,7 @@ set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.
set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
set(LIBGLU_HASH_TYPE MD5)
set(LIBGLU_FILE glu-${LIBGLU_VERSION}.tar.xz)
set(LIBGLU_HOMEPAGE https://gitlab.freedesktop.org/mesa/glu)
set(MESA_VERSION 21.1.5)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa/mesa-${MESA_VERSION}.tar.xz)
@ -509,6 +538,7 @@ set(MESA_HASH 022c7293074aeeced2278c872db4fa693147c70f8595b076cf3f1ef81520766d)
set(MESA_HASH_TYPE SHA256)
set(MESA_FILE mesa-${MESA_VERSION}.tar.xz)
set(MESA_CPE "cpe:2.3:a:mesa3d:mesa:${MESA_VERSION}:*:*:*:*:*:*:*")
set(MESA_HOMEPAGE https://www.mesa3d.org/)
set(NASM_VERSION 2.15.02)
set(NASM_URI https://github.com/netwide-assembler/nasm/archive/nasm-${NASM_VERSION}.tar.gz)
@ -528,18 +558,21 @@ set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz)
set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/${WL_PROTOCOLS_FILE})
set(WL_PROTOCOLS_HASH a28ff59a56e2ebb746048b6ef8d931d6)
set(WL_PROTOCOLS_HASH_TYPE MD5)
set(WL_PROTOCOLS_HOMEPAGE https://gitlab.freedesktop.org/wayland/wayland-protocols)
set(WAYLAND_VERSION 1.22.0)
set(WAYLAND_FILE wayland-${WAYLAND_VERSION}.tar.xz)
set(WAYLAND_URI https://gitlab.freedesktop.org/wayland/wayland/-/releases/${WAYLAND_VERSION}/downloads/wayland-${WAYLAND_VERSION}.tar.xz)
set(WAYLAND_HASH 7410ab549e3928fce9381455b17b0803)
set(WAYLAND_HASH_TYPE MD5)
set(WAYLAND_HOMEPAGE https://gitlab.freedesktop.org/wayland/wayland)
set(WAYLAND_LIBDECOR_VERSION 0.1.0)
set(WAYLAND_LIBDECOR_FILE libdecor-${WAYLAND_LIBDECOR_VERSION}.tar.xz)
set(WAYLAND_LIBDECOR_URI https://gitlab.gnome.org/jadahl/libdecor/uploads/81adf91d27620e20bcc5f6b9b312d768/libdecor-${WAYLAND_LIBDECOR_VERSION}.tar.xz )
set(WAYLAND_LIBDECOR_HASH 47b59eba76faa3787f0878bf8700e912)
set(WAYLAND_LIBDECOR_HASH_TYPE MD5)
set(WAYLAND_LIBDECOR_HOMEPAGE https://gitlab.freedesktop.org/libdecor/libdecor)
set(ISPC_VERSION v1.17.0)
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
@ -553,6 +586,7 @@ set(GMP_HASH 0b82665c4a92fd2ade7440c13fcaa42b)
set(GMP_HASH_TYPE MD5)
set(GMP_FILE gmp-${GMP_VERSION}.tar.xz)
set(GMP_CPE "cpe:2.3:a:gmplib:gmp:${GMP_VERSION}:*:*:*:*:*:*:*")
set(GMP_HOMEPAGE https://gmplib.org/)
set(POTRACE_VERSION 1.16)
set(POTRACE_URI http://potrace.sourceforge.net/download/${POTRACE_VERSION}/potrace-${POTRACE_VERSION}.tar.gz)
@ -560,6 +594,7 @@ set(POTRACE_HASH 5f0bd87ddd9a620b0c4e65652ef93d69)
set(POTRACE_HASH_TYPE MD5)
set(POTRACE_FILE potrace-${POTRACE_VERSION}.tar.gz)
set(POTRACE_CPE "cpe:2.3:a:icoasoft:potrace:${POTRACE_VERSION}:*:*:*:*:*:*:*")
set(POTRACE_HOMEPAGE https://potrace.sourceforge.net/)
set(HARU_VERSION 2_3_0)
set(HARU_URI https://github.com/libharu/libharu/archive/RELEASE_${HARU_VERSION}.tar.gz)
@ -743,6 +778,7 @@ set(AOM_URI https://storage.googleapis.com/aom-releases/libaom-${AOM_VERSION}.ta
set(AOM_HASH bd754b58c3fa69f3ffd29da77de591bd9c26970e3b18537951336d6c0252e354)
set(AOM_HASH_TYPE SHA256)
set(AOM_FILE libaom-${AOM_VERSION}.tar.gz)
SET(AOM_HOMEPAGE https://aomedia.googlesource.com/aom/)
set(FRIBIDI_VERSION v1.0.12)
set(FRIBIDI_URI https://github.com/fribidi/fribidi/archive/refs/tags/${FRIBIDI_VERSION}.tar.gz)
@ -785,15 +821,17 @@ set(SHADERC_GLSLANG_FILE glslang-${SHADERC_GLSLANG_VERSION}.tar.gz)
set(VULKAN_VERSION v1.2.198)
set(VULKAN_HEADERS_URI https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/${VULKAN_VERSION}.tar.gz)
set(VULKAN_HEADERS_VERSION ${VULKAN_VERSION})
set(VULKAN_HEADERS_URI https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/${VULKAN_HEADERS_VERSION}.tar.gz)
set(VULKAN_HEADERS_HASH 64fe73e887c963ad546bfc7f9505fa1d)
set(VULKAN_HEADERS_HASH_TYPE MD5)
set(VULKAN_HEADERS_FILE Vulkan-Headers-${VULKAN_VERSION}.tar.gz)
set(VULKAN_HEADERS_FILE Vulkan-Headers-${VULKAN_HEADERS_VERSION}.tar.gz)
set(VULKAN_LOADER_URI https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/${VULKAN_VERSION}.tar.gz)
set(VULKAN_LOADER_VERSION ${VULKAN_VERSION})
set(VULKAN_LOADER_URI https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/${VULKAN_LOADER_VERSION}.tar.gz)
set(VULKAN_LOADER_HASH 015170a74f648fd2b41e209b6bf1ebc4)
set(VULKAN_LOADER_HASH_TYPE MD5)
set(VULKAN_LOADER_FILE Vulkan-Loader-${VULKAN_VERSION}.tar.gz)
set(VULKAN_LOADER_FILE Vulkan-Loader-${VULKAN_LOADER_VERSION}.tar.gz)
set(PYBIND11_VERSION 2.10.1)
set(PYBIND11_URI https://github.com/pybind/pybind11/archive/refs/tags/v${PYBIND11_VERSION}.tar.gz)

View File

@ -47,9 +47,6 @@ ClangSourceLocation = Any
USE_VERBOSE = os.environ.get("VERBOSE", None) is not None
# Turn off for debugging.
USE_MULTIPROCESS = True
CLANG_BIND_DIR = os.environ.get("CLANG_BIND_DIR")
CLANG_LIB_DIR = os.environ.get("CLANG_LIB_DIR")
@ -440,6 +437,7 @@ def source_info_filter(
def run_checks_on_project(
check_ids: Sequence[str],
regex_list: Sequence[re.Pattern[str]],
jobs: int,
) -> None:
source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX)
source_defines = project_source_info.build_defines_as_args()
@ -464,9 +462,11 @@ def run_checks_on_project(
import multiprocessing
if USE_MULTIPROCESS:
job_total = multiprocessing.cpu_count() + 1
with multiprocessing.Pool(processes=job_total) as pool:
if jobs <= 0:
jobs = multiprocessing.cpu_count() * 2
if jobs > 1:
with multiprocessing.Pool(processes=jobs) as pool:
# No `istarmap`, use an intermediate function.
for result in pool.imap(check_source_file_for_imap, all_args):
if result:
@ -515,6 +515,17 @@ def create_parser(checkers_all: Sequence[str]) -> argparse.ArgumentParser:
"Multiple checkers may be passed at once (comma separated, no spaces)."),
required=True,
)
parser.add_argument(
"--jobs",
dest="jobs",
type=int,
default=0,
help=(
"The number of processes to use. "
"Defaults to zero which detects the available cores, 1 is single threaded (useful for debugging)."
),
required=False,
)
return parser
@ -536,7 +547,12 @@ def main() -> int:
print("Error in expression: \"{:s}\"\n {!r}".format(expr, ex))
return 1
run_checks_on_project(args.checks.split(','), regex_list)
run_checks_on_project(
args.checks.split(','),
regex_list,
args.jobs,
)
return 0

View File

@ -111,6 +111,12 @@ class DATA_PT_lightprobe_eevee_next(DataButtonsPanel, Panel):
col.prop(probe, "grid_bake_samples")
col.prop(probe, "surfel_density")
col.separator()
col.prop(probe, "grid_normal_bias")
col.prop(probe, "grid_view_bias")
col.prop(probe, "grid_irradiance_smoothing")
elif probe.type == 'CUBEMAP':
col = layout.column()
col.prop(probe, "resolution")

View File

@ -1742,6 +1742,25 @@ class _defs_paint_grease_pencil:
data_block='DRAW',
)
@ToolDef.from_fn
def erase():
def draw_settings(context, layout, _tool):
paint = context.tool_settings.gpencil_paint
brush = paint.brush
if not brush:
return
layout.prop(brush.gpencil_settings, "eraser_mode", expand=True)
if brush.gpencil_settings.eraser_mode == "HARD":
layout.prop(brush.gpencil_settings, "use_keep_caps_eraser")
layout.prop(brush.gpencil_settings, "use_active_layer_only")
return dict(
idname="builtin_brush.Erase",
label="Erase",
icon="brush.gpencil_draw.erase",
data_block='ERASE',
draw_settings=draw_settings,
)
class _defs_image_generic:
@ -3105,6 +3124,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_view3d_generic.cursor,
None,
_defs_paint_grease_pencil.draw,
_defs_paint_grease_pencil.erase,
],
'PAINT_GPENCIL': [
_defs_view3d_generic.cursor,

View File

@ -5526,7 +5526,7 @@ class VIEW3D_MT_edit_greasepencil_stroke(Menu):
def draw(self, _context):
layout = self.layout
layout.operator("grease_pencil.stroke_smooth")
pass
layout.operator("grease_pencil.stroke_simplify")
class VIEW3D_MT_edit_curves(Menu):

View File

@ -59,7 +59,7 @@ static FontBLF *blf_get(int fontid)
return nullptr;
}
int BLF_init(void)
int BLF_init()
{
for (int i = 0; i < BLF_MAX_FONT; i++) {
global_font[i] = nullptr;
@ -68,7 +68,7 @@ int BLF_init(void)
return blf_font_init();
}
void BLF_exit(void)
void BLF_exit()
{
for (int i = 0; i < BLF_MAX_FONT; i++) {
FontBLF *font = global_font[i];
@ -81,7 +81,7 @@ void BLF_exit(void)
blf_font_exit();
}
void BLF_cache_clear(void)
void BLF_cache_clear()
{
for (int i = 0; i < BLF_MAX_FONT; i++) {
FontBLF *font = global_font[i];
@ -123,7 +123,7 @@ static int blf_search_by_filepath(const char *filepath)
return -1;
}
static int blf_search_available(void)
static int blf_search_available()
{
for (int i = 0; i < BLF_MAX_FONT; i++) {
if (!global_font[i]) {
@ -277,7 +277,7 @@ void BLF_unload_id(int fontid)
}
}
void BLF_unload_all(void)
void BLF_unload_all()
{
for (int i = 0; i < BLF_MAX_FONT; i++) {
FontBLF *font = global_font[i];
@ -486,20 +486,20 @@ void BLF_color3f(int fontid, float r, float g, float b)
BLF_color4fv(fontid, rgba);
}
void BLF_batch_draw_begin(void)
void BLF_batch_draw_begin()
{
BLI_assert(g_batch.enabled == false);
g_batch.enabled = true;
}
void BLF_batch_draw_flush(void)
void BLF_batch_draw_flush()
{
if (g_batch.enabled) {
blf_batch_draw();
}
}
void BLF_batch_draw_end(void)
void BLF_batch_draw_end()
{
BLI_assert(g_batch.enabled == true);
blf_batch_draw(); /* Draw remaining glyphs */
@ -541,7 +541,7 @@ static void blf_draw_gl__end(const FontBLF *font)
}
}
void BLF_draw_ex(int fontid, const char *str, const size_t str_len, struct ResultBLF *r_info)
void BLF_draw_ex(int fontid, const char *str, const size_t str_len, ResultBLF *r_info)
{
FontBLF *font = blf_get(fontid);
@ -640,7 +640,7 @@ size_t BLF_width_to_strlen(
int width_result;
ret = blf_font_width_to_strlen(font, str, str_len, width / xa, &width_result);
if (r_width) {
*r_width = (float)width_result * xa;
*r_width = float(width_result) * xa;
}
return ret;
}
@ -662,7 +662,7 @@ size_t BLF_width_to_rstrlen(
int width_result;
ret = blf_font_width_to_rstrlen(font, str, str_len, width / xa, &width_result);
if (r_width) {
*r_width = (float)width_result * xa;
*r_width = float(width_result) * xa;
}
return ret;
}
@ -674,7 +674,7 @@ size_t BLF_width_to_rstrlen(
}
void BLF_boundbox_ex(
int fontid, const char *str, const size_t str_len, rcti *r_box, struct ResultBLF *r_info)
int fontid, const char *str, const size_t str_len, rcti *r_box, ResultBLF *r_info)
{
FontBLF *font = blf_get(fontid);
@ -708,7 +708,7 @@ void BLF_width_and_height(
}
}
float BLF_width_ex(int fontid, const char *str, const size_t str_len, struct ResultBLF *r_info)
float BLF_width_ex(int fontid, const char *str, const size_t str_len, ResultBLF *r_info)
{
FontBLF *font = blf_get(fontid);
@ -737,7 +737,7 @@ float BLF_fixed_width(int fontid)
return 0.0f;
}
float BLF_height_ex(int fontid, const char *str, const size_t str_len, struct ResultBLF *r_info)
float BLF_height_ex(int fontid, const char *str, const size_t str_len, ResultBLF *r_info)
{
FontBLF *font = blf_get(fontid);
@ -887,12 +887,9 @@ void blf_draw_buffer__start(FontBLF *font)
srgb_to_linearrgb_v4(buf_info->col_float, buf_info->col_init);
}
}
void blf_draw_buffer__end(void) {}
void blf_draw_buffer__end() {}
void BLF_draw_buffer_ex(int fontid,
const char *str,
const size_t str_len,
struct ResultBLF *r_info)
void BLF_draw_buffer_ex(int fontid, const char *str, const size_t str_len, ResultBLF *r_info)
{
FontBLF *font = blf_get(fontid);

View File

@ -36,13 +36,13 @@ void BLF_default_set(int fontid)
}
}
int BLF_default(void)
int BLF_default()
{
ASSERT_DEFAULT_SET;
return global_font_default;
}
int BLF_set_default(void)
int BLF_set_default()
{
ASSERT_DEFAULT_SET;

View File

@ -177,7 +177,7 @@ static ft_pix blf_unscaled_F26Dot6_to_pixels(FontBLF *font, FT_Pos value)
* group some strings together and render them in one draw-call. This behavior
* is on demand only, between #BLF_batch_draw_begin() and #BLF_batch_draw_end().
*/
static void blf_batch_draw_init(void)
static void blf_batch_draw_init()
{
GPUVertFormat format = {0};
g_batch.pos_loc = GPU_vertformat_attr_add(&format, "pos", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
@ -205,7 +205,7 @@ static void blf_batch_draw_init(void)
GPU_batch_instbuf_set(g_batch.batch, g_batch.verts, true);
}
static void blf_batch_draw_exit(void)
static void blf_batch_draw_exit()
{
GPU_BATCH_DISCARD_SAFE(g_batch.batch);
}
@ -270,7 +270,7 @@ void blf_batch_draw_begin(FontBLF *font)
}
}
static GPUTexture *blf_batch_cache_texture_load(void)
static GPUTexture *blf_batch_cache_texture_load()
{
GlyphCacheBLF *gc = g_batch.glyph_cache;
BLI_assert(gc);
@ -310,7 +310,7 @@ static GPUTexture *blf_batch_cache_texture_load(void)
return gc->texture;
}
void blf_batch_draw(void)
void blf_batch_draw()
{
if (g_batch.glyph_len == 0) {
return;
@ -343,7 +343,7 @@ void blf_batch_draw(void)
g_batch.glyph_len = 0;
}
static void blf_batch_draw_end(void)
static void blf_batch_draw_end()
{
if (!g_batch.active) {
blf_batch_draw();
@ -394,7 +394,7 @@ BLI_INLINE ft_pix blf_kerning(FontBLF *font, const GlyphBLF *g_prev, const Glyph
/* If ASCII we save this value to our cache for quicker access next time. */
if ((g_prev->c < KERNING_CACHE_TABLE_SIZE) && (g->c < KERNING_CACHE_TABLE_SIZE)) {
font->kerning_cache->ascii_table[g->c][g_prev->c] = (int)delta.x;
font->kerning_cache->ascii_table[g->c][g_prev->c] = int(delta.x);
}
if (delta.x != 0) {
@ -416,7 +416,7 @@ static void blf_font_draw_ex(FontBLF *font,
GlyphCacheBLF *gc,
const char *str,
const size_t str_len,
struct ResultBLF *r_info,
ResultBLF *r_info,
const ft_pix pen_y)
{
GlyphBLF *g, *g_prev = nullptr;
@ -452,7 +452,7 @@ static void blf_font_draw_ex(FontBLF *font,
r_info->width = ft_pix_to_int(pen_x);
}
}
void blf_font_draw(FontBLF *font, const char *str, const size_t str_len, struct ResultBLF *r_info)
void blf_font_draw(FontBLF *font, const char *str, const size_t str_len, ResultBLF *r_info)
{
GlyphCacheBLF *gc = blf_glyph_cache_acquire(font);
blf_font_draw_ex(font, gc, str, str_len, r_info, 0);
@ -481,7 +481,7 @@ int blf_font_draw_mono(FontBLF *font, const char *str, const size_t str_len, int
/* do not return this loop if clipped, we want every character tested */
blf_glyph_draw(font, gc, g, ft_pix_to_int_floor(pen_x), ft_pix_to_int_floor(pen_y));
col = BLI_wcwidth((char32_t)g->c);
col = BLI_wcwidth(char32_t(g->c));
if (col < 0) {
col = 1;
}
@ -557,9 +557,9 @@ static void blf_glyph_draw_buffer(FontBufInfoBLF *buf_info,
const char a_byte = *(g->bitmap + x + (yb * g->pitch));
if (a_byte) {
const float a = (a_byte / 255.0f) * b_col_float[3];
const size_t buf_ofs = (((size_t)(chx + x) +
((size_t)(pen_y_px + y) * (size_t)buf_info->dims[0])) *
(size_t)buf_info->ch);
const size_t buf_ofs = ((size_t(chx + x) +
(size_t(pen_y_px + y) * size_t(buf_info->dims[0]))) *
size_t(buf_info->ch));
float *fbuf = buf_info->fbuf + buf_ofs;
float font_pixel[4];
@ -588,9 +588,9 @@ static void blf_glyph_draw_buffer(FontBufInfoBLF *buf_info,
if (a_byte) {
const float a = (a_byte / 255.0f) * b_col_float[3];
const size_t buf_ofs = (((size_t)(chx + x) +
((size_t)(pen_y_px + y) * (size_t)buf_info->dims[0])) *
(size_t)buf_info->ch);
const size_t buf_ofs = ((size_t(chx + x) +
(size_t(pen_y_px + y) * size_t(buf_info->dims[0]))) *
size_t(buf_info->ch));
uchar *cbuf = buf_info->cbuf + buf_ofs;
uchar font_pixel[4];
@ -617,7 +617,7 @@ static void blf_font_draw_buffer_ex(FontBLF *font,
GlyphCacheBLF *gc,
const char *str,
const size_t str_len,
struct ResultBLF *r_info,
ResultBLF *r_info,
ft_pix pen_y)
{
GlyphBLF *g, *g_prev = nullptr;
@ -650,10 +650,7 @@ static void blf_font_draw_buffer_ex(FontBLF *font,
}
}
void blf_font_draw_buffer(FontBLF *font,
const char *str,
const size_t str_len,
struct ResultBLF *r_info)
void blf_font_draw_buffer(FontBLF *font, const char *str, const size_t str_len, ResultBLF *r_info)
{
GlyphCacheBLF *gc = blf_glyph_cache_acquire(font);
blf_font_draw_buffer_ex(font, gc, str, str_len, r_info, 0);
@ -692,7 +689,7 @@ size_t blf_font_width_to_strlen(
size_t i, i_prev;
GlyphCacheBLF *gc = blf_glyph_cache_acquire(font);
const int width_i = (int)width;
const int width_i = int(width);
for (i_prev = i = 0, width_new = pen_x = 0, g_prev = nullptr; (i < str_len) && str[i];
i_prev = i, width_new = pen_x, g_prev = g)
@ -724,9 +721,9 @@ size_t blf_font_width_to_rstrlen(
i = BLI_strnlen(str, str_len);
s = BLI_str_find_prev_char_utf8(&str[i], str);
i = (size_t)(s - str);
i = size_t(s - str);
s_prev = BLI_str_find_prev_char_utf8(s, str);
i_prev = (size_t)(s_prev - str);
i_prev = size_t(s_prev - str);
i_tmp = i;
g = blf_glyph_from_utf8_and_step(font, gc, str, str_len, &i_tmp);
@ -734,7 +731,7 @@ size_t blf_font_width_to_rstrlen(
i = i_prev, s = s_prev, g = g_prev, g_prev = nullptr, width_new = pen_x)
{
s_prev = BLI_str_find_prev_char_utf8(s, str);
i_prev = (size_t)(s_prev - str);
i_prev = size_t(s_prev - str);
if (s_prev != nullptr) {
i_tmp = i_prev;
@ -766,7 +763,7 @@ static void blf_font_boundbox_ex(FontBLF *font,
const char *str,
const size_t str_len,
rcti *box,
struct ResultBLF *r_info,
ResultBLF *r_info,
ft_pix pen_y)
{
GlyphBLF *g, *g_prev = nullptr;
@ -828,7 +825,7 @@ static void blf_font_boundbox_ex(FontBLF *font,
}
}
void blf_font_boundbox(
FontBLF *font, const char *str, const size_t str_len, rcti *r_box, struct ResultBLF *r_info)
FontBLF *font, const char *str, const size_t str_len, rcti *r_box, ResultBLF *r_info)
{
GlyphCacheBLF *gc = blf_glyph_cache_acquire(font);
blf_font_boundbox_ex(font, gc, str, str_len, r_box, r_info, 0);
@ -840,7 +837,7 @@ void blf_font_width_and_height(FontBLF *font,
const size_t str_len,
float *r_width,
float *r_height,
struct ResultBLF *r_info)
ResultBLF *r_info)
{
float xa, ya;
rcti box;
@ -860,14 +857,11 @@ void blf_font_width_and_height(FontBLF *font,
else {
blf_font_boundbox(font, str, str_len, &box, r_info);
}
*r_width = ((float)BLI_rcti_size_x(&box) * xa);
*r_height = ((float)BLI_rcti_size_y(&box) * ya);
*r_width = (float(BLI_rcti_size_x(&box)) * xa);
*r_height = (float(BLI_rcti_size_y(&box)) * ya);
}
float blf_font_width(FontBLF *font,
const char *str,
const size_t str_len,
struct ResultBLF *r_info)
float blf_font_width(FontBLF *font, const char *str, const size_t str_len, ResultBLF *r_info)
{
float xa;
rcti box;
@ -885,13 +879,10 @@ float blf_font_width(FontBLF *font,
else {
blf_font_boundbox(font, str, str_len, &box, r_info);
}
return (float)BLI_rcti_size_x(&box) * xa;
return float(BLI_rcti_size_x(&box)) * xa;
}
float blf_font_height(FontBLF *font,
const char *str,
const size_t str_len,
struct ResultBLF *r_info)
float blf_font_height(FontBLF *font, const char *str, const size_t str_len, ResultBLF *r_info)
{
float ya;
rcti box;
@ -909,13 +900,13 @@ float blf_font_height(FontBLF *font,
else {
blf_font_boundbox(font, str, str_len, &box, r_info);
}
return (float)BLI_rcti_size_y(&box) * ya;
return float(BLI_rcti_size_y(&box)) * ya;
}
float blf_font_fixed_width(FontBLF *font)
{
GlyphCacheBLF *gc = blf_glyph_cache_acquire(font);
float width = (gc) ? (float)gc->fixed_width : font->size / 2.0f;
float width = (gc) ? float(gc->fixed_width) : font->size / 2.0f;
blf_glyph_cache_release(font);
return width;
}
@ -990,11 +981,11 @@ size_t blf_str_offset_from_cursor_position(FontBLF *font,
{
CursorPositionForeachGlyph_Data data{};
data.location_x = location_x;
data.r_offset = (size_t)-1;
data.r_offset = size_t(-1);
blf_font_boundbox_foreach_glyph(font, str, str_len, blf_cursor_position_foreach_glyph, &data);
if (data.r_offset == (size_t)-1) {
if (data.r_offset == size_t(-1)) {
/* We are to the right of the string, so return position of null terminator. */
data.r_offset = BLI_strnlen(str, str_len);
}
@ -1055,7 +1046,7 @@ void blf_str_offset_to_glyph_bounds(FontBLF *font,
static void blf_font_wrap_apply(FontBLF *font,
const char *str,
const size_t str_len,
struct ResultBLF *r_info,
ResultBLF *r_info,
void (*callback)(FontBLF *font,
GlyphCacheBLF *gc,
const char *str,
@ -1161,10 +1152,7 @@ static void blf_font_draw__wrap_cb(FontBLF *font,
{
blf_font_draw_ex(font, gc, str, str_len, nullptr, pen_y);
}
void blf_font_draw__wrap(FontBLF *font,
const char *str,
const size_t str_len,
struct ResultBLF *r_info)
void blf_font_draw__wrap(FontBLF *font, const char *str, const size_t str_len, ResultBLF *r_info)
{
blf_font_wrap_apply(font, str, str_len, r_info, blf_font_draw__wrap_cb, nullptr);
}
@ -1184,7 +1172,7 @@ static void blf_font_boundbox_wrap_cb(FontBLF *font,
BLI_rcti_union(box, &box_single);
}
void blf_font_boundbox__wrap(
FontBLF *font, const char *str, const size_t str_len, rcti *box, struct ResultBLF *r_info)
FontBLF *font, const char *str, const size_t str_len, rcti *box, ResultBLF *r_info)
{
box->xmin = 32000;
box->xmax = -32000;
@ -1207,7 +1195,7 @@ static void blf_font_draw_buffer__wrap_cb(FontBLF *font,
void blf_font_draw_buffer__wrap(FontBLF *font,
const char *str,
const size_t str_len,
struct ResultBLF *r_info)
ResultBLF *r_info)
{
blf_font_wrap_apply(font, str, str_len, r_info, blf_font_draw_buffer__wrap_cb, nullptr);
}
@ -1268,7 +1256,7 @@ char *blf_display_name(FontBLF *font)
/** \name Font Subsystem Init/Exit
* \{ */
int blf_font_init(void)
int blf_font_init()
{
memset(&g_batch, 0, sizeof(g_batch));
BLI_mutex_init(&ft_lib_mutex);
@ -1290,7 +1278,7 @@ int blf_font_init(void)
return err;
}
void blf_font_exit(void)
void blf_font_exit()
{
BLI_mutex_end(&ft_lib_mutex);
if (ftc_manager) {
@ -1426,7 +1414,7 @@ bool blf_ensure_face(FontBLF *font)
fprintf(stderr,
"FT_Attach_File failed to load '%s' with error %d\n",
font->filepath,
(int)err);
int(err));
}
MEM_freeN(mfile);
}
@ -1456,10 +1444,10 @@ bool blf_ensure_face(FontBLF *font)
/* Save TrueType table with bits to quickly test most unicode block coverage. */
TT_OS2 *os2_table = (TT_OS2 *)FT_Get_Sfnt_Table(font->face, FT_SFNT_OS2);
if (os2_table) {
font->unicode_ranges[0] = (uint)os2_table->ulUnicodeRange1;
font->unicode_ranges[1] = (uint)os2_table->ulUnicodeRange2;
font->unicode_ranges[2] = (uint)os2_table->ulUnicodeRange3;
font->unicode_ranges[3] = (uint)os2_table->ulUnicodeRange4;
font->unicode_ranges[0] = uint(os2_table->ulUnicodeRange1);
font->unicode_ranges[1] = uint(os2_table->ulUnicodeRange2);
font->unicode_ranges[2] = uint(os2_table->ulUnicodeRange3);
font->unicode_ranges[3] = uint(os2_table->ulUnicodeRange4);
}
if (FT_IS_FIXED_WIDTH(font)) {
@ -1489,13 +1477,13 @@ struct FaceDetails {
};
/* Details about the fallback fonts we ship, so that we can load only when needed. */
static const struct FaceDetails static_face_details[] = {
static const FaceDetails static_face_details[] = {
{"lastresort.woff2", UINT32_MAX, UINT32_MAX, UINT32_MAX, UINT32_MAX},
{"Noto Sans CJK Regular.woff2", 0x30000083L, 0x29DF3C10L, 0x16L, 0},
{"NotoEmoji-VariableFont_wght.woff2", 0x80000003L, 0x241E4ACL, 0x14000000L, 0x4000000L},
{"NotoSansArabic-VariableFont_wdth,wght.woff2",
TT_UCR_ARABIC,
(uint)TT_UCR_ARABIC_PRESENTATION_FORMS_A,
uint(TT_UCR_ARABIC_PRESENTATION_FORMS_A),
TT_UCR_ARABIC_PRESENTATION_FORMS_B,
0},
{"NotoSansArmenian-VariableFont_wdth,wght.woff2", TT_UCR_ARMENIAN, 0, 0, 0},
@ -1556,9 +1544,9 @@ static FontBLF *blf_font_new_impl(const char *filepath,
if (font->filepath) {
const char *filename = BLI_path_basename(font->filepath);
for (int i = 0; i < (int)ARRAY_SIZE(static_face_details); i++) {
for (int i = 0; i < int(ARRAY_SIZE(static_face_details)); i++) {
if (BLI_path_cmp(static_face_details[i].filename, filename) == 0) {
const struct FaceDetails *static_details = &static_face_details[i];
const FaceDetails *static_details = &static_face_details[i];
font->unicode_ranges[0] = static_details->coverage1;
font->unicode_ranges[1] = static_details->coverage2;
font->unicode_ranges[2] = static_details->coverage3;
@ -1680,7 +1668,7 @@ bool blf_font_size(FontBLF *font, float size)
/* FreeType uses fixed-point integers in 64ths. */
FT_UInt ft_size = round_fl_to_uint(size * 64.0f);
/* Adjust our new size to be on even 64ths. */
size = (float)ft_size / 64.0f;
size = float(ft_size) / 64.0f;
if (font->size != size) {
if (font->flags & BLF_CACHED) {

View File

@ -52,7 +52,7 @@ int BLF_load_mono_default(const bool unique)
return font_id;
}
static void blf_load_datafiles_dir(void)
static void blf_load_datafiles_dir()
{
const char *datafiles_fonts_dir = BLF_DATAFILES_FONTS_DIR SEP_STR;
const char *path = BKE_appdir_folder_id(BLENDER_DATAFILES, datafiles_fonts_dir);
@ -65,7 +65,7 @@ static void blf_load_datafiles_dir(void)
return;
}
struct direntry *file_list;
direntry *file_list;
uint file_list_num = BLI_filelist_dir_contents(path, &file_list);
for (int i = 0; i < file_list_num; i++) {
if (S_ISDIR(file_list[i].s.st_mode)) {
@ -94,7 +94,7 @@ static void blf_load_datafiles_dir(void)
BLI_filelist_free(file_list, file_list_num);
}
void BLF_load_font_stack(void)
void BLF_load_font_stack()
{