This fixes the following warning:
```
<...>/blender/extern/audaspace/plugins/coreaudio/CoreAudioDevice.cpp:160:73: warning: bitwise operation between different enumeration types ('(unnamed enum at <...>/CoreAudioTypes.framework/Headers/CoreAudioBaseTypes.h:573:1)' and '(unnamed enum at <...>/CoreAudioTypes.framework/Headers/CoreAudioBaseTypes.h:522:1)') is deprecated [-Wdeprecated-anon-enum-enum-conversion]
160 | stream_basic_description.mFormatFlags |= kAudioFormatFlagsNativeEndian | kLinearPCMFormatFlagIsPacked;
```
This deprecation (and warning) is new in C++20. The issue came from
macOS CoreAudio using an internal macro (CF_ENUM) to define anonymous
enums with an underlying type, with the warning then being cause by both
of these constants being part of different enums.
Fixed by adding an explict cast to the underlying type
(AudioFormatFlags) before applying the bitwise operation.
This change reduces compile time:
```
before: 648.4 s weighted time (15645.9 s elapsed time sum, 24.1x parallelism)
after : 613.6 s weighted time (14110.1 s elapsed time sum, 23.0x parallelism)
-----------------------------------------------------------------------------
Diff : -34.8 s -1535.8
```
We now also bundle less libraries within the Blender code base.
In CMake, set(VAR) without a value unsets the variable rather than
initializing it to empty. This causes issues with --warn-uninitialized
and can lead to unexpected behavior when the variable is used later.
Use set(VAR "") when initializing variables that will be appended to
or used in expressions. Use unset() to explicitly remove temporary
variables after use.
Ref !153503
Primarily driven by #153249 (sound modifier data is always leaked).
Audaspace itself is written in C++ and uses C++ smart pointers
(shared_ptr) for all resource lifetime management. But the additional
"C" Audaspace API layer was not, it was allocating raw C pointers that
pointed to the C++ smart pointers.
However some parts of Blender code were not really paying attention to
that; particularly all the sound modifier related code. The modifiers
are just created and then kinda forgotten about; their lifetime is
never managed on Blender side which means they were always resulting in
a leak.
The only reason why that Audaspace C API layer exists, is because back
in the day whole Blender was written in C and could not use C++ APIs.
But that is no longer true, so rewrite the Audaspace integration to use
C++ APIs directly. Everywhere on Blender side, just use regular
shared_ptr handles that Audaspace already uses.
- BKE_sound_types.hh defines just the audaspace handle types, for data
structures that need to store them as members.
- Everything else was already storing Audaspace objects outside of DNA
structs, except for NlaStrip. Move the "speaker handle" of it into a
separately allocated runtime struct then.
- Instead of many Audaspace handles being "void *"" as previously, now
they are AUD_Sound, AUD_Sequence, AUD_SequenceEntry etc which makes
it clearer what is what.
- The "C" part of Audaspace library is no longer compiled now.
Pull Request: https://projects.blender.org/blender/blender/pulls/153386
- Fix variable name typo in `buildinfo.cmake`.
- Use `CMAKE_CXX_COMPILER_ID` instead of `CMAKE_C_COMPILER_ID`
when adding C++ compiler flags in `gflags` and `gtest`.
- Change message type from `ERROR` to `STATUS` for missing system Python
in tests configuration, matching similar messages that aren't fatal.
This commit includes new minimum compiler requirements for Blender 5.1 as well as updated and new libraries.
**New compiler requirements**
* Windows x64: Visual Studio 2022 (17.14.14 or newer)
* Windows arm64: Visual Studio 2022 (17.14.23 or newer)
* Linux x64: gcc 14 (when used with our libraries)
**New libraries**
Abseil 20250814.1
ThorVG 1.0.0-pre31
OpenJPH 0.25.2
**Updated libraries**
AOM 3.13.1
Expat 2.7.2
FFI 3.5.2
HIPRT 606b4886efabce918dd0634ef71c06615a47c83b
Imath 3.2.2
ISPC 1.29.1
libheif 1.20.2
MaterialX 1.39.4
MESON 1.9.0
minizip-ng 4.0.10
Numpy 2.3.4
oneAPI Level Zero 1.21.9
OneTBB 2022.3.0
OpenColorIO 2.5.0
OpenEXR 3.4.3
OpenImageDenoise 2.4.1
OpenImageIO 3.1.7
OpenSubDiv 3.7.0
OpenVDB 13.0.0
OpenXR 1.1.53
PIP 25.2
Python 3.13.9
ShaderC 2025.4
Vulkan 1.4.328
webp 1.6.0
Yaml CPP 0.8.0
ZSTD 1.5.7 (z-standard 0.25.0)
**Library changes**
FMT (moved from /extern to libs)
Ceres (updated version in lib, will be removed from /extern in a later commit)
Eigen (updated version in lib, will be removed from /extern in a later commit))
Ref #147201
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Sebastian Parborg <sebastian@blender.org>
Co-authored-by: Anthony Roberts <anthony.roberts@linaro.org>
Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Co-authored-by: Bart van der Braak <bart@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/149852
Replacing various include directories, defines and libraries specified
directly.
Additionally, this makes it so bf::dependencies are automatically added
last to the target. This ensures include directories from bf::extern libraries
have priority over them, so that e.g. our own fmtlib will be used rather than
one that might be installed on the system.
Pull Request: https://projects.blender.org/blender/blender/pulls/151920
Changes include:
- Fix stale error values being used during refinement
with the "refit" solver.
- Use multiple split-point detection methods
(max distance, sign-change & inflection point for S-shaped curves).
- Heap comparator uses the index as a tie breaker for more stable
ordering when values match.
Results in higher quality fitting as measured by area delta
between input/output polygons.
Ref !152677
- Fix solver bug in degree-3 speed polynomial calculation
(from the original OpenToonz implementation).
- Extend the refit method to support custom corners.
- Improve the refit solver by scanning for a local optimum
around the initial refit point.
- Minor fixes and optimizations.
While the difference is subtle, both the fix to the solver and the
improved refit method produce better results that tend to be a closer
fit with the same error margin - as measured by the area between the
input polygon and the resulting curve.
This applies to freehand drawing of bezier curves and grease-pencil.
Ref !152513
Previously only a subset of the code was in this namespace. This improves
consistency, and means common types like Vector, StringRef and float3
don't need blender:: prefixes anywhere.
This does not move code into sub-namespaces, but gets us a step closer to
the end goal.
* Add namespace blender {} to almost all files.
* Remove unnecessary blender:: prefixes and using namespace blender;.
* Freestyle was not not moved, it remains in top level namespace freestyle.
* Cycles integration code was modified to use blender:: prefixes.
* bUUID existed both in the top level and blender namespace. To resolve this
conflict, the wrapper class is now blender::UUID.
Some blender:: prefixes remain primarily because of ambiguous namespaces, for
example animrig:: could refer to both blender::animrig and blender::ed::animrig.
Pull Request: https://projects.blender.org/blender/blender/pulls/152329
These asserts where disabled to work around the issue that resources
could be created when Blender is being exited. This isn't the case
anymore so it should be safe to enable asserts in VMA.
Pull Request: https://projects.blender.org/blender/blender/pulls/151830
Both HIP and HIP RT rely on the HIP runtime, which is provided by the rocm-hip
package as both a versioned and an unversioned library (libamdhip64.so.x and
libamdhip64.so). On Fedora, however, rocm-hip ships only the versioned library,
while the unversioned one is provided by rocm-hip-devel.
The version of HIP RT used in Blender currently looks only for the unversioned
library and fails to load the driver if it’s missing. HIP itself, by contrast,
looks for both the versioned and unversioned libraries. Cycles enables HIP RT
as long as the hiprt library is present, even if HIP RT fails to load the
runtime—leading to undefined behavior.
This addresses the issue by disabling HIP RT when the unversioned HIP runtime
library is not found.
Ref #150553
Pull Request: https://projects.blender.org/blender/blender/pulls/151081
At the moment, HIP RT and OIDN tries to load the HIP 6.X runtime,
while the rest of Cycles tries to load a HIP 7.X runtime,
which then leads to undefined behaviour and crashing.
To fix this issue, this commit prioritizes loading the HIP 6.X runtime
and falls back to the HIP 7.X runtime if 6.X doesn't exist.
Pull Request: https://projects.blender.org/blender/blender/pulls/149488
When there are lot of sound strips in VSE timeline, waveform rendering
could not be stopped. This causes problems mainly when .blend file was
opened by accident and different one can not be opened until all
waveforms are read, which can take a minute.
This was caused by code, where value of `stop` boolean pointer was
stored in local variable and cast into short. Pointer to this local
variable was passed to `AUD_readSound()`. Then value of `stop` bool
pointer was set to that local variable again. Because the code runs in
multiple threads now, it is quite likely, that `stop` value gets
overwritten by older thread. Especially, because `AUD_readSound()` does
interrupt its process only when `stop` was true before its execution,
so it is done very quickly.
Pass boolean pointer directly to `AUD_readSound()`, so the waveform
reading process can be interrupted immediately. The change in Audaspace
is already merged in
9b1be5f7c9
Finally, while the waveform reading job now can be cancelled, new job
will be created immediately. This is technically correct behavior, even
though it can cause other problems described in #144082
Pull Request: https://projects.blender.org/blender/blender/pulls/149301
Similar case as was with equalizer modifier recently (#141084):
here the AnimateableTimeStretchPitchScale effect was being
constantly re-created every frame, as soon as anything in VSE
timeline has an animation.
Fix this by checking if Audaspace sequence handle for the sound
is already an instance of AnimateableTimeStretchPitchScale; if it
is then just use the already created one.
Pull Request: https://projects.blender.org/blender/blender/pulls/149127
Mantaflow likes to throw exceptions when things go wrong, which includes a
simple case of the solver not converging sufficiently. This should not be
catastrophic, but cleanup of buffers is omitted when such an exception occurs.
This then leads to yet another failure when the solver is stopped because of
incorrect buffer refcounts. That exception bubbles up through the python layer
and causes errors in the Blender integration wrapper that cause crashes.
Pull Request: https://projects.blender.org/blender/blender/pulls/147527
This is a port of iOS commit f3f8647 to main, for Xcode archiving to
also work for macOS bundles, allowing the bundle to be archived and
later distributed via Testflight, App Store Connect, etc...
Additonal Xcode property also had to be added to the extern draco shared
library target to prevent it from being included in the Xcode archive
(an implicit behavior for `SHARED` CMake libraries), without this,
the archive would get polluted, preventing it from being properly
recognized as a proper app bundle archive.
Pull Request: https://projects.blender.org/blender/blender/pulls/146027
This pull request removes ROCm 5 code path and adds ROCm 7 runtime to
library search list.
ROCm 5 runtime is no longer shipped with AMD drivers, and ROCm 5 compiler
is no longer compatible with newer driver versions.
It also adds ROCm 7 runtime to the list of runtime libraries to look for.
Starting later this year, ROCm 7 runtime will be bundled with the driver
installer, and all future runtime fixes and improvements will target ROCm 7.
Once ROCm 7 runtime is rolled out, ROCm 6 compiler will continue to work
with it for about a year as a transitional measure. Beyond that, compatibility
is not guaranteed.
Pull Request: https://projects.blender.org/blender/blender/pulls/145279
This change introduces animated time stretching and pitch scaling.
It also extends the Python API with AnimateableProperty.
Note: to be used, this still needs rubberband.
Credit: Kacey La
Blender had some support for using MoltenVK. However there are some key
issues why MotlenVK cannot be used. Bugs have been reported up-stream.
As it doesn't work and holds back regular developments it will be removed
from the main branch.
Any efforts on making Vulkan run on Apple (including KosmicKrisp)
is considered a community effort and can be done in a development
branch.
Pull Request: https://projects.blender.org/blender/blender/pulls/144602
This follows the other CMake "modernization" commits, this time for
`bf_intern_openvdb` and the OpenVDB dependency itself.
The difference with this one is that `intern/openvdb` becomes an
"optional" dependency itself. This is because downstream consumers often
want to include this dependency rather than openvdb directly, so this
target must also be optional. Optional, in this case, means the target
always exists but may be entirely empty.
Summary
- If you are using BKE APIs to access openvdb features, then use the
`bf::blenkernel` target
- If you are only using `intern/openvdb` APIs then use the
`bf::intern::optional::openvdb` target (rare)
- For all other cases, use the `bf::dependencies::optional::openvdb`
target (rare)
context: https://devtalk.blender.org/t/cmake-cleanup/30260
Pull Request: https://projects.blender.org/blender/blender/pulls/137071
This change introduces time stretching and pitch scaling.
However, none of this will be compiled at the moment, as rubberband
needs to be added to the dependencies first.
Credit: Kacey La
* Add own simple logging system to replace glog, which is no longer
maintained by Google.
* When building in Blender, integrate with CLOG and print all messages
through that system instead.
* --log cycles now replaces --debug-cycles. The latter still works but
is no longer documented.
Pull Request: https://projects.blender.org/blender/blender/pulls/140244