Commit Graph

1621 Commits

Author SHA1 Message Date
Campbell Barton
66ed599c33 Cleanup: remove Python scripts & directory from CMake source file lists 2025-08-21 17:09:18 +10:00
Jeroen Bakker
1f1098c498 Vulkan: Remove MoltenVK
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
2025-08-15 09:36:38 +02:00
Jeroen Bakker
7286885789 Vulkan: Update VMA to 3.3.0
Updated to latest release. Has some fixes and a new API for easy
integration with Volk.

Pull Request: https://projects.blender.org/blender/blender/pulls/144434
2025-08-14 13:20:45 +02:00
Jesse Yurkovich
0240a1f32f Cleanup: CMake: Modernize bf_intern_openvdb dependencies
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
2025-08-12 21:26:38 +02:00
Brad Smith
501df52b53 Fix: Build failure on riscv64 platform
Use `__LP64__` consistently for 64-bit platform detection and simplify
the checks a bit. The amd64, aarch64 and powerpc64 checks are covered
by `__LP64__`.

Pull Request: https://projects.blender.org/blender/blender/pulls/143679
2025-08-12 17:05:25 +02:00
Jörg Müller
957ee8953b Audaspace: porting changes from upstream.
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
2025-07-26 19:00:34 +02:00
Campbell Barton
c3cdc11283 CMake: quiet build warnings from fmtlib
Reference fmtlib as a system include to suppress noisy messages.
2025-07-16 15:32:03 +10:00
Brecht Van Lommel
8392ca915b Cycles: Remove glog dependency, redirect logs to CLOG
* 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
2025-07-09 20:59:24 +02:00
Lukas Stockner
7842b27326 GTest: Fix compiler warning with GCC 15
`<ciso646>` is deprecated in C++17, and now GCC 15 has started to complain,
so include an upstream commit that fixes this.

Pull Request: https://projects.blender.org/blender/blender/pulls/139417
2025-06-26 02:03:34 +02:00
Brecht Van Lommel
aa25b4d3c2 Merge branch 'blender-v4.5-release' 2025-06-17 20:21:00 +02:00
Zhou Qiankang
1692817b5e Fix: Wrong HIP device pointer size on riscv64 and loongarcg64
Add __LP64__ to 64-bit platform detection, to ensure hipDeviceptr_t has the
correct size on these platforms.

Pull Request: https://projects.blender.org/blender/blender/pulls/140528
2025-06-17 20:18:00 +02:00
Aras Pranckevicius
d9ef240311 Merge branch 'blender-v4.5-release' 2025-06-14 22:15:36 +03:00
Aras Pranckevicius
074fcfe1a5 Fix #138834: FBX importer sets pivots incorrectly in some cases
Fix the rest of #138834, pivot adjustment was not done
when rotation pivot and scaling pivot inside FBX were not matching.

Pull Request: https://projects.blender.org/blender/blender/pulls/140411
2025-06-14 21:14:27 +02:00
Campbell Barton
a16d68b625 CMake: suppress GCC warnings in ./extern/bullet 2025-06-13 11:56:43 +10:00
Jörg Müller
f7a58f99ce Fix #139721: Audio: Blender hang on startup
Fix by Sergey Sharybin.
2025-06-02 17:39:10 +02:00
Bartosz Kosiorek
f2ad6b1ef0 Fix: Mantaflow OpenVDB cache hollow volume artifacts
If an OpenVDB grid has an 8x8x8 block with the same value, it is stored as
a tile with a single value. Now iterate over the bounding box and copy the
value to all voxels for this case.

Fix #91174: Hollow emission artifacts
Fix #124064: Hollow density artifacts

Pull Request: https://projects.blender.org/blender/blender/pulls/139231
2025-06-02 16:20:43 +02:00
Ray Molenkamp
0b6fd93069 libs: move wintab out of the lib dir into /extern
Almost all content in the libdir we can regenerate, wintab however
is not one of them, and if you generate a new lib folder it's one
of the things you have to manually copy back into place.

this PR moves it out of the libdir and into /extern

Pull Request: https://projects.blender.org/blender/blender/pulls/128873
2025-05-29 00:52:57 +02:00
Aras Pranckevicius
6a0e6f5cff Fix: New FBX importer was not handling blender specific FullWeights
- Update to latest ufbx version that adds support for FullWeights
- Handle that in the same way as the Python importer did
- Add test files from ufbx test suite

Pull Request: https://projects.blender.org/blender/blender/pulls/138811
2025-05-13 15:43:08 +02:00
Sebastian Parborg
552a395952 Audaspace: Wait for the PulseAudio stream to be ready when initializing
Otherwise, the stream might be in an invalid state when we are trying to
start playback.

Pull Request: https://projects.blender.org/blender/blender/pulls/136845
2025-05-07 15:01:10 +02:00
Sebastian Parborg
b6a86a8fc9 Audaspace: Always free up the CoreAudio resources 2025-05-07 15:00:55 +02:00
Sebastian Parborg
df733ea3a7 Audaspace: Fix Core Audio sound playback 2025-05-07 15:00:55 +02:00
Sebastian Parborg
898877e8b3 Audaspace: Workaround Core Audio clock quirk 2025-05-07 15:00:55 +02:00
Sebastian Parborg
034478fe07 Audaspace: Cork the PulseAudio audio stream on creation
We uncork it when we start playback
2025-05-07 15:00:55 +02:00
Bartosz Kosiorek
48a6626968 Physics: Improve fluid viscosity performance by 2.5%
By moving checking of Grid outside of loop, we are decrease amount of
conditional branches, which allows for better compiler optimizations.

Pull Request: https://projects.blender.org/blender/blender/pulls/138410
2025-05-06 19:05:49 +02:00
Bartosz Kosiorek
56144ee59d Fix #80529: Smoke dissolve rate affected by time steps
Now results are similar under different time steps. Additionally it is
now working correctly with different time scale, where smoke lifetime
is proportional to time scale.

Pull Request: https://projects.blender.org/blender/blender/pulls/138347
2025-05-06 19:04:10 +02:00
Bartosz Kosiorek
1e5ede1942 Physics: Increase precision of 4D vector normalization functions
More accurately normalize 4D vectors, to avoid potential
numerical stability issues in Mantaflow.

For consistency with changes from #136966.

Pull Request: https://projects.blender.org/blender/blender/pulls/137413
2025-04-30 21:01:36 +02:00
Bartosz Kosiorek
b3dcaa2e1e Physics: Improve liquid simulation performance
Move various computations out of a loop.

This can improve performance up to 1.25x - 1.5x depending on the scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/137733
2025-04-30 19:39:57 +02:00
Brecht Van Lommel
463fc8cf28 CUEW: Add external memory API functions
Pull Request: https://projects.blender.org/blender/blender/pulls/137363
2025-04-28 11:38:56 +02:00
Campbell Barton
01c32a9ccc Cleanup: trailing space 2025-04-24 12:44:27 +10:00
Jörg Müller
e4792cb4e7 Audaspace: MixingThreadDevice
Fixes #135897 by introducing a mixing thread to coreaudio, making the callback lock free. At the same time these changes unify all devices that use a mixing thread (now that's jack, pulse, pipewire and coreaudio).

Pull Request: https://projects.blender.org/blender/blender/pulls/136711
2025-04-17 14:30:34 +02:00
Aras Pranckevicius
cc741fbf99 IO: New FBX importer (C++, via ufbx)
Adds a C++ based FBX importer, using 3rd party ufbx library (design task:
#131304). The old Python based importer is still there; the new one is marked
as "(experimental)" in the menu item. Drag-and-drop uses the old Python
importer; the new one is only in the menu item.

The new importer is generally 2x-5x faster than the old one, and often uses
less memory too. There's potential to make it several times faster still.

- ASCII FBX files are supported now
- Binary FBX files older than 7.1 (SDK 2012) version are supported now
- Better handling of "geometric transform" (common in 3dsmax), manifesting
  as wrong rotation for some objects when in a hierarchy (e.g. #131172)
- Some FBX files that the old importer was failing to read are supported now
  (e.g. cases 47344, 134983)
- Materials import more shader parameters (IOR, diffuse roughness,
  anisotropy, subsurface, transmission, coat, sheen, thin film) and shader
  models (e.g. OpenPBR or glTF2 materials from 3dsmax imports much better)
- Importer now creates layered/slotted animation actions. Each "take" inside
  FBX file creates one action, and animated object within it gets a slot.
- Materials that use the same texture several times no longer create
  duplicate images; the same image is used
- Material diffuse color animations were imported, but they only animated
  the viewport color. Now they also animate the nodetree base color too.
- "Ignore Leaf Bones" option no longer ignores leaf bones that are actually
  skinned to some parts of the mesh.
- Previous importer was creating orphan invisible Camera data objects for
  some files (mostly from MotionBuilder?), new one properly creates these
  cameras.

Import settings that existed in Python importer, but are NOT DONE in the new
one (mostly because not sure if they are useful, and no one asked for them
from feedback yet):

- Manual Orientation & Forward/Up Axis: not sure if actually useful. FBX
  file itself specifies the axes fairly clearly. USD/glTF/Alembic also do
  not have settings to override them.
- Use Pre/Post Rotation (defaults on): feels like it should just always be
  on. ufbx handles that internally.
- Apply Transform (defaults off, warning icon): not sure if needed at all.
- Decal Offset: Cycles specific. None of other importers have it.
- Automatic Bone Orientation (defaults off): feels like current behavior
  (either on or off) often produces "nonsensical bones" where bone direction
  does not go towards the children with either setting. There are discussions
  within I/O and Animation modules about different ways of bone
  visualizations and/or different bone length axes, that would solve this
  in general.
- Force Connect Children (defaults off): not sure when that would be useful.
  On several animated armatures I tried, it turns armature animation
  into garbage.
- Primary/Secondary Bone Axis: again not sure when would be useful.

Importer UI screenshots, performance benchmark details and TODOs for later
work are in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/132406
2025-04-16 09:55:00 +02:00
Bartosz Kosiorek
1148eb9c8b Fix #102755: Viscosity instability in Mantaflow
More accurately normalize 3D vectors, to avoid this an potential other
numerical stability issues in Mantaflow.

Pull Request: https://projects.blender.org/blender/blender/pulls/136966
2025-04-09 22:04:51 +02:00
Sergey Sharybin
59991e54f5 Update Ceres to version 2.2.0
Brings a lot of performance improvements and bug fixes.

Keyframe selection in bundle-adjustment.blend goes down from
4.5 seconds to 3.0 on M2 Ultra. The reconstruction itself stays
within 0.2 seconds.

Full change log can be found at http://ceres-solver.org/version_history.html

Pull Request: https://projects.blender.org/blender/blender/pulls/136896
2025-04-03 16:20:38 +02:00
Campbell Barton
7b93a84ed5 Cleanup: extend the list of warnings removed when building with CLANG 2025-04-03 10:55:04 +00:00
Campbell Barton
2d49844931 Cleanup: resolve unknown pragma warning for CLANG 2025-04-03 21:45:26 +11:00
Brecht Van Lommel
1ea89c82d4 Build: Remove OpenMP
It's better for performance to use a single thread pool for all areas of
Blender, and this gets us closer to that.

Bullet, Quadriflow, Mantaflow and Ceres still contain OpenMP code, but it
was already disabled.

On macOS, our OpenMP libraries are no longer compatible with the latest
Xcode 16.3. By removing OpenMP we no longer have to solve that problem.

OpenMP was disabled for bpy module builds on Windows ARM64, which also no
longer needs to be solved.

Pull Request: https://projects.blender.org/blender/blender/pulls/136865
2025-04-02 16:50:50 +02:00
Brecht Van Lommel
da9a9093ec Refactor: Eigen: Switch from OpenMP to TBB
Only the parallel sparse matrix code was updated. This is used by e.g.
LSCM and ABF unwrap, and performance seems about the same or better.

Parallel GEMM (dense matrix-matrix multiplication) is used by libmv,
for example in libmv_keyframe_selection_test for a 54 x 54 matrix.
However it appears to harm performance, removing parallelization makes
that test run 5x faster on a Apple M3 Max.

There has been no new Eigen release since 2021, however there is active
development in master and it includes support for a C++ thread pool for
GEMM. So we could upgrade, but the algorithm remains the same and
looking at the implementation it just does not seem designed for modern
many core CPUs. Unless the matrix is much larger, there's too much thread
synchronization overhead. So it does not seem useful to enable that
thread pool for us.

Pull Request: https://projects.blender.org/blender/blender/pulls/136865
2025-04-02 16:50:50 +02:00
Brecht Van Lommel
98b3b36411 Refactor: Build: Add bf::dependencies::eigen target
To make adding a dependeny on TBB easier.

Additional changes:
* Using LIB for libmv tests, as it now brings in includes
* Removing Eigen header listing in iTaSC

Pull Request: https://projects.blender.org/blender/blender/pulls/136865
2025-04-02 16:50:46 +02:00
Jörg Müller
57117497fe Audaspace: Synchronizer API change
Removes the playback handle from the synchronizer API and integrates it
into the device, removing the ISynchronizer interface completely.

This has been discussed in more detail in #126047 and its main purpose is to unify the handling of synchronizer events, especially seek which needed different logic for jack vs other backends.

OpenAL now needs a silence playback handle for synchronization but all
other backends are pretty straightforward just counting the mixed
samples in the SoftwareDevice with some specializations for specific
backends that had their own synchronizers before.

Note: CoreAudio changes are untested as I don't have a Mac.

Pull Request: https://projects.blender.org/blender/blender/pulls/133191
2025-04-01 11:28:08 +02:00
Campbell Barton
e83dee1b8f Cleanup: suppress "extra" warnings for CLANG in extern/
These are additional warnings to -Wall and generally aren't worth
suppressing for code maintained externally.
2025-04-01 00:49:35 +00:00
Brecht Van Lommel
0fd360428a Fix #136593, #136641: Quadriflow remesh gets stuck on Windows
This appears to be a pre-existing issue that got exposed by the refactor
for some files, while for others it was already happening.

Pull Request: https://projects.blender.org/blender/blender/pulls/136680
2025-03-28 19:25:56 +01:00
phantomsoldierking
8ffe7e6ae1 Docs: changed description of the length parameter
Fixes #134117

Pull Request: https://projects.blender.org/blender/blender/pulls/135958
2025-03-14 21:45:18 +01:00
Falk David
e39c83c881 Merge branch 'blender-v4.4-release' 2025-03-06 21:19:31 +01:00
Jörg Müller
4c1c2f0280 Audaspace: update to version 1.6 for blender 4.4.
Pull Request: https://projects.blender.org/blender/blender/pulls/135475
2025-03-06 21:14:45 +01:00
Jörg Müller
41cbebe6d9 Audaspace: port CoreAudio closing fix from main. 2025-03-06 21:14:44 +01:00
Ray Molenkamp
c7fd8d5ad1 Fix: CMake: Windows: Make ASAN usable again on debug configurations
Seems like ASAN has been broken on debug builds for MSVC ever since
d5e50460e7 (1.5 years ago) the core reason is it's incompatible with
fastlink, it'll appear to work, but in the asan reports no symbols
will be resolved.

While looking into this, some other problems like the symbol format being
not inline with the table in the comment above it, and a warning coming
out of /extern were noted.

All of these issues are addressed in this commit.
2025-02-27 16:56:18 -07:00
Weizhen Huang
f116329cab Fix: Audaspace: Unsupported availability guard
`__builtin_available` needs to be used with `if()`

Pull Request: https://projects.blender.org/blender/blender/pulls/135161
2025-02-26 17:58:44 +01:00
Jörg Müller
603355fa23 Audaspace: file missing in last commit.
See #132065 for more details.
2025-02-25 18:57:19 +01:00
Jörg Müller
10c7b00f72 Audaspace: port bugfix for CoreAudio from upstream.
Device is now closed for Mac versions where the CoreAudio bug has been
fixed.
2025-02-25 18:54:41 +01:00
Sergey Sharybin
c114ac97be Merge branch 'blender-v4.4-release' 2025-02-20 17:36:37 +01:00