Commit Graph

1724 Commits

Author SHA1 Message Date
Campbell Barton
7c668c0308 Cleanup: CMake indentation & wrap long lines 2025-05-20 11:20:09 +10:00
Campbell Barton
29ab328f35 CMake: use "mode" argument for messages
While it's optional, include by convention and helps to clarify the
purpose of a message.
2025-05-20 11:15:35 +10:00
Jacques Lucke
1816a2665e Tests: Geometry Nodes: add initial Import CSV node tests
Previously, the test files still had absolute instead of relative paths in them.

Pull Request: https://projects.blender.org/blender/blender/pulls/139020
2025-05-18 07:34:57 +02:00
Ray Molenkamp
2c5b9e182b CMake: Add code coverage support for clang
Pretty bare bones but gets the job done, unlike the gcc
tooling, this will work for release builds, the performance cost
of it is on the high side of things, the full test suite tests take over
an hour for me with code coverage support enabled on a release build.
I have not timed a debug build. Given developers can just run their
tests to get coverage data over what they are working on, I feel this
is still useful tooling to have.

This adds the 3 targets for clang and adds a single gcc target

coverage-reset - this removes the collected code coverage data and
report

coverage-report - This merges the collected data and generates the
report (new for gcc)

coverage-show - This merges the collected data and generates the report
and opens it in the browser

This relies on llvm-cov and llvm-profdata being available if not found
code coverage is disabled.

Note: A full test run requires an obscene amount of disk space, a
complete test run takes about 125GB and takes 12 minutes to merge, so
provision the COMPILER_CODE_COVERAGE_DATA_DIR folder accordingly

Example report in PR
2025-05-12 16:28:41 +02:00
Jesse Yurkovich
223aca7703 Build: Fix overzealous line wrap for COMPILER_CODE_COVERAGE_CXXFLAGS
Broken by f48b4e3abf

Pull Request: https://projects.blender.org/blender/blender/pulls/138379
2025-05-04 21:37:28 +02:00
Miguel Pozo
f24ad7a470 Build: Add WITH_OPTIMIZED_BUILD_TOOLS
Enable optimizations on Debug builds for executables used for the build
process (datatoc and glsl_preprocess) and enable unity builds for
shader preprocessing targets.

Debug: From 28.9s to 5.7s
Release: From 4.9s to 3.5s

Pull Request: https://projects.blender.org/blender/blender/pulls/138274
2025-05-02 18:33:44 +02:00
Jonas Holzman
8202b734a3 Cleanup: CMake: Merge APPLE blocks, wrap long option description line 2025-04-27 23:23:49 +02:00
Sean Kim
e27be7cfc6 CMake: Rename and expose 'USE_EXPERIMENTAL_TESTS' option
The `USE_EXPERIMENTAL_TESTS` variable was not exposed as an option, so
the two tests that use the option to check whether tests should be run
had to be manually enabled by changing `tests/python/CMakeLists.txt`.

This commit renames the variable to `WITH_TESTS_EXPERIMENTAL`, defaults
the option to `OFF`, and marks it as an advanced option.

Pull Request: https://projects.blender.org/blender/blender/pulls/133831
2025-04-24 06:11:30 +02:00
Howard Trickey
dd559259d8 Modeling: Add a new boolean solver based on the Manifold library.
Adds the 'manifold' solver option to the Boolean geo node and to
the Boolean modifier. This solver is about as fast, or faster,
than the current float solver, and is robust against floating
point issues like the Exact solver. But currently it only
works on mesh arguments that are strictly manifold.

See https://projects.blender.org/blender/blender/issues/120182
for many more details.
2025-04-22 21:23:37 -04:00
Johan Walles
8afde59054 macOS: Default to modern linker on x64
This patch changes the default macOS x64 linker from the slower legacy
"classic" linker, to the much faster default modern macOS linker. A new
CMake option `WITH_LEGACY_MACOS_X64_LINKER` was also introduced to use
the old linker, set to OFF by default.

