Compare commits
2 Commits
tmp-eevee-
...
arcpatch-D
Author | SHA1 | Date | |
---|---|---|---|
d1c8699f83 | |||
![]() |
4d18250a2a |
@@ -61,17 +61,17 @@ ContinuationIndentWidth: 4
|
||||
# This tries to match Blender's style as much as possible. One
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping: {
|
||||
AfterClass: 'false',
|
||||
AfterControlStatement: 'false',
|
||||
AfterEnum : 'false',
|
||||
AfterFunction : 'true',
|
||||
AfterNamespace : 'false',
|
||||
AfterStruct : 'false',
|
||||
AfterUnion : 'false',
|
||||
BeforeCatch : 'true',
|
||||
BeforeElse : 'true',
|
||||
IndentBraces : 'false',
|
||||
AfterObjCDeclaration: 'true',
|
||||
AfterClass: 'false'
|
||||
AfterControlStatement: 'false'
|
||||
AfterEnum : 'false'
|
||||
AfterFunction : 'true'
|
||||
AfterNamespace : 'false'
|
||||
AfterStruct : 'false'
|
||||
AfterUnion : 'false'
|
||||
BeforeCatch : 'true'
|
||||
BeforeElse : 'true'
|
||||
IndentBraces : 'false'
|
||||
AfterObjCDeclaration: 'true'
|
||||
}
|
||||
|
||||
# For switch statements, indent the cases.
|
||||
|
@@ -1,5 +0,0 @@
|
||||
${CommitTitle}
|
||||
|
||||
${CommitBody}
|
||||
|
||||
Pull Request #${PullRequestIndex}
|
@@ -1,3 +0,0 @@
|
||||
${PullRequestTitle}
|
||||
|
||||
Pull Request #${PullRequestIndex}
|
@@ -1,44 +0,0 @@
|
||||
name: Bug Report
|
||||
about: File a bug report
|
||||
labels:
|
||||
- "type::Report"
|
||||
- "status::Needs Triage"
|
||||
- "priority::Normal"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Instructions
|
||||
First time reporting? See [tips](https://wiki.blender.org/wiki/Process/Bug_Reports).
|
||||
|
||||
* Use **Help > Report a Bug** in Blender to fill system information and exact Blender version.
|
||||
* Test [daily builds](https://builder.blender.org/) to verify if the issue is already fixed.
|
||||
* Test [previous versions](https://download.blender.org/release/) to find an older working version.
|
||||
* For feature requests, feedback, questions or build issues, see [communication channels](https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests).
|
||||
* If there are multiple bugs, make multiple bug reports.
|
||||
|
||||
- type: textarea
|
||||
id: body
|
||||
attributes:
|
||||
label: "Description"
|
||||
hide_label: true
|
||||
value: |
|
||||
**System Information**
|
||||
Operating system:
|
||||
Graphics card:
|
||||
|
||||
**Blender Version**
|
||||
Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen)
|
||||
Worked: (newest version of Blender that worked as expected)
|
||||
|
||||
**Short description of error**
|
||||
|
||||
**Exact steps for others to reproduce the error**
|
||||
Based on the default startup or an attached .blend file (as simple as possible).
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Help the developers
|
||||
|
||||
Bug fixing is important, the developers will handle reports swiftly. For that reason, carefully provide exact steps and a **small and simple .blend file** to reproduce the problem. You do your half of the work, then we do our half!
|
@@ -1 +0,0 @@
|
||||
blank_issues_enabled: false
|
@@ -1,10 +0,0 @@
|
||||
name: Design
|
||||
about: Create a design task (for developers only)
|
||||
labels:
|
||||
- "type::Design"
|
||||
body:
|
||||
- type: textarea
|
||||
id: body
|
||||
attributes:
|
||||
label: "Description"
|
||||
hide_label: true
|
@@ -1,10 +0,0 @@
|
||||
name: To Do
|
||||
about: Create a to do task (for developers only)
|
||||
labels:
|
||||
- "type::To Do"
|
||||
body:
|
||||
- type: textarea
|
||||
id: body
|
||||
attributes:
|
||||
label: "Description"
|
||||
hide_label: true
|
@@ -1,17 +0,0 @@
|
||||
name: Pull Request
|
||||
about: Contribute code to Blender
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Instructions
|
||||
|
||||
Guides to [contributing code](https://wiki.blender.org/index.php/Dev:Doc/Process/Contributing_Code) and effective [code review](https://wiki.blender.org/index.php/Dev:Doc/Tools/Code_Review).
|
||||
|
||||
By submitting code here, you agree that the code is (compatible with) GNU GPL v2 or later.
|
||||
|
||||
- type: textarea
|
||||
id: body
|
||||
attributes:
|
||||
label: "Description"
|
||||
hide_label: true
|
156
CMakeLists.txt
156
CMakeLists.txt
@@ -117,19 +117,15 @@ enable_testing()
|
||||
# Keep in sync with: https://wiki.blender.org/wiki/Building_Blender
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "11.0.0")
|
||||
message(FATAL_ERROR "The minimum supported version of GCC is 11.0.0, found ${CMAKE_C_COMPILER_VERSION}")
|
||||
if("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "9.3.1")
|
||||
message(FATAL_ERROR "The minimum supported version of GCC is 9.3.1")
|
||||
endif()
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND ("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "8.0"))
|
||||
message(FATAL_ERROR "The minimum supported version of CLANG is 8.0, found ${CMAKE_C_COMPILER_VERSION}")
|
||||
message(FATAL_ERROR "The minimum supported version of CLANG is 8.0")
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
if(MSVC_VERSION VERSION_LESS "1928")
|
||||
# MSVC_VERSION is an internal version number, it doesn't map to something
|
||||
# the end user would recognize as a version. Because of this, for MSVC we do
|
||||
# not show the found number. When using our make.bat the actual VS version
|
||||
# will be displayed on the console before starting the build, anyway.
|
||||
message(FATAL_ERROR "The minimum supported version of MSVC is 2019 (16.9.16)")
|
||||
endif()
|
||||
endif()
|
||||
@@ -167,26 +163,14 @@ get_blender_version()
|
||||
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
|
||||
mark_as_advanced(WITH_BLENDER)
|
||||
|
||||
if(WIN32)
|
||||
option(WITH_BLENDER_THUMBNAILER "\
|
||||
Build \"BlendThumb.dll\" helper for Windows explorer integration to support extracting \
|
||||
thumbnails from `.blend` files."
|
||||
ON
|
||||
)
|
||||
else()
|
||||
set(_option_default ON)
|
||||
if(APPLE)
|
||||
# In future, can be used with `quicklookthumbnailing/qlthumbnailreply`
|
||||
# to create file thumbnails for say Finder.
|
||||
# Turn it off for now, even though it can build on APPLE, it's not likely to be useful.
|
||||
set(_option_default OFF)
|
||||
endif()
|
||||
option(WITH_BLENDER_THUMBNAILER "\
|
||||
Build stand-alone \"blender-thumbnailer\" command-line thumbnail extraction utility, \
|
||||
intended for use by file-managers to extract PNG images from `.blend` files."
|
||||
${_option_default}
|
||||
)
|
||||
unset(_option_default)
|
||||
# In future, can be used with `quicklookthumbnailing/qlthumbnailreply` to create file
|
||||
# thumbnails for say Finder. Turn it off for now.
|
||||
option(WITH_BLENDER_THUMBNAILER "Build \"blender-thumbnailer\" thumbnail extraction utility" OFF)
|
||||
elseif(WIN32)
|
||||
option(WITH_BLENDER_THUMBNAILER "Build \"BlendThumb.dll\" helper for Windows explorer integration" ON)
|
||||
else()
|
||||
option(WITH_BLENDER_THUMBNAILER "Build \"blender-thumbnailer\" thumbnail extraction utility" ON)
|
||||
endif()
|
||||
|
||||
option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
|
||||
@@ -226,19 +210,14 @@ option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
|
||||
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
|
||||
mark_as_advanced(WITH_SYSTEM_BULLET)
|
||||
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ON)
|
||||
|
||||
set(_option_default ON)
|
||||
if(APPLE)
|
||||
# There's no OpenXR runtime in sight for macOS, neither is code well
|
||||
# tested there -> disable it by default.
|
||||
set(_option_default OFF)
|
||||
endif()
|
||||
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" ${_option_default})
|
||||
if(APPLE)
|
||||
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" OFF)
|
||||
mark_as_advanced(WITH_XR_OPENXR)
|
||||
else()
|
||||
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" ON)
|
||||
endif()
|
||||
unset(_option_default)
|
||||
|
||||
option(WITH_GMP "Enable features depending on GMP (Exact Boolean)" ON)
|
||||
|
||||
# Compositor
|
||||
@@ -370,12 +349,11 @@ else()
|
||||
set(WITH_COREAUDIO OFF)
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
set(_option_default ON)
|
||||
if(APPLE)
|
||||
set(_option_default OFF)
|
||||
option(WITH_JACK "Enable JACK Support (http://www.jackaudio.org)" OFF)
|
||||
else()
|
||||
option(WITH_JACK "Enable JACK Support (http://www.jackaudio.org)" ON)
|
||||
endif()
|
||||
option(WITH_JACK "Enable JACK Support (http://www.jackaudio.org)" ${_option_default})
|
||||
unset(_option_default)
|
||||
option(WITH_JACK_DYNLOAD "Enable runtime dynamic JACK libraries loading" OFF)
|
||||
else()
|
||||
set(WITH_JACK OFF)
|
||||
@@ -417,26 +395,6 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
|
||||
# Freestyle
|
||||
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
|
||||
|
||||
# Libraries.
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Optionally build without pre-compiled libraries.
|
||||
# NOTE: this could be supported on all platforms however in practice UNIX is the only platform
|
||||
# that has good support for detecting installed libraries.
|
||||
option(WITH_LIBS_PRECOMPILED "\
|
||||
Detect and link against pre-compiled libraries (typically found under \"../lib/\"). \
|
||||
Disabling this option will use the system libraries although cached paths \
|
||||
that point to pre-compiled libraries will be left as-is."
|
||||
ON
|
||||
)
|
||||
mark_as_advanced(WITH_LIBS_PRECOMPILED)
|
||||
|
||||
option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
|
||||
if(WITH_STATIC_LIBS)
|
||||
option(WITH_BOOST_ICU "Boost uses ICU library (required for linking with static Boost built with libicu)." OFF)
|
||||
mark_as_advanced(WITH_BOOST_ICU)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Misc
|
||||
if(WIN32 OR APPLE)
|
||||
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
|
||||
@@ -444,6 +402,11 @@ endif()
|
||||
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_INSTALL_PORTABLE "Install redistributable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
|
||||
option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
|
||||
if(WITH_STATIC_LIBS)
|
||||
option(WITH_BOOST_ICU "Boost uses ICU library (required for linking with static Boost built with libicu)." OFF)
|
||||
mark_as_advanced(WITH_BOOST_ICU)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
|
||||
@@ -524,7 +487,7 @@ endif()
|
||||
if(NOT APPLE)
|
||||
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" ON)
|
||||
option(WITH_CYCLES_HIP_BINARIES "Build Cycles AMD HIP binaries" OFF)
|
||||
set(CYCLES_HIP_BINARIES_ARCH gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 gfx1035 gfx1100 gfx1101 gfx1102 CACHE STRING "AMD HIP architectures to build binaries for")
|
||||
set(CYCLES_HIP_BINARIES_ARCH gfx900 gfx906 gfx90c gfx902 gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 gfx1035 gfx1100 gfx1101 gfx1102 CACHE STRING "AMD HIP architectures to build binaries for")
|
||||
mark_as_advanced(WITH_CYCLES_DEVICE_HIP)
|
||||
mark_as_advanced(CYCLES_HIP_BINARIES_ARCH)
|
||||
endif()
|
||||
@@ -538,14 +501,12 @@ endif()
|
||||
if(NOT APPLE)
|
||||
option(WITH_CYCLES_DEVICE_ONEAPI "Enable Cycles oneAPI compute support" OFF)
|
||||
option(WITH_CYCLES_ONEAPI_BINARIES "Enable Ahead-Of-Time compilation for Cycles oneAPI device" OFF)
|
||||
option(WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION "Switch target of oneAPI implementation from SYCL devices to Host Task (single thread on CPU). This option is only for debugging purposes." OFF)
|
||||
|
||||
# https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/ahead-of-time-compilation.html
|
||||
# acm-g10 is the target for the first Intel Arc Alchemist GPUs.
|
||||
set(CYCLES_ONEAPI_SPIR64_GEN_DEVICES "acm-g10" CACHE STRING "oneAPI Intel GPU architectures to build binaries for")
|
||||
set(CYCLES_ONEAPI_SYCL_TARGETS spir64 spir64_gen CACHE STRING "oneAPI targets to build AOT binaries for")
|
||||
|
||||
mark_as_advanced(WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION)
|
||||
mark_as_advanced(CYCLES_ONEAPI_SPIR64_GEN_DEVICES)
|
||||
mark_as_advanced(CYCLES_ONEAPI_SYCL_TARGETS)
|
||||
endif()
|
||||
@@ -632,12 +593,16 @@ mark_as_advanced(
|
||||
# Metal
|
||||
|
||||
if(APPLE)
|
||||
option(WITH_METAL_BACKEND "Use Metal for graphics instead of (or as well as) OpenGL on macOS." ON)
|
||||
option(WITH_METAL_BACKEND "Use Metal for graphics instead of (or as well as) OpenGL on macOS." OFF)
|
||||
mark_as_advanced(WITH_METAL_BACKEND)
|
||||
else()
|
||||
set(WITH_METAL_BACKEND OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_METAL_BACKEND)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
getDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
|
||||
set(CPACK_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${})
|
||||
@@ -784,6 +749,11 @@ if("${CMAKE_GENERATOR}" MATCHES "Ninja")
|
||||
mark_as_advanced(WITH_NINJA_POOL_JOBS)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_CXX11_ABI "Use native C++11 ABI of compiler" ON)
|
||||
mark_as_advanced(WITH_CXX11_ABI)
|
||||
endif()
|
||||
|
||||
# Installation process.
|
||||
set(POSTINSTALL_SCRIPT "" CACHE FILEPATH "Run given CMake script after installation process")
|
||||
mark_as_advanced(POSTINSTALL_SCRIPT)
|
||||
@@ -865,17 +835,27 @@ endif()
|
||||
# enable boost for cycles, audaspace or i18n
|
||||
# otherwise if the user disabled
|
||||
|
||||
set_and_warn_dependency(WITH_BOOST WITH_CYCLES OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_INTERNATIONAL OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_OPENVDB OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
|
||||
if(WITH_CYCLES)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_CYCLES_OSL OFF)
|
||||
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
set_and_warn_dependency(WITH_PUGIXML WITH_OPENIMAGEIO OFF)
|
||||
|
||||
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
||||
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))
|
||||
message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
|
||||
set(WITH_BOOST OFF)
|
||||
endif()
|
||||
|
||||
set_and_warn_dependency(WITH_TBB WITH_CYCLES OFF)
|
||||
set_and_warn_dependency(WITH_TBB WITH_USD OFF)
|
||||
set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF)
|
||||
set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
|
||||
set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
|
||||
|
||||
@@ -884,10 +864,14 @@ set_and_warn_dependency(WITH_OPENVDB WITH_NANOVDB OFF)
|
||||
|
||||
# OpenVDB and OpenColorIO uses 'half' type from OpenEXR
|
||||
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF)
|
||||
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENCOLORIO OFF)
|
||||
|
||||
# Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF.
|
||||
set_and_warn_dependency(WITH_IMAGE_TIFF WITH_HARU OFF)
|
||||
|
||||
# USD needs OpenSubDiv, since that is used by the Cycles Hydra render delegate.
|
||||
set_and_warn_dependency(WITH_OPENSUBDIV WITH_USD OFF)
|
||||
|
||||
# auto enable openimageio for cycles
|
||||
if(WITH_CYCLES)
|
||||
set(WITH_OPENIMAGEIO ON)
|
||||
@@ -901,6 +885,17 @@ else()
|
||||
set(WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
|
||||
# auto enable openimageio linking dependencies
|
||||
if(WITH_OPENIMAGEIO)
|
||||
set(WITH_IMAGE_OPENEXR ON)
|
||||
set(WITH_IMAGE_TIFF ON)
|
||||
endif()
|
||||
|
||||
# auto enable alembic linking dependencies
|
||||
if(WITH_ALEMBIC)
|
||||
set(WITH_IMAGE_OPENEXR ON)
|
||||
endif()
|
||||
|
||||
# don't store paths to libs for portable distribution
|
||||
if(WITH_INSTALL_PORTABLE)
|
||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||
@@ -1026,8 +1021,6 @@ set(PLATFORM_LINKLIBS "")
|
||||
# - CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
set(PLATFORM_LINKFLAGS "")
|
||||
set(PLATFORM_LINKFLAGS_DEBUG "")
|
||||
set(PLATFORM_LINKFLAGS_RELEASE "")
|
||||
set(PLATFORM_LINKFLAGS_EXECUTABLE "")
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
if(WITH_COMPILER_ASAN)
|
||||
@@ -1105,6 +1098,14 @@ if(WITH_CYCLES)
|
||||
"Configure OIIO or disable WITH_CYCLES"
|
||||
)
|
||||
endif()
|
||||
if(NOT WITH_BOOST)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Cycles requires WITH_BOOST, the library may not have been found. "
|
||||
"Configure BOOST or disable WITH_CYCLES"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
if(NOT WITH_LLVM)
|
||||
message(
|
||||
@@ -1241,6 +1242,13 @@ if(WITH_OPENGL)
|
||||
add_definitions(-DWITH_OPENGL)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure Vulkan.
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
list(APPEND BLENDER_GL_LIBRARIES ${VULKAN_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configure Metal
|
||||
|
||||
@@ -1290,14 +1298,12 @@ endif()
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configure Bullet
|
||||
|
||||
if(WITH_BULLET)
|
||||
if(WITH_SYSTEM_BULLET)
|
||||
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
|
||||
find_package(Bullet)
|
||||
set_and_warn_library_found("Bullet" BULLET_FOUND WITH_BULLET)
|
||||
else()
|
||||
set(BULLET_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/bullet2/src")
|
||||
set(BULLET_LIBRARIES "extern_bullet")
|
||||
endif()
|
||||
# set(BULLET_LIBRARIES "")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1457,9 +1463,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
add_check_c_compiler_flag(C_WARNINGS C_WARN_TYPE_LIMITS -Wtype-limits)
|
||||
add_check_c_compiler_flag(C_WARNINGS C_WARN_FORMAT_SIGN -Wformat-signedness)
|
||||
add_check_c_compiler_flag(C_WARNINGS C_WARN_RESTRICT -Wrestrict)
|
||||
# Useful but too many false positives and inconvenient to suppress each occurrence.
|
||||
add_check_c_compiler_flag(C_WARNINGS C_WARN_NO_STRINGOP_OVERREAD -Wno-stringop-overread)
|
||||
add_check_c_compiler_flag(C_WARNINGS C_WARN_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow)
|
||||
|
||||
# C-only.
|
||||
add_check_c_compiler_flag(C_WARNINGS C_WARN_NO_NULL -Wnonnull)
|
||||
@@ -1499,9 +1502,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
add_check_cxx_compiler_flag(CXX_WARNINGS CXX_WARN_RESTRICT -Wrestrict)
|
||||
add_check_cxx_compiler_flag(CXX_WARNINGS CXX_WARN_NO_SUGGEST_OVERRIDE -Wno-suggest-override)
|
||||
add_check_cxx_compiler_flag(CXX_WARNINGS CXX_WARN_UNINITIALIZED -Wuninitialized)
|
||||
# Useful but too many false positives and inconvenient to suppress each occurrence.
|
||||
add_check_cxx_compiler_flag(CXX_WARNINGS CXX_WARN_NO_STRINGOP_OVERREAD -Wno-stringop-overread)
|
||||
add_check_cxx_compiler_flag(CXX_WARNINGS CXX_WARN_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow)
|
||||
|
||||
# causes too many warnings
|
||||
if(NOT APPLE)
|
||||
@@ -1721,6 +1721,12 @@ if(
|
||||
string(APPEND CMAKE_C_FLAGS " -std=gnu11")
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(NOT WITH_CXX11_ABI)
|
||||
string(APPEND PLATFORM_CFLAGS " -D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_COMPILER_SHORT_FILE_MACRO)
|
||||
# Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
|
||||
add_check_c_compiler_flag(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
|
||||
|
13
GNUmakefile
13
GNUmakefile
@@ -71,13 +71,6 @@ Static Source Code Checking
|
||||
* check_mypy: Checks all Python scripts using mypy,
|
||||
see: source/tools/check_source/check_mypy_config.py scripts which are included.
|
||||
|
||||
Documentation Checking
|
||||
|
||||
* check_wiki_file_structure:
|
||||
Check the WIKI documentation for the source-tree's file structure
|
||||
matches Blender's source-code.
|
||||
See: https://wiki.blender.org/wiki/Source/File_Structure
|
||||
|
||||
Spell Checkers
|
||||
This runs the spell checker from the developer tools repositor.
|
||||
|
||||
@@ -218,7 +211,7 @@ endif
|
||||
# Set the LIBDIR, an empty string when not found.
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
|
||||
ifeq (, $(LIBDIR))
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU}_glibc_228)
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_centos7_${CPU})
|
||||
endif
|
||||
ifeq (, $(LIBDIR))
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE})
|
||||
@@ -488,10 +481,6 @@ check_smatch: .FORCE
|
||||
check_mypy: .FORCE
|
||||
@$(PYTHON) "$(BLENDER_DIR)/source/tools/check_source/check_mypy.py"
|
||||
|
||||
check_wiki_file_structure: .FORCE
|
||||
@PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_wiki/check_wiki_file_structure.py"
|
||||
|
||||
check_spelling_py: .FORCE
|
||||
@cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
|
38
README.md
38
README.md
@@ -1,38 +0,0 @@
|
||||
<!--
|
||||
Keep this document short & concise,
|
||||
linking to external resources instead of including content in-line.
|
||||
See 'release/text/readme.html' for the end user read-me.
|
||||
-->
|
||||
|
||||
Blender
|
||||
=======
|
||||
|
||||
Blender is the free and open source 3D creation suite.
|
||||
It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing,
|
||||
motion tracking and video editing.
|
||||
|
||||

|
||||
|
||||
Project Pages
|
||||
-------------
|
||||
|
||||
- [Main Website](http://www.blender.org)
|
||||
- [Reference Manual](https://docs.blender.org/manual/en/latest/index.html)
|
||||
- [User Community](https://www.blender.org/community/)
|
||||
|
||||
Development
|
||||
-----------
|
||||
|
||||
- [Build Instructions](https://wiki.blender.org/wiki/Building_Blender)
|
||||
- [Code Review & Bug Tracker](https://developer.blender.org)
|
||||
- [Developer Forum](https://devtalk.blender.org)
|
||||
- [Developer Documentation](https://wiki.blender.org)
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Blender as a whole is licensed under the GNU General Public License, Version 3.
|
||||
Individual files may have a different, but compatible license.
|
||||
|
||||
See [blender.org/about/license](https://www.blender.org/about/license) for details.
|
@@ -23,11 +23,13 @@ elseif(APPLE)
|
||||
set(BOOST_BUILD_COMMAND ./b2)
|
||||
set(BOOST_BUILD_OPTIONS toolset=clang-darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
|
||||
set(BOOST_HARVEST_CMD echo .)
|
||||
set(BOOST_PATCH_COMMAND echo .)
|
||||
else()
|
||||
set(BOOST_HARVEST_CMD echo .)
|
||||
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
|
||||
set(BOOST_BUILD_COMMAND ./b2)
|
||||
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
|
||||
set(BOOST_PATCH_COMMAND echo .)
|
||||
endif()
|
||||
|
||||
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
|
||||
@@ -70,7 +72,7 @@ ExternalProject_Add(external_boost
|
||||
URL_HASH ${BOOST_HASH_TYPE}=${BOOST_HASH}
|
||||
PREFIX ${BUILD_DIR}/boost
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/boost/src/external_boost < ${PATCH_DIR}/boost.diff
|
||||
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
|
||||
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=${BOOST_ARCHITECTURE} address-model=${BOOST_ADDRESS_MODEL} link=shared threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
|
||||
BUILD_IN_SOURCE 1
|
||||
|
@@ -12,6 +12,7 @@ if(UNIX)
|
||||
automake
|
||||
bison
|
||||
${_libtoolize_name}
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
tclsh
|
||||
|
@@ -32,8 +32,7 @@ function(download_source dep)
|
||||
message("Checking source : ${dep} (${TARGET_FILE})")
|
||||
if(NOT EXISTS ${TARGET_FILE})
|
||||
message("Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
|
||||
file(
|
||||
DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
|
||||
file(DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
|
||||
TIMEOUT 1800 # seconds
|
||||
EXPECTED_HASH ${TARGET_HASH_TYPE}=${TARGET_HASH}
|
||||
TLS_VERIFY ON
|
||||
@@ -43,7 +42,7 @@ function(download_source dep)
|
||||
if(EXISTS ${TARGET_FILE})
|
||||
# Sometimes the download fails, but that is not a
|
||||
# fail condition for "file(DOWNLOAD" it will warn about
|
||||
# a CRC mismatch and just carry on, we need to explicitly
|
||||
# a crc mismatch and just carry on, we need to explicitly
|
||||
# catch this and remove the bogus 0 byte file so we can
|
||||
# retry without having to go find the file and manually
|
||||
# delete it.
|
||||
|
@@ -18,8 +18,7 @@ set(EMBREE_EXTRA_ARGS
|
||||
if (NOT BLENDER_PLATFORM_ARM)
|
||||
set(EMBREE_EXTRA_ARGS
|
||||
${EMBREE_EXTRA_ARGS}
|
||||
-DEMBREE_MAX_ISA=AVX2
|
||||
)
|
||||
-DEMBREE_MAX_ISA=AVX2)
|
||||
endif()
|
||||
|
||||
if(TBB_STATIC_LIBRARY)
|
||||
|
@@ -26,6 +26,5 @@ endif()
|
||||
|
||||
add_dependencies(
|
||||
external_epoxy
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
@@ -1,55 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(temp_LIBDIR ${mingw_LIBDIR})
|
||||
else()
|
||||
set(temp_LIBDIR ${LIBDIR})
|
||||
endif()
|
||||
|
||||
set(FFMPEG_CFLAGS "\
|
||||
-I${temp_LIBDIR}/lame/include \
|
||||
-I${temp_LIBDIR}/openjpeg/include/ \
|
||||
-I${temp_LIBDIR}/ogg/include \
|
||||
-I${temp_LIBDIR}/vorbis/include \
|
||||
-I${temp_LIBDIR}/theora/include \
|
||||
-I${temp_LIBDIR}/opus/include \
|
||||
-I${temp_LIBDIR}/vpx/include \
|
||||
-I${temp_LIBDIR}/x264/include \
|
||||
-I${temp_LIBDIR}/xvidcore/include \
|
||||
-I${temp_LIBDIR}/zlib/include \
|
||||
-I${temp_LIBDIR}/aom/include"
|
||||
)
|
||||
set(FFMPEG_LDFLAGS "\
|
||||
-L${temp_LIBDIR}/lame/lib \
|
||||
-L${temp_LIBDIR}/openjpeg/lib \
|
||||
-L${temp_LIBDIR}/ogg/lib \
|
||||
-L${temp_LIBDIR}/vorbis/lib \
|
||||
-L${temp_LIBDIR}/theora/lib \
|
||||
-L${temp_LIBDIR}/opus/lib \
|
||||
-L${temp_LIBDIR}/vpx/lib \
|
||||
-L${temp_LIBDIR}/x264/lib \
|
||||
-L${temp_LIBDIR}/xvidcore/lib \
|
||||
-L${temp_LIBDIR}/zlib/lib \
|
||||
-L${temp_LIBDIR}/aom/lib"
|
||||
)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
--pkg-config-flags=--static
|
||||
--extra-cflags=${FFMPEG_CFLAGS}
|
||||
--extra-ldflags=${FFMPEG_LDFLAGS}
|
||||
)
|
||||
set(FFMPEG_ENV "PKG_CONFIG_PATH=\
|
||||
${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/x264/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/vorbis/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/ogg/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/vpx/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/theora/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/opus/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/aom/lib/pkgconfig"
|
||||
)
|
||||
|
||||
unset(temp_LIBDIR)
|
||||
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/opus/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include -I${mingw_LIBDIR}/aom/include")
|
||||
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/opus/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib -L${mingw_LIBDIR}/aom/lib")
|
||||
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
|
||||
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}:${mingw_LIBDIR}/vpx/lib/pkgconfig:${mingw_LIBDIR}/theora/lib/pkgconfig:${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:${mingw_LIBDIR}/aom/lib/pkgconfig:)
|
||||
|
||||
if(WIN32)
|
||||
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
|
||||
|
@@ -35,7 +35,6 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
# harfbuzz *NEEDS* to find freetype.lib and will not be conviced to take alternative names so just give it
|
||||
# what it wants.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/freetype/lib/freetype2st.lib ${LIBDIR}/freetype/lib/freetype.lib
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -18,7 +18,6 @@ ExternalProject_Add(external_fribidi
|
||||
add_dependencies(
|
||||
external_fribidi
|
||||
external_python
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
||||
|
@@ -22,14 +22,6 @@ elseif(UNIX AND NOT APPLE)
|
||||
)
|
||||
endif()
|
||||
|
||||
# Boolean crashes with Arm assembly, see T103423.
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--disable-assembly
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_gmp
|
||||
URL file://${PACKAGE_DIR}/${GMP_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
@@ -53,7 +45,6 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
@@ -62,7 +53,6 @@ if(BUILD_MODE STREQUAL Debug AND WIN32)
|
||||
ExternalProject_Add_Step(external_gmp after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
||||
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -5,12 +5,7 @@ if(WIN32)
|
||||
set(HARFBUZZ_PKG_ENV FREETYPE_DIR=${LIBDIR}/freetype)
|
||||
else()
|
||||
set(HARFBUZZ_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
set(HARFBUZZ_PKG_ENV "PKG_CONFIG_PATH=\
|
||||
${LIBDIR}/freetype/lib/pkgconfig:\
|
||||
${LIBDIR}/brotli/lib/pkgconfig:\
|
||||
${LIBDIR}/lib/python3.10/pkgconfig:\
|
||||
$PKG_CONFIG_PATH"
|
||||
)
|
||||
set(HARFBUZZ_PKG_ENV PKG_CONFIG_PATH=${LIBDIR}/freetype/lib/pkgconfig:${LIBDIR}/brotli/lib/pkgconfig:$PKG_CONFIG_PATH)
|
||||
endif()
|
||||
|
||||
set(HARFBUZZ_EXTRA_OPTIONS
|
||||
@@ -18,9 +13,6 @@ set(HARFBUZZ_EXTRA_OPTIONS
|
||||
-Dfreetype=enabled
|
||||
-Dglib=disabled
|
||||
-Dgobject=disabled
|
||||
# Only used for command line utilities,
|
||||
# disable as this would add an addition & unnecessary build-dependency.
|
||||
-Dcairo=disabled
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_harfbuzz
|
||||
@@ -28,16 +20,8 @@ ExternalProject_Add(external_harfbuzz
|
||||
URL_HASH ${HARFBUZZ_HASH_TYPE}=${HARFBUZZ_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/harfbuzz
|
||||
|
||||
CONFIGURE_COMMAND ${HARFBUZZ_CONFIGURE_ENV} &&
|
||||
${CMAKE_COMMAND} -E env ${HARFBUZZ_PKG_ENV}
|
||||
${MESON} setup
|
||||
--prefix ${LIBDIR}/harfbuzz ${HARFBUZZ_EXTRA_OPTIONS}
|
||||
--default-library static
|
||||
--libdir lib
|
||||
${BUILD_DIR}/harfbuzz/src/external_harfbuzz-build
|
||||
${BUILD_DIR}/harfbuzz/src/external_harfbuzz
|
||||
|
||||
${CMAKE_COMMAND} -E env ${HARFBUZZ_PKG_ENV} ${MESON} setup --prefix ${LIBDIR}/harfbuzz ${HARFBUZZ_EXTRA_OPTIONS} --default-library static --libdir lib ${BUILD_DIR}/harfbuzz/src/external_harfbuzz-build ${BUILD_DIR}/harfbuzz/src/external_harfbuzz
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
INSTALL_DIR ${LIBDIR}/harfbuzz
|
||||
@@ -46,8 +30,6 @@ ExternalProject_Add(external_harfbuzz
|
||||
add_dependencies(
|
||||
external_harfbuzz
|
||||
external_python
|
||||
external_freetype
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
||||
@@ -59,3 +41,4 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@@ -13,21 +13,20 @@ if(WIN32)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
add_custom_target(Harvest_Release_Results
|
||||
COMMAND # JPEG rename lib-file + copy include.
|
||||
COMMAND # jpeg rename libfile + copy include
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpeg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpeg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
|
||||
# PNG.
|
||||
# png
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
|
||||
# FREEGLUT -> OPENGL.
|
||||
# freeglut-> opengl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||
|
||||
DEPENDS
|
||||
)
|
||||
endif()
|
||||
|
||||
else()
|
||||
else(WIN32)
|
||||
|
||||
function(harvest from to)
|
||||
set(pattern "")
|
||||
@@ -64,8 +63,6 @@ else()
|
||||
# Ideally this would be done as part of the Blender build since it makes assumptions
|
||||
# about where the files will be installed. However it would add patchelf as a new
|
||||
# dependency for building.
|
||||
#
|
||||
# Also removes versioned symlinks, which give errors with macOS notarization.
|
||||
if(APPLE)
|
||||
set(set_rpath_cmd python3 ${CMAKE_CURRENT_SOURCE_DIR}/darwin/set_rpath.py @loader_path)
|
||||
else()
|
||||
@@ -79,11 +76,7 @@ else()
|
||||
cmake_policy(SET CMP0009 NEW)\n
|
||||
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}) \n
|
||||
foreach(f \${shared_libs}) \n
|
||||
if(IS_SYMLINK \${f})\n
|
||||
if(APPLE)\n
|
||||
file(REMOVE_RECURSE \${f})
|
||||
endif()\n
|
||||
else()\n
|
||||
if(NOT IS_SYMLINK \${f})\n
|
||||
execute_process(COMMAND ${set_rpath_cmd} \${f}) \n
|
||||
endif()\n
|
||||
endforeach()")
|
||||
@@ -108,21 +101,15 @@ else()
|
||||
install(CODE "\
|
||||
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}\.so*) \n
|
||||
foreach(f \${shared_libs}) \n
|
||||
if(IS_SYMLINK \${f})\n
|
||||
if(APPLE)\n
|
||||
file(REMOVE_RECURSE \${f})
|
||||
endif()\n
|
||||
else()\n
|
||||
get_filename_component(f_dir \${f} DIRECTORY) \n
|
||||
file(RELATIVE_PATH relative_dir \${f_dir} ${HARVEST_TARGET}) \n
|
||||
execute_process(COMMAND ${set_rpath_cmd}/\${relative_dir}../lib \${f}) \n
|
||||
endif()\n
|
||||
endforeach()")
|
||||
endfunction()
|
||||
|
||||
harvest(alembic/include alembic/include "*.h")
|
||||
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
|
||||
harvest_rpath_bin(alembic/bin alembic/bin "*")
|
||||
harvest(alembic/bin alembic/bin "*")
|
||||
harvest(brotli/include brotli/include "*.h")
|
||||
harvest(brotli/lib brotli/lib "*.a")
|
||||
harvest(boost/include boost/include "*")
|
||||
@@ -164,7 +151,7 @@ else()
|
||||
harvest(llvm/lib llvm/lib "libclang*.a")
|
||||
harvest(llvm/lib/clang llvm/lib/clang "*.h")
|
||||
if(APPLE)
|
||||
harvest(openmp/lib openmp/lib "libomp.dylib")
|
||||
harvest(openmp/lib openmp/lib "*")
|
||||
harvest(openmp/include openmp/include "*.h")
|
||||
endif()
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
@@ -181,11 +168,7 @@ else()
|
||||
harvest(xml2/include xml2/include "*.h")
|
||||
harvest(xml2/lib xml2/lib "*.a")
|
||||
|
||||
harvest(
|
||||
wayland-protocols/share/wayland-protocols
|
||||
wayland-protocols/share/wayland-protocols/
|
||||
"*.xml"
|
||||
)
|
||||
harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml")
|
||||
harvest(wayland/bin wayland/bin "wayland-scanner")
|
||||
harvest(wayland/include wayland/include "*.h")
|
||||
harvest(wayland_libdecor/include wayland_libdecor/include "*.h")
|
||||
@@ -197,11 +180,7 @@ else()
|
||||
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
|
||||
harvest(opencolorio/include opencolorio/include "*.h")
|
||||
harvest_rpath_lib(opencolorio/lib opencolorio/lib "*${SHAREDLIBEXT}*")
|
||||
harvest_rpath_python(
|
||||
opencolorio/lib/python${PYTHON_SHORT_VERSION}
|
||||
python/lib/python${PYTHON_SHORT_VERSION}
|
||||
"*"
|
||||
)
|
||||
harvest_rpath_python(opencolorio/lib/python${PYTHON_SHORT_VERSION} python/lib/python${PYTHON_SHORT_VERSION} "*")
|
||||
harvest(openexr/include openexr/include "*.h")
|
||||
harvest_rpath_lib(openexr/lib openexr/lib "*${SHAREDLIBEXT}*")
|
||||
harvest_rpath_bin(openimageio/bin openimageio/bin "idiff")
|
||||
@@ -209,11 +188,7 @@ else()
|
||||
harvest_rpath_bin(openimageio/bin openimageio/bin "oiiotool")
|
||||
harvest(openimageio/include openimageio/include "*")
|
||||
harvest_rpath_lib(openimageio/lib openimageio/lib "*${SHAREDLIBEXT}*")
|
||||
harvest_rpath_python(
|
||||
openimageio/lib/python${PYTHON_SHORT_VERSION}
|
||||
python/lib/python${PYTHON_SHORT_VERSION}
|
||||
"*"
|
||||
)
|
||||
harvest_rpath_python(openimageio/lib/python${PYTHON_SHORT_VERSION} python/lib/python${PYTHON_SHORT_VERSION} "*")
|
||||
harvest(openimagedenoise/include openimagedenoise/include "*")
|
||||
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
|
||||
harvest(embree/include embree/include "*.h")
|
||||
@@ -228,14 +203,10 @@ else()
|
||||
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
|
||||
harvest(openvdb/include/nanovdb openvdb/include/nanovdb "*.h")
|
||||
harvest_rpath_lib(openvdb/lib openvdb/lib "*${SHAREDLIBEXT}*")
|
||||
harvest_rpath_python(
|
||||
openvdb/lib/python${PYTHON_SHORT_VERSION}
|
||||
python/lib/python${PYTHON_SHORT_VERSION}
|
||||
"*pyopenvdb*"
|
||||
)
|
||||
harvest_rpath_python(openvdb/lib/python${PYTHON_SHORT_VERSION} python/lib/python${PYTHON_SHORT_VERSION} "*pyopenvdb*")
|
||||
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
|
||||
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
|
||||
harvest_rpath_bin(osl/bin osl/bin "oslc")
|
||||
harvest(osl/bin osl/bin "oslc")
|
||||
harvest(osl/include osl/include "*.h")
|
||||
harvest(osl/lib osl/lib "*.a")
|
||||
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
|
||||
@@ -268,21 +239,14 @@ else()
|
||||
harvest(usd/include usd/include "*.h")
|
||||
harvest_rpath_lib(usd/lib usd/lib "libusd_ms${SHAREDLIBEXT}")
|
||||
harvest(usd/lib/usd usd/lib/usd "*")
|
||||
harvest_rpath_python(
|
||||
usd/lib/python/pxr
|
||||
python/lib/python${PYTHON_SHORT_VERSION}/site-packages/pxr
|
||||
"*"
|
||||
)
|
||||
harvest_rpath_python(usd/lib/python/pxr python/lib/python${PYTHON_SHORT_VERSION}/site-packages/pxr "*")
|
||||
harvest(usd/plugin usd/plugin "*")
|
||||
harvest(materialx/include materialx/include "*.h")
|
||||
harvest_rpath_lib(materialx/lib materialx/lib "*${SHAREDLIBEXT}*")
|
||||
harvest(materialx/lib materialx/lib "*")
|
||||
harvest(materialx/libraries materialx/libraries "*")
|
||||
harvest(materialx/python materialx/python "*")
|
||||
harvest(materialx/lib/cmake/MaterialX materialx/lib/cmake/MaterialX "*.cmake")
|
||||
harvest_rpath_python(
|
||||
materialx/python/MaterialX
|
||||
python/lib/python${PYTHON_SHORT_VERSION}/site-packages/MaterialX
|
||||
"*"
|
||||
)
|
||||
harvest_rpath_python(materialx/python/MaterialX python/lib/python${PYTHON_SHORT_VERSION}/site-packages/MaterialX "*")
|
||||
# We do not need anything from the resources folder, but the MaterialX config
|
||||
# file will complain if the folder does not exist, so just copy the readme.md
|
||||
# files to ensure the folder will exist.
|
||||
@@ -293,12 +257,6 @@ else()
|
||||
harvest(haru/lib haru/lib "*.a")
|
||||
harvest(zstd/include zstd/include "*.h")
|
||||
harvest(zstd/lib zstd/lib "*.a")
|
||||
harvest(shaderc shaderc "*")
|
||||
harvest(vulkan_headers vulkan "*")
|
||||
harvest_rpath_lib(vulkan_loader/lib vulkan/lib "*${SHAREDLIBEXT}*")
|
||||
if(APPLE)
|
||||
harvest(vulkan_loader/loader vulkan/loader "*")
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
harvest(libglu/lib mesa/lib "*${SHAREDLIBEXT}*")
|
||||
|
@@ -33,8 +33,6 @@ set(MESA_EXTRA_FLAGS
|
||||
# At some point we will likely want to support Wayland.
|
||||
# Disable for now since it's not officially supported.
|
||||
-Dplatforms=x11
|
||||
# Needed to find the local expat.
|
||||
--pkg-config-path=${LIBDIR}/expat/lib/pkgconfig
|
||||
--native-file ${BUILD_DIR}/mesa/tmp/native-file.ini
|
||||
)
|
||||
|
||||
@@ -55,8 +53,4 @@ add_dependencies(
|
||||
external_mesa
|
||||
ll
|
||||
external_zlib
|
||||
# Run-time dependency.
|
||||
external_expat
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
@@ -39,10 +39,8 @@ if(MSVC)
|
||||
)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_openjpeg_msvc after_install
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -34,4 +34,5 @@ if(WIN32)
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
@@ -32,11 +32,13 @@ if(WIN32)
|
||||
# Python will download its own deps and there's very little we can do about
|
||||
# that beyond placing some code in their externals dir before it tries.
|
||||
# the foldernames *HAVE* to match the ones inside pythons get_externals.cmd.
|
||||
# python 3.10.8 still ships zlib 1.2.12, replace it with our 1.2.13
|
||||
# copy until they update. Same rules apply to openssl foldernames HAVE to match
|
||||
# regardless of the version actually in there.
|
||||
PATCH_COMMAND mkdir ${PYTHON_EXTERNALS_FOLDER_DOS} &&
|
||||
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.2.13 ${ZLIB_SOURCE_FOLDER_DOS} &&
|
||||
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.2.12 ${ZLIB_SOURCE_FOLDER_DOS} &&
|
||||
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\openssl-1.1.1q ${SSL_SOURCE_FOLDER_DOS} &&
|
||||
${CMAKE_COMMAND} -E copy ${ZLIB_SOURCE_FOLDER}/../external_zlib-build/zconf.h ${PYTHON_EXTERNALS_FOLDER}/zlib-1.2.13/zconf.h &&
|
||||
${CMAKE_COMMAND} -E copy ${ZLIB_SOURCE_FOLDER}/../external_zlib-build/zconf.h ${PYTHON_EXTERNALS_FOLDER}/zlib-1.2.12/zconf.h &&
|
||||
${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_windows.diff
|
||||
CONFIGURE_COMMAND echo "."
|
||||
BUILD_COMMAND ${CONFIGURE_ENV_MSVC} && cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && set LDFLAGS=/DEBUG && call prepare_ssl.bat && call build.bat -e -p x64 -c ${BUILD_MODE}
|
||||
|
@@ -5,11 +5,7 @@ if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
||||
# zstandard is determined to build and link release mode libs in a debug
|
||||
# configuration, the only way to make it happy is to bend to its will
|
||||
# and give it a library to link with.
|
||||
set(
|
||||
PIP_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.lib
|
||||
${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
|
||||
)
|
||||
set(PIP_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.lib ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib)
|
||||
else()
|
||||
set(PIP_CONFIGURE_COMMAND echo ".")
|
||||
endif()
|
||||
@@ -19,23 +15,7 @@ ExternalProject_Add(external_python_site_packages
|
||||
CONFIGURE_COMMAND ${PIP_CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND ""
|
||||
PREFIX ${BUILD_DIR}/site_packages
|
||||
|
||||
# setuptools is downgraded to 63.2.0 (same as python 3.10.8) since numpy 1.23.x seemingly has
|
||||
# issues building on windows with the newer versions that ships with python 3.10.9+
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA}
|
||||
setuptools==63.2.0
|
||||
cython==${CYTHON_VERSION}
|
||||
idna==${IDNA_VERSION}
|
||||
charset-normalizer==${CHARSET_NORMALIZER_VERSION}
|
||||
urllib3==${URLLIB3_VERSION}
|
||||
certifi==${CERTIFI_VERSION}
|
||||
requests==${REQUESTS_VERSION}
|
||||
zstandard==${ZSTANDARD_VERSION}
|
||||
autopep8==${AUTOPEP8_VERSION}
|
||||
pycodestyle==${PYCODESTYLE_VERSION}
|
||||
toml==${TOML_VERSION}
|
||||
meson==${MESON_VERSION}
|
||||
--no-binary :all:
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} charset-normalizer==${CHARSET_NORMALIZER_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} zstandard==${ZSTANDARD_VERSION} autopep8==${AUTOPEP8_VERSION} pycodestyle==${PYCODESTYLE_VERSION} toml==${TOML_VERSION} meson==${MESON_VERSION} --no-binary :all:
|
||||
)
|
||||
|
||||
if(USE_PIP_NUMPY)
|
||||
|
@@ -1,5 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
set(SHADERC_EXTRA_ARGS
|
||||
-DSHADERC_SKIP_TESTS=On
|
||||
-DSHADERC_SPIRV_TOOLS_DIR=${BUILD_DIR}/shaderc_spirv_tools/src/external_shaderc_spirv_tools
|
||||
@@ -45,3 +60,5 @@ if(WIN32)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
@@ -1,4 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# These are build time requirements for shaderc. We only have to unpack these
|
||||
# shaderc will build them.
|
||||
@@ -32,3 +48,4 @@ ExternalProject_Add(external_shaderc_spirv_tools
|
||||
BUILD_COMMAND echo .
|
||||
INSTALL_COMMAND echo .
|
||||
)
|
||||
|
||||
|
@@ -1,15 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(SNDFILE_EXTRA_ARGS)
|
||||
set(SNDFILE_ENV)
|
||||
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:${mingw_LIBDIR})
|
||||
|
||||
if(WIN32)
|
||||
set(SNDFILE_ENV "PKG_CONFIG_PATH=\
|
||||
${mingw_LIBDIR}/ogg/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/vorbis/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/flac/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/opus/lib/pkgconfig"
|
||||
)
|
||||
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
|
||||
# Shared for windows because static libs will drag in a libgcc dependency.
|
||||
set(SNDFILE_OPTIONS --disable-static --enable-shared )
|
||||
|
@@ -5,20 +5,7 @@ ExternalProject_Add(external_spnav
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${SPNAV_HASH_TYPE}=${SPNAV_HASH}
|
||||
PREFIX ${BUILD_DIR}/spnav
|
||||
|
||||
CONFIGURE_COMMAND
|
||||
${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/spnav/src/external_spnav/ &&
|
||||
${CONFIGURE_COMMAND}
|
||||
--prefix=${LIBDIR}/spnav
|
||||
# X11 is not needed as Blender polls the device as part of the GHOST event loop.
|
||||
# This is used to support `3dxserv`, however this is no longer supported by 3DCONNEXION.
|
||||
# Disable so building without X11 is supported (WAYLAND only).
|
||||
--disable-x11
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/spnav
|
||||
|
@@ -34,8 +34,7 @@ elseif(UNIX)
|
||||
if(APPLE)
|
||||
set(USD_SHARED_LINKER_FLAGS "-Xlinker -undefined -Xlinker dynamic_lookup")
|
||||
list(APPEND USD_PLATFORM_FLAGS
|
||||
-DCMAKE_SHARED_LINKER_FLAGS=${USD_SHARED_LINKER_FLAGS}
|
||||
)
|
||||
-DCMAKE_SHARED_LINKER_FLAGS=${USD_SHARED_LINKER_FLAGS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -195,20 +195,12 @@ set(TIFF_HASH_TYPE MD5)
|
||||
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
|
||||
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
# 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
|
||||
# releases should also build but without OptiX support.
|
||||
set(OSL_VERSION 1a7670600c8b08c2443a78d03c8c27e9a1149140)
|
||||
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 7b6d6716b05d1addb92a8f47280bf77f)
|
||||
set(OSL_VERSION 1.12.7.1)
|
||||
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/v${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 53211da86c34ba6e0344998c1a6d219c)
|
||||
set(OSL_HASH_TYPE MD5)
|
||||
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
|
||||
|
||||
# NOTE: When updating the python version, it's required to check the versions of
|
||||
# it wants to use in PCbuild/get_externals.bat for the following dependencies:
|
||||
# BZIP2, FFI, SQLITE and change the versions in this file as well. For compliance
|
||||
# reasons there can be no exceptions to this.
|
||||
|
||||
set(PYTHON_VERSION 3.10.9)
|
||||
set(PYTHON_SHORT_VERSION 3.10)
|
||||
set(PYTHON_SHORT_VERSION_NO_DOTS 310)
|
||||
@@ -232,40 +224,26 @@ set(OPENVDB_HASH 64301c737e16b26c8f3085a31e6397e9)
|
||||
set(OPENVDB_HASH_TYPE MD5)
|
||||
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Python Modules
|
||||
|
||||
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||
set(IDNA_VERSION 3.3)
|
||||
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||
set(CHARSET_NORMALIZER_VERSION 2.0.10)
|
||||
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||
set(URLLIB3_VERSION 1.26.8)
|
||||
set(URLLIB3_CPE "cpe:2.3:a:urllib3:urllib3:${URLLIB3_VERSION}:*:*:*:*:*:*:*")
|
||||
# Needed by: Python's `requests` module (so add-ons can authenticate against trusted certificates).
|
||||
set(CERTIFI_VERSION 2021.10.8)
|
||||
# Needed by: Some of Blender's add-ons (to support convenient interaction with online services).
|
||||
set(REQUESTS_VERSION 2.27.1)
|
||||
# Needed by: Python's `numpy` module (used by some add-ons).
|
||||
set(CYTHON_VERSION 0.29.30)
|
||||
# Needed by: Python scripts that read `.blend` files, as files may use Z-standard compression.
|
||||
# The version of the ZSTD library used to build the Python package should match ZSTD_VERSION
|
||||
# The version of the zstd library used to build the Python package should match ZSTD_VERSION
|
||||
# defined below. At this time of writing, 0.17.0 was already released,
|
||||
# but built against ZSTD 1.5.1, while we use 1.5.0.
|
||||
# but built against zstd 1.5.1, while we use 1.5.0.
|
||||
set(ZSTANDARD_VERSION 0.16.0)
|
||||
# Auto-format Python source (developer tool, not used by Blender at run-time).
|
||||
set(AUTOPEP8_VERSION 1.6.0)
|
||||
# Needed by: `autopep8` (so the version doesn't change on rebuild).
|
||||
set(PYCODESTYLE_VERSION 2.8.0)
|
||||
# Needed by: `autopep8` (so the version doesn't change on rebuild).
|
||||
set(TOML_VERSION 0.10.2)
|
||||
# Build system for other packages (not used by Blender at run-time).
|
||||
set(MESON_VERSION 0.63.0)
|
||||
|
||||
set(NUMPY_VERSION 1.23.5)
|
||||
set(NUMPY_VERSION 1.23.2)
|
||||
set(NUMPY_SHORT_VERSION 1.23)
|
||||
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.tar.gz)
|
||||
set(NUMPY_HASH 8b2692a511a3795f3af8af2cd7566a15)
|
||||
set(NUMPY_HASH 9bf2a361509797de14ceee607387fe0f)
|
||||
set(NUMPY_HASH_TYPE MD5)
|
||||
set(NUMPY_FILE numpy-${NUMPY_VERSION}.tar.gz)
|
||||
set(NUMPY_CPE "cpe:2.3:a:numpy:numpy:${NUMPY_VERSION}:*:*:*:*:*:*:*")
|
||||
@@ -359,7 +337,7 @@ set(SNDFILE_VERSION 1.1.0)
|
||||
set(SNDFILE_URI https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-${SNDFILE_VERSION}.tar.xz)
|
||||
set(SNDFILE_HASH e63dead2b4f0aaf323687619d007ee6a)
|
||||
set(SNDFILE_HASH_TYPE MD5)
|
||||
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.xz)
|
||||
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.gz)
|
||||
set(SNDFILE_CPE "cpe:2.3:a:libsndfile_project:libsndfile:${SNDFILE_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(WEBP_VERSION 1.2.2)
|
||||
@@ -369,9 +347,9 @@ 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(SPNAV_VERSION 1.1)
|
||||
set(SPNAV_URI https://github.com/FreeSpacenav/libspnav/releases/download/v${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
|
||||
set(SPNAV_HASH 7c0032034672dfba3c4bb9b49a440e70)
|
||||
set(SPNAV_VERSION 0.2.3)
|
||||
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
|
||||
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
|
||||
set(SPNAV_HASH_TYPE MD5)
|
||||
set(SPNAV_FILE libspnav-${SPNAV_VERSION}.tar.gz)
|
||||
|
||||
@@ -459,7 +437,9 @@ set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
|
||||
set(LZMA_HASH_TYPE SHA256)
|
||||
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
|
||||
|
||||
# NOTE: Python's build has been modified to use our ssl version.
|
||||
# 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
|
||||
# can be no exceptions to this.
|
||||
set(SSL_VERSION 1.1.1q)
|
||||
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
|
||||
set(SSL_HASH d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca)
|
||||
@@ -470,10 +450,10 @@ set(SSL_CPE "cpe:2.3:a:openssl:openssl:${SSL_VERSION}:*:*:*:*:*:*:*")
|
||||
# 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
|
||||
# can be no exceptions to this.
|
||||
set(SQLITE_VERSION 3.39.4)
|
||||
set(SQLLITE_LONG_VERSION 3390400)
|
||||
set(SQLITE_VERSION 3.37.2)
|
||||
set(SQLLITE_LONG_VERSION 3370200)
|
||||
set(SQLITE_URI https://www.sqlite.org/2022/sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
|
||||
set(SQLITE_HASH c4c5c39269d1b9bb1487cff580c1f583608229b2)
|
||||
set(SQLITE_HASH e56faacadfb4154f8fbd0f2a3f827d13706b70a1)
|
||||
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}:*:*:*:*:*:*:*")
|
||||
|
@@ -1,4 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(VULKAN_HEADERS_EXTRA_ARGS)
|
||||
|
||||
@@ -14,17 +30,6 @@ set(VULKAN_LOADER_EXTRA_ARGS
|
||||
-DVULKAN_HEADERS_INSTALL_DIR=${LIBDIR}/vulkan_headers
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# These are used in `cmake/FindWayland.cmake` from `external_vulkan_loader`.
|
||||
# NOTE: When upgrading to CMAKE 3.22 we it would be cleaner to use: `PKG_CONFIG_ARGN`,
|
||||
# so `pkgconfig` would find wayland.
|
||||
set(VULKAN_LOADER_EXTRA_ARGS
|
||||
${VULKAN_LOADER_EXTRA_ARGS}
|
||||
-DPKG_WAYLAND_INCLUDE_DIRS=${LIBDIR}/wayland/include
|
||||
-DPKG_WAYLAND_LIBRARY_DIRS=${LIBDIR}/wayland/lib64
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_vulkan_loader
|
||||
URL file://${PACKAGE_DIR}/${VULKAN_LOADER_FILE}
|
||||
URL_HASH ${VULKAN_LOADER_HASH_TYPE}=${VULKAN_LOADER_HASH}
|
||||
@@ -38,12 +43,7 @@ add_dependencies(
|
||||
external_vulkan_headers
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_dependencies(
|
||||
external_vulkan_loader
|
||||
external_wayland
|
||||
)
|
||||
elseif(WIN32)
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_vulkan_loader after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/vulkan_loader/ ${HARVEST_TARGET}/vulkan
|
||||
@@ -52,3 +52,4 @@ elseif(WIN32)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -5,6 +5,7 @@ ExternalProject_Add(external_wayland
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${WAYLAND_HASH_TYPE}=${WAYLAND_HASH}
|
||||
PREFIX ${BUILD_DIR}/wayland
|
||||
PATCH_COMMAND ${PATCH_CMD} -d ${BUILD_DIR}/wayland/src/external_wayland < ${PATCH_DIR}/wayland.diff
|
||||
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own LIBEXPAT & LIBXML2.
|
||||
#
|
||||
# NOTE: passing link args "ffi/lib" should not be needed, but
|
||||
@@ -23,7 +24,4 @@ add_dependencies(
|
||||
external_expat
|
||||
external_xml2
|
||||
external_ffi
|
||||
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
@@ -15,6 +15,4 @@ ExternalProject_Add(external_wayland_protocols
|
||||
add_dependencies(
|
||||
external_wayland_protocols
|
||||
external_wayland
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
@@ -10,8 +10,7 @@ if(WIN32)
|
||||
set(YAMLCPP_EXTRA_ARGS
|
||||
${YAMLCPP_EXTRA_ARGS}
|
||||
-DBUILD_GMOCK=OFF
|
||||
-DYAML_MSVC_SHARED_RT=ON
|
||||
)
|
||||
-DYAML_MSVC_SHARED_RT=ON)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_yamlcpp
|
||||
|
@@ -1,23 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# macOS utility to remove all rpaths and add a new one.
|
||||
|
||||
# macOS utility to remove all `rpaths` and add a new one.
|
||||
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
# Strip version numbers from dependenciesm macOS notarizatiom fails
|
||||
# with version symlinks.
|
||||
def strip_lib_version(name):
|
||||
name = re.sub(r'(\.[0-9]+)+.dylib', '.dylib', name)
|
||||
name = re.sub(r'(\.[0-9]+)+.so', '.so', name)
|
||||
name = re.sub(r'(\.[0-9]+)+.cpython', '.cpython', name)
|
||||
return name
|
||||
|
||||
|
||||
rpath = sys.argv[1]
|
||||
file = sys.argv[2]
|
||||
|
||||
@@ -31,18 +17,3 @@ for i, token in enumerate(tokens):
|
||||
subprocess.run(['install_name_tool', '-delete_rpath', old_rpath, file])
|
||||
|
||||
subprocess.run(['install_name_tool', '-add_rpath', rpath, file])
|
||||
|
||||
# Strip version from dependencies.
|
||||
p = subprocess.run(['otool', '-L', file], capture_output=True)
|
||||
tokens = p.stdout.split()
|
||||
for i, token in enumerate(tokens):
|
||||
token = token.decode("utf-8")
|
||||
if token.startswith("@rpath"):
|
||||
new_token = strip_lib_version(token)
|
||||
subprocess.run(['install_name_tool', '-change', token, new_token, file])
|
||||
|
||||
# Strip version from library itself.
|
||||
new_file = strip_lib_version(file)
|
||||
new_id = '@rpath/' + os.path.basename(new_file)
|
||||
os.rename(file, new_file)
|
||||
subprocess.run(['install_name_tool', '-id', new_id, new_file])
|
||||
|
@@ -39,15 +39,15 @@ with-all,with-opencollada,with-jack,with-pulseaudio,with-embree,with-oidn,with-n
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,ver-level-zero:\
|
||||
force-all,force-python,force-boost,force-tbb,\
|
||||
force-ocio,force-imath,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-materialx,force-usd,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-usd,\
|
||||
force-xr-openxr,force-level-zero,force-openpgl,\
|
||||
build-all,build-python,build-boost,build-tbb,\
|
||||
build-ocio,build-imath,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-materialx,build-usd,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-usd,\
|
||||
build-xr-openxr,build-level-zero,build-openpgl,\
|
||||
skip-python,skip-boost,skip-tbb,\
|
||||
skip-ocio,skip-imath,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-materialx,skip-usd,\
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-usd,\
|
||||
skip-xr-openxr,skip-level-zero,skip-openpgl \
|
||||
-- "$@" \
|
||||
)
|
||||
@@ -223,9 +223,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--build-ffmpeg
|
||||
Force the build of FFMpeg.
|
||||
|
||||
--build-materialx
|
||||
Force the build of MaterialX.
|
||||
|
||||
--build-usd
|
||||
Force the build of Universal Scene Description.
|
||||
|
||||
@@ -299,9 +296,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--force-ffmpeg
|
||||
Force the rebuild of FFMpeg.
|
||||
|
||||
--force-materialx
|
||||
Force the rebuild of MaterialX.
|
||||
|
||||
--force-usd
|
||||
Force the rebuild of Universal Scene Description.
|
||||
|
||||
@@ -368,9 +362,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--skip-ffmpeg
|
||||
Unconditionally skip FFMpeg installation/building.
|
||||
|
||||
--skip-materialx
|
||||
Unconditionally skip MaterialX installation/building.
|
||||
|
||||
--skip-usd
|
||||
Unconditionally skip Universal Scene Description installation/building.
|
||||
|
||||
@@ -403,7 +394,7 @@ CLANG_FORMAT_VERSION="10.0"
|
||||
CLANG_FORMAT_VERSION_MIN="6.0"
|
||||
CLANG_FORMAT_VERSION_MEX="14.0"
|
||||
|
||||
PYTHON_VERSION="3.10.9"
|
||||
PYTHON_VERSION="3.10.8"
|
||||
PYTHON_VERSION_SHORT="3.10"
|
||||
PYTHON_VERSION_MIN="3.10"
|
||||
PYTHON_VERSION_MEX="3.12"
|
||||
@@ -411,7 +402,6 @@ PYTHON_VERSION_INSTALLED=$PYTHON_VERSION_SHORT
|
||||
PYTHON_FORCE_BUILD=false
|
||||
PYTHON_FORCE_REBUILD=false
|
||||
PYTHON_SKIP=false
|
||||
_with_built_python=false
|
||||
|
||||
# Additional Python modules.
|
||||
PYTHON_IDNA_VERSION="3.3"
|
||||
@@ -444,7 +434,7 @@ PYTHON_ZSTANDARD_VERSION_MIN="0.15.2"
|
||||
PYTHON_ZSTANDARD_VERSION_MEX="0.20.0"
|
||||
PYTHON_ZSTANDARD_NAME="zstandard"
|
||||
|
||||
PYTHON_NUMPY_VERSION="1.23.5"
|
||||
PYTHON_NUMPY_VERSION="1.22.0"
|
||||
PYTHON_NUMPY_VERSION_MIN="1.14"
|
||||
PYTHON_NUMPY_VERSION_MEX="2.0"
|
||||
PYTHON_NUMPY_NAME="numpy"
|
||||
@@ -472,13 +462,11 @@ PYTHON_MODULES_PIP=(
|
||||
)
|
||||
|
||||
|
||||
BOOST_VERSION="1.80.0"
|
||||
BOOST_VERSION_SHORT="1.80"
|
||||
BOOST_VERSION="1.78.0"
|
||||
BOOST_VERSION_SHORT="1.78"
|
||||
BOOST_VERSION_MIN="1.49"
|
||||
BOOST_VERSION_MEX="2.0"
|
||||
# XXX Boost currently has an issue with python/tbb, see rB019b930 for details and patch used to fix it.
|
||||
# So for now it has to be built, system packages are not usable. :(
|
||||
BOOST_FORCE_BUILD=true
|
||||
BOOST_FORCE_BUILD=false
|
||||
BOOST_FORCE_REBUILD=false
|
||||
BOOST_SKIP=false
|
||||
|
||||
@@ -491,8 +479,8 @@ TBB_FORCE_BUILD=false
|
||||
TBB_FORCE_REBUILD=false
|
||||
TBB_SKIP=false
|
||||
|
||||
OCIO_VERSION="2.2.0"
|
||||
OCIO_VERSION_SHORT="2.2"
|
||||
OCIO_VERSION="2.1.1"
|
||||
OCIO_VERSION_SHORT="2.1"
|
||||
OCIO_VERSION_MIN="2.0"
|
||||
OCIO_VERSION_MEX="3.0"
|
||||
OCIO_FORCE_BUILD=false
|
||||
@@ -517,10 +505,10 @@ OPENEXR_FORCE_REBUILD=false
|
||||
OPENEXR_SKIP=false
|
||||
_with_built_openexr=false
|
||||
|
||||
OIIO_VERSION="2.4.6.0"
|
||||
OIIO_VERSION_SHORT="2.4"
|
||||
OIIO_VERSION_MIN="2.2.0"
|
||||
OIIO_VERSION_MEX="2.5.0"
|
||||
OIIO_VERSION="2.3.20.0"
|
||||
OIIO_VERSION_SHORT="2.3"
|
||||
OIIO_VERSION_MIN="2.1.12"
|
||||
OIIO_VERSION_MEX="2.4.0"
|
||||
OIIO_FORCE_BUILD=false
|
||||
OIIO_FORCE_REBUILD=false
|
||||
OIIO_SKIP=false
|
||||
@@ -535,8 +523,8 @@ LLVM_FORCE_REBUILD=false
|
||||
LLVM_SKIP=false
|
||||
|
||||
# OSL needs to be compiled for now!
|
||||
OSL_VERSION="1.13.0.2"
|
||||
OSL_VERSION_SHORT="1.13"
|
||||
OSL_VERSION="1.12.6.2"
|
||||
OSL_VERSION_SHORT="1.12"
|
||||
OSL_VERSION_MIN="1.11"
|
||||
OSL_VERSION_MEX="2.0"
|
||||
OSL_FORCE_BUILD=false
|
||||
@@ -544,9 +532,9 @@ OSL_FORCE_REBUILD=false
|
||||
OSL_SKIP=false
|
||||
|
||||
# OpenSubdiv needs to be compiled for now
|
||||
OSD_VERSION="3.5.0"
|
||||
OSD_VERSION_SHORT="3.5"
|
||||
OSD_VERSION_MIN="3.5"
|
||||
OSD_VERSION="3.4.4"
|
||||
OSD_VERSION_SHORT="3.4"
|
||||
OSD_VERSION_MIN="3.4"
|
||||
OSD_VERSION_MEX="4.0"
|
||||
OSD_FORCE_BUILD=false
|
||||
OSD_FORCE_REBUILD=false
|
||||
@@ -555,10 +543,10 @@ OSD_SKIP=false
|
||||
# OpenVDB needs to be compiled for now
|
||||
OPENVDB_BLOSC_VERSION="1.21.1"
|
||||
|
||||
OPENVDB_VERSION="10.0.0"
|
||||
OPENVDB_VERSION_SHORT="10.0"
|
||||
OPENVDB_VERSION_MIN="10.0"
|
||||
OPENVDB_VERSION_MEX="11.0"
|
||||
OPENVDB_VERSION="9.0.0"
|
||||
OPENVDB_VERSION_SHORT="9.0"
|
||||
OPENVDB_VERSION_MIN="9.0"
|
||||
OPENVDB_VERSION_MEX="9.1"
|
||||
OPENVDB_FORCE_BUILD=false
|
||||
OPENVDB_FORCE_REBUILD=false
|
||||
OPENVDB_SKIP=false
|
||||
@@ -572,16 +560,8 @@ ALEMBIC_FORCE_BUILD=false
|
||||
ALEMBIC_FORCE_REBUILD=false
|
||||
ALEMBIC_SKIP=false
|
||||
|
||||
MATERIALX_VERSION="1.38.6"
|
||||
MATERIALX_VERSION_SHORT="1.38"
|
||||
MATERIALX_VERSION_MIN="1.38"
|
||||
MATERIALX_VERSION_MEX="1.40"
|
||||
MATERIALX_FORCE_BUILD=false
|
||||
MATERIALX_FORCE_REBUILD=false
|
||||
MATERIALX_SKIP=false
|
||||
|
||||
USD_VERSION="22.11"
|
||||
USD_VERSION_SHORT="22.11"
|
||||
USD_VERSION="22.03"
|
||||
USD_VERSION_SHORT="22.03"
|
||||
USD_VERSION_MIN="20.05"
|
||||
USD_VERSION_MEX="23.00"
|
||||
USD_FORCE_BUILD=false
|
||||
@@ -916,9 +896,6 @@ while true; do
|
||||
--build-alembic)
|
||||
ALEMBIC_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-materialx)
|
||||
MATERIALX_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-usd)
|
||||
USD_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
@@ -948,7 +925,6 @@ while true; do
|
||||
OIDN_FORCE_REBUILD=true
|
||||
FFMPEG_FORCE_REBUILD=true
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
MATERIALX_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
XR_OPENXR_FORCE_REBUILD=true
|
||||
LEVEL_ZERO_FORCE_REBUILD=true
|
||||
@@ -1004,9 +980,6 @@ while true; do
|
||||
--force-alembic)
|
||||
ALEMBIC_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-materialx)
|
||||
MATERIALX_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-usd)
|
||||
USD_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
@@ -1070,9 +1043,6 @@ while true; do
|
||||
--skip-usd)
|
||||
USD_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-materialx)
|
||||
MATERIALX_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-xr-openxr)
|
||||
XR_OPENXR_SKIP=true; shift; continue
|
||||
;;
|
||||
@@ -1138,9 +1108,7 @@ PYTHON_SOURCE=( "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHO
|
||||
|
||||
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
|
||||
BOOST_SOURCE=( "https://boostorg.jfrog.io/artifactory/main/release/$BOOST_VERSION/source/boost_$_boost_version_nodots.tar.bz2" )
|
||||
BOOST_BUILD_MODULES="--with-filesystem --with-locale --with-thread --with-regex --with-system --with-date_time --with-wave --with-atomic --with-serialization --with-program_options --with-iostreams --with-python"
|
||||
# Used by debian distros.
|
||||
BOOST_DEB_PACKAGE_MODULES=( "libboost-filesystem" "libboost-locale" "libboost-thread" "libboost-regex" "libboost-system" "libboost-date-time" "libboost-wave" "libboost-atomic" "libboost-serialization" "libboost-program-options" "libboost-iostreams" "libboost-python" "libboost-numpy" )
|
||||
BOOST_BUILD_MODULES="--with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time --with-wave --with-iostreams --with-python --with-program_options --with-serialization --with-atomic"
|
||||
|
||||
TBB_SOURCE=( "https://github.com/oneapi-src/oneTBB/archive/$TBB_VERSION$TBB_VERSION_UPDATE.tar.gz" )
|
||||
TBB_SOURCE_CMAKE=( "https://raw.githubusercontent.com/wjakob/tbb/master/CMakeLists.txt" )
|
||||
@@ -1170,11 +1138,17 @@ _LLVM_SOURCE_ROOT="https://github.com/llvm/llvm-project/releases/download/llvmor
|
||||
LLVM_SOURCE=( "$_LLVM_SOURCE_ROOT/llvm-$LLVM_VERSION.src.tar.xz" )
|
||||
LLVM_CLANG_SOURCE=( "$_LLVM_SOURCE_ROOT/clang-$LLVM_VERSION.src.tar.xz" "$_LLVM_SOURCE_ROOT/cfe-$LLVM_VERSION.src.tar.xz" )
|
||||
|
||||
OSL_USE_REPO=true
|
||||
OSL_USE_REPO=false
|
||||
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/v$OSL_VERSION.tar.gz" )
|
||||
OSL_SOURCE_REPO=( "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage.git" )
|
||||
OSL_SOURCE_REPO_BRANCH="main"
|
||||
OSL_SOURCE_REPO_UID="1a7670600c8b08c2443a78d03c8c27e9a1149140"
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/imageworks/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO_BRANCH="master"
|
||||
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
||||
#~ OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage/archive/Release-1.5.11.tar.gz" )
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/mont29/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO_UID="7d40ff5fe8e47b030042afb92d0e955f5aa96f48"
|
||||
#~ OSL_SOURCE_REPO_BRANCH="blender-fixes"
|
||||
|
||||
OSD_USE_REPO=false
|
||||
# Script foo to make the version string compliant with the archive name:
|
||||
@@ -1197,8 +1171,6 @@ ALEMBIC_SOURCE=( "https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.
|
||||
# ALEMBIC_SOURCE_REPO_UID="e6c90d4faa32c4550adeaaf3f556dad4b73a92bb"
|
||||
# ALEMBIC_SOURCE_REPO_BRANCH="master"
|
||||
|
||||
MATERIALX_SOURCE=( "https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v${MATERIALX_VERSION}.tar.gz" )
|
||||
|
||||
USD_SOURCE=( "https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz" )
|
||||
|
||||
OPENCOLLADA_USE_REPO=false
|
||||
@@ -1251,10 +1223,8 @@ Those libraries should be available as packages in all recent distributions (opt
|
||||
* libjpeg, libpng, libtiff, [openjpeg2], [libopenal].
|
||||
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
|
||||
* libwayland-client0, libdecor, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland)
|
||||
* libsqlite3, libzstd, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp, flex, pybind11.
|
||||
* libsdl2, libepoxy, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].
|
||||
* [libvulkan/vulkan-loader].
|
||||
* [libfribidi], [libharfbuzz].\""
|
||||
* libsqlite3, libzstd, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp, flex.
|
||||
* libsdl2, libepoxy, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].\""
|
||||
|
||||
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
|
||||
|
||||
@@ -1515,17 +1485,9 @@ _init_python() {
|
||||
_update_deps_python() {
|
||||
if [ "$1" = true ]; then
|
||||
BOOST_FORCE_BUILD=true
|
||||
OCIO_FORCE_BUILD=true
|
||||
OIIO_FORCE_BUILD=true
|
||||
OPENVDB_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
BOOST_FORCE_REBUILD=true
|
||||
OCIO_FORCE_REBUILD=true
|
||||
OIIO_FORCE_REBUILD=true
|
||||
OPENVDB_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1611,9 +1573,6 @@ compile_Python() {
|
||||
PRINT ""
|
||||
$_python -m pip install $module --no-binary :all:
|
||||
done
|
||||
|
||||
_with_built_python=true
|
||||
_with_built_python_execpath="$INST/python-$PYTHON_VERSION_SHORT/bin/python3"
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
@@ -1632,14 +1591,12 @@ _update_deps_boost() {
|
||||
OSL_FORCE_BUILD=true
|
||||
OPENVDB_FORCE_BUILD=true
|
||||
ALEMBIC_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
OIIO_FORCE_REBUILD=true
|
||||
OSL_FORCE_REBUILD=true
|
||||
OPENVDB_FORCE_REBUILD=true
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1659,7 +1616,7 @@ compile_Boost() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
boost_magic=15
|
||||
boost_magic=14
|
||||
|
||||
_init_boost
|
||||
|
||||
@@ -1685,13 +1642,11 @@ compile_Boost() {
|
||||
mkdir -p $SRC
|
||||
download BOOST_SOURCE[@] $_src.tar.bz2
|
||||
tar -C $SRC --transform "s,\w*,boost-$BOOST_VERSION,x" -xf $_src.tar.bz2
|
||||
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/boost.diff
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
if [ ! -f $_src/b2 ]; then
|
||||
if [ -d $_with_built_python ]; then
|
||||
if [ -d $INST/python-$PYTHON_VERSION_INSTALLED ]; then
|
||||
./bootstrap.sh --with-python-root="$INST/python-$PYTHON_VERSION_INSTALLED"
|
||||
else
|
||||
./bootstrap.sh
|
||||
@@ -1886,7 +1841,7 @@ compile_OCIO() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
ocio_magic=5
|
||||
ocio_magic=3
|
||||
_init_ocio
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -1941,13 +1896,9 @@ compile_OCIO() {
|
||||
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D OCIO_BUILD_APPS=OFF"
|
||||
cmake_d="$cmake_d -D OCIO_BUILD_PYTHON=ON"
|
||||
cmake_d="$cmake_d -D OCIO_BUILD_PYTHON=OFF"
|
||||
cmake_d="$cmake_d -D OCIO_BUILD_GPU_TESTS=OFF"
|
||||
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
|
||||
if [ $(uname -m) == "aarch64" ]; then
|
||||
cmake_d="$cmake_d -D OCIO_USE_SSE=OFF"
|
||||
fi
|
||||
@@ -2137,13 +2088,11 @@ _update_deps_openexr() {
|
||||
OIIO_FORCE_BUILD=true
|
||||
OPENVDB_FORCE_BUILD=true
|
||||
ALEMBIC_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
OIIO_FORCE_REBUILD=true
|
||||
OPENVDB_FORCE_REBUILD=true
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2272,11 +2221,9 @@ _init_oiio() {
|
||||
_update_deps_oiio() {
|
||||
if [ "$1" = true ]; then
|
||||
OSL_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
OSL_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2296,7 +2243,7 @@ compile_OIIO() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
oiio_magic=20
|
||||
oiio_magic=18
|
||||
_init_oiio
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -2350,7 +2297,6 @@ compile_OIIO() {
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
|
||||
cmake_d="$cmake_d -D LINKSTATIC=OFF"
|
||||
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
||||
|
||||
if [ $(uname -m) != "aarch64" ]; then
|
||||
cmake_d="$cmake_d -D USE_SIMD=sse2"
|
||||
@@ -2366,37 +2312,21 @@ compile_OIIO() {
|
||||
cmake_d="$cmake_d -D OpenEXR_ROOT=$INST/openexr"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -D USE_PYTHON=ON"
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
# ptex is only needed when nicholas bishop is ready
|
||||
cmake_d="$cmake_d -D USE_PTEX=OFF"
|
||||
|
||||
# Optional tests and cmd tools
|
||||
cmake_d="$cmake_d -D USE_QT=OFF"
|
||||
cmake_d="$cmake_d -D USE_QT5=OFF"
|
||||
cmake_d="$cmake_d -D USE_OPENGL=OFF"
|
||||
cmake_d="$cmake_d -D USE_TBB=OFF"
|
||||
cmake_d="$cmake_d -D USE_BZIP2=OFF"
|
||||
cmake_d="$cmake_d -D USE_FREETYPE=OFF"
|
||||
cmake_d="$cmake_d -D USE_OPENCOLORIO=OFF"
|
||||
|
||||
cmake_d="$cmake_d -D USE_WEBP=ON"
|
||||
cmake_d="$cmake_d -D USE_OPENJPEG=ON"
|
||||
|
||||
cmake_d="$cmake_d -D USE_PYTHON=OFF"
|
||||
cmake_d="$cmake_d -D USE_FFMPEG=OFF"
|
||||
cmake_d="$cmake_d -D USE_OPENCV=OFF"
|
||||
cmake_d="$cmake_d -D USE_OPENVDB=OFF"
|
||||
cmake_d="$cmake_d -D USE_NUKE=OFF"
|
||||
cmake_d="$cmake_d -D USE_DCMTK=OFF"
|
||||
cmake_d="$cmake_d -D USE_LIBHEIF=OFF"
|
||||
cmake_d="$cmake_d -D USE_GIF=OFF"
|
||||
cmake_d="$cmake_d -D USE_LIBRAW=OFF"
|
||||
cmake_d="$cmake_d -D USE_LIBSQUISH=OFF"
|
||||
|
||||
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
|
||||
cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF"
|
||||
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=ON"
|
||||
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=OFF"
|
||||
cmake_d="$cmake_d -D TXT2MAN="
|
||||
#cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
||||
#cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"
|
||||
|
||||
if [ -d $INST/boost ]; then
|
||||
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON -D Boost_NO_BOOST_CMAKE=ON"
|
||||
@@ -2474,7 +2404,7 @@ compile_LLVM() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
llvm_magic=4
|
||||
llvm_magic=3
|
||||
_init_llvm
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -2523,9 +2453,9 @@ compile_LLVM() {
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
LLVM_TARGETS="X86;NVPTX"
|
||||
LLVM_TARGETS="X86"
|
||||
if [ $(uname -m) == "aarch64" ]; then
|
||||
LLVM_TARGETS="AArch64;NVPTX"
|
||||
LLVM_TARGETS="AArch64"
|
||||
fi
|
||||
|
||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||
@@ -2592,7 +2522,7 @@ compile_OSL() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
osl_magic=22
|
||||
osl_magic=21
|
||||
_init_osl
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -2623,9 +2553,8 @@ compile_OSL() {
|
||||
INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
|
||||
tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
|
||||
-xf $_src.tar.gz
|
||||
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
||||
fi
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
@@ -2637,8 +2566,6 @@ compile_OSL() {
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OSL_SOURCE_REPO_UID
|
||||
git reset --hard
|
||||
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
||||
fi
|
||||
|
||||
# Always refresh the whole build!
|
||||
@@ -2954,12 +2881,7 @@ _init_openvdb() {
|
||||
}
|
||||
|
||||
_update_deps_openvdb() {
|
||||
if [ "$1" = true ]; then
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
:
|
||||
}
|
||||
|
||||
clean_OPENVDB() {
|
||||
@@ -2981,7 +2903,7 @@ compile_OPENVDB() {
|
||||
PRINT ""
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
openvdb_magic=5
|
||||
openvdb_magic=4
|
||||
_init_openvdb
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -3030,18 +2952,12 @@ compile_OPENVDB() {
|
||||
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_CORE_SHARED=ON"
|
||||
cmake_d="$cmake_d -D OPENVDB_CORE_STATIC=OFF"
|
||||
cmake_d="$cmake_d -D OPENVDB_BUILD_BINARIES=OFF"
|
||||
|
||||
if [ "$WITH_NANOVDB" = true ]; then
|
||||
cmake_d="$cmake_d -D USE_NANOVDB=ON"
|
||||
cmake_d="$cmake_d -D OPENVDB_BUILD_NANOVDB=ON"
|
||||
cmake_d="$cmake_d -D NANOVDB_BUILD_TOOLS=OFF"
|
||||
else
|
||||
cmake_d="$cmake_d -D USE_NANOVDB=OFF"
|
||||
cmake_d="$cmake_d -D OPENVDB_BUILD_NANOVDB=OFF"
|
||||
cmake_d="$cmake_d -D NANOVDB_BUILD_TOOLS=OFF"
|
||||
fi
|
||||
|
||||
if [ -d $INST/boost ]; then
|
||||
@@ -3053,9 +2969,6 @@ compile_OPENVDB() {
|
||||
fi
|
||||
if [ -d $INST/tbb ]; then
|
||||
cmake_d="$cmake_d -D TBB_ROOT=$INST/tbb"
|
||||
# Work around until we use oneTBB, otherwise OpenVDB forcefully
|
||||
# uses oneTBB if it can find it on the system.
|
||||
cmake_d="$cmake_d -D Tbb_INCLUDE_DIR=$INST/tbb/include"
|
||||
fi
|
||||
|
||||
if [ "$_with_built_imath" = true ]; then
|
||||
@@ -3069,13 +2982,6 @@ compile_OPENVDB() {
|
||||
cmake_d="$cmake_d -D Blosc_ROOT=$INST/blosc"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -D OPENVDB_BUILD_PYTHON_MODULE=ON"
|
||||
cmake_d="$cmake_d -D OPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON"
|
||||
cmake_d="$cmake_d -D USE_NUMPY=ON"
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
|
||||
cmake $cmake_d ..
|
||||
|
||||
make -j$THREADS install
|
||||
@@ -3213,103 +3119,6 @@ compile_ALEMBIC() {
|
||||
run_ldconfig "alembic"
|
||||
}
|
||||
|
||||
#### Build materialX ####
|
||||
_init_materialx() {
|
||||
_src=$SRC/MaterialX-$MATERIALX_VERSION
|
||||
_git=false
|
||||
_inst=$INST/materialx-$MATERIALX_VERSION_SHORT
|
||||
_inst_shortcut=$INST/materialx
|
||||
}
|
||||
|
||||
_update_deps_materialx() {
|
||||
:
|
||||
}
|
||||
|
||||
clean_MATERIALX() {
|
||||
_init_materialx
|
||||
if [ -d $_inst ]; then
|
||||
# Force rebuilding the dependencies if needed.
|
||||
_update_deps_materialx false true
|
||||
fi
|
||||
_clean
|
||||
}
|
||||
|
||||
compile_MATERIALX() {
|
||||
if [ "$NO_BUILD" = true ]; then
|
||||
WARNING "--no-build enabled, MaterialX will not be compiled!"
|
||||
return
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
materialx_magic=1
|
||||
_init_materialx
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
_update_deps_materialx true false
|
||||
|
||||
# Clean install if needed!
|
||||
magic_compile_check materialx-$MATERIALX_VERSION $materialx_magic
|
||||
if [ $? -eq 1 -o "$MATERIALX_FORCE_REBUILD" = true ]; then
|
||||
clean_MATERIALX
|
||||
fi
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
INFO "Building MaterialX-$MATERIALX_VERSION"
|
||||
|
||||
# Force rebuilding the dependencies.
|
||||
_update_deps_materialx true true
|
||||
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
download MATERIALX_SOURCE[@] "$_src.tar.gz"
|
||||
|
||||
INFO "Unpacking MaterialX-$MATERIALX_VERSION"
|
||||
tar -C $SRC -xf $_src.tar.gz
|
||||
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/materialx.diff
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
|
||||
cmake_d="$cmake_d -DMATERIALX_BUILD_SHARED_LIBS=ON"
|
||||
cmake_d="$cmake_d -DCMAKE_DEBUG_POSTFIX=_d"
|
||||
|
||||
cmake_d="$cmake_d -DMATERIALX_BUILD_RENDER=OFF"
|
||||
|
||||
cmake_d="$cmake_d -DMATERIALX_BUILD_PYTHON=ON"
|
||||
cmake_d="$cmake_d -DMATERIALX_INSTALL_PYTHON=OFF"
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
|
||||
cmake $cmake_d ./
|
||||
make -j$THREADS install
|
||||
make clean
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
ERROR "MaterialX-$MATERIALX_VERSION failed to compile, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
magic_compile_set materialx-$MATERIALX_VERSION $materialx_magic
|
||||
|
||||
cd $CWD
|
||||
INFO "Done compiling MaterialX-$MATERIALX_VERSION!"
|
||||
else
|
||||
INFO "Own MaterialX-$MATERIALX_VERSION is up to date, nothing to do!"
|
||||
INFO "If you want to force rebuild of this lib, use the --force-materialx option."
|
||||
fi
|
||||
|
||||
if [ -d $_inst ]; then
|
||||
_create_inst_shortcut
|
||||
fi
|
||||
run_ldconfig "materialx"
|
||||
}
|
||||
|
||||
#### Build USD ####
|
||||
_init_usd() {
|
||||
_src=$SRC/USD-$USD_VERSION
|
||||
@@ -3338,7 +3147,7 @@ compile_USD() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
usd_magic=2
|
||||
usd_magic=1
|
||||
_init_usd
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -3372,46 +3181,18 @@ compile_USD() {
|
||||
cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
# For the reasoning behind these options, please see usd.cmake.
|
||||
if [ -d $INST/boost ]; then
|
||||
cmake_d="$cmake_d -DBOOST_ROOT=$INST/boost"
|
||||
cmake_d="$cmake_d $cmake_d -D BOOST_ROOT=$INST/boost"
|
||||
fi
|
||||
|
||||
if [ -d $INST/tbb ]; then
|
||||
cmake_d="$cmake_d -DTBB_ROOT_DIR=$INST/tbb"
|
||||
cmake_d="$cmake_d $cmake_d -D TBB_ROOT_DIR=$INST/tbb"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=ON"
|
||||
cmake_d="$cmake_d -DPXR_USE_PYTHON_3=ON"
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D PYTHON_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=ON"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON"
|
||||
if [ -d $INST/openexr ]; then
|
||||
cmake_d="$cmake_d -DOPENEXR_LOCATION=$INST/openexr"
|
||||
fi
|
||||
if [ -d $INST/oiio ]; then
|
||||
cmake_d="$cmake_d -DOpenImageIO_ROOT=$INST/oiio"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_OPENVDB_SUPPORT=ON"
|
||||
if [ -d $INST/openvdb ]; then
|
||||
cmake_d="$cmake_d -DOPENVDB_LOCATION=$INST/openvdb"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_GL_SUPPORT=ON"
|
||||
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_TESTS=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_EXAMPLES=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_TUTORIALS=OFF"
|
||||
|
||||
cmake_d="$cmake_d -DPXR_BUILD_USD_TOOLS=OFF"
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_HDF5_SUPPORT=OFF"
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_MATERIALX_SUPPORT=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_USDVIEW=OFF"
|
||||
|
||||
cmake_d="$cmake_d -DPXR_BUILD_MONOLITHIC=ON"
|
||||
cmake_d="$cmake_d -DBUILD_SHARED_LIBS=ON"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_MONOLITHIC=ON"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_USD_TOOLS=OFF"
|
||||
cmake_d="$cmake_d -DCMAKE_DEBUG_POSTFIX=_d"
|
||||
|
||||
cmake $cmake_d ./
|
||||
@@ -4424,12 +4205,11 @@ install_DEB() {
|
||||
git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \
|
||||
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
||||
libwayland-dev libdecor-0-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \
|
||||
libvulkan-dev libshaderc-dev \
|
||||
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
|
||||
libopenal-dev libepoxy-dev yasm pybind11-dev \
|
||||
libopenal-dev libepoxy-dev yasm \
|
||||
libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \
|
||||
libgmp-dev libpugixml-dev libpotrace-dev libhpdf-dev libzstd-dev libpystring-dev \
|
||||
libglfw3-dev libfribidi-dev libharfbuzz-dev"
|
||||
libglfw3-dev"
|
||||
|
||||
VORBIS_USE=true
|
||||
OGG_USE=true
|
||||
@@ -4613,7 +4393,7 @@ install_DEB() {
|
||||
|
||||
boost_version=$(echo `get_package_version_DEB libboost-dev` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/')
|
||||
|
||||
install_packages_DEB ${BOOST_DEB_PACKAGE_MODULES[@]/%/$boost_version-dev}
|
||||
install_packages_DEB libboost-{filesystem,iostreams,locale,regex,system,thread,wave,program-options}$boost_version-dev
|
||||
clean_Boost
|
||||
else
|
||||
compile_Boost
|
||||
@@ -4805,16 +4585,6 @@ install_DEB() {
|
||||
compile_ALEMBIC
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$MATERIALX_SKIP" = true ]; then
|
||||
WARNING "Skipping MaterialX installation, as requested..."
|
||||
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced MaterialX building, as requested..."
|
||||
compile_MATERIALX
|
||||
else
|
||||
compile_MATERIALX
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$USD_SKIP" = true ]; then
|
||||
WARNING "Skipping USD installation, as requested..."
|
||||
@@ -5158,12 +4928,10 @@ install_RPM() {
|
||||
libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \
|
||||
libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
|
||||
wayland-devel libdecor-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \
|
||||
vulkan-loader-devel libshaderc-devel \
|
||||
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
|
||||
libepoxy-devel yasm patch pybind11-devel \
|
||||
libepoxy-devel yasm patch \
|
||||
libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \
|
||||
gmp-devel pugixml-devel potrace-devel libharu-devel libzstd-devel pystring-devel \
|
||||
fribidi-devel harfbuzz-devel"
|
||||
gmp-devel pugixml-devel potrace-devel libharu-devel libzstd-devel pystring-devel"
|
||||
|
||||
OPENJPEG_USE=true
|
||||
VORBIS_USE=true
|
||||
@@ -5544,16 +5312,6 @@ install_RPM() {
|
||||
compile_ALEMBIC
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$MATERIALX_SKIP" = true ]; then
|
||||
WARNING "Skipping MaterialX installation, as requested..."
|
||||
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced MaterialX building, as requested..."
|
||||
compile_MATERIALX
|
||||
else
|
||||
compile_MATERIALX
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$USD_SKIP" = true ]; then
|
||||
WARNING "Skipping USD installation, as requested..."
|
||||
@@ -5824,10 +5582,9 @@ install_ARCH() {
|
||||
|
||||
_packages="$BASE_DEVEL git cmake fontconfig flex \
|
||||
libxi libxcursor libxrandr libxinerama libepoxy libdecor libpng libtiff wget openal \
|
||||
vulkan-icd-loader vulkan-headers shaderc \
|
||||
$OPENJPEG_DEV yasm sdl2 fftw pybind11 \
|
||||
$OPENJPEG_DEV yasm sdl2 fftw \
|
||||
libxml2 yaml-cpp tinyxml python-requests jemalloc gmp potrace pugixml libharu \
|
||||
zstd pystring fribidi harfbuzz"
|
||||
zstd pystring"
|
||||
|
||||
OPENJPEG_USE=true
|
||||
VORBIS_USE=true
|
||||
@@ -6159,16 +5916,6 @@ install_ARCH() {
|
||||
compile_ALEMBIC
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$MATERIALX_SKIP" = true ]; then
|
||||
WARNING "Skipping MaterialX installation, as requested..."
|
||||
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced MaterialX building, as requested..."
|
||||
compile_MATERIALX
|
||||
else
|
||||
compile_MATERIALX
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$USD_SKIP" = true ]; then
|
||||
WARNING "Skipping USD installation, as requested..."
|
||||
@@ -6460,27 +6207,6 @@ install_OTHER() {
|
||||
fi
|
||||
|
||||
|
||||
PRINT ""
|
||||
if [ "$MATERIALX_SKIP" = true ]; then
|
||||
WARNING "Skipping MaterialX installation, as requested..."
|
||||
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced MaterialX building, as requested..."
|
||||
compile_MATERIALX
|
||||
else
|
||||
compile_MATERIALX
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$USD_SKIP" = true ]; then
|
||||
WARNING "Skipping USD installation, as requested..."
|
||||
elif [ "$USD_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced USD building, as requested..."
|
||||
compile_USD
|
||||
else
|
||||
compile_USD
|
||||
fi
|
||||
|
||||
|
||||
if [ "$WITH_OPENCOLLADA" = true ]; then
|
||||
PRINT ""
|
||||
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
||||
@@ -6558,8 +6284,7 @@ print_info() {
|
||||
|
||||
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost* -U *TBB*"
|
||||
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CLANG* -U *CYCLES*"
|
||||
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *BLOSC* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC*"
|
||||
_buildargs="$_buildargs -U *MATERIALX* -U *USD*"
|
||||
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *BLOSC* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
|
||||
_buildargs="$_buildargs -U *EMBREE* -U *OPENIMAGEDENOISE* -U *OPENXR* -U *OPENPGL*"
|
||||
|
||||
_1="-D WITH_CODEC_SNDFILE=ON"
|
||||
@@ -6746,17 +6471,6 @@ print_info() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$MATERIALX_SKIP" = false ]; then
|
||||
_1="-D WITH_MATERIALX=ON"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
if [ -d $INST/materialx ]; then
|
||||
_1="-D MaterialX_DIR=$INST/materialx/lib/cmake/MaterialX"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$USD_SKIP" = false ]; then
|
||||
_1="-D WITH_USD=ON"
|
||||
PRINT " $_1"
|
||||
|
@@ -11,31 +11,19 @@ if [ `id -u` -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Required by: config manager command below to enable powertools.
|
||||
dnf install 'dnf-command(config-manager)'
|
||||
|
||||
# Packages `ninja-build` and `meson` are not available unless CBR or PowerTools repositories are enabled.
|
||||
# See: https://wiki.rockylinux.org/rocky/repo/#notes-on-unlisted-repositories
|
||||
dnf config-manager --set-enabled powertools
|
||||
|
||||
# Required by: epel-release has the patchelf and rubygem-asciidoctor packages
|
||||
dnf install epel-release
|
||||
|
||||
# `yum-config-manager` does not come in the default minimal install,
|
||||
# yum-config-manager does not come in the default minimal install,
|
||||
# so make sure it is installed and available.
|
||||
yum -y update
|
||||
yum -y install yum-utils
|
||||
|
||||
# Install all the packages needed for a new tool-chain.
|
||||
# Install all the packages needed for a new toolchain.
|
||||
#
|
||||
# NOTE: Keep this separate from the packages install, since otherwise
|
||||
# older tool-chain will be installed.
|
||||
# older toolchain will be installed.
|
||||
yum -y update
|
||||
yum -y install scl-utils
|
||||
yum -y install scl-utils-build
|
||||
|
||||
# Currently this is defined by the VFX platform (CY2023), see: https://vfxplatform.com
|
||||
yum -y install gcc-toolset-11
|
||||
yum -y install epel-release
|
||||
yum -y install centos-release-scl
|
||||
yum -y install devtoolset-9
|
||||
|
||||
# Install packages needed for Blender's dependencies.
|
||||
PACKAGES_FOR_LIBS=(
|
||||
@@ -59,12 +47,19 @@ PACKAGES_FOR_LIBS=(
|
||||
automake
|
||||
libtool
|
||||
|
||||
# TODO: why is this needed?
|
||||
patchelf
|
||||
|
||||
# Meta-build system used by various packages.
|
||||
meson
|
||||
# Builds generated by meson use Ninja for the actual build.
|
||||
ninja-build
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_X11`.
|
||||
libXrandr-devel
|
||||
libXinerama-devel
|
||||
libXcursor-devel
|
||||
libXi-devel
|
||||
libX11-devel
|
||||
libXt-devel
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||
mesa-libEGL-devel
|
||||
# Required by: Blender & `external_opensubdiv` (probably others).
|
||||
@@ -84,47 +79,52 @@ PACKAGES_FOR_LIBS=(
|
||||
# Why are both needed?
|
||||
yasm
|
||||
|
||||
# NOTE(@campbellbarton): while `python39` is available, the default Python version is 3.6.
|
||||
# This is used for the `python3-mako` package for e.g.
|
||||
# So use the "default" system Python since it means it's most compatible with other packages.
|
||||
python3
|
||||
# Required by: `external_mesa`.
|
||||
python3-mako
|
||||
|
||||
# Required by: `external_mesa`.
|
||||
expat-devel
|
||||
# Required by: `meson` (Python based build system).
|
||||
python36
|
||||
# Required by: `mako` (Python module used for building `external_mesa`)
|
||||
python-setuptools
|
||||
|
||||
# Required by: `external_igc` & `external_osl` as a build-time dependency.
|
||||
bison
|
||||
# Required by: `external_osl` as a build-time dependency.
|
||||
flex
|
||||
|
||||
# Required by: `external_ispc`.
|
||||
# TODO: dependencies build without this, consider removal.
|
||||
ncurses-devel
|
||||
# Required by: `external_ispc` (when building with CLANG).
|
||||
libstdc++-static
|
||||
)
|
||||
|
||||
# Additional packages needed for building Blender.
|
||||
PACKAGES_FOR_BLENDER=(
|
||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||
libxkbcommon-devel
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_X11`.
|
||||
libX11-devel
|
||||
libXcursor-devel
|
||||
libXi-devel
|
||||
libXinerama-devel
|
||||
libXrandr-devel
|
||||
libXt-devel
|
||||
libXxf86vm-devel
|
||||
)
|
||||
|
||||
yum -y install -y ${PACKAGES_FOR_LIBS[@]} ${PACKAGES_FOR_BLENDER[@]}
|
||||
|
||||
# Dependencies for pip (needed for `buildbot-worker`), uses Python3.6.
|
||||
yum -y install python3 python3-pip python3-devel
|
||||
# Dependencies for Mesa
|
||||
yum -y install expat-devel
|
||||
python3 -m pip install mako
|
||||
|
||||
# Dependencies for pip (needed for buildbot-worker).
|
||||
yum -y install python36-pip python36-devel
|
||||
|
||||
# Dependencies for asound.
|
||||
yum -y install -y \
|
||||
alsa-lib-devel pulseaudio-libs-devel
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \
|
||||
--family cmake
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
|
||||
--family cmake
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
|
||||
--family cmake
|
@@ -1,12 +0,0 @@
|
||||
--- a/boost/python//detail/wrap_python.hpp 2022-12-09 19:16:17
|
||||
+++ b/boost/python//detail/wrap_python.hpp 2022-12-09 19:18:08
|
||||
@@ -206,7 +206,8 @@
|
||||
|
||||
#ifdef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
|
||||
# undef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
|
||||
-# define _DEBUG
|
||||
+// BLENDER: TBB excepts this to have a value.
|
||||
+# define _DEBUG 1
|
||||
# ifdef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
|
||||
# undef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
|
||||
# undef _CRT_NOFORCE_MANIFEST
|
@@ -90,25 +90,3 @@ diff -Naur orig/openvdb/openvdb/tree/ValueAccessor.h openvdb/openvdb/openvdb/tre
|
||||
|
||||
CacheItem(TreeCacheT& parent)
|
||||
: mParent(&parent)
|
||||
diff --git a/nanovdb/nanovdb/NanoVDB.h b/nanovdb/nanovdb/NanoVDB.h
|
||||
index f7fc304..fde5c47 100644
|
||||
--- a/nanovdb/nanovdb/NanoVDB.h
|
||||
+++ b/nanovdb/nanovdb/NanoVDB.h
|
||||
@@ -1877,7 +1877,7 @@ __hostdev__ static inline uint32_t FindLowestOn(uint64_t v)
|
||||
{
|
||||
NANOVDB_ASSERT(v);
|
||||
#if (defined(__CUDA_ARCH__) || defined(__HIP__)) && defined(NANOVDB_USE_INTRINSICS)
|
||||
- return __ffsll(v);
|
||||
+ return __ffsll(static_cast<unsigned long long int>(v));
|
||||
#elif defined(_MSC_VER) && defined(NANOVDB_USE_INTRINSICS)
|
||||
unsigned long index;
|
||||
_BitScanForward64(&index, v);
|
||||
@@ -2592,7 +2592,7 @@ public:
|
||||
///
|
||||
/// @note This method is only defined for IndexGrid = NanoGrid<ValueIndex>
|
||||
template <typename T = BuildType>
|
||||
- __hostdev__ typename enable_if<is_same<T, ValueIndex>::value, uint64_t>::type valueCount() const {return DataType::mData1;}
|
||||
+ __hostdev__ typename enable_if<is_same<T, ValueIndex>::value, const uint64_t&>::type valueCount() const {return DataType::mData1;}
|
||||
|
||||
/// @brief Return a const reference to the tree
|
||||
__hostdev__ const TreeT& tree() const { return *reinterpret_cast<const TreeT*>(this->treePtr()); }
|
||||
|
@@ -36,39 +36,3 @@ index a97a755..07ce853 100644
|
||||
if (self.compiler.find_library_file(self.lib_dirs, lib_name)):
|
||||
ffi_lib = lib_name
|
||||
break
|
||||
--- a/Modules/posixmodule.c 2022-12-09 21:44:03
|
||||
+++ b/Modules/posixmodule.c 2022-12-09 21:39:46
|
||||
@@ -10564,10 +10564,15 @@
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#ifdef HAVE_MKFIFOAT
|
||||
if (dir_fd != DEFAULT_DIR_FD) {
|
||||
+// BLENDER: disable also at compile time for compatibility when linking with older Xcode.
|
||||
+// https://github.com/python/cpython/issues/97897
|
||||
+#ifndef __APPLE__
|
||||
if (HAVE_MKFIFOAT_RUNTIME) {
|
||||
result = mkfifoat(dir_fd, path->narrow, mode);
|
||||
|
||||
+ } else
|
||||
+#endif
|
||||
+ {
|
||||
- } else {
|
||||
mkfifoat_unavailable = 1;
|
||||
result = 0;
|
||||
}
|
||||
@@ -10638,10 +10633,15 @@
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#ifdef HAVE_MKNODAT
|
||||
if (dir_fd != DEFAULT_DIR_FD) {
|
||||
+// BLENDER: disable also at compile time for compatibility when linking with older Xcode.
|
||||
+// https://github.com/python/cpython/issues/97897
|
||||
+#ifndef __APPLE__
|
||||
if (HAVE_MKNODAT_RUNTIME) {
|
||||
result = mknodat(dir_fd, path->narrow, mode, device);
|
||||
|
||||
+ } else
|
||||
+#endif
|
||||
+ {
|
||||
- } else {
|
||||
mknodat_unavailable = 1;
|
||||
result = 0;
|
||||
}
|
||||
|
@@ -30,19 +30,3 @@ diff -ru ./src/video/SDL_video.c ./src/video/SDL_video.c
|
||||
if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */
|
||||
if (Cocoa_IsWindowInFullscreenSpace(window)) {
|
||||
return SDL_FALSE;
|
||||
--- CMakeLists.txt 2022-12-09 20:40:00
|
||||
+++ CMakeLists.txt 2022-12-09 20:40:00
|
||||
@@ -526,6 +526,13 @@
|
||||
list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
|
||||
endif()
|
||||
|
||||
+ # BLENDER: make libs compatible with older Xcode.
|
||||
+ # https://github.com/KhronosGroup/MoltenVK/issues/1756
|
||||
+ check_c_compiler_flag(-fno-objc-msgsend-selector-stubs HAVE_GCC_NO_OBJC_MSGSEND_SELECTOR_STUBS)
|
||||
+ if(HAVE_GCC_NO_OBJC_MSGSEND_SELECTOR_STUBS)
|
||||
+ list(APPEND EXTRA_CFLAGS "-fno-objc-msgsend-selector-stubs")
|
||||
+ endif()
|
||||
+
|
||||
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||
if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||
check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT)
|
||||
|
11
build_files/build_environment/patches/wayland.diff
Normal file
11
build_files/build_environment/patches/wayland.diff
Normal file
@@ -0,0 +1,11 @@
|
||||
--- meson.build.orig 2022-06-30 22:59:11.000000000 +0100
|
||||
+++ meson.build 2022-09-27 13:21:26.428517668 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
'wayland', 'c',
|
||||
version: '1.21.0',
|
||||
license: 'MIT',
|
||||
- meson_version: '>= 0.56.0',
|
||||
+ meson_version: '>= 0.55.1',
|
||||
default_options: [
|
||||
'warning_level=2',
|
||||
'buildtype=debugoptimized',
|
@@ -4,9 +4,10 @@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
|
||||
|
||||
message(STATUS "Building in Rocky 8 Linux 64bit environment")
|
||||
message(STATUS "Building in CentOS 7 64bit environment")
|
||||
|
||||
set(LIBDIR_NAME "linux_x86_64_glibc_228")
|
||||
set(LIBDIR_NAME "linux_centos7_x86_64")
|
||||
set(WITH_CXX11_ABI OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Linux-specific build options ########
|
||||
# Options which are specific to Linux-only platforms
|
||||
|
@@ -19,13 +19,9 @@ ENDIF()
|
||||
|
||||
SET(_moltenvk_SEARCH_DIRS
|
||||
${MOLTENVK_ROOT_DIR}
|
||||
${LIBDIR}/vulkan/MoltenVK
|
||||
)
|
||||
|
||||
# FIXME: These finder modules typically don't use LIBDIR,
|
||||
# this should be set by `./build_files/cmake/platform/` instead.
|
||||
IF(DEFINED LIBDIR)
|
||||
SET(_moltenvk_SEARCH_DIRS ${_moltenvk_SEARCH_DIRS} ${LIBDIR}/moltenvk)
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(MOLTENVK_INCLUDE_DIR
|
||||
NAMES
|
||||
|
@@ -17,13 +17,9 @@ ENDIF()
|
||||
|
||||
SET(_optix_SEARCH_DIRS
|
||||
${OPTIX_ROOT_DIR}
|
||||
"$ENV{PROGRAMDATA}/NVIDIA Corporation/OptiX SDK 7.3.0"
|
||||
)
|
||||
|
||||
# TODO: Which environment uses this?
|
||||
if(DEFINED ENV{PROGRAMDATA})
|
||||
list(APPEND _optix_SEARCH_DIRS "$ENV{PROGRAMDATA}/NVIDIA Corporation/OptiX SDK 7.3.0")
|
||||
endif()
|
||||
|
||||
FIND_PATH(OPTIX_INCLUDE_DIR
|
||||
NAMES
|
||||
optix.h
|
||||
|
@@ -67,8 +67,6 @@ ENDIF()
|
||||
|
||||
STRING(REPLACE "." "" PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
|
||||
SET(_PYTHON_ABI_FLAGS "")
|
||||
|
||||
SET(_python_SEARCH_DIRS
|
||||
${PYTHON_ROOT_DIR}
|
||||
"$ENV{HOME}/py${PYTHON_VERSION_NO_DOTS}"
|
||||
|
@@ -1,63 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright 2023 Blender Foundation.
|
||||
|
||||
# - Find ShaderC libraries
|
||||
# Find the ShaderC includes and libraries
|
||||
# This module defines
|
||||
# SHADERC_INCLUDE_DIRS, where to find MoltenVK headers, Set when
|
||||
# SHADERC_INCLUDE_DIR is found.
|
||||
# SHADERC_LIBRARIES, libraries to link against to use ShaderC.
|
||||
# SHADERC_ROOT_DIR, The base directory to search for ShaderC.
|
||||
# This can also be an environment variable.
|
||||
# SHADERC_FOUND, If false, do not try to use ShaderC.
|
||||
#
|
||||
|
||||
# If SHADERC_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT SHADERC_ROOT_DIR AND NOT $ENV{SHADERC_ROOT_DIR} STREQUAL "")
|
||||
SET(SHADERC_ROOT_DIR $ENV{SHADERC_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_shaderc_SEARCH_DIRS
|
||||
${SHADERC_ROOT_DIR}
|
||||
)
|
||||
|
||||
# FIXME: These finder modules typically don't use LIBDIR,
|
||||
# this should be set by `./build_files/cmake/platform/` instead.
|
||||
IF(DEFINED LIBDIR)
|
||||
SET(_shaderc_SEARCH_DIRS ${_shaderc_SEARCH_DIRS} ${LIBDIR}/shaderc)
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(SHADERC_INCLUDE_DIR
|
||||
NAMES
|
||||
shaderc/shaderc.h
|
||||
HINTS
|
||||
${_shaderc_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SHADERC_LIBRARY
|
||||
NAMES
|
||||
shaderc_combined
|
||||
HINTS
|
||||
${_shaderc_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SHADERC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ShaderC DEFAULT_MSG SHADERC_LIBRARY SHADERC_INCLUDE_DIR)
|
||||
|
||||
IF(SHADERC_FOUND)
|
||||
SET(SHADERC_LIBRARIES ${SHADERC_LIBRARY})
|
||||
SET(SHADERC_INCLUDE_DIRS ${SHADERC_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
SHADERC_INCLUDE_DIR
|
||||
SHADERC_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_shaderc_SEARCH_DIRS)
|
@@ -1,63 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright 2023 Blender Foundation.
|
||||
|
||||
# - Find Vulkan libraries
|
||||
# Find the Vulkan includes and libraries
|
||||
# This module defines
|
||||
# VULKAN_INCLUDE_DIRS, where to find Vulkan headers, Set when
|
||||
# VULKAN_INCLUDE_DIR is found.
|
||||
# VULKAN_LIBRARIES, libraries to link against to use Vulkan.
|
||||
# VULKAN_ROOT_DIR, The base directory to search for Vulkan.
|
||||
# This can also be an environment variable.
|
||||
# VULKAN_FOUND, If false, do not try to use Vulkan.
|
||||
#
|
||||
|
||||
# If VULKAN_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT VULKAN_ROOT_DIR AND NOT $ENV{VULKAN_ROOT_DIR} STREQUAL "")
|
||||
SET(VULKAN_ROOT_DIR $ENV{VULKAN_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_vulkan_SEARCH_DIRS
|
||||
${VULKAN_ROOT_DIR}
|
||||
)
|
||||
|
||||
# FIXME: These finder modules typically don't use LIBDIR,
|
||||
# this should be set by `./build_files/cmake/platform/` instead.
|
||||
IF(DEFINED LIBDIR)
|
||||
SET(_vulkan_SEARCH_DIRS ${_vulkan_SEARCH_DIRS} ${LIBDIR}/vulkan)
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(VULKAN_INCLUDE_DIR
|
||||
NAMES
|
||||
vulkan/vulkan.h
|
||||
HINTS
|
||||
${_vulkan_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(VULKAN_LIBRARY
|
||||
NAMES
|
||||
vulkan
|
||||
HINTS
|
||||
${_vulkan_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set VULKAN_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vulkan DEFAULT_MSG VULKAN_LIBRARY VULKAN_INCLUDE_DIR)
|
||||
|
||||
IF(VULKAN_FOUND)
|
||||
SET(VULKAN_LIBRARIES ${VULKAN_LIBRARY})
|
||||
SET(VULKAN_INCLUDE_DIRS ${VULKAN_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
VULKAN_INCLUDE_DIR
|
||||
VULKAN_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_vulkan_SEARCH_DIRS)
|
@@ -6,80 +6,18 @@
|
||||
import re
|
||||
import sys
|
||||
|
||||
from typing import Optional
|
||||
|
||||
cmakelists_file = sys.argv[-1]
|
||||
|
||||
|
||||
def count_backslashes_before_pos(file_data: str, pos: int) -> int:
|
||||
slash_count = 0
|
||||
pos -= 1
|
||||
while pos >= 0:
|
||||
if file_data[pos] != '\\':
|
||||
break
|
||||
pos -= 1
|
||||
slash_count += 1
|
||||
return slash_count
|
||||
|
||||
|
||||
def extract_cmake_string_at_pos(file_data: str, pos_beg: int) -> Optional[str]:
|
||||
assert file_data[pos_beg - 1] == '"'
|
||||
|
||||
pos = pos_beg
|
||||
# Dummy assignment.
|
||||
pos_end = pos_beg
|
||||
while True:
|
||||
pos_next = file_data.find('"', pos)
|
||||
if pos_next == -1:
|
||||
raise Exception("Un-terminated string (parse error?)")
|
||||
|
||||
count_slashes = count_backslashes_before_pos(file_data, pos_next)
|
||||
if (count_slashes % 2) == 0:
|
||||
pos_end = pos_next
|
||||
# Found the closing quote.
|
||||
break
|
||||
|
||||
# The quote was back-slash escaped, step over it.
|
||||
pos = pos_next + 1
|
||||
file_data[pos_next]
|
||||
|
||||
assert file_data[pos_end] == '"'
|
||||
|
||||
if pos_beg == pos_end:
|
||||
return None
|
||||
|
||||
# See: https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#escape-sequences
|
||||
text = file_data[pos_beg: pos_end].replace(
|
||||
# Handle back-slash literals.
|
||||
"\\\\", "\\",
|
||||
).replace(
|
||||
# Handle tabs.
|
||||
"\\t", "\t",
|
||||
).replace(
|
||||
# Handle escaped quotes.
|
||||
"\\\"", "\"",
|
||||
).replace(
|
||||
# Handle tabs.
|
||||
"\\;", ";",
|
||||
).replace(
|
||||
# Handle trailing newlines.
|
||||
"\\\n", "",
|
||||
)
|
||||
|
||||
return text
|
||||
|
||||
|
||||
def main() -> None:
|
||||
def main():
|
||||
options = []
|
||||
with open(cmakelists_file, 'r', encoding="utf-8") as fh:
|
||||
file_data = fh.read()
|
||||
for m in re.finditer(r"^\s*option\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\")", file_data, re.MULTILINE):
|
||||
option_name = m.group(1)
|
||||
option_descr = extract_cmake_string_at_pos(file_data, m.span(2)[1])
|
||||
if option_descr is None:
|
||||
# Possibly a parsing error, at least show something.
|
||||
option_descr = "(UNDOCUMENTED)"
|
||||
options.append("{:s}: {:s}".format(option_name, option_descr))
|
||||
for l in open(cmakelists_file, 'r').readlines():
|
||||
if not l.lstrip().startswith('#'):
|
||||
l_option = re.sub(r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+\"(.*)\"\s*.*', r'\g<1> - \g<2>', l)
|
||||
if l_option != l:
|
||||
l_option = l_option.strip()
|
||||
if l_option.startswith('WITH_'):
|
||||
options.append(l_option)
|
||||
|
||||
print('\n'.join(options))
|
||||
|
||||
|
@@ -550,10 +550,8 @@ function(setup_platform_linker_libs
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT UNIX)
|
||||
if(DEFINED PTHREADS_LIBRARIES)
|
||||
target_link_libraries(${target} ${PTHREADS_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(${target} ${PLATFORM_LINKLIBS})
|
||||
@@ -1264,7 +1262,7 @@ endmacro()
|
||||
|
||||
# Utility to gather and install precompiled shared libraries.
|
||||
macro(add_bundled_libraries library_dir)
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
set(_library_dir ${LIBDIR}/${library_dir})
|
||||
if(WIN32)
|
||||
file(GLOB _all_library_versions ${_library_dir}/*\.dll)
|
||||
|
@@ -86,25 +86,38 @@ endif()
|
||||
|
||||
if(WITH_USD)
|
||||
find_package(USD REQUIRED)
|
||||
endif()
|
||||
add_bundled_libraries(usd/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_MATERIALX)
|
||||
find_package(MaterialX)
|
||||
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
||||
endif()
|
||||
if(WITH_MATERIALX)
|
||||
add_bundled_libraries(materialx/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
find_package(MoltenVK REQUIRED)
|
||||
find_package(ShaderC REQUIRED)
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
if(EXISTS ${LIBDIR}/vulkan)
|
||||
set(VULKAN_FOUND On)
|
||||
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan/macOS)
|
||||
set(VULKAN_INCLUDE_DIR ${VULKAN_ROOT_DIR}/include)
|
||||
set(VULKAN_LIBRARY ${VULKAN_ROOT_DIR}/lib/libvulkan.1.dylib)
|
||||
|
||||
set(VULKAN_INCLUDE_DIRS ${VULKAN_INCLUDE_DIR} ${MOLTENVK_INCLUDE_DIRS})
|
||||
set(VULKAN_LIBRARIES ${VULKAN_LIBRARY} ${MOLTENVK_LIBRARIES})
|
||||
else()
|
||||
message(WARNING "Vulkan SDK was not found, disabling WITH_VULKAN_BACKEND")
|
||||
set(WITH_VULKAN_BACKEND OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV)
|
||||
find_package(OpenSubdiv)
|
||||
endif()
|
||||
add_bundled_libraries(opensubdiv/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
find_package(SndFile)
|
||||
@@ -142,9 +155,9 @@ list(APPEND FREETYPE_LIBRARIES
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
find_package(OpenEXR)
|
||||
endif()
|
||||
add_bundled_libraries(openexr/lib)
|
||||
add_bundled_libraries(imath/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG_ROOT_DIR ${LIBDIR}/ffmpeg)
|
||||
@@ -256,11 +269,12 @@ if(WITH_BOOST)
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_DEFINITIONS)
|
||||
|
||||
add_bundled_libraries(boost/lib)
|
||||
|
||||
mark_as_advanced(Boost_LIBRARIES)
|
||||
mark_as_advanced(Boost_INCLUDE_DIRS)
|
||||
unset(_boost_FIND_COMPONENTS)
|
||||
endif()
|
||||
add_bundled_libraries(boost/lib)
|
||||
|
||||
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
||||
string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it !
|
||||
@@ -282,13 +296,13 @@ if(WITH_OPENIMAGEIO)
|
||||
)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
|
||||
endif()
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package(OpenColorIO 2.0.0 REQUIRED)
|
||||
endif()
|
||||
add_bundled_libraries(opencolorio/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
find_package(OpenVDB)
|
||||
@@ -299,8 +313,8 @@ if(WITH_OPENVDB)
|
||||
unset(BLOSC_LIBRARIES CACHE)
|
||||
endif()
|
||||
set(OPENVDB_DEFINITIONS)
|
||||
endif()
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
find_package(NanoVDB)
|
||||
@@ -348,8 +362,8 @@ endif()
|
||||
|
||||
if(WITH_TBB)
|
||||
find_package(TBB REQUIRED)
|
||||
endif()
|
||||
add_bundled_libraries(tbb/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_POTRACE)
|
||||
find_package(Potrace REQUIRED)
|
||||
@@ -367,9 +381,9 @@ if(WITH_OPENMP)
|
||||
set(OpenMP_LIBRARY_DIR "${LIBDIR}/openmp/lib/")
|
||||
set(OpenMP_LINKER_FLAGS "-L'${OpenMP_LIBRARY_DIR}' -lomp")
|
||||
set(OpenMP_LIBRARY "${OpenMP_LIBRARY_DIR}/libomp.dylib")
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(openmp/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
find_package(XR_OpenXR_SDK REQUIRED)
|
||||
|
@@ -155,8 +155,8 @@ if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
# M1 chips run Big Sur onwards.
|
||||
set(OSX_MIN_DEPLOYMENT_TARGET 11.00)
|
||||
else()
|
||||
# 10.15 is our min. target, if you use higher sdk, weak linking happens
|
||||
set(OSX_MIN_DEPLOYMENT_TARGET 10.15)
|
||||
# 10.13 is our min. target, if you use higher sdk, weak linking happens
|
||||
set(OSX_MIN_DEPLOYMENT_TARGET 10.13)
|
||||
endif()
|
||||
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "${OSX_MIN_DEPLOYMENT_TARGET}" CACHE STRING "" FORCE)
|
||||
|
@@ -1,14 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright 2022 Blender Foundation. All rights reserved.
|
||||
|
||||
# Auto update existing CMake caches for new libraries.
|
||||
# Auto update existing CMake caches for new libraries
|
||||
|
||||
# Assert that `LIBDIR` is defined.
|
||||
if(NOT (DEFINED LIBDIR))
|
||||
message(FATAL_ERROR "Logical error, expected 'LIBDIR' to be defined!")
|
||||
endif()
|
||||
|
||||
# Clear cached variables whose name matches `pattern`.
|
||||
function(unset_cache_variables pattern)
|
||||
get_cmake_property(_cache_variables CACHE_VARIABLES)
|
||||
foreach (_cache_variable ${_cache_variables})
|
||||
@@ -18,30 +12,6 @@ function(unset_cache_variables pattern)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# Clear cached variables with values containing `contents`.
|
||||
function(unset_cached_varables_containting contents msg)
|
||||
get_cmake_property(_cache_variables CACHE_VARIABLES)
|
||||
set(_found)
|
||||
set(_print_msg)
|
||||
foreach(_cache_variable ${_cache_variables})
|
||||
# Skip "_" prefixed variables, these are used for internal book-keeping,
|
||||
# not under user control.
|
||||
string(FIND "${_cache_variable}" "_" _found)
|
||||
if(NOT (_found EQUAL 0))
|
||||
string(FIND "${${_cache_variable}}" "${contents}" _found)
|
||||
if(NOT (_found EQUAL -1))
|
||||
if(_found)
|
||||
unset(${_cache_variable} CACHE)
|
||||
set(_print_msg ON)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
if(_print_msg)
|
||||
message(STATUS ${msg})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Detect update from 3.1 to 3.2 libs.
|
||||
if(UNIX AND
|
||||
DEFINED OPENEXR_VERSION AND
|
||||
@@ -93,13 +63,3 @@ if(UNIX AND
|
||||
unset_cache_variables("^TBB")
|
||||
unset_cache_variables("^USD")
|
||||
endif()
|
||||
|
||||
if(UNIX AND (NOT APPLE) AND LIBDIR AND (EXISTS ${LIBDIR}))
|
||||
# Only search for the path if it's found on the system.
|
||||
set(_libdir_stale "/lib/linux_centos7_x86_64/")
|
||||
unset_cached_varables_containting(
|
||||
"${_libdir_stale}"
|
||||
"Auto clearing old ${_libdir_stale} paths from CMake configuration"
|
||||
)
|
||||
unset(_libdir_stale)
|
||||
endif()
|
||||
|
@@ -4,25 +4,22 @@
|
||||
# Libraries configuration for any *nix system including Linux and Unix (excluding APPLE).
|
||||
|
||||
# Detect precompiled library directory
|
||||
|
||||
if(NOT WITH_LIBS_PRECOMPILED)
|
||||
unset(LIBDIR)
|
||||
else()
|
||||
if(NOT DEFINED LIBDIR)
|
||||
# Path to a locally compiled libraries.
|
||||
set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
|
||||
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
|
||||
set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
|
||||
|
||||
# Path to precompiled libraries with known glibc 2.28 ABI.
|
||||
set(LIBDIR_GLIBC228_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_x86_64_glibc_228)
|
||||
# Path to precompiled libraries with known CentOS 7 ABI.
|
||||
set(LIBDIR_CENTOS7_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_centos7_x86_64)
|
||||
|
||||
# Choose the best suitable libraries.
|
||||
if(EXISTS ${LIBDIR_NATIVE_ABI})
|
||||
set(LIBDIR ${LIBDIR_NATIVE_ABI})
|
||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND True)
|
||||
elseif(EXISTS ${LIBDIR_GLIBC228_ABI})
|
||||
set(LIBDIR ${LIBDIR_GLIBC228_ABI})
|
||||
elseif(EXISTS ${LIBDIR_CENTOS7_ABI})
|
||||
set(LIBDIR ${LIBDIR_CENTOS7_ABI})
|
||||
set(WITH_CXX11_ABI OFF)
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
# jemalloc provides malloc hooks.
|
||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND False)
|
||||
@@ -33,23 +30,13 @@ else()
|
||||
|
||||
# Avoid namespace pollustion.
|
||||
unset(LIBDIR_NATIVE_ABI)
|
||||
unset(LIBDIR_GLIBC228_ABI)
|
||||
unset(LIBDIR_CENTOS7_ABI)
|
||||
endif()
|
||||
|
||||
if(NOT (EXISTS ${LIBDIR}))
|
||||
message(STATUS
|
||||
"Unable to find LIBDIR: ${LIBDIR}, system libraries may be used "
|
||||
"(disable WITH_LIBS_PRECOMPILED to suppress this message)."
|
||||
)
|
||||
unset(LIBDIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Support restoring this value once pre-compiled libraries have been handled.
|
||||
set(WITH_STATIC_LIBS_INIT ${WITH_STATIC_LIBS})
|
||||
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
||||
|
||||
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
|
||||
@@ -99,7 +86,7 @@ endmacro()
|
||||
# These are libraries that may be precompiled. For this we disable searching in
|
||||
# the system directories so that we don't accidentally use them instead.
|
||||
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
without_system_libs_begin()
|
||||
endif()
|
||||
|
||||
@@ -111,7 +98,6 @@ find_package_wrapper(Epoxy REQUIRED)
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
find_package_wrapper(Vulkan REQUIRED)
|
||||
find_package_wrapper(ShaderC REQUIRED)
|
||||
endif()
|
||||
|
||||
function(check_freetype_for_brotli)
|
||||
@@ -129,7 +115,7 @@ endfunction()
|
||||
if(NOT WITH_SYSTEM_FREETYPE)
|
||||
# FreeType compiled with Brotli compression for woff2.
|
||||
find_package_wrapper(Freetype REQUIRED)
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
find_package_wrapper(Brotli REQUIRED)
|
||||
|
||||
# NOTE: This is done on WIN32 & APPLE but fails on some Linux systems.
|
||||
@@ -156,7 +142,7 @@ if(WITH_PYTHON)
|
||||
if(WITH_PYTHON_MODULE AND NOT WITH_INSTALL_PORTABLE)
|
||||
# Installing into `site-packages`, warn when installing into `./../lib/`
|
||||
# which script authors almost certainly don't want.
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
path_is_prefix(LIBDIR PYTHON_SITE_PACKAGES _is_prefix)
|
||||
if(_is_prefix)
|
||||
message(WARNING "
|
||||
@@ -181,9 +167,11 @@ endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
find_package_wrapper(OpenEXR) # our own module
|
||||
set_and_warn_library_found("OpenEXR" OPENEXR_FOUND WITH_IMAGE_OPENEXR)
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
add_bundled_libraries(openexr/lib)
|
||||
add_bundled_libraries(imath/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG)
|
||||
find_package_wrapper(OpenJPEG)
|
||||
@@ -232,7 +220,7 @@ if(WITH_CODEC_SNDFILE)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
set(FFMPEG_ROOT_DIR ${LIBDIR}/ffmpeg)
|
||||
# Override FFMPEG components to also include static library dependencies
|
||||
# included with precompiled libraries, and to ensure correct link order.
|
||||
@@ -247,7 +235,7 @@ if(WITH_CODEC_FFMPEG)
|
||||
vpx
|
||||
x264
|
||||
xvidcore)
|
||||
if((DEFINED LIBDIR) AND (EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a))
|
||||
if(EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a)
|
||||
list(APPEND FFMPEG_FIND_COMPONENTS aom)
|
||||
endif()
|
||||
elseif(FFMPEG)
|
||||
@@ -341,8 +329,13 @@ endif()
|
||||
if(WITH_OPENVDB)
|
||||
find_package(OpenVDB)
|
||||
set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
|
||||
endif()
|
||||
|
||||
if(OPENVDB_FOUND)
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
find_package_wrapper(Blosc)
|
||||
set_and_warn_library_found("Blosc" BLOSC_FOUND WITH_OPENVDB_BLOSC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
find_package_wrapper(NanoVDB)
|
||||
@@ -361,14 +354,18 @@ endif()
|
||||
if(WITH_USD)
|
||||
find_package_wrapper(USD)
|
||||
set_and_warn_library_found("USD" USD_FOUND WITH_USD)
|
||||
endif()
|
||||
if(WITH_USD)
|
||||
add_bundled_libraries(usd/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_MATERIALX)
|
||||
find_package_wrapper(MaterialX)
|
||||
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
||||
endif()
|
||||
if(WITH_MATERIALX)
|
||||
add_bundled_libraries(materialx/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
# uses in build instructions to override include and library variables
|
||||
@@ -424,8 +421,9 @@ if(WITH_BOOST)
|
||||
find_package(IcuLinux)
|
||||
list(APPEND BOOST_LIBRARIES ${ICU_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_bundled_libraries(boost/lib)
|
||||
endif()
|
||||
|
||||
if(WITH_PUGIXML)
|
||||
find_package_wrapper(PugiXML)
|
||||
@@ -445,13 +443,10 @@ if(WITH_OPENIMAGEIO)
|
||||
${PNG_LIBRARIES}
|
||||
${JPEG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${BOOST_LIBRARIES}
|
||||
)
|
||||
|
||||
set(OPENIMAGEIO_DEFINITIONS "")
|
||||
|
||||
if(WITH_BOOST)
|
||||
list(APPEND OPENIMAGEIO_LIBRARIES "${BOOST_LIBRARIES}")
|
||||
endif()
|
||||
if(WITH_IMAGE_TIFF)
|
||||
list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}")
|
||||
endif()
|
||||
@@ -463,16 +458,21 @@ if(WITH_OPENIMAGEIO)
|
||||
endif()
|
||||
|
||||
set_and_warn_library_found("OPENIMAGEIO" OPENIMAGEIO_FOUND WITH_OPENIMAGEIO)
|
||||
endif()
|
||||
if(WITH_OPENIMAGEIO)
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package_wrapper(OpenColorIO 2.0.0)
|
||||
|
||||
set(OPENCOLORIO_DEFINITIONS "")
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
set_and_warn_library_found("OpenColorIO" OPENCOLORIO_FOUND WITH_OPENCOLORIO)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
add_bundled_libraries(opencolorio/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||
find_package(Embree 3.8.0 REQUIRED)
|
||||
@@ -484,7 +484,7 @@ if(WITH_OPENIMAGEDENOISE)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
set(LLVM_STATIC ON)
|
||||
endif()
|
||||
|
||||
@@ -498,7 +498,7 @@ if(WITH_LLVM)
|
||||
endif()
|
||||
|
||||
# Symbol conflicts with same UTF library used by OpenCollada
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
if(WITH_OPENCOLLADA AND (${LLVM_VERSION} VERSION_LESS "4.0.0"))
|
||||
list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY})
|
||||
endif()
|
||||
@@ -513,14 +513,18 @@ if(WITH_OPENSUBDIV)
|
||||
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
|
||||
set_and_warn_library_found("OpenSubdiv" OPENSUBDIV_FOUND WITH_OPENSUBDIV)
|
||||
endif()
|
||||
if(WITH_OPENSUBDIV)
|
||||
add_bundled_libraries(opensubdiv/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_TBB)
|
||||
find_package_wrapper(TBB)
|
||||
set_and_warn_library_found("TBB" TBB_FOUND WITH_TBB)
|
||||
endif()
|
||||
if(WITH_TBB)
|
||||
add_bundled_libraries(tbb/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
find_package(XR_OpenXR_SDK)
|
||||
@@ -554,7 +558,7 @@ if(WITH_CYCLES AND WITH_CYCLES_PATH_GUIDING)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
without_system_libs_end()
|
||||
endif()
|
||||
|
||||
@@ -569,14 +573,9 @@ else()
|
||||
endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
# `FindThreads` documentation notes that this may be empty
|
||||
# with the system libraries provide threading functionality.
|
||||
if(CMAKE_THREAD_LIBS_INIT)
|
||||
list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
# used by other platforms
|
||||
set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
|
||||
if(CMAKE_DL_LIBS)
|
||||
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
|
||||
@@ -598,7 +597,7 @@ add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
||||
#
|
||||
# Keep last, so indirectly linked libraries don't override our own pre-compiled libs.
|
||||
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS ${LIBDIR})
|
||||
# Clear the prefix path as it causes the `LIBDIR` to override system locations.
|
||||
unset(CMAKE_PREFIX_PATH)
|
||||
|
||||
@@ -654,7 +653,7 @@ if(WITH_GHOST_WAYLAND)
|
||||
# When dynamically linked WAYLAND is used and `${LIBDIR}/wayland` is present,
|
||||
# there is no need to search for the libraries as they are not needed for building.
|
||||
# Only the headers are needed which can reference the known paths.
|
||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/wayland" AND WITH_GHOST_WAYLAND_DYNLOAD))
|
||||
if(EXISTS "${LIBDIR}/wayland" AND WITH_GHOST_WAYLAND_DYNLOAD)
|
||||
set(_use_system_wayland OFF)
|
||||
else()
|
||||
set(_use_system_wayland ON)
|
||||
@@ -668,7 +667,8 @@ if(WITH_GHOST_WAYLAND)
|
||||
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
else()
|
||||
# Rocky8 packages have too old a version, a newer version exist in the pre-compiled libraries.
|
||||
# CentOS 7 packages have too old a version, a newer version exist in the
|
||||
# precompiled libraries.
|
||||
find_path(WAYLAND_PROTOCOLS_DIR
|
||||
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
|
||||
PATH_SUFFIXES share/wayland-protocols
|
||||
@@ -718,7 +718,7 @@ if(WITH_GHOST_WAYLAND)
|
||||
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
|
||||
endif()
|
||||
|
||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/wayland/bin/wayland-scanner"))
|
||||
if(EXISTS "${LIBDIR}/wayland/bin/wayland-scanner")
|
||||
set(WAYLAND_SCANNER "${LIBDIR}/wayland/bin/wayland-scanner")
|
||||
else()
|
||||
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
||||
|
@@ -140,8 +140,8 @@ if(WITH_WINDOWS_BUNDLE_CRT)
|
||||
|
||||
install(FILES ${CMAKE_BINARY_DIR}/blender.crt.manifest DESTINATION ./blender.crt)
|
||||
set(BUNDLECRT "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.crt\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
||||
endif()
|
||||
set(BUNDLECRT "${BUNDLECRT}<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.shared\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
||||
endif()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.exe.manifest @ONLY)
|
||||
|
||||
|
||||
|
@@ -30,7 +30,7 @@ update-code:
|
||||
linux-x86_64:
|
||||
branch: trunk
|
||||
commit_id: HEAD
|
||||
path: lib/linux_x86_64_glibc_228
|
||||
path: lib/linux_centos7_x86_64
|
||||
windows-amd64:
|
||||
branch: trunk
|
||||
commit_id: HEAD
|
||||
@@ -43,17 +43,13 @@ update-code:
|
||||
branch: trunk
|
||||
commit_id: HEAD
|
||||
path: lib/benchmarks
|
||||
assets:
|
||||
branch: trunk
|
||||
commit_id: HEAD
|
||||
path: lib/assets
|
||||
|
||||
#
|
||||
# Buildbot only configs
|
||||
#
|
||||
buildbot:
|
||||
gcc:
|
||||
version: '11.0.0'
|
||||
version: '9.0.0'
|
||||
cuda10:
|
||||
version: '10.1.243'
|
||||
cuda11:
|
||||
@@ -63,7 +59,7 @@ buildbot:
|
||||
optix:
|
||||
version: '7.3.0'
|
||||
ocloc:
|
||||
version: '101.4032'
|
||||
version: '101.3430'
|
||||
cmake:
|
||||
default:
|
||||
version: any
|
||||
|
@@ -24,7 +24,7 @@ import os
|
||||
import re
|
||||
import platform
|
||||
import string
|
||||
import setuptools
|
||||
import setuptools # type: ignore
|
||||
import sys
|
||||
|
||||
from typing import (
|
||||
@@ -208,7 +208,7 @@ def main() -> None:
|
||||
return paths
|
||||
|
||||
# Ensure this wheel is marked platform specific.
|
||||
class BinaryDistribution(setuptools.dist.Distribution):
|
||||
class BinaryDistribution(setuptools.dist.Distribution): # type: ignore
|
||||
def has_ext_modules(self) -> bool:
|
||||
return True
|
||||
|
||||
|
@@ -13,10 +13,10 @@ import sys
|
||||
import make_utils
|
||||
from make_utils import call
|
||||
|
||||
# Parse arguments.
|
||||
# Parse arguments
|
||||
|
||||
|
||||
def parse_arguments() -> argparse.Namespace:
|
||||
def parse_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--ctest-command", default="ctest")
|
||||
parser.add_argument("--cmake-command", default="cmake")
|
||||
|
@@ -41,7 +41,7 @@ def parse_arguments() -> argparse.Namespace:
|
||||
parser.add_argument("--svn-command", default="svn")
|
||||
parser.add_argument("--svn-branch", default=None)
|
||||
parser.add_argument("--git-command", default="git")
|
||||
parser.add_argument("--use-linux-libraries", action="store_true")
|
||||
parser.add_argument("--use-centos-libraries", action="store_true")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None
|
||||
# this script is bundled as part of the precompiled libraries. However it
|
||||
# is used by the buildbot.
|
||||
lib_platform = "win64_vc15"
|
||||
elif args.use_linux_libraries:
|
||||
lib_platform = "linux_x86_64_glibc_228"
|
||||
elif args.use_centos_libraries:
|
||||
lib_platform = "linux_centos7_x86_64"
|
||||
else:
|
||||
# No precompiled libraries for Linux.
|
||||
lib_platform = None
|
||||
@@ -104,30 +104,17 @@ def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None
|
||||
svn_url_tests = svn_url + lib_tests
|
||||
call(svn_non_interactive + ["checkout", svn_url_tests, lib_tests_dirpath])
|
||||
|
||||
lib_assets = "assets"
|
||||
lib_assets_dirpath = os.path.join(lib_dirpath, lib_assets)
|
||||
|
||||
if not os.path.exists(lib_assets_dirpath):
|
||||
print_stage("Checking out Assets")
|
||||
|
||||
if make_utils.command_missing(args.svn_command):
|
||||
sys.stderr.write("svn not found, can't checkout assets\n")
|
||||
sys.exit(1)
|
||||
|
||||
svn_url_assets = svn_url + lib_assets
|
||||
call(svn_non_interactive + ["checkout", svn_url_assets, lib_assets_dirpath])
|
||||
|
||||
# Update precompiled libraries, assets and tests
|
||||
# Update precompiled libraries and tests
|
||||
|
||||
if not os.path.isdir(lib_dirpath):
|
||||
print("Library path: %r, not found, skipping" % lib_dirpath)
|
||||
else:
|
||||
paths_local_and_remote = []
|
||||
if os.path.exists(os.path.join(lib_dirpath, ".svn")):
|
||||
print_stage("Updating Precompiled Libraries, Assets and Tests (one repository)")
|
||||
print_stage("Updating Precompiled Libraries and Tests (one repository)")
|
||||
paths_local_and_remote.append((lib_dirpath, svn_url))
|
||||
else:
|
||||
print_stage("Updating Precompiled Libraries, Assets and Tests (multiple repositories)")
|
||||
print_stage("Updating Precompiled Libraries and Tests (multiple repositories)")
|
||||
# Separate paths checked out.
|
||||
for dirname in os.listdir(lib_dirpath):
|
||||
if dirname.startswith("."):
|
||||
|
@@ -10,9 +10,8 @@ Only keyword arguments can be used to pass operator properties.
|
||||
Operators don't have return values as you might expect,
|
||||
instead they return a set() which is made up of:
|
||||
``{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}``.
|
||||
Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``, the latter
|
||||
meaning that the operator execution was aborted without making any changes or
|
||||
saving an undo history entry.
|
||||
Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``.
|
||||
|
||||
|
||||
Calling an operator in the wrong context will raise a ``RuntimeError``,
|
||||
there is a poll() method to avoid this problem.
|
||||
|
@@ -13,16 +13,16 @@ Blender stores 4 main arrays to define mesh geometry.
|
||||
- :class:`Mesh.polygons`: (reference a range of loops)
|
||||
|
||||
|
||||
Each polygon references a slice in the loop array, this way, polygons do not store vertices or corner data such as UVs directly,
|
||||
Each polygon reference a slice in the loop array, this way, polygons do not store vertices or corner data such as UV's directly,
|
||||
only a reference to loops that the polygon uses.
|
||||
|
||||
:class:`Mesh.loops`, :class:`Mesh.uv_layers` :class:`Mesh.vertex_colors` are all aligned so the same polygon loop
|
||||
indices can be used to find the UVs and vertex colors as with as the vertices.
|
||||
indices can be used to find the UV's and vertex colors as with as the vertices.
|
||||
|
||||
To compare mesh API options see: :ref:`NGons and Tessellation Faces <info_gotcha_mesh_faces>`
|
||||
|
||||
|
||||
This example script prints the vertices and UVs for each polygon, assumes the active object is a mesh with UVs.
|
||||
This example script prints the vertices and UV's for each polygon, assumes the active object is a mesh with UVs.
|
||||
"""
|
||||
|
||||
import bpy
|
||||
|
@@ -44,7 +44,6 @@ class ModalOperator(bpy.types.Operator):
|
||||
elif event.type == 'LEFTMOUSE': # Confirm
|
||||
return {'FINISHED'}
|
||||
elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
|
||||
# Revert all changes that have been made
|
||||
context.object.location.x = self.init_loc_x
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
@@ -7,16 +7,9 @@ This script shows simple operator which prints a message.
|
||||
Since the operator only has an :class:`Operator.execute` function it takes no
|
||||
user input.
|
||||
|
||||
The function should return ``{'FINISHED'}`` or ``{'CANCELLED'}``, the latter
|
||||
meaning that operator execution was aborted without making any changes, and
|
||||
saving an undo entry isn't neccesary. If an error is detected after some changes
|
||||
have already been made, use the ``{'FINISHED'}`` return code, or the behavior
|
||||
of undo will be confusing for the user.
|
||||
|
||||
.. note::
|
||||
|
||||
Operator subclasses must be registered before accessing them from blender.
|
||||
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
@@ -370,7 +370,7 @@ def main():
|
||||
|
||||
args_in_wash = get_args_wash(args_in, args_in_index, False)
|
||||
|
||||
fw(".. function:: %s(bm, %s)\n\n" % (b[0], ", ".join([arg_name_with_default(arg) for arg in args_in_wash])))
|
||||
fw(".. function:: %s(bm, %s)\n\n" % (b[0], ", ".join([print_arg_in(arg) for arg in args_in_wash])))
|
||||
|
||||
# -- wash the comment
|
||||
comment_washed = []
|
||||
@@ -423,8 +423,8 @@ def main():
|
||||
print(OUT_RST)
|
||||
|
||||
|
||||
def arg_name_with_default(arg):
|
||||
name, default_value, _, _ = arg
|
||||
def print_arg_in(arg):
|
||||
(name, default_value, _, _) = arg
|
||||
if default_value is None:
|
||||
return name
|
||||
return name + '=' + default_value
|
||||
|
@@ -2098,8 +2098,6 @@ def write_rst_types_index(basepath):
|
||||
fw(title_string("Types (bpy.types)", "="))
|
||||
fw(".. module:: bpy.types\n\n")
|
||||
fw(".. toctree::\n")
|
||||
# Only show top-level entries (avoids unreasonably large pages).
|
||||
fw(" :maxdepth: 1\n")
|
||||
fw(" :glob:\n\n")
|
||||
fw(" bpy.types.*\n\n")
|
||||
|
||||
@@ -2126,8 +2124,6 @@ def write_rst_ops_index(basepath):
|
||||
write_example_ref("", fw, "bpy.ops")
|
||||
fw(".. toctree::\n")
|
||||
fw(" :caption: Submodules\n")
|
||||
# Only show top-level entries (avoids unreasonably large pages).
|
||||
fw(" :maxdepth: 1\n")
|
||||
fw(" :glob:\n\n")
|
||||
fw(" bpy.ops.*\n\n")
|
||||
file.close()
|
||||
|
2
extern/audaspace/CMakeLists.txt
vendored
2
extern/audaspace/CMakeLists.txt
vendored
@@ -513,7 +513,6 @@ if(WITH_FFTW)
|
||||
src/fx/Convolver.cpp
|
||||
src/fx/ConvolverReader.cpp
|
||||
src/fx/ConvolverSound.cpp
|
||||
src/fx/Equalizer.cpp
|
||||
src/fx/FFTConvolver.cpp
|
||||
src/fx/HRTF.cpp
|
||||
src/fx/ImpulseResponse.cpp
|
||||
@@ -525,7 +524,6 @@ if(WITH_FFTW)
|
||||
include/fx/Convolver.h
|
||||
include/fx/ConvolverReader.h
|
||||
include/fx/ConvolverSound.h
|
||||
include/fx/Equalizer.h
|
||||
include/fx/FFTConvolver.h
|
||||
include/fx/HRTF.h
|
||||
include/fx/HRTFLoader.h
|
||||
|
11
extern/audaspace/bindings/C/AUD_Sound.cpp
vendored
11
extern/audaspace/bindings/C/AUD_Sound.cpp
vendored
@@ -54,7 +54,6 @@
|
||||
#ifdef WITH_CONVOLUTION
|
||||
#include "fx/BinauralSound.h"
|
||||
#include "fx/ConvolverSound.h"
|
||||
#include "fx/Equalizer.h"
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
@@ -769,14 +768,4 @@ AUD_API AUD_Sound* AUD_Sound_Binaural(AUD_Sound* sound, AUD_HRTF* hrtfs, AUD_Sou
|
||||
}
|
||||
}
|
||||
|
||||
AUD_API AUD_Sound* AUD_Sound_equalize(AUD_Sound* sound, float *definition, int size, float maxFreqEq, int sizeConversion)
|
||||
{
|
||||
assert(sound);
|
||||
|
||||
std::shared_ptr<Buffer> buf = std::shared_ptr<Buffer>(new Buffer(sizeof(float)*size));
|
||||
std::memcpy(buf->getBuffer(), definition, sizeof(float)*size);
|
||||
AUD_Sound *equalizer=new AUD_Sound(new Equalizer(*sound, buf, size, maxFreqEq, sizeConversion));
|
||||
return equalizer;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
10
extern/audaspace/bindings/C/AUD_Sound.h
vendored
10
extern/audaspace/bindings/C/AUD_Sound.h
vendored
@@ -397,16 +397,6 @@ extern AUD_API AUD_Sound* AUD_Sound_mutable(AUD_Sound* sound);
|
||||
#ifdef WITH_CONVOLUTION
|
||||
extern AUD_API AUD_Sound* AUD_Sound_Convolver(AUD_Sound* sound, AUD_ImpulseResponse* filter, AUD_ThreadPool* threadPool);
|
||||
extern AUD_API AUD_Sound* AUD_Sound_Binaural(AUD_Sound* sound, AUD_HRTF* hrtfs, AUD_Source* source, AUD_ThreadPool* threadPool);
|
||||
|
||||
/**
|
||||
* Creates an Equalizer for the sound
|
||||
* \param sound The handle of the sound
|
||||
* \param definition buffer of size*sizeof(float) with the array of equalization values
|
||||
* \param maxFreqEq Maximum frequency refered by the array
|
||||
* \param sizeConversion Size of the transformation. Must be 2^number (for example 1024, 2048,...)
|
||||
* \return A handle to the Equalizer refered to that sound
|
||||
*/
|
||||
extern AUD_API AUD_Sound* AUD_Sound_equalize(AUD_Sound* sound, float *definition, int size, float maxFreqEq, int sizeConversion);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
1
extern/audaspace/bindings/C/AUD_Special.h
vendored
1
extern/audaspace/bindings/C/AUD_Special.h
vendored
@@ -53,7 +53,6 @@ extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds);
|
||||
* \param buffer The buffer to write to. Must have a size of 3*4*length.
|
||||
* \param length How many samples to read from the sound.
|
||||
* \param samples_per_second How many samples to read per second of the sound.
|
||||
* \param interrupt Must point to a short that equals 0. If it is set to a non-zero value, the method will be interrupted and return 0.
|
||||
* \return How many samples really have been read. Always <= length.
|
||||
*/
|
||||
extern AUD_API int AUD_readSound(AUD_Sound* sound, float* buffer, int length, int samples_per_second, short* interrupt);
|
||||
|
6
extern/audaspace/bindings/python/setup.py.in
vendored
6
extern/audaspace/bindings/python/setup.py.in
vendored
@@ -5,12 +5,12 @@ import os
|
||||
import codecs
|
||||
import numpy
|
||||
|
||||
from setuptools import setup, Extension
|
||||
from distutils.core import setup, Extension
|
||||
|
||||
if len(sys.argv) > 2 and sys.argv[1] == '--build-docs':
|
||||
import subprocess
|
||||
from setuptools import Distribution
|
||||
from setuptools.command.build import build
|
||||
from distutils.core import Distribution
|
||||
from distutils.command.build import build
|
||||
|
||||
dist = Distribution()
|
||||
cmd = build(dist)
|
||||
|
106
extern/audaspace/include/fx/Equalizer.h
vendored
106
extern/audaspace/include/fx/Equalizer.h
vendored
@@ -1,106 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2022 Marcos Perez Gonzalez
|
||||
*
|
||||
* 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.
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @file Equalizer.h
|
||||
* @ingroup fx
|
||||
* The Equalizer class.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "ISound.h"
|
||||
#include "ImpulseResponse.h"
|
||||
|
||||
AUD_NAMESPACE_BEGIN
|
||||
|
||||
class Buffer;
|
||||
class ImpulseResponse;
|
||||
/**
|
||||
* This class represents a sound that can be modified depending on a given impulse response.
|
||||
*/
|
||||
class AUD_API Equalizer : public ISound
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* A pointer to the imput sound.
|
||||
*/
|
||||
std::shared_ptr<ISound> m_sound;
|
||||
|
||||
/**
|
||||
* Local definition of Equalizer
|
||||
*/
|
||||
std::shared_ptr<Buffer> m_bufEQ;
|
||||
|
||||
/**
|
||||
* A pointer to the impulse response.
|
||||
*/
|
||||
std::shared_ptr<ImpulseResponse> m_impulseResponse;
|
||||
|
||||
/**
|
||||
* delete copy constructor and operator=
|
||||
*/
|
||||
Equalizer(const Equalizer&) = delete;
|
||||
Equalizer& operator=(const Equalizer&) = delete;
|
||||
|
||||
/**
|
||||
* Create ImpulseResponse from the definition in the Buffer,
|
||||
* using at the end a minimum phase change
|
||||
*/
|
||||
std::shared_ptr<ImpulseResponse> createImpulseResponse();
|
||||
|
||||
/**
|
||||
* Create an Impulse Response with minimum phase distortion using Homomorphic
|
||||
* The input is an Impulse Response
|
||||
*/
|
||||
std::shared_ptr<Buffer> minimumPhaseFilterHomomorphic(std::shared_ptr<Buffer> original, int lOriginal, int lWork);
|
||||
|
||||
/**
|
||||
* Create an Impulse Response with minimum phase distortion using Hilbert
|
||||
* The input is an Impulse Response
|
||||
*/
|
||||
std::shared_ptr<Buffer> minimumPhaseFilterHilbert(std::shared_ptr<Buffer> original, int lOriginal, int lWork);
|
||||
|
||||
public:
|
||||
/**
|
||||
* Creates a new Equalizer.
|
||||
* \param sound The sound that will be equalized
|
||||
*/
|
||||
Equalizer(std::shared_ptr<ISound> sound, std::shared_ptr<Buffer> bufEQ, int externalSizeEq, float maxFreqEq, int sizeConversion);
|
||||
|
||||
virtual ~Equalizer();
|
||||
virtual std::shared_ptr<IReader> createReader();
|
||||
|
||||
/*
|
||||
* Length of the external equalizer definition. It must be the number of "float" positions of the Buffer
|
||||
*/
|
||||
int external_size_eq;
|
||||
|
||||
/*
|
||||
* Length of the internal equalizer definition
|
||||
*/
|
||||
int filter_length;
|
||||
|
||||
/*
|
||||
* Maximum frequency used in the equalizer definition
|
||||
*/
|
||||
float maxFreqEq;
|
||||
};
|
||||
|
||||
AUD_NAMESPACE_END
|
2
extern/audaspace/src/fx/BinauralReader.cpp
vendored
2
extern/audaspace/src/fx/BinauralReader.cpp
vendored
@@ -27,7 +27,7 @@
|
||||
|
||||
AUD_NAMESPACE_BEGIN
|
||||
BinauralReader::BinauralReader(std::shared_ptr<IReader> reader, std::shared_ptr<HRTF> hrtfs, std::shared_ptr<Source> source, std::shared_ptr<ThreadPool> threadPool, std::shared_ptr<FFTPlan> plan) :
|
||||
m_position(0), m_reader(reader), m_hrtfs(hrtfs), m_source(source), m_N(plan->getSize()), m_transition(false), m_transPos(CROSSFADE_SAMPLES*NUM_OUTCHANNELS), m_eosReader(false), m_eosTail(false), m_threadPool(threadPool)
|
||||
m_reader(reader), m_hrtfs(hrtfs), m_source(source), m_N(plan->getSize()), m_threadPool(threadPool), m_position(0), m_eosReader(false), m_eosTail(false), m_transition(false), m_transPos(CROSSFADE_SAMPLES*NUM_OUTCHANNELS)
|
||||
{
|
||||
if(m_hrtfs->isEmpty())
|
||||
AUD_THROW(StateException, "The provided HRTF object is empty");
|
||||
|
2
extern/audaspace/src/fx/Convolver.cpp
vendored
2
extern/audaspace/src/fx/Convolver.cpp
vendored
@@ -23,7 +23,7 @@
|
||||
|
||||
AUD_NAMESPACE_BEGIN
|
||||
Convolver::Convolver(std::shared_ptr<std::vector<std::shared_ptr<std::vector<std::complex<sample_t>>>>> ir, int irLength, std::shared_ptr<ThreadPool> threadPool, std::shared_ptr<FFTPlan> plan) :
|
||||
m_N(plan->getSize()), m_M(plan->getSize()/2), m_L(plan->getSize()/2), m_irBuffers(ir), m_numThreads(std::min(threadPool->getNumOfThreads(), static_cast<unsigned int>(m_irBuffers->size() - 1))), m_threadPool(threadPool), m_irLength(irLength), m_tailCounter(0), m_eos(false)
|
||||
m_N(plan->getSize()), m_M(plan->getSize()/2), m_L(plan->getSize()/2), m_irBuffers(ir), m_irLength(irLength), m_threadPool(threadPool), m_numThreads(std::min(threadPool->getNumOfThreads(), static_cast<unsigned int>(m_irBuffers->size() - 1))), m_tailCounter(0), m_eos(false)
|
||||
|
||||
{
|
||||
m_resetFlag = false;
|
||||
|
2
extern/audaspace/src/fx/ConvolverReader.cpp
vendored
2
extern/audaspace/src/fx/ConvolverReader.cpp
vendored
@@ -24,7 +24,7 @@
|
||||
|
||||
AUD_NAMESPACE_BEGIN
|
||||
ConvolverReader::ConvolverReader(std::shared_ptr<IReader> reader, std::shared_ptr<ImpulseResponse> ir, std::shared_ptr<ThreadPool> threadPool, std::shared_ptr<FFTPlan> plan) :
|
||||
m_position(0), m_reader(reader), m_ir(ir), m_N(plan->getSize()), m_eosReader(false), m_eosTail(false), m_inChannels(reader->getSpecs().channels), m_irChannels(ir->getSpecs().channels), m_threadPool(threadPool)
|
||||
m_reader(reader), m_ir(ir), m_N(plan->getSize()), m_eosReader(false), m_eosTail(false), m_inChannels(reader->getSpecs().channels), m_irChannels(ir->getSpecs().channels), m_threadPool(threadPool), m_position(0)
|
||||
{
|
||||
m_nChannelThreads = std::min((int)threadPool->getNumOfThreads(), m_inChannels);
|
||||
m_futures.resize(m_nChannelThreads);
|
||||
|
367
extern/audaspace/src/fx/Equalizer.cpp
vendored
367
extern/audaspace/src/fx/Equalizer.cpp
vendored
@@ -1,367 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2022 Marcos Perez Gonzalez
|
||||
*
|
||||
* 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.
|
||||
******************************************************************************/
|
||||
|
||||
#include "fx/Equalizer.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "Exception.h"
|
||||
|
||||
#include "fx/ConvolverReader.h"
|
||||
#include "fx/ImpulseResponse.h"
|
||||
#include "util/Buffer.h"
|
||||
#include "util/FFTPlan.h"
|
||||
#include "util/ThreadPool.h"
|
||||
|
||||
AUD_NAMESPACE_BEGIN
|
||||
|
||||
Equalizer::Equalizer(std::shared_ptr<ISound> sound, std::shared_ptr<Buffer> bufEQ, int externalSizeEq, float maxFreqEq, int sizeConversion) : m_sound(sound), m_bufEQ(bufEQ)
|
||||
{
|
||||
this->maxFreqEq = maxFreqEq;
|
||||
this->external_size_eq = externalSizeEq;
|
||||
|
||||
filter_length = sizeConversion;
|
||||
}
|
||||
|
||||
Equalizer::~Equalizer()
|
||||
{
|
||||
}
|
||||
|
||||
std::shared_ptr<IReader> Equalizer::createReader()
|
||||
{
|
||||
std::shared_ptr<FFTPlan> fp = std::shared_ptr<FFTPlan>(new FFTPlan(filter_length));
|
||||
// 2 threads to start with
|
||||
return std::shared_ptr<ConvolverReader>(new ConvolverReader(m_sound->createReader(), createImpulseResponse(), std::shared_ptr<ThreadPool>(new ThreadPool(2)), fp));
|
||||
}
|
||||
|
||||
float calculateValueArray(float* data, float minX, float maxX, int length, float posX)
|
||||
{
|
||||
if(posX < minX)
|
||||
return 1.0;
|
||||
if(posX > maxX)
|
||||
return data[length - 1];
|
||||
float interval = (maxX - minX) / (float) length;
|
||||
int idx = (int) ((posX - minX) / interval);
|
||||
return data[idx];
|
||||
}
|
||||
|
||||
void complex_prod(float a, float b, float c, float d, float* r, float* imag)
|
||||
{
|
||||
float prod1 = a * c;
|
||||
float prod2 = b * d;
|
||||
float prod3 = (a + b) * (c + d);
|
||||
|
||||
// Real Part
|
||||
*r = prod1 - prod2;
|
||||
|
||||
// Imaginary Part
|
||||
*imag = prod3 - (prod1 + prod2);
|
||||
}
|
||||
|
||||
/**
|
||||
* The creation of the ImpuseResponse which will be convoluted with the sound
|
||||
*
|
||||
* The implementation is based on scikit-signal
|
||||
*/
|
||||
std::shared_ptr<ImpulseResponse> Equalizer::createImpulseResponse()
|
||||
{
|
||||
std::shared_ptr<FFTPlan> fp = std::shared_ptr<FFTPlan>(new FFTPlan(filter_length));
|
||||
fftwf_complex* buffer = (fftwf_complex*) fp->getBuffer();
|
||||
std::memset(buffer, 0, filter_length * sizeof(fftwf_complex));
|
||||
std::shared_ptr<IReader> soundReader = m_sound.get()->createReader();
|
||||
Specs specsSound = soundReader.get()->getSpecs();
|
||||
|
||||
int sampleRate = specsSound.rate;
|
||||
|
||||
for(unsigned i = 0; i < filter_length / 2; i++)
|
||||
{
|
||||
double freq = (((float) i) / (float) filter_length) * (float) sampleRate;
|
||||
|
||||
double dbGain = calculateValueArray(m_bufEQ->getBuffer(), 0.0, maxFreqEq, external_size_eq, freq);
|
||||
|
||||
// gain = 10^(decibels / 20.0)
|
||||
// 0 db = 1
|
||||
// 20 db = 10
|
||||
// 40 db = 100
|
||||
float gain = (float) pow(10.0, dbGain / 20.0);
|
||||
|
||||
if(i == filter_length / 2 - 1)
|
||||
{
|
||||
gain = 0;
|
||||
}
|
||||
// IMPORTANT!!!! It is needed for the minimum phase step.
|
||||
// Without this, the amplitude would be square rooted
|
||||
//
|
||||
gain *= gain;
|
||||
|
||||
// Calculation of exponential with std.. or "by hand"
|
||||
/*
|
||||
std::complex<float> preShift= std::complex<float>(0.0, -(filter_length - 1)
|
||||
/ 2. * M_PI * freq / ( sampleRate/2)); std::complex<float> shift =
|
||||
std::exp(preShift);
|
||||
|
||||
std::complex<float> cGain = gain * shift;
|
||||
*/
|
||||
|
||||
float imaginary_shift = -(filter_length - 1) / 2. * M_PI * freq / (sampleRate / 2);
|
||||
float cGain_real = gain * cos(imaginary_shift);
|
||||
float cGain_imag = gain * sin(imaginary_shift);
|
||||
|
||||
int i2 = filter_length - i - 1;
|
||||
|
||||
buffer[i][0] = cGain_real; // Real
|
||||
buffer[i][1] = cGain_imag; // Imag
|
||||
|
||||
if(i > 0 && i2 < filter_length)
|
||||
{
|
||||
buffer[i2][0] = cGain_real; // Real
|
||||
buffer[i2][1] = cGain_imag; // Imag
|
||||
}
|
||||
}
|
||||
|
||||
// In place. From Complex to sample_t
|
||||
fp->IFFT(buffer);
|
||||
|
||||
// Window Hamming
|
||||
sample_t* pt_sample_t = (sample_t*) buffer;
|
||||
float half_filter = ((float) filter_length) / 2.0;
|
||||
for(int i = 0; i < filter_length; i++)
|
||||
{
|
||||
// Centered in filter_length/2
|
||||
float window = 0.54 - 0.46 * cos((2 * M_PI * (float) i) / (float) (filter_length - 1));
|
||||
pt_sample_t[i] *= window;
|
||||
}
|
||||
|
||||
std::shared_ptr<Buffer> b2 = std::shared_ptr<Buffer>(new Buffer(filter_length * sizeof(sample_t)));
|
||||
|
||||
sample_t* buffer_real = (sample_t*) buffer;
|
||||
sample_t* buffer2 = b2->getBuffer();
|
||||
float normaliziter = (float) filter_length;
|
||||
for(int i = 0; i < filter_length; i++)
|
||||
{
|
||||
buffer2[i] = (buffer_real[i] / normaliziter);
|
||||
}
|
||||
|
||||
fp->freeBuffer(buffer);
|
||||
|
||||
//
|
||||
// Here b2 is the buffer with a "valid" FIR (remember the squared amplitude
|
||||
//
|
||||
std::shared_ptr<Buffer> ir_minimum = minimumPhaseFilterHomomorphic(b2, filter_length, -1);
|
||||
|
||||
Specs specsIR;
|
||||
specsIR.rate = sampleRate;
|
||||
specsIR.channels = CHANNELS_MONO;
|
||||
|
||||
return std::shared_ptr<ImpulseResponse>(new ImpulseResponse(std::shared_ptr<StreamBuffer>(new StreamBuffer(ir_minimum, specsIR)), fp));
|
||||
}
|
||||
|
||||
std::shared_ptr<Buffer> Equalizer::minimumPhaseFilterHomomorphic(std::shared_ptr<Buffer> original, int lOriginal, int lWork)
|
||||
{
|
||||
void* b_orig = original->getBuffer();
|
||||
|
||||
if(lWork < lOriginal || lWork < 0)
|
||||
{
|
||||
lWork = (int) pow(2, ceil(log2((float) (2 * (lOriginal - 1) / 0.01))));
|
||||
}
|
||||
|
||||
std::shared_ptr<FFTPlan> fp = std::shared_ptr<FFTPlan>(new FFTPlan(lWork, 0.1));
|
||||
fftwf_complex* buffer = (fftwf_complex*) fp->getBuffer();
|
||||
sample_t* b_work = (sample_t*) buffer;
|
||||
// Padding with 0
|
||||
std::memset(b_work, 0, lWork * sizeof(sample_t));
|
||||
std::memcpy(b_work, b_orig, lOriginal * sizeof(sample_t));
|
||||
|
||||
fp->FFT(b_work);
|
||||
|
||||
for(int i = 0; i < lWork / 2; i++)
|
||||
{
|
||||
buffer[i][0] = fabs(sqrt(buffer[i][0] * buffer[i][0] + buffer[i][1] * buffer[i][1]));
|
||||
buffer[i][1] = 0.0;
|
||||
int conjugate = lWork - i - 1;
|
||||
buffer[conjugate][0] = buffer[i][0];
|
||||
buffer[conjugate][1] = 0.0;
|
||||
}
|
||||
|
||||
double threshold = pow(10.0, -7);
|
||||
float logThreshold = (float) log(threshold);
|
||||
// take 0.25*log(|H|**2) = 0.5*log(|H|)
|
||||
for(int i = 0; i < lWork; i++)
|
||||
{
|
||||
if(buffer[i][0] < threshold)
|
||||
{
|
||||
buffer[i][0] = 0.5 * logThreshold;
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer[i][0] = 0.5 * log(buffer[i][0]);
|
||||
}
|
||||
}
|
||||
|
||||
fp->IFFT(buffer);
|
||||
|
||||
// homomorphic filter
|
||||
int stop = (lOriginal + 1) / 2;
|
||||
b_work[0] = b_work[0] / (float) lWork;
|
||||
for(int i = 1; i < stop; i++)
|
||||
{
|
||||
b_work[i] = b_work[i] / (float) lWork * 2.0;
|
||||
}
|
||||
for(int i = stop; i < lWork; i++)
|
||||
{
|
||||
b_work[i] = 0;
|
||||
}
|
||||
|
||||
fp->FFT(buffer);
|
||||
// EXP
|
||||
// e^x = e^ (a+bi)= e^a * e^bi = e^a * (cos b + i sin b)
|
||||
for(int i = 0; i < lWork / 2; i++)
|
||||
{
|
||||
float new_real;
|
||||
float new_imag;
|
||||
new_real = exp(buffer[i][0]) * cos(buffer[i][1]);
|
||||
new_imag = exp(buffer[i][0]) * sin(buffer[i][1]);
|
||||
|
||||
buffer[i][0] = new_real;
|
||||
buffer[i][1] = new_imag;
|
||||
int conjugate = lWork - i - 1;
|
||||
buffer[conjugate][0] = new_real;
|
||||
buffer[conjugate][1] = new_imag;
|
||||
}
|
||||
|
||||
// IFFT
|
||||
fp->IFFT(buffer);
|
||||
|
||||
// Create new clean Buffer with only the result and normalization
|
||||
int lOut = (lOriginal / 2) + lOriginal % 2;
|
||||
std::shared_ptr<Buffer> bOut = std::shared_ptr<Buffer>(new Buffer(sizeof(float) * lOut));
|
||||
float* bbOut = (float*) bOut->getBuffer();
|
||||
|
||||
// Copy and normalize
|
||||
for(int i = 0; i < lOut; i++)
|
||||
{
|
||||
bbOut[i] = b_work[i] / (float) lWork;
|
||||
}
|
||||
|
||||
fp->freeBuffer(buffer);
|
||||
return bOut;
|
||||
}
|
||||
|
||||
std::shared_ptr<Buffer> Equalizer::minimumPhaseFilterHilbert(std::shared_ptr<Buffer> original, int lOriginal, int lWork)
|
||||
{
|
||||
void* b_orig = original->getBuffer();
|
||||
|
||||
if(lWork < lOriginal || lWork < 0)
|
||||
{
|
||||
lWork = (int) pow(2, ceil(log2((float) (2 * (lOriginal - 1) / 0.01))));
|
||||
}
|
||||
|
||||
std::shared_ptr<FFTPlan> fp = std::shared_ptr<FFTPlan>(new FFTPlan(lWork, 0.1));
|
||||
fftwf_complex* buffer = (fftwf_complex*) fp->getBuffer();
|
||||
sample_t* b_work = (sample_t*) buffer;
|
||||
// Padding with 0
|
||||
std::memset(b_work, 0, lWork * sizeof(sample_t));
|
||||
std::memcpy(b_work, b_orig, lOriginal * sizeof(sample_t));
|
||||
|
||||
fp->FFT(b_work);
|
||||
float mymax, mymin;
|
||||
float n_half = (float) (lOriginal >> 1);
|
||||
for(int i = 0; i < lWork; i++)
|
||||
{
|
||||
float w = ((float) i) * 2.0 * M_PI / (float) lWork * n_half;
|
||||
float f1 = cos(w);
|
||||
float f2 = sin(w);
|
||||
float f3, f4;
|
||||
complex_prod(buffer[i][0], buffer[i][1], f1, f2, &f3, &f4);
|
||||
buffer[i][0] = f3;
|
||||
buffer[i][1] = 0.0;
|
||||
if(i == 0)
|
||||
{
|
||||
mymax = f3;
|
||||
mymin = f3;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(f3 < mymin)
|
||||
mymin = f3;
|
||||
if(f3 > mymax)
|
||||
mymax = f3;
|
||||
}
|
||||
}
|
||||
float dp = mymax - 1;
|
||||
float ds = 0 - mymin;
|
||||
float S = 4.0 / pow(2, (sqrt(1 + dp + ds) + sqrt(1 - dp + ds)));
|
||||
for(int i = 0; i < lWork; i++)
|
||||
{
|
||||
buffer[i][0] = sqrt((buffer[i][0] + ds) * S) + 1.0E-10;
|
||||
}
|
||||
|
||||
fftwf_complex* buffer_tmp = (fftwf_complex*) std::malloc(lWork * sizeof(fftwf_complex));
|
||||
std::memcpy(buffer_tmp, buffer, lWork * sizeof(fftwf_complex));
|
||||
|
||||
//
|
||||
// Hilbert transform
|
||||
//
|
||||
int midpt = lWork >> 1;
|
||||
for(int i = 0; i < lWork; i++)
|
||||
buffer[i][0] = log(buffer[i][0]);
|
||||
fp->IFFT(buffer);
|
||||
b_work[0] = 0.0;
|
||||
for(int i = 1; i < midpt; i++)
|
||||
{
|
||||
b_work[i] /= (float) lWork;
|
||||
}
|
||||
b_work[midpt] = 0.0;
|
||||
for(int i = midpt + 1; i < lWork; i++)
|
||||
{
|
||||
b_work[i] /= (-1.0 * lWork);
|
||||
}
|
||||
|
||||
fp->FFT(b_work);
|
||||
|
||||
// Exp
|
||||
for(int i = 0; i < lWork; i++)
|
||||
{
|
||||
float base = exp(buffer[i][0]);
|
||||
buffer[i][0] = base * cos(buffer[i][1]);
|
||||
buffer[i][1] = base * sin(buffer[i][1]);
|
||||
complex_prod(buffer_tmp[i][0], buffer_tmp[i][1], buffer[i][0], buffer[i][1], &(buffer[i][0]), &(buffer[i][1]));
|
||||
}
|
||||
std::free(buffer_tmp);
|
||||
|
||||
fp->IFFT(buffer);
|
||||
|
||||
//
|
||||
// Copy and normalization
|
||||
//
|
||||
int n_out = n_half + lOriginal % 2;
|
||||
std::shared_ptr<Buffer> b_minimum = std::shared_ptr<Buffer>(new Buffer(n_out * sizeof(sample_t)));
|
||||
std::memcpy(b_minimum->getBuffer(), buffer, n_out * sizeof(sample_t));
|
||||
sample_t* b_final = (sample_t*) b_minimum->getBuffer();
|
||||
for(int i = 0; i < n_out; i++)
|
||||
{
|
||||
b_final[i] /= (float) lWork;
|
||||
}
|
||||
return b_minimum;
|
||||
}
|
||||
|
||||
AUD_NAMESPACE_END
|
2
extern/audaspace/src/fx/FFTConvolver.cpp
vendored
2
extern/audaspace/src/fx/FFTConvolver.cpp
vendored
@@ -22,7 +22,7 @@
|
||||
AUD_NAMESPACE_BEGIN
|
||||
|
||||
FFTConvolver::FFTConvolver(std::shared_ptr<std::vector<std::complex<sample_t>>> ir, std::shared_ptr<FFTPlan> plan) :
|
||||
m_plan(plan), m_N(plan->getSize()), m_M(plan->getSize()/2), m_L(plan->getSize()/2), m_irBuffer(ir), m_tailPos(0)
|
||||
m_plan(plan), m_N(plan->getSize()), m_M(plan->getSize()/2), m_L(plan->getSize()/2), m_tailPos(0), m_irBuffer(ir)
|
||||
{
|
||||
m_tail = (float*)calloc(m_M - 1, sizeof(float));
|
||||
m_realBufLen = ((m_N / 2) + 1) * 2;
|
||||
|
2
extern/audaspace/src/fx/HRTFLoaderUnix.cpp
vendored
2
extern/audaspace/src/fx/HRTFLoaderUnix.cpp
vendored
@@ -75,7 +75,7 @@ void HRTFLoader::loadHRTFs(std::shared_ptr<HRTF> hrtfs, char ear, const std::str
|
||||
if(ear == 'L')
|
||||
azim = 360 - azim;
|
||||
}
|
||||
catch(...)
|
||||
catch(std::exception& e)
|
||||
{
|
||||
AUD_THROW(FileException, "The HRTF name doesn't follow the naming scheme: " + filename);
|
||||
}
|
||||
|
@@ -78,7 +78,7 @@ void HRTFLoader::loadHRTFs(std::shared_ptr<HRTF> hrtfs, char ear, const std::str
|
||||
if(ear == 'L')
|
||||
azim = 360 - azim;
|
||||
}
|
||||
catch(...)
|
||||
catch(std::exception& e)
|
||||
{
|
||||
AUD_THROW(FileException, "The HRTF name doesn't follow the naming scheme: " + filename);
|
||||
}
|
||||
|
6
extern/mantaflow/CMakeLists.txt
vendored
6
extern/mantaflow/CMakeLists.txt
vendored
@@ -13,14 +13,12 @@ endif()
|
||||
|
||||
# Exporting functions from the blender binary gives linker warnings on Apple arm64 systems.
|
||||
# Silence them here.
|
||||
if(APPLE)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64"))
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
string(APPEND CMAKE_C_FLAGS " -fvisibility=hidden")
|
||||
string(APPEND CMAKE_CXX_FLAGS " -fvisibility=hidden")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(MANTAVERSION "0.13")
|
||||
|
||||
@@ -263,11 +261,9 @@ set(LIB
|
||||
|
||||
blender_add_lib(extern_mantaflow "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
# The VDB libs above are only added to as INTERFACE libs by blender_add_lib,
|
||||
# meaning extern_mantaflow itself actually does not have a dependency on the
|
||||
# openvdb libraries, and CMAKE is free to link the vdb libs before
|
||||
# extern_mantaflow causing linker errors on linux. By explicitly declaring
|
||||
# a dependency here, cmake will do the right thing.
|
||||
target_link_libraries(extern_mantaflow PRIVATE ${OPENVDB_LIBRARIES})
|
||||
endif()
|
||||
|
@@ -7,7 +7,6 @@ set(INC
|
||||
|
||||
set(INC_SYS
|
||||
${VULKAN_INCLUDE_DIRS}
|
||||
${MOLTENVK_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(SRC
|
||||
|
@@ -1,15 +0,0 @@
|
||||
diff --git a/extern/vulkan_memory_allocator/vk_mem_alloc.h b/extern/vulkan_memory_allocator/vk_mem_alloc.h
|
||||
index 60f572038c0..63a9994ba46 100644
|
||||
--- a/extern/vulkan_memory_allocator/vk_mem_alloc.h
|
||||
+++ b/extern/vulkan_memory_allocator/vk_mem_alloc.h
|
||||
@@ -13371,8 +13371,8 @@ bool VmaDefragmentationContext_T::IncrementCounters(VkDeviceSize bytes)
|
||||
// Early return when max found
|
||||
if (++m_PassStats.allocationsMoved >= m_MaxPassAllocations || m_PassStats.bytesMoved >= m_MaxPassBytes)
|
||||
{
|
||||
- VMA_ASSERT(m_PassStats.allocationsMoved == m_MaxPassAllocations ||
|
||||
- m_PassStats.bytesMoved == m_MaxPassBytes && "Exceeded maximal pass threshold!");
|
||||
+ VMA_ASSERT((m_PassStats.allocationsMoved == m_MaxPassAllocations ||
|
||||
+ m_PassStats.bytesMoved == m_MaxPassBytes) && "Exceeded maximal pass threshold!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
@@ -13371,8 +13371,8 @@ bool VmaDefragmentationContext_T::IncrementCounters(VkDeviceSize bytes)
|
||||
// Early return when max found
|
||||
if (++m_PassStats.allocationsMoved >= m_MaxPassAllocations || m_PassStats.bytesMoved >= m_MaxPassBytes)
|
||||
{
|
||||
VMA_ASSERT((m_PassStats.allocationsMoved == m_MaxPassAllocations ||
|
||||
m_PassStats.bytesMoved == m_MaxPassBytes) && "Exceeded maximal pass threshold!");
|
||||
VMA_ASSERT(m_PassStats.allocationsMoved == m_MaxPassAllocations ||
|
||||
m_PassStats.bytesMoved == m_MaxPassBytes && "Exceeded maximal pass threshold!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@@ -85,11 +85,15 @@ elseif(WIN32 AND MSVC AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# there is no /arch:SSE3, but intrinsics are available anyway
|
||||
if(CMAKE_CL_64)
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_SSE3_KERNEL_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_AVX_KERNEL_FLAGS "${CYCLES_AVX_ARCH_FLAGS} ${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "${CYCLES_AVX2_ARCH_FLAGS} ${CYCLES_KERNEL_FLAGS}")
|
||||
else()
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "/arch:SSE2 ${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_SSE3_KERNEL_FLAGS "/arch:SSE2 ${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "/arch:SSE2 ${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_AVX_KERNEL_FLAGS "${CYCLES_AVX_ARCH_FLAGS} ${CYCLES_KERNEL_FLAGS}")
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "${CYCLES_AVX2_ARCH_FLAGS} ${CYCLES_KERNEL_FLAGS}")
|
||||
endif()
|
||||
|
||||
@@ -122,7 +126,11 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||
endif()
|
||||
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "${CYCLES_KERNEL_FLAGS} -msse -msse2")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS} -msse3 -mssse3 -msse4.1")
|
||||
set(CYCLES_SSE3_KERNEL_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS} -msse3 -mssse3")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "${CYCLES_SSE3_KERNEL_FLAGS} -msse4.1")
|
||||
if(CXX_HAS_AVX)
|
||||
set(CYCLES_AVX_KERNEL_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS} -mavx")
|
||||
endif()
|
||||
if(CXX_HAS_AVX2)
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS} -mavx -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mf16c")
|
||||
endif()
|
||||
@@ -136,8 +144,13 @@ elseif(WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
|
||||
if(CXX_HAS_SSE)
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "/QxSSE2")
|
||||
set(CYCLES_SSE3_KERNEL_FLAGS "/QxSSSE3")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "/QxSSE4.1")
|
||||
|
||||
if(CXX_HAS_AVX)
|
||||
set(CYCLES_AVX_KERNEL_FLAGS "/arch:AVX")
|
||||
endif()
|
||||
|
||||
if(CXX_HAS_AVX2)
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "/QxCORE-AVX2")
|
||||
endif()
|
||||
@@ -161,8 +174,13 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
set(CYCLES_SSE2_KERNEL_FLAGS "-xsse2")
|
||||
endif()
|
||||
|
||||
set(CYCLES_SSE3_KERNEL_FLAGS "-xssse3")
|
||||
set(CYCLES_SSE41_KERNEL_FLAGS "-xsse4.1")
|
||||
|
||||
if(CXX_HAS_AVX)
|
||||
set(CYCLES_AVX_KERNEL_FLAGS "-xavx")
|
||||
endif()
|
||||
|
||||
if(CXX_HAS_AVX2)
|
||||
set(CYCLES_AVX2_KERNEL_FLAGS "-xcore-avx2")
|
||||
endif()
|
||||
@@ -172,10 +190,15 @@ endif()
|
||||
if(CXX_HAS_SSE)
|
||||
add_definitions(
|
||||
-DWITH_KERNEL_SSE2
|
||||
-DWITH_KERNEL_SSE3
|
||||
-DWITH_KERNEL_SSE41
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CXX_HAS_AVX)
|
||||
add_definitions(-DWITH_KERNEL_AVX)
|
||||
endif()
|
||||
|
||||
if(CXX_HAS_AVX2)
|
||||
add_definitions(-DWITH_KERNEL_AVX2)
|
||||
endif()
|
||||
|
@@ -92,7 +92,7 @@ class AddPresetPerformance(AddPresetBase, Operator):
|
||||
|
||||
preset_defines = [
|
||||
"render = bpy.context.scene.render",
|
||||
"cycles = bpy.context.scene.cycles",
|
||||
"cycles = bpy.context.scene.cycles"
|
||||
]
|
||||
|
||||
preset_values = [
|
||||
|
@@ -82,8 +82,8 @@ enum_use_layer_samples = (
|
||||
)
|
||||
|
||||
enum_sampling_pattern = (
|
||||
('SOBOL_BURLEY', "Sobol-Burley", "Use on-the-fly computed Owen-scrambled Sobol for random sampling", 0),
|
||||
('TABULATED_SOBOL', "Tabulated Sobol", "Use pre-computed tables of Owen-scrambled Sobol for random sampling", 1),
|
||||
('SOBOL', "Sobol-Burley", "Use Sobol-Burley random sampling pattern", 0),
|
||||
('PROGRESSIVE_MULTI_JITTER', "Progressive Multi-Jitter", "Use Progressive Multi-Jitter random sampling pattern", 1),
|
||||
)
|
||||
|
||||
enum_emission_sampling = (
|
||||
@@ -412,9 +412,9 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
|
||||
sampling_pattern: EnumProperty(
|
||||
name="Sampling Pattern",
|
||||
description="Random sampling pattern used by the integrator",
|
||||
description="Random sampling pattern used by the integrator. When adaptive sampling is enabled, Progressive Multi-Jitter is always used instead of Sobol-Burley",
|
||||
items=enum_sampling_pattern,
|
||||
default='TABULATED_SOBOL',
|
||||
default='PROGRESSIVE_MULTI_JITTER',
|
||||
)
|
||||
|
||||
scrambling_distance: FloatProperty(
|
||||
@@ -905,8 +905,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
|
||||
use_fast_gi: BoolProperty(
|
||||
name="Fast GI Approximation",
|
||||
description="Approximate diffuse indirect light with background tinted ambient occlusion. "
|
||||
"This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality",
|
||||
description="Approximate diffuse indirect light with background tinted ambient occlusion. This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality",
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -951,7 +950,9 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
return _cycles.debug_flags_update(scene)
|
||||
|
||||
debug_use_cpu_avx2: BoolProperty(name="AVX2", default=True)
|
||||
debug_use_cpu_avx: BoolProperty(name="AVX", default=True)
|
||||
debug_use_cpu_sse41: BoolProperty(name="SSE41", default=True)
|
||||
debug_use_cpu_sse3: BoolProperty(name="SSE3", default=True)
|
||||
debug_use_cpu_sse2: BoolProperty(name="SSE2", default=True)
|
||||
debug_bvh_layout: EnumProperty(
|
||||
name="BVH Layout",
|
||||
@@ -1538,24 +1539,10 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
|
||||
use_metalrt: BoolProperty(
|
||||
name="MetalRT (Experimental)",
|
||||
description="MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better "
|
||||
"performance in specific cases. However this support is experimental and some scenes may render incorrectly",
|
||||
description="MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better performance in specific cases. However this support is experimental and some scenes may render incorrectly",
|
||||
default=False,
|
||||
)
|
||||
|
||||
kernel_optimization_level: EnumProperty(
|
||||
name="Kernel Optimization",
|
||||
description="Kernels can be optimized based on scene content. Optimized kernels are requested at the start of a render. "
|
||||
"If optimized kernels are not available, rendering will proceed using generic kernels until the optimized set "
|
||||
"is available in the cache. This can result in additional CPU usage for a brief time (tens of seconds)",
|
||||
default='FULL',
|
||||
items=(
|
||||
('OFF', "Off", "Disable kernel optimization. Slowest rendering, no extra background CPU usage"),
|
||||
('INTERSECT', "Intersection only", "Optimize only intersection kernels. Faster rendering, negligible extra background CPU usage"),
|
||||
('FULL', "Full", "Optimize all kernels. Fastest rendering, may result in extra background CPU usage"),
|
||||
),
|
||||
)
|
||||
|
||||
def find_existing_device_entry(self, device):
|
||||
for device_entry in self.devices:
|
||||
if device_entry.id == device[2] and device_entry.type == device[1]:
|
||||
@@ -1671,19 +1658,19 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
elif device_type == 'HIP':
|
||||
import sys
|
||||
if sys.platform[:3] == "win":
|
||||
col.label(text="Requires AMD GPU with RDNA architecture", icon='BLANK1')
|
||||
col.label(text="Requires AMD GPU with Vega or RDNA architecture", icon='BLANK1')
|
||||
col.label(text="and AMD Radeon Pro 21.Q4 driver or newer", icon='BLANK1')
|
||||
elif sys.platform.startswith("linux"):
|
||||
col.label(text="Requires AMD GPU with RDNA architecture", icon='BLANK1')
|
||||
col.label(text="Requires AMD GPU with Vega or RDNA architecture", icon='BLANK1')
|
||||
col.label(text="and AMD driver version 22.10 or newer", icon='BLANK1')
|
||||
elif device_type == 'ONEAPI':
|
||||
import sys
|
||||
if sys.platform.startswith("win"):
|
||||
col.label(text="Requires Intel GPU with Xe-HPG architecture", icon='BLANK1')
|
||||
col.label(text="and Windows driver version 101.4032 or newer", icon='BLANK1')
|
||||
col.label(text="and Windows driver version 101.3430 or newer", icon='BLANK1')
|
||||
elif sys.platform.startswith("linux"):
|
||||
col.label(text="Requires Intel GPU with Xe-HPG architecture and", icon='BLANK1')
|
||||
col.label(text=" - intel-level-zero-gpu version 1.3.24931 or newer", icon='BLANK1')
|
||||
col.label(text=" - intel-level-zero-gpu version 1.3.23904 or newer", icon='BLANK1')
|
||||
col.label(text=" - oneAPI Level-Zero Loader", icon='BLANK1')
|
||||
elif device_type == 'METAL':
|
||||
col.label(text="Requires Apple Silicon with macOS 12.2 or newer", icon='BLANK1')
|
||||
@@ -1724,12 +1711,10 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
if compute_device_type == 'METAL':
|
||||
import platform
|
||||
# MetalRT only works on Apple Silicon at present, pending argument encoding fixes on AMD
|
||||
# Kernel specialization is only viable on Apple Silicon at present due to relative compilation speed
|
||||
if platform.machine() == 'arm64':
|
||||
col = layout.column()
|
||||
col.use_property_split = True
|
||||
col.prop(self, "kernel_optimization_level")
|
||||
col.prop(self, "use_metalrt")
|
||||
row = layout.row()
|
||||
row.use_property_split = True
|
||||
row.prop(self, "use_metalrt")
|
||||
|
||||
def draw(self, context):
|
||||
self.draw_impl(self.layout, context)
|
||||
|
@@ -364,13 +364,16 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
|
||||
row.prop(cscene, "seed")
|
||||
row.prop(cscene, "use_animated_seed", text="", icon='TIME')
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "sampling_pattern", text="Pattern")
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "sample_offset")
|
||||
|
||||
layout.separator()
|
||||
|
||||
heading = layout.column(align=True, heading="Scrambling Distance")
|
||||
heading.active = cscene.sampling_pattern == 'TABULATED_SOBOL'
|
||||
heading.active = cscene.sampling_pattern != 'SOBOL'
|
||||
heading.prop(cscene, "auto_scrambling_distance", text="Automatic")
|
||||
heading.prop(cscene, "preview_scrambling_distance", text="Viewport")
|
||||
heading.prop(cscene, "scrambling_distance", text="Multiplier")
|
||||
@@ -393,6 +396,11 @@ class CYCLES_RENDER_PT_sampling_lights(CyclesButtonsPanel, Panel):
|
||||
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw_header(self, context):
|
||||
layout = self.layout
|
||||
scene = context.scene
|
||||
cscene = scene.cycles
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
@@ -408,23 +416,6 @@ class CYCLES_RENDER_PT_sampling_lights(CyclesButtonsPanel, Panel):
|
||||
sub.active = not cscene.use_light_tree
|
||||
|
||||
|
||||
class CYCLES_RENDER_PT_sampling_debug(CyclesDebugButtonsPanel, Panel):
|
||||
bl_label = "Debug"
|
||||
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
scene = context.scene
|
||||
cscene = scene.cycles
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "sampling_pattern", text="Pattern")
|
||||
|
||||
|
||||
class CYCLES_RENDER_PT_subdivision(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Subdivision"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@@ -2112,7 +2103,9 @@ class CYCLES_RENDER_PT_debug(CyclesDebugButtonsPanel, Panel):
|
||||
|
||||
row = col.row(align=True)
|
||||
row.prop(cscene, "debug_use_cpu_sse2", toggle=True)
|
||||
row.prop(cscene, "debug_use_cpu_sse3", toggle=True)
|
||||
row.prop(cscene, "debug_use_cpu_sse41", toggle=True)
|
||||
row.prop(cscene, "debug_use_cpu_avx", toggle=True)
|
||||
row.prop(cscene, "debug_use_cpu_avx2", toggle=True)
|
||||
col.prop(cscene, "debug_bvh_layout", text="BVH")
|
||||
|
||||
@@ -2358,6 +2351,7 @@ def draw_pause(self, context):
|
||||
|
||||
def get_panels():
|
||||
exclude_panels = {
|
||||
'DATA_PT_area',
|
||||
'DATA_PT_camera_dof',
|
||||
'DATA_PT_falloff_curve',
|
||||
'DATA_PT_light',
|
||||
@@ -2397,7 +2391,6 @@ classes = (
|
||||
CYCLES_RENDER_PT_sampling_path_guiding_debug,
|
||||
CYCLES_RENDER_PT_sampling_lights,
|
||||
CYCLES_RENDER_PT_sampling_advanced,
|
||||
CYCLES_RENDER_PT_sampling_debug,
|
||||
CYCLES_RENDER_PT_light_paths,
|
||||
CYCLES_RENDER_PT_light_paths_max_bounces,
|
||||
CYCLES_RENDER_PT_light_paths_clamping,
|
||||
|
@@ -228,7 +228,7 @@ def do_versions(self):
|
||||
cscene.use_preview_denoising = False
|
||||
if not cscene.is_property_set("sampling_pattern") or \
|
||||
cscene.get('sampling_pattern') >= 2:
|
||||
cscene.sampling_pattern = 'TABULATED_SOBOL'
|
||||
cscene.sampling_pattern = 'PROGRESSIVE_MULTI_JITTER'
|
||||
|
||||
# Removal of square samples.
|
||||
cscene = scene.cycles
|
||||
@@ -241,12 +241,6 @@ def do_versions(self):
|
||||
layer.samples *= layer.samples
|
||||
cscene["use_square_samples"] = False
|
||||
|
||||
# Disable light tree for existing scenes.
|
||||
if version <= (3, 5, 3):
|
||||
cscene = scene.cycles
|
||||
if not cscene.is_property_set("use_light_tree"):
|
||||
cscene.use_light_tree = False
|
||||
|
||||
# Lamps
|
||||
for light in bpy.data.lights:
|
||||
if light.library not in libraries:
|
||||
|
@@ -30,10 +30,7 @@ int blender_device_threads(BL::Scene &b_scene)
|
||||
return 0;
|
||||
}
|
||||
|
||||
DeviceInfo blender_device_info(BL::Preferences &b_preferences,
|
||||
BL::Scene &b_scene,
|
||||
bool background,
|
||||
bool preview)
|
||||
DeviceInfo blender_device_info(BL::Preferences &b_preferences, BL::Scene &b_scene, bool background)
|
||||
{
|
||||
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
|
||||
|
||||
@@ -116,18 +113,6 @@ DeviceInfo blender_device_info(BL::Preferences &b_preferences,
|
||||
device.use_metalrt = true;
|
||||
}
|
||||
|
||||
if (preview) {
|
||||
/* Disable specialization for preview renders. */
|
||||
device.kernel_optimization_level = KERNEL_OPTIMIZATION_LEVEL_OFF;
|
||||
}
|
||||
else {
|
||||
device.kernel_optimization_level = (KernelOptimizationLevel)get_enum(
|
||||
cpreferences,
|
||||
"kernel_optimization_level",
|
||||
KERNEL_OPTIMIZATION_NUM_LEVELS,
|
||||
KERNEL_OPTIMIZATION_LEVEL_FULL);
|
||||
}
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
|
@@ -19,8 +19,7 @@ int blender_device_threads(BL::Scene &b_scene);
|
||||
/* Convert Blender settings to device specification. */
|
||||
DeviceInfo blender_device_info(BL::Preferences &b_preferences,
|
||||
BL::Scene &b_scene,
|
||||
bool background,
|
||||
bool preview);
|
||||
bool background);
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
||||
|
@@ -1,6 +1,12 @@
|
||||
/* SPDX-License-Identifier: Apache-2.0
|
||||
* Copyright 2021-2022 Blender Foundation */
|
||||
|
||||
#include "blender/display_driver.h"
|
||||
|
||||
#include "device/device.h"
|
||||
#include "util/log.h"
|
||||
#include "util/math.h"
|
||||
|
||||
#include "GPU_context.h"
|
||||
#include "GPU_immediate.h"
|
||||
#include "GPU_shader.h"
|
||||
@@ -9,12 +15,6 @@
|
||||
|
||||
#include "RE_engine.h"
|
||||
|
||||
#include "blender/display_driver.h"
|
||||
|
||||
#include "device/device.h"
|
||||
#include "util/log.h"
|
||||
#include "util/math.h"
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
@@ -57,6 +57,7 @@ int BlenderDisplayShader::get_tex_coord_attrib_location()
|
||||
|
||||
/* TODO move shaders to standalone .glsl file. */
|
||||
static const char *FALLBACK_VERTEX_SHADER =
|
||||
"#version 330\n"
|
||||
"uniform vec2 fullscreen;\n"
|
||||
"in vec2 texCoord;\n"
|
||||
"in vec2 pos;\n"
|
||||
@@ -74,6 +75,7 @@ static const char *FALLBACK_VERTEX_SHADER =
|
||||
"}\n\0";
|
||||
|
||||
static const char *FALLBACK_FRAGMENT_SHADER =
|
||||
"#version 330\n"
|
||||
"uniform sampler2D image_texture;\n"
|
||||
"in vec2 texCoord_interp;\n"
|
||||
"out vec4 fragColor;\n"
|
||||
@@ -721,6 +723,8 @@ static void draw_tile(const float2 &zoom,
|
||||
return;
|
||||
}
|
||||
|
||||
GPU_texture_bind(texture.gpu_texture, 0);
|
||||
|
||||
/* Trick to keep sharp rendering without jagged edges on all GPUs.
|
||||
*
|
||||
* The idea here is to enforce driver to use linear interpolation when the image is not zoomed
|
||||
@@ -733,14 +737,14 @@ static void draw_tile(const float2 &zoom,
|
||||
const float zoomed_height = draw_tile.params.size.y * zoom.y;
|
||||
if (texture.width != draw_tile.params.size.x || texture.height != draw_tile.params.size.y) {
|
||||
/* Resolution divider is different from 1, force nearest interpolation. */
|
||||
GPU_texture_bind_ex(texture.gpu_texture, GPU_SAMPLER_DEFAULT, 0, false);
|
||||
GPU_texture_filter_mode(texture.gpu_texture, false);
|
||||
}
|
||||
else if (zoomed_width - draw_tile.params.size.x > 0.5f ||
|
||||
zoomed_height - draw_tile.params.size.y > 0.5f) {
|
||||
GPU_texture_bind_ex(texture.gpu_texture, GPU_SAMPLER_DEFAULT, 0, false);
|
||||
GPU_texture_filter_mode(texture.gpu_texture, false);
|
||||
}
|
||||
else {
|
||||
GPU_texture_bind_ex(texture.gpu_texture, GPU_SAMPLER_FILTER, 0, false);
|
||||
GPU_texture_filter_mode(texture.gpu_texture, true);
|
||||
}
|
||||
|
||||
/* Draw at the parameters for which the texture has been updated for. This allows to always draw
|
||||
|
@@ -48,8 +48,6 @@ void BlenderSync::sync_light(BL::Object &b_parent,
|
||||
case BL::Light::type_SPOT: {
|
||||
BL::SpotLight b_spot_light(b_light);
|
||||
light->set_size(b_spot_light.shadow_soft_size());
|
||||
light->set_axisu(transform_get_column(&tfm, 0));
|
||||
light->set_axisv(transform_get_column(&tfm, 1));
|
||||
light->set_light_type(LIGHT_SPOT);
|
||||
light->set_spot_angle(b_spot_light.spot_size());
|
||||
light->set_spot_smooth(b_spot_light.spot_blend());
|
||||
|
@@ -367,11 +367,13 @@ static void attr_create_generic(Scene *scene,
|
||||
{
|
||||
AttributeSet &attributes = (subdivision) ? mesh->subd_attributes : mesh->attributes;
|
||||
static const ustring u_velocity("velocity");
|
||||
const ustring default_color_name{b_mesh.attributes.default_color_name().c_str()};
|
||||
|
||||
int attribute_index = 0;
|
||||
int render_color_index = b_mesh.attributes.render_color_index();
|
||||
|
||||
for (BL::Attribute &b_attribute : b_mesh.attributes) {
|
||||
const ustring name{b_attribute.name().c_str()};
|
||||
const bool is_render_color = name == default_color_name;
|
||||
const bool is_render_color = (attribute_index++ == render_color_index);
|
||||
|
||||
if (need_motion && name == u_velocity) {
|
||||
attr_create_motion(mesh, b_attribute, motion_scale);
|
||||
@@ -679,7 +681,7 @@ static void attr_create_pointiness(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, b
|
||||
if (num_verts == 0) {
|
||||
return;
|
||||
}
|
||||
const float(*positions)[3] = static_cast<const float(*)[3]>(b_mesh.vertices[0].ptr.data);
|
||||
const MVert *verts = static_cast<const MVert *>(b_mesh.vertices[0].ptr.data);
|
||||
|
||||
/* STEP 1: Find out duplicated vertices and point duplicates to a single
|
||||
* original vertex.
|
||||
@@ -765,8 +767,10 @@ static void attr_create_pointiness(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, b
|
||||
continue;
|
||||
}
|
||||
visited_edges.insert(v0, v1);
|
||||
float3 co0 = make_float3(positions[v0][0], positions[v0][1], positions[v0][2]);
|
||||
float3 co1 = make_float3(positions[v1][0], positions[v1][1], positions[v1][2]);
|
||||
const MVert &b_vert_0 = verts[v0];
|
||||
const MVert &b_vert_1 = verts[v1];
|
||||
float3 co0 = make_float3(b_vert_0.co[0], b_vert_0.co[1], b_vert_0.co[2]);
|
||||
float3 co1 = make_float3(b_vert_1.co[0], b_vert_1.co[1], b_vert_1.co[2]);
|
||||
float3 edge = normalize(co1 - co0);
|
||||
edge_accum[v0] += edge;
|
||||
edge_accum[v1] += -edge;
|
||||
@@ -917,7 +921,7 @@ static void create_mesh(Scene *scene,
|
||||
return;
|
||||
}
|
||||
|
||||
const float(*positions)[3] = static_cast<const float(*)[3]>(b_mesh.vertices[0].ptr.data);
|
||||
const MVert *verts = static_cast<const MVert *>(b_mesh.vertices[0].ptr.data);
|
||||
|
||||
if (!subdivision) {
|
||||
numtris = numfaces;
|
||||
@@ -940,7 +944,8 @@ static void create_mesh(Scene *scene,
|
||||
|
||||
/* create vertex coordinates and normals */
|
||||
for (int i = 0; i < numverts; i++) {
|
||||
mesh->add_vertex(make_float3(positions[i][0], positions[i][1], positions[i][2]));
|
||||
const MVert &b_vert = verts[i];
|
||||
mesh->add_vertex(make_float3(b_vert.co[0], b_vert.co[1], b_vert.co[2]));
|
||||
}
|
||||
|
||||
AttributeSet &attributes = (subdivision) ? mesh->subd_attributes : mesh->attributes;
|
||||
@@ -1249,13 +1254,14 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph,
|
||||
float3 *mP = attr_mP->data_float3() + motion_step * numverts;
|
||||
float3 *mN = (attr_mN) ? attr_mN->data_float3() + motion_step * numverts : NULL;
|
||||
|
||||
const float(*positions)[3] = static_cast<const float(*)[3]>(b_mesh.vertices[0].ptr.data);
|
||||
const MVert *verts = static_cast<const MVert *>(b_mesh.vertices[0].ptr.data);
|
||||
|
||||
/* NOTE: We don't copy more that existing amount of vertices to prevent
|
||||
* possible memory corruption.
|
||||
*/
|
||||
for (int i = 0; i < std::min<size_t>(b_verts_num, numverts); i++) {
|
||||
mP[i] = make_float3(positions[i][0], positions[i][1], positions[i][2]);
|
||||
const MVert &b_vert = verts[i];
|
||||
mP[i] = make_float3(b_vert.co[0], b_vert.co[1], b_vert.co[2]);
|
||||
}
|
||||
if (mN) {
|
||||
const float(*b_vert_normals)[3] = static_cast<const float(*)[3]>(
|
||||
|
@@ -63,7 +63,9 @@ static void debug_flags_sync_from_scene(BL::Scene b_scene)
|
||||
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
|
||||
/* Synchronize CPU flags. */
|
||||
flags.cpu.avx2 = get_boolean(cscene, "debug_use_cpu_avx2");
|
||||
flags.cpu.avx = get_boolean(cscene, "debug_use_cpu_avx");
|
||||
flags.cpu.sse41 = get_boolean(cscene, "debug_use_cpu_sse41");
|
||||
flags.cpu.sse3 = get_boolean(cscene, "debug_use_cpu_sse3");
|
||||
flags.cpu.sse2 = get_boolean(cscene, "debug_use_cpu_sse2");
|
||||
flags.cpu.bvh_layout = (BVHLayout)get_enum(cscene, "debug_bvh_layout");
|
||||
/* Synchronize CUDA flags. */
|
||||
@@ -752,7 +754,7 @@ static PyObject *denoise_func(PyObject * /*self*/, PyObject *args, PyObject *key
|
||||
RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyscene), &sceneptr);
|
||||
BL::Scene b_scene(sceneptr);
|
||||
|
||||
DeviceInfo device = blender_device_info(b_preferences, b_scene, true, true);
|
||||
DeviceInfo device = blender_device_info(b_preferences, b_scene, true);
|
||||
|
||||
/* Get denoising parameters from view layer. */
|
||||
PointerRNA viewlayerptr;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
typedef unordered_multimap<void *, ShaderInput *> PtrInputMap;
|
||||
typedef map<void *, ShaderInput *> PtrInputMap;
|
||||
typedef map<void *, ShaderOutput *> PtrOutputMap;
|
||||
typedef map<string, ConvertNode *> ProxyMap;
|
||||
|
||||
@@ -1251,9 +1251,7 @@ static void add_nodes(Scene *scene,
|
||||
|
||||
ConvertNode *proxy = graph->create_node<ConvertNode>(to_socket_type, to_socket_type, true);
|
||||
|
||||
/* Muted nodes can result in multiple Cycles input sockets mapping to the same Blender
|
||||
* input socket, so this needs to be a multimap. */
|
||||
input_map.emplace(b_link.from_socket().ptr.data, proxy->inputs[0]);
|
||||
input_map[b_link.from_socket().ptr.data] = proxy->inputs[0];
|
||||
output_map[b_link.to_socket().ptr.data] = proxy->outputs[0];
|
||||
|
||||
graph->add(proxy);
|
||||
@@ -1288,7 +1286,7 @@ static void add_nodes(Scene *scene,
|
||||
/* register the proxy node for internal binding */
|
||||
group_proxy_input_map[b_input.identifier()] = proxy;
|
||||
|
||||
input_map.emplace(b_input.ptr.data, proxy->inputs[0]);
|
||||
input_map[b_input.ptr.data] = proxy->inputs[0];
|
||||
|
||||
set_default_value(proxy->inputs[0], b_input, b_data, b_ntree);
|
||||
}
|
||||
@@ -1340,7 +1338,7 @@ static void add_nodes(Scene *scene,
|
||||
if (proxy_it != proxy_output_map.end()) {
|
||||
ConvertNode *proxy = proxy_it->second;
|
||||
|
||||
input_map.emplace(b_input.ptr.data, proxy->inputs[0]);
|
||||
input_map[b_input.ptr.data] = proxy->inputs[0];
|
||||
|
||||
set_default_value(proxy->inputs[0], b_input, b_data, b_ntree);
|
||||
}
|
||||
@@ -1371,7 +1369,7 @@ static void add_nodes(Scene *scene,
|
||||
/* XXX should not happen, report error? */
|
||||
continue;
|
||||
}
|
||||
input_map.emplace(b_input.ptr.data, input);
|
||||
input_map[b_input.ptr.data] = input;
|
||||
|
||||
set_default_value(input, b_input, b_data, b_ntree);
|
||||
}
|
||||
@@ -1403,25 +1401,22 @@ static void add_nodes(Scene *scene,
|
||||
BL::NodeSocket b_from_sock = b_link.from_socket();
|
||||
BL::NodeSocket b_to_sock = b_link.to_socket();
|
||||
|
||||
ShaderOutput *output = nullptr;
|
||||
ShaderOutput *output = 0;
|
||||
ShaderInput *input = 0;
|
||||
|
||||
PtrOutputMap::iterator output_it = output_map.find(b_from_sock.ptr.data);
|
||||
if (output_it != output_map.end())
|
||||
output = output_it->second;
|
||||
PtrInputMap::iterator input_it = input_map.find(b_to_sock.ptr.data);
|
||||
if (input_it != input_map.end())
|
||||
input = input_it->second;
|
||||
|
||||
/* either socket may be NULL when the node was not exported, typically
|
||||
/* either node may be NULL when the node was not exported, typically
|
||||
* because the node type is not supported */
|
||||
if (output != nullptr) {
|
||||
ShaderOutput *output = output_it->second;
|
||||
auto inputs = input_map.equal_range(b_to_sock.ptr.data);
|
||||
for (PtrInputMap::iterator input_it = inputs.first; input_it != inputs.second; ++input_it) {
|
||||
ShaderInput *input = input_it->second;
|
||||
if (input != nullptr) {
|
||||
if (output && input)
|
||||
graph->connect(output, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void add_nodes(Scene *scene,
|
||||
BL::RenderEngine &b_engine,
|
||||
|
@@ -357,7 +357,7 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
|
||||
}
|
||||
|
||||
SamplingPattern sampling_pattern = (SamplingPattern)get_enum(
|
||||
cscene, "sampling_pattern", SAMPLING_NUM_PATTERNS, SAMPLING_PATTERN_TABULATED_SOBOL);
|
||||
cscene, "sampling_pattern", SAMPLING_NUM_PATTERNS, SAMPLING_PATTERN_PMJ);
|
||||
integrator->set_sampling_pattern(sampling_pattern);
|
||||
|
||||
int samples = 1;
|
||||
@@ -866,8 +866,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine &b_engine,
|
||||
|
||||
/* Device */
|
||||
params.threads = blender_device_threads(b_scene);
|
||||
params.device = blender_device_info(
|
||||
b_preferences, b_scene, params.background, b_engine.is_preview());
|
||||
params.device = blender_device_info(b_preferences, b_scene, params.background);
|
||||
|
||||
/* samples */
|
||||
int samples = get_int(cscene, "samples");
|
||||
|
@@ -113,7 +113,6 @@ static inline BL::Mesh object_to_mesh(BL::BlendData & /*data*/,
|
||||
|
||||
if ((bool)mesh && subdivision_type == Mesh::SUBDIVISION_NONE) {
|
||||
if (mesh.use_auto_smooth()) {
|
||||
mesh.calc_normals_split();
|
||||
mesh.split_faces(false);
|
||||
}
|
||||
|
||||
|
@@ -111,12 +111,10 @@ macro(cycles_external_libraries_append libraries)
|
||||
endif()
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
list(APPEND ${libraries} ${OPENIMAGEDENOISE_LIBRARIES})
|
||||
if(APPLE)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
if(APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
list(APPEND ${libraries} "-framework Accelerate")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_ALEMBIC)
|
||||
list(APPEND ${libraries} ${ALEMBIC_LIBRARIES})
|
||||
endif()
|
||||
@@ -138,15 +136,7 @@ macro(cycles_external_libraries_append libraries)
|
||||
${PYTHON_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
||||
if(DEFINED PTHREADS_LIBRARIES)
|
||||
list(APPEND ${libraries}
|
||||
${PTHREADS_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND ${libraries}
|
||||
${PLATFORM_LINKLIBS}
|
||||
)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user