Commit Graph

3472 Commits

Author SHA1 Message Date
Brecht Van Lommel 526f935981 Fix broken OPTIX_ROOT_DIR environment variable for setting up build
Changes in 42713bf made it ignore the environment variable if there is a
defined but empty CMake variable. Also make similar changes for other
GPU compute APIs, to guard against future problems like this.

Pull Request: https://projects.blender.org/blender/blender/pulls/111928
2023-09-04 17:28:00 +02:00
Brecht Van Lommel 19da2fba83 Fix macOS Arm build of OSL library dependency
This patch is already in upstream, so this is temporary until we upgrade
to the latest OSL version.

Ref #110708
2023-09-04 15:08:02 +02:00
Xavier Hallade 400f7c22bc Cycles: update ocloc to 101.4369 on Windows
As discussed on #108314, oidn 2.0 needs an updated version of ocloc.
No need to bump the min required driver version as it's already
high enough on Windows (101.4644).

Pull Request: https://projects.blender.org/blender/blender/pulls/111729
2023-09-01 15:21:54 +02:00
Marcos Perez 1015bed2fd VSE: Sound equalizer modifier
The sound equalizer is using the Audaspace FFT Convolver.
The blender part creates an array of descriptions of power per "band"
and orders the creation of Equalizer (ISound) in the Audaspace.

Modifier can be created on sound strips. It lets you define
amplification or attenuation over frequency range from 30Hz to 20 kHz.
The power is limited to -30 db - 30 db. This is done using curve
mapping widget.

Co-authored-by: menda <alguien@aqui.es>
Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/105613
2023-08-30 22:36:36 +02:00
Brecht Van Lommel 62c898f2e0 Fix (DY)LD_LIBRARY_PATH ignored for oslc and shader builder in build
Accidentally used CMake instead of environment variable.

Pull Request: https://projects.blender.org/blender/blender/pulls/111234
2023-08-30 17:00:02 +02:00
Campbell Barton 46edf61180 CMake: adjust the error message when a non-default version wasn't found
The error message was written assuming the default version was set,
making the error confusing.
Adjust the error message when the non-default version is missing.
2023-08-30 15:20:50 +10:00
Campbell Barton 3de8900ed6 Cleanup: spelling in comments 2023-08-25 09:40:42 +10:00
Bastien Montagne 607adbca47 install_linux_packages: Raise LLVM default version to 15.0.7.
Following specs from #109244 for Blender 4.0.
2023-08-24 22:55:56 +02:00
Campbell Barton b8054b0cb2 Cleanup: white-space for UNIX platform error messages 2023-08-24 10:37:52 +10:00
Campbell Barton 20b4a77872 datatoc: exclude the initial C-style comment from GLSL/MSL/Cuda files
Add optional argument `STRIP_LEADING_C_COMMENTS` to CMake macros:
data_to_c_simple & data_to_c.

Strip leading C-style comments that don't bloat binary size.
Comments are replaced with blank lines so line numbers in error messages
match. Reduces Blender's binary size by ~70kb.
2023-08-19 17:57:12 +10:00
Ray Molenkamp e7c94b35b8 Fix: Missing PDB on windows
Missed one cmake check in 0df3aedfa8
2023-08-19 00:09:19 -06:00
Ray Molenkamp e2af12d368 Cleanup: Update copyright to the new format
Had put my name here since the choice was between the foundation
and me personally, with the blender authors file now being in
place this can be cleaned up.
2023-08-18 11:58:37 -06:00
Ray Molenkamp d5e50460e7 CMake/MSVC: Use /debug:fastlink for debug builds
This changes the default linker options for debug builds to use
fastlinking, this causes the PDB only to be usable on the machine
it is being created on, however since debug builds cannot be
distributed to end users (wont run due to missing debug CRT on
their system) this isn't a problem.

This halves the time required for an incremental link on my system
from 7->3.5 seconds
2023-08-18 10:47:47 -06:00
Campbell Barton accc80c73b CMake: blender_lite no longer caches values for other platforms 2023-08-18 15:28:01 +10:00
Campbell Barton ab18bd6f84 CMake: revert use of cmake_language as it's unavailable in v3.10
Using cmake_language caused an error with 3.10, so revert [0] & [1].

[0]: 206f126617
[1]: e95e6ad66a
2023-08-17 23:00:31 +10:00
Campbell Barton 0a04a6d1a1 Cleanup: quiet GCC's -Wsuggest-attribute=format warning 2023-08-17 16:52:45 +10:00
Campbell Barton 8d26dda40c Fix #111186: Crash backtrace missing on Linux
Regression in [0] which caused `execinfo.h` not to be detected by CMake.

Setting a default variable for other platforms prevented the new
variable from being set.

[0]: f197b1a1f1
2023-08-17 13:45:11 +10:00
Campbell Barton 5478798526 Cleanup: use lowercase cmake commands
The `Find*.cmake` modules originally used uppercase commands to match
CMake's own conventions. Since then CMake uses lower-case and even
within our own find modules, using all uppercase wasn't done
consistently. Opt for lowercase everywhere.
2023-08-17 13:15:56 +10:00
Campbell Barton cfc9473c3f CMake: always define BROTLI_LIBRARIES
Previously FREETYPE_LIBRARIES would sometimes contain
BROTLI libraries, since some configurations set them separately,
declare them separately under all configurations to avoid
changes to one platform breaking others.

Also quiets uninitialized variable warning.
2023-08-17 11:53:58 +10:00
Campbell Barton c713c70781 CMake: quiet uninitialized warnings 2023-08-17 11:53:56 +10:00
Campbell Barton 120fdf1f4b CMake: remove unknown variable _LEVEL_ZERO_INCLUDE_PARENT_DIR 2023-08-17 11:53:53 +10:00
Campbell Barton 72bdcb4e25 CMake: use more conventional checks that libraries were found
The method of checking the library was found cause an undefined
variable warning when it was found.
2023-08-17 11:53:52 +10:00
Campbell Barton 130af96e6b CMake: quiet case sensitivity warning for Boost_DIR
Quiets warning from CMake policy: CMP0144
2023-08-17 11:53:50 +10:00
Brecht Van Lommel 59fb9341cf Build: keep SDL haptics disabled on macOS x86_64
Not yet available for the current minimum of macOS 10.15.
2023-08-16 19:11:41 +02:00
Brecht Van Lommel 51fd4af648 Build: fix OpenVDB Metal patch not applying cleanly 2023-08-16 18:43:23 +02:00
Brecht Van Lommel 1594f7fb95 Build: update SDL to 2.28.2
Older versions don't build with Xcode 14.3.

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/110975
2023-08-16 14:39:11 +02:00
Campbell Barton 92c4756d02 Fix replacement of "Blender Foundation" in recent header change
The recent change to header copyrights [0] unintentionally changed
"Blender Foundation" to "Blender Authors" for the WIN32 file path
which blender is installed into.

Revert lines changed that aren't related to copyright text.

[0]: e955c94ed3
2023-08-16 21:21:55 +10:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Ray Molenkamp deb4aa88b0 CMake/CPack: Fix windows distribution
the revert in 282944caac was incomplete
this commit restores the missing bits needed to make blender run
again.
2023-08-13 22:21:12 -06:00
Campbell Barton 282944caac CMake: revert use of CMAKE_INSTALL_PREFIX as it broke CPack on WIN32
Absolute paths aren't supported when using CPack on WIN32.
This effectively reverts [0] & [1].

[0]: 7209ed80bb
[1]: d605cc7574
2023-08-13 21:34:03 +10:00
Campbell Barton d605cc7574 CMake: use CMAKE_INSTALL_PREFIX in more places
Also remove quotes for consistency as they aren't needed and weren't
used in quite a few places.
2023-08-13 14:27:47 +10:00
Campbell Barton 206f126617 Fix regression in remove_cc_flag macro
Recent change in [0] caused the CFLAGS variables not to be manipulated
by remove_cc_flag. Unfortunately EVAL is needed to set a variable
that references a variable name.

[0]: e95e6ad66a
2023-08-12 16:29:46 +10:00
Brecht Van Lommel 11bca76f96 Cycles: update OSL to work with version 1.13.2
While keeping compatibility with older versions.

Ref #110708

Pull Request: https://projects.blender.org/blender/blender/pulls/110980
2023-08-10 20:01:09 +02:00
Ray Molenkamp 4ad63687cb CMake: fix windows build and warning
Missing underscore in platform/platform_win32.cmake
and a quote too many in macros.cmake
2023-08-09 21:47:19 -06:00
Campbell Barton 735273f537 CMake: show WITH_HYDRA on first installation
Also disable OSL for lite builds, only makes a difference when cycles is
enabled for lite builds.
2023-08-10 12:37:54 +10:00
Campbell Barton 5e44b3c147 Fix error in recent refactor to add_check_c{xx}_compiler_flag functions
The variable needs to be set in the parents scope.
2023-08-10 12:17:49 +10:00
Campbell Barton b057c0cce1 Fix building WITH_PYTHON=OFF after discover_nodes.py inclusion
Recently [0] added PYTHON_EXECUTABLE as a build time dependency.
Define PYTHON_EXECUTABLE even with WITH_PYTHON=OFF.

[0]: 19912457c6
2023-08-10 11:57:30 +10:00
Campbell Barton 8cea7519ca Cleanup: wrap long lines in CMake 2023-08-10 11:28:25 +10:00
Campbell Barton e95e6ad66a CMake: replace duplicate lines with a for loop 2023-08-10 11:28:23 +10:00
Campbell Barton 9dfb3fc550 CMake: refactor flag checking function to take multiple argument pairs
Many calls to add_check_c_compiler_flag add_check_cxx_compiler_flag
resulted in over long lines & visual noise. Replace with a function that
takes multiple (cache_var flag) pairs to reduce duplication.
2023-08-10 11:28:22 +10:00
Brecht Van Lommel 2afdc15709 Build: patch OSL to avoid duplicate symbols in static libraries
This was revealed by CMake refactoring in #110394, with the solution
identified by Ray Molenkamp.

Upstream: https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1709

Pull Request: https://projects.blender.org/blender/blender/pulls/110974
2023-08-09 19:53:11 +02:00
Campbell Barton d542ecff53 CMake: disable WITH_HYDRA in lite builds 2023-08-09 11:45:24 +10:00
Jot 0a80543f1e Build: Remove confirmations from linux_rocky8_setup.sh
There were "-y" flags missing in the dnf install commands. Running this
from another script would fail because it was asking for confirmation.

Pull Request: https://projects.blender.org/blender/blender/pulls/110502
2023-08-07 17:45:20 +02:00
Brecht Van Lommel 3c5dddf09c Build: patch USD to work with OpenGL core profile
Upstream:
https://github.com/PixarAnimationStudios/OpenUSD/pull/2550

Ref #109244

Pull Request: https://projects.blender.org/blender/blender/pulls/110474
2023-08-07 16:28:26 +02:00
Hans Goudey ffe4fbe832 Cleanup: Move editors headers to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/110820
2023-08-05 02:57:52 +02:00
Bogdan Nagirniak 04bb5f9995 Render: support USD Hydra render delegates
Hydra is a rendering architecture part of USD, designed to abstract the
host application from the renderer. A renderer implementing a Hydra
render delegate can run in any host application supporting Hydra, which
now includes Blender.

For external renderers this means less code to be written, and improved
performance due to a using a C++ API instead of a Python API.

Add-ons need to subclass bpy.types.HydraRenderEngine. See the example in
the Python API docs for details.

An add-on for Hydra Storm will be included as well. This is USD's
rasterizing renderer, used in other applications like usdview. For users
it can provide a preview of USD file export, and for developers it
serves a reference.

There are still limitations and missing features, especially around
materials. The remaining to do items are tracked in #110765.

This feature was contributed by AMD.

Ref #110765

Co-authored-by: Georgiy Markelov <georgiy.m.markelov@gmail.com>
Co-authored-by: Vasyl-Pidhirskyi <vpidhirskyi@gmail.com>
Co-authored-by: Brian Savery <brian.savery@gmail.com>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/104712
2023-08-04 17:01:09 +02:00
Bogdan Nagirniak 61f407d427 Build: install USD Storm and MaterialX libraries by default
* Bundle hdStorm and associated plugins
* Enable WITH_MATERIALX by default to bundle MaterialX libraries
* Set PXR_MTLX_STDLIB_SEARCH_PATHS so Storm can find MaterialX files

Co-authored-by: Georgiy Markelov <georgiy.m.markelov@gmail.com>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Ref #110765, #104712
2023-08-04 17:01:09 +02:00
Campbell Barton 7cc3ef3260 Cleanup: use C++ includes, various non-functional changes for C++ 2023-08-02 20:30:02 +10:00
Ray Molenkamp 1a860d123d MSVC: enable Two-phase name lookup
Previously disabled due to OpenMP issues but those have been resolved
on the compilers that are currently our lower bar. (vs2019)

Pull Request: https://projects.blender.org/blender/blender/pulls/110660
2023-08-01 20:44:24 +02:00
Brecht Van Lommel 55413e0fc6 Fix #110615: missing GL dev packages in install_linux_packages.py
The build fails without these.

Pull Request: https://projects.blender.org/blender/blender/pulls/110609
2023-08-01 15:20:32 +02:00