As an example from testing on an Intel Macbook, this makes linking time
go from 3min25s to 10s after this change. The reason why the legacy
linker was enforced on x64 in the first place was to silence "platform
load command not found" warnings during linking. Since this behavior is
still desired on the BuildBot, the `WITH_LEGACY_MACOS_X64_LINKER` option
is enforced in the BuildBot macOS configs.

Pull Request: https://projects.blender.org/blender/blender/pulls/134639
2025-04-21 10:56:36 +02:00
Nicolas van Kempen
132a676120 Cleanup: Update outdated jemalloc-related comment
As of dde0765de2, jemalloc is enabled by default when found.

As of dde0765de2, jemalloc is enabled by default when found.
There is also no active plan to use it on all platforms, i.e.
on Windows tbbmalloc is used.

When it doesn't exist, there is simply a warning:
```
-- Could NOT find JeMalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
-- JeMalloc not found, disabling WITH_MEM_JEMALLOC
```

Pull Request: https://projects.blender.org/blender/blender/pulls/137743
2025-04-21 10:21:37 +02:00
Sergey Sharybin
730d9e4d2e Fix strict warnings in extern/ after Audaspace update
Done for Clang compiler. GCC might need the same fix, but would
need to be tested separately.
2025-04-18 15:14:50 +02:00
Campbell Barton
8de93061f7 CMake: detect numpy with Python 3.13
Resolves #137635.
2025-04-17 17:32:48 +10: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
Clément Foucault
dde18802a5 GPU: Remove WITH_GPU_RENDER_TESTS_SILENT option
This was introduced during EEVEE-next developement
cycle to not make the buildbot fail because of EEVEE
render tests.

These have stabilized now and we can remove this option.

Pull Request: https://projects.blender.org/blender/blender/pulls/137545
2025-04-15 17:56:16 +02:00
Campbell Barton
5affe5fc6d Cleanup: spelling in comments (make check_spelling_*) 2025-04-12 19:31:29 +10:00
Campbell Barton
3a51d140d8 Cleanup: remove WITH_X11_XF86VMODE since mode setting is no longer used
Setting the display mode was last used for the Game Engine
remove the CMake option WITH_X11_XF86VMODE and the associated code.

Ref: !137126
2025-04-08 10:56:27 +00:00
Campbell Barton
e544f543a0 CMake: pass a mode argument to message
While omitting the mode is supported it's generally better to clarify
the purpose of a message.
2025-04-05 21:42:16 +11:00
Campbell Barton
f48b4e3abf Cleanup: wrap long lines for CMake 2025-04-05 20:30:37 +11:00
Sergey Sharybin
85a97b01a9 Fix: Warnings after Ceres update
The external libraries did not properly ignore Wreorder for GCC and MSVC.

Pull Request: https://projects.blender.org/blender/blender/pulls/136946
2025-04-03 19:13:07 +02: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
Campbell Barton
60dada3e41 CMake: enable WITH_UI_TESTS_HEADLESS when possible
Prefer headless tests, details in code-comments.
2025-04-02 03:02:05 +00:00
Campbell Barton
90fd070c28 Cleanup: spelling in comments (make check_spelling_*) 2025-04-02 03:02:01 +00:00
Sean Kim
38870d17e6 Build: Allow UI tests to run locally on all platforms
This commit allows the `WITH_UI_TESTS` CMake option to be used on all
platforms, not only Linux. The existing functionality to use the Weston
compositor was moved into the `WITH_UI_TESTS_HEADLESS` option. When
these tests are run with only `WITH_UI_TESTS`, a visible instance of
Blender is opened up for testing.

Pull Request: https://projects.blender.org/blender/blender/pulls/135889
2025-03-14 22:27:50 +01:00
Campbell Barton
5b856ba447 Merge branch 'blender-v4.4-release' 2025-03-06 10:35:59 +11:00
Campbell Barton
b85fc32cae Cleanup: spelling & repeated words in comments
Address warnings from check_spelling.py
2025-03-06 10:33:21 +11:00
Sean Kim
8fef9214a7 Tests: Move sculpting render tests out of WITH_GPU_RENDER_TESTS
Adds a new CMake option so that these tests can be run independently of
other tests, and so that existing tests that use WITH_GPU_RENDER_TESTS
are not forced to run these sculpt tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/134893
2025-02-21 20:31:57 +01:00
Sergey Sharybin
c114ac97be Merge branch 'blender-v4.4-release' 2025-02-20 17:36:37 +01:00
Sahar A. Kashi
6363181af9 Cycles: HIP-RT 2.5 integration and gfx12 support
This change brings the following improvements on the user level
- Support of GPUs with gfx12 architecture
- New HIP-RT library which in addition to the gfx12 support brings
  various bug-fixes.

The known limitation of gfx12 is that OpenImageDenoiser does not yet
support this GPU architecture. This means that while Cycles will use the
full advantage of the gfx12 (including hardware accelerated ray-tracing),
denoising will only be possible on CPU, or secondary gfx11 or below GPU.
This is something that requires a change in OIDN and it is to late to do
it for Blender 4.4, but it is something to look forward for Blender 4.5.

The gfx12 changes for the pre-compiled kernels is rather trivial,
so it comes together (in the same PR) as the bigger HIP-RT change.

On the development side this change brings the following improvements:
- One step compile and link (much simpler CMake rules)
- Embedding BVH binaries in hiprt dll (which makes it easier to package
  and load, without relying on special path configuration)

Co-authored-by: Sahar Kashi <sahar.kashi@amd.com>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/133129
2025-02-20 17:34:14 +01:00
Miguel Pozo
9f003ee722 Merge branch 'blender-v4.4-release' 2025-02-20 17:21:53 +01:00
Miguel Pozo
ba3749ad47 Overlay: Add tests
This adds support for Overlay tests.

There are some differences with how we handle tests for other engines:
- The renders are captured using `bpy.ops.render.opengl()`, but this
  won't work on our GPU build bots.
- A single blend file can run multiple tests by outputting a txt list
  with the test names.
- Each overlay test blend file requires a matching script file with
  the same name inside `tests/python/overlay/`.
- To reproduce a specific test state you can run
  `blender "(...)/tests/data/overlay/<test>.blend" -P "(...)/tests/python/overlay/<test>.py" -- --test <test-number>`.

Note:
The current test permutations are WIP, so reference images are not
committed to the data repo for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/133879
2025-02-20 17:18:59 +01:00
Anthony Roberts
c8929b856a Merge branch 'blender-v4.4-release' 2025-02-20 10:27:08 +00:00
Anthony Roberts
8ff405bc06 Windows: Enable OpenMP on ARM64, and quiet new noisy warning
New versions of LLVM now ship with OpenMP for these devices, so enable accordingly.

The disabled warning was causing substantial spam in buildbot logs.

Pull Request: https://projects.blender.org/blender/blender/pulls/134583
2025-02-20 11:24:22 +01:00
Campbell Barton
96179be206 Cleanup: cmake indentation 2025-02-16 17:14:12 +11:00
Ankit Meel
1a6800a11f Merge branch 'blender-v4.4-release' 2025-02-14 15:18:28 +05:30
Ankit Meel
13c3d95f52 Xcode/thumbnailer: rebuild error due to rpath
Fix duplicate rpath error on rebuild by using CMake target
property.

Pull Request: https://projects.blender.org/blender/blender/pulls/134527
2025-02-14 10:46:48 +01:00
Devashish Lal
1a62fdc82a Geometry Nodes: CSV import node
This commit implements a node to import CSV files as a point cloud.
The interface is minimal, with just a file path input. The type of each
column is chosen by whether the first value is an integer or a float
(those are currently the only supported types).

The goal of the node is to make it easier to get arbitrary data into
geometry nodes for visualization purposes, for example.

https://devtalk.blender.org/t/gsoc-2024-geometry-nodes-file-import-nodes/34482

Pull Request: https://projects.blender.org/blender/blender/pulls/126308
2025-02-10 16:56:52 +01:00
Sergey Sharybin
4e9f85b76f Merge branch 'blender-v4.4-release' 2025-02-10 14:55:57 +01:00
Patrick Mours
5810c94f95 Cycles: Add Blackwell to Cycles CUDA binaries architectures
Enables building of a Cubin for GPUs based on Blackwell architecture
if CUDA toolkit version 12.8 or higher is installed.
Only added sm_120 to the default set, since it is the one relevant for
consumer GPUs (RTX 5090 etc.) that are generally used with Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/134170
2025-02-10 14:55:28 +01:00
Bastien Montagne
4b996baa76 Merge branch 'blender-v4.4-release' 2025-02-10 14:16:47 +01:00
Sergey Sharybin
5437f22faf Fix unknown Cycles test device silently pass
Prevents situation when requested device is HIPRT (while the expected
spelling is HIP-RT).

Pull Request: https://projects.blender.org/blender/blender/pulls/134332
2025-02-10 14:13:42 +01:00
Campbell Barton
e659e87a67 Cleanup: cmake formatting, sort file lists 2025-02-10 19:40:06 +11:00
Brecht Van Lommel
c7eb2f4204 Refactor: Remove _DEBUG, use WITH_DRAW_DEBUG instead
The `_DEBUG` flag is interfering with oneTBB, and now that there is a
`WITH_DRAW_DEBUG` option this is more appropriate.

See #115774 for more context.

Pull Request: https://projects.blender.org/blender/blender/pulls/133950
2025-02-03 12:32:04 +01:00
Campbell Barton
59732c95d8 Cleanup: strip trailing space for TOML,HTML & XML 2025-02-02 13:58:34 +11:00
Ankit Meel
301e298040 Build: Remove macOS mold and lld linkers support
The mold linker doesn't support macOS anymore. The sold linker
gets no new releases since the Xcode 15+ linker is at par with sold.

https://github.com/bluewhalesystems/sold/issues/50#issuecomment-2076249631
https://github.com/rui314/mold/issues/189#issuecomment-1495288926

Pull Request: https://projects.blender.org/blender/blender/pulls/133634
2025-01-30 18:21:38 +01:00
Ankit Meel
b858319dd3 macOS/QuickLook: support rich thumbnail in Finder
Support thumbnail that shows the file contents instead
of the default blend file icon for all files in Finder.
Some files may still have the usual blender icon as thumbnail
depending on their contents.

blender-thumbnailer process is kept alive by the system
in the background and is invoked by QuickLook when needed.

The checkbox to disable the extension is present in
the Settings app.

It will NOT be an interactive "Preview" that allows richer
interactions like Panning viewport, or rotating 3D objects.
2025-01-23 17:00:19 +01:00
Ray Molenkamp
92cd4ca295 CMake: Disable WINDOWS_PYTHON_DEBUG
The python debugger in Visual Studio for has been broken for years
but the upstream project over at https://github.com/microsoft/PTVS
show hopeful signs of life once in a while, so there is hope that
at one point this will start working again. That being said people
do keep turning this option on and end up disappointed it isn't
working and they spend a whole bunch of time on trying to get it to
work. So for now rather than removing this functionality
completely, just disable it.
2025-01-23 08:36:30 -07:00
Sean Kim
b24d8822ef Build: Add config print for WITH_AUDASPACE and WITH_OPENSUBDIV
This commit adds two entries into the "Build Options:" CMake print to
assist in verifying configuration both locally and on the buildbot.

Pull Request: https://projects.blender.org/blender/blender/pulls/133409
2025-01-22 21:05:26 +01:00
Brecht Van Lommel
c749f6c376 Cleanup: Remove unnecessary usage of Boost in the build system
* Some libraries like Alembic and OpenColorIO for a long time removed
  header dependencies on Boost.
* No need to have BOOST_LIBRARIES anymore, only BOOST_PYTHON_LIBRARIES
  is a direct dependency through USD headers.
* OpenVDB is no longer a static library, no need to link its dependencies.

Pull Request: https://projects.blender.org/blender/blender/pulls/133424
2025-01-22 10:02:22 +01:00
Brecht Van Lommel
bec8581916 Refactor: Remove Boost from Quadriflow
Extract Boykov-Kolmogorov max flow algorithm from boost::graph. As part
of work towards removing Boost as a Blender dependency.

Together with #133347 this removes the last direct Blender dependency
on Boost.

Pull Request: https://projects.blender.org/blender/blender/pulls/132142
2025-01-22 09:05:38 +01:00