Commit graph

1902 commits

Author SHA1 Message Date
Jesse Yurkovich
04159fb181 Fix: Tests: Wrong assert function used in USD tests
In Python, lists always compare as True so this slipped through.

Found by LLM review.

Pull Request: https://projects.blender.org/blender/blender/pulls/160943
2026-07-01 21:24:16 +02:00
Guillermo Venegas
ccec1025e0 Merge branch 'blender-v5.2-release' 2026-07-01 08:35:59 -06:00
Guillermo Venegas
15dc480c53 Fix #157477, #117176: Avoid crashes with popups referencing unregistered python classes
Unregistered classes could be still referenced in active popups and as
soon they get focused they will likely crash after trying to access
freed data.

This avoid any crash by refreshing any active popup when a class
is unregistered, if the popup can't be refreshed and is referencing
the class to be unregistered it will be closed instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/157524
2026-07-01 16:30:49 +02:00
Clément Foucault
e40148276b EEVEE: Bypass lightprobe setup in tests without any lit materials
This significantly reduce the overhead of simple tests
like the image tests.

Before (warm run)
```
(.venv) $[build_linux] ctest -R eevee_opengl_image_
Test project /mnt/data/Blender/build_linux
    Start 257: eevee_opengl_image_colorspace
1/4 Test #257: eevee_opengl_image_colorspace ......   Passed    7.28 sec
    Start 258: eevee_opengl_image_data_types
2/4 Test #258: eevee_opengl_image_data_types ......   Passed   16.24 sec
    Start 259: eevee_opengl_image_mapping
3/4 Test #259: eevee_opengl_image_mapping .........   Passed   17.99 sec
    Start 260: eevee_opengl_image_texture_limit
4/4 Test #260: eevee_opengl_image_texture_limit ...   Passed   16.28 sec

100% tests passed, 0 tests failed out of 4

Total Test time (real) =  57.82 sec
```
After (warm run)
```
(.venv) $[build_linux] ctest -R eevee_opengl_image_
Test project /mnt/data/Blender/build_linux
    Start 257: eevee_opengl_image_colorspace
1/4 Test #257: eevee_opengl_image_colorspace ......   Passed    5.17 sec
    Start 258: eevee_opengl_image_data_types
2/4 Test #258: eevee_opengl_image_data_types ......   Passed   11.60 sec
    Start 259: eevee_opengl_image_mapping
3/4 Test #259: eevee_opengl_image_mapping .........   Passed   12.79 sec
    Start 260: eevee_opengl_image_texture_limit
4/4 Test #260: eevee_opengl_image_texture_limit ...   Passed   12.30 sec

100% tests passed, 0 tests failed out of 4

Total Test time (real) =  41.89 sec
```

Pull Request: https://projects.blender.org/blender/blender/pulls/160868
2026-06-30 17:00:58 +02:00
Lukas Tönne
8faae58201 Merge branch 'blender-v5.2-release' 2026-06-26 15:00:36 +02:00
Lukas Tönne
f7f4071e2e Fix #160692: Auto-removal of viewer socket crashes group operator
The `Make Group` operator for nodes expects that sockets remain valid
when removing a link to the node (to be replaced by a new external
link). This is not the case for highly dynamic nodes like viewer nodes.
A viewer socket is removed as soon as it is un-linked.

Make the group operator more robust by checking if sockets exist and
ignoring any link to group nodes when the socket disappears.
Ideally the viewer node would remain connected through these operations,
but that requires some detail special case for viewer behavior or some
way to ensure a viewer node copy has the same sockets as the original.

A regression test is also added for this case.

The `bl_node_copy_operators.py` has been modified to use the
`BLENDER_TEST_UPDATE` environment variable for updating the expected
test data, instead of the previous `--generate` script parameter.
This is consistent with other test scripts using the same mechanism.

A bug in `nearest_node_grid_coord` was fixed which created `nan` node
locations when running in `--background` mode due to zero UI scale.
Introduced by #157834.

Pull Request: https://projects.blender.org/blender/blender/pulls/160718
2026-06-26 14:59:43 +02:00
Clément Foucault
5b296aee6f EEVEE: Add placeholder for Cycles blocklist 2026-06-26 10:48:58 +02:00
Brecht Van Lommel
7197d149d1 Merge branch 'blender-v5.2-release' 2026-06-24 22:26:26 +02:00
Brecht Van Lommel
0e06daffc8 Tests: Cycles: Blocklist normal map light leak test for HIP-RT
This is already on the verge of failure, and small changes are pushing this
over the threshold. Blocklist for now to unblock those PRs that do not
actually make this worse.

Ref #159824, #159635
2026-06-24 22:24:49 +02:00
Jesse Yurkovich
374e6c7e57 Merge branch 'blender-v5.2-release' 2026-06-24 12:23:18 -07:00
Jesse Yurkovich
1a936ca8f9 Fix #154260: Inconsistent AVIF BW output support
It turns out the workaround for #154260 only disabled AVIF BW saving for
the Image->Save UI, but not in the Output Properties UI. So while 5.1
will remain problematic when using those settings, 5.2 has updated
libraries and can successfully output in both places.

Re-enable the Image->Save UI to make things consistent and add dedicated
BW variations to the imbuf suite of tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/160576
2026-06-24 21:22:29 +02:00
Brecht Van Lommel
99d5a30bb9 Merge branch 'blender-v5.2-release' 2026-06-24 15:04:43 +02:00
Brecht Van Lommel
1319a955eb Fix #160256: Cycles OptiX crash with OSL camera and shader raytrace
This particular combination was not computing the stack size correctly,
since shader raytrace was moved to a separate OptiX module. It needs to
be set manually now that it's not part of the same module.

Regression from c51fcf73a7.

Pull Request: https://projects.blender.org/blender/blender/pulls/160318
2026-06-24 14:31:29 +02:00
Brecht Van Lommel
516ab47004 Tests: Remove some unnecessary OSL camera test files
Disable for Storm, and removed unused EEVEE reference renders.

Pull Request: https://projects.blender.org/blender/blender/pulls/160318
2026-06-24 14:31:29 +02:00
Jesse Yurkovich
513ce3a9f5 Fix: USD: Incorrect matrix attribute conversions
The recent change to import/export matrix attributes missed the fact
that USD is row-major while Blender's float4x4 type is col-major. This
wasn't obvious as Blender to Blender interop didn't surface the issue
and the spreadsheet tooltip itself does a transpose before displaying
the values.

Add dedicated validation for this now.

----
Found from LLM review
https://projects.blender.org/llm-test/llm-reports/src/branch/main/llm_review/log_2026_w25.md

Pull Request: https://projects.blender.org/blender/blender/pulls/160531
2026-06-23 20:21:07 +02:00
Brecht Van Lommel
a176b84a1b Merge branch 'blender-v5.2-release' 2026-06-23 12:50:34 +02:00
Brecht Van Lommel
61ca1b5856 Fix #160089: Cycles: Disable MNEE on HIP without hardware ray-tracing
Unfortunately it appears that moving MNEE to another kernel did not
fundamentally fix the apparent compiler bug that breaks this. Another
refactor in 0baa98866c made the bug surface again.

It appears to work fine with HIP-RT, so we leave that case enabled.
HIP-RT is also enabled by default, so it's not as bad.

Pull Request: https://projects.blender.org/blender/blender/pulls/160110
2026-06-23 12:33:04 +02:00
Brecht Van Lommel
8696c6d226 Tests: Share reference renders between Storm Hydra and USD
Use the mechanism where there is one reference directory, and an override
directory for the cases that are known to be different.

The override is kept only where the committed USD reference and Hydra
reference differ beyond the test threshold; otherwise the Hydra render
is redundant and shares the USD reference. This helps work towards
making them match, and reduces the repository checkout size.

Pull Request: https://projects.blender.org/blender/blender/pulls/160433
2026-06-23 12:33:03 +02:00
phantomsoldierking
c3be8ecb22 UI: Add UI tests for Searching
UI simulation tests covering search/filter functionality (Ctrl + F),
verifies search behavior in the following editors:

- Properties Editor: Tests modifier search (Subdivision Surface)
- Outliner: Tests object filtering using object name search
- Dope Sheet: Tests F-Curve name filtering (location)
- Graph Editor: Tests animation curve search/filter behavior
- File Browser: Creates a temporary directory during runtime and Tests filename filtering through search.

Added dedicated test blend file: `tests/files/ui_tests/test_search_in_editors.blend`
`__search_test_cube__` a mesh object with Subdivision Surface modifier

Pull Request: https://projects.blender.org/blender/blender/pulls/159720
2026-06-22 12:19:03 +02:00
Campbell Barton
40933da68c Merge branch 'blender-v5.2-release' 2026-06-19 10:39:00 +10:00
Campbell Barton
601f4361d6 Fix #160029: Crash adding UV layer after converting attributes
Regression in [0] meant converting the active UV map to a vertex
group then adding a new UV map caused an out-of-bounds read
in AttributeStorage::lookup.

Vertex groups share the attribute namespace,
so an attribute can't be added with a name that matches a vertex group.
BKE_attribute_calc_unique_name didn't account for this,
so the name generated for the new UV map collided with the vertex group,
the attribute was never added,
and ED_mesh_uv_add returned a stale index.

Prevent collisions with vertex group names in
BKE_attribute_calc_unique_name.

Also convert attributes using BKE_attribute_remove instead of the
raw accessor, so the active UV map and color attribute stay valid
(matching the remove operator).

Ref !160314

[0]: 8adba33029
2026-06-19 10:23:19 +10:00
Kévin Dietrich
f2a1c2848a Alembic: import and export of subdivision parameters
This adds support to import and to export subdivision parameters from
subsurface modifiers in Alembic.

As Alembic is using the OpenSubDiv 2.0 API to define the parameters, we
need to convert to and from the OpenSubDiv 3.0 API which Blender uses.
Since Alembic does not define proper enumerations for these values,
this adds relevant enumerations whose names derive from the USD Alembic
exporter to avoid using magic values.

On top of that we also export and import the subdivision levels for
viewport and render so those values get preserved when reimporting in
Blender.

For import, this also automatically adds a subdivision surface modifier
to subdivision meshes.

Pull Request: https://projects.blender.org/blender/blender/pulls/160260
2026-06-18 15:30:25 +02:00
Jesse Yurkovich
5ab643bb46 USD: Add support for matrix attributes
Support import/export of Matrix4d primvar attribute values.

The changes to io_report.py are currently unused but were implemented
for completeness.

Note: The double-precision 64-bit values from USD are converted to float
32-bit on import.

Pull Request: https://projects.blender.org/blender/blender/pulls/160182
2026-06-17 21:14:10 +02:00
Kévin Dietrich
ad5b8b7b1b Merge branch 'blender-v5.2-release' 2026-06-16 20:34:09 +02:00
Clément Foucault
ec92178a69 Fix #160084: EEVEE: Wrong Gbuffer packing with colored refraction
The heuristic for colorless reflections detection
was not taking into account the Multiscatter GGX case.
In this configuration, the `Favg` is tinting the reflectance
which results in colored reflections. The Gbuffer packing needs
to be notified to account for that.
See `GPU_MATFLAG_REFLECTION_MAYBE_COLORED`.

Also unblock Principled BSDF transmission test.
It was previously disabled because of a shadow
issue that was recently solved. Moreover it tests for this
specific case.

Pull Request: https://projects.blender.org/blender/blender/pulls/160232
2026-06-16 18:12:45 +02:00
Brecht Van Lommel
4adac77a97 Merge branch 'blender-v5.2-release' 2026-06-16 13:52:24 +02:00
Jeroen Bakker
0b7a4b32c8 Tests: Disable Workbench/EEVEE on AMD official drivers
Also disabling it on windows builders. In the future we will enable
them after the planned reconfiguration of the buildbot workers.

Pull Request: https://projects.blender.org/blender/blender/pulls/160215
2026-06-16 13:36:51 +02:00
Aras Pranckevicius
01ff4fb425 Merge branch 'blender-v5.2-release'
# Conflicts:
#	source/blender/sequencer/intern/utils.cc
2026-06-16 11:04:43 +03:00
Aras Pranckevicius
b044c81644 Fix #160144: VSE unique strip names get formatted incorrectly in some cases
When strip names were colliding, and the name already had "." in there,
everything after it was stripped and replaced with a number. This does
not follow the behavior of other parts of blender; treat
it as "this is a numeric suffix" if it actually contains a number only.

Pull Request: https://projects.blender.org/blender/blender/pulls/160155
2026-06-16 10:00:24 +02:00
Jeroen Bakker
97a2b406af Tests: Disable Workbench/EEVEE tests on AMD/Linux
Platform can get unstable. The artifacts that were detected seemed
like invalid synchronization of index buffers, or incorrect execution
of vertex buffers. This could be related to the combination of AMD
official drivers and Rocky8. More investigation is needed, but for
now we just disable these tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/160204
2026-06-16 09:34:41 +02:00
Ray Molenkamp
8289e35daa Merge remote-tracking branch 'origin/blender-v5.2-release' 2026-06-15 12:24:57 -06:00
Ray Molenkamp
72f8c89b77 Core: add --console-crash-handler flag
Initially noted by devops as a problem: UI tests when crashing
spawn our crash dialog, that will just sit there for 1200 seconds
until the CI environment decides the test has failed and kills the
process, clicking away the dialog also works, but neither option is
ideal here.

The crash handler knows when we are in background mode, (`-B`) and
suppresses this dialog so this is why it has not been an issue for the
normal tests. However when we do crash we get an unhelpful message
saying `Writing: blender.crash.txt` which is not collected by buildbot
so unless a developer can get a devops person to go retrieve this file
its contents will be left to ones imagination.

This PR adds a `--console-crash-handler` argument that does two things:

1 - Suppress the crash dialog even when we are not in background mode
2 - Rather than writing the crash data to blender.crash.txt write this
information to stderr so it shows up in the CI logs.

It also updates all invocations of blender I could find in our test
scripts to pass this new flag. The benchmark scripts have not been
updated as they regularly run against older blender versions that may
not support the new flag.

Pull Request: https://projects.blender.org/blender/blender/pulls/159983
2026-06-15 20:23:29 +02:00
Jeroen Bakker
e8b2855a5e Merge branch 'blender-v5.2-release' 2026-06-15 07:53:09 +02:00
Jeroen Bakker
e13012872f Tests: Enable vulkan render tests
Enabling all render tests that are not failing on the build bot for 5.2

Pull Request: https://projects.blender.org/blender/blender/pulls/159966
2026-06-15 07:52:07 +02:00
Marc Bourny
46d0a7ccd4 USD: Export normals based on Blender internal data model
Most game engines use and store normal data per-point. Blender's default
USD export always converts them to face-varying/corner. This PR exports
normals following Blender internal data model (point, corner or face),
thus making import in engines more straightforward for meshes that
already use per-point normals without additional conversion steps.

USD export tests have also been updated to reflect this change.

Pull Request: https://projects.blender.org/blender/blender/pulls/159858
2026-06-12 22:22:14 +02:00
Clément Foucault
063e43c047 Merge branch 'blender-v5.2-release' 2026-06-11 15:42:56 +02:00
Clément Foucault
bdfbad66e1 EEVEE: Update threshold for passing tests on older AMD GPU 2026-06-11 15:41:50 +02:00
Christoph Neuhauser
fc8445c991 Fix #159634: EEVEE: Increase screen space ray bias
EEVEE screen space ray tracing uses a bias of `-2.4e-7f * 2.0f` to avoid
self-intersections. This bias is increased to `-2.4e-7f * 7.0f` in order
to work around self-intersections present on Intel GPUs on Windows.

Pull Request: https://projects.blender.org/blender/blender/pulls/159953
2026-06-11 14:08:39 +02:00
Jeroen Bakker
3afd23474a Merge branch 'blender-v5.2-release' 2026-06-11 13:03:33 +02:00
Jeroen Bakker
6063b2f8f3 Fix: Block implicit_volume.blend for Win/AMD/Vulkan
This test raises a driver error on many setups. This has been reported
to AMD. This PR blocks the test on the failing platforms.

See #159880 for details.

Pull Request: https://projects.blender.org/blender/blender/pulls/159949
2026-06-11 12:51:20 +02:00
Kévin Dietrich
59d1f47499 Merge branch 'blender-v5.2-release' 2026-06-10 18:32:17 +02:00
Kévin Dietrich
e3368f4c73 Fix: missing property animation for Alembic cameras
The RNA path for the properties relating to depth of field on steroscopy
were wrong, so the FCurves for those properties were silently ignored.

To fix this the ENUMERATE_CAMERA_PROPERTIES macro is extended with a
`short_name` used for creating members and variables, and the `rna_name`
is replaced by a proper `rna_path`. The test file is also updated to
include tests for all properties which should have been done from the
get-go.

Pull Request: https://projects.blender.org/blender/blender/pulls/159812
2026-06-10 18:31:35 +02:00
Sean Kim
010b904e5a Weight Paint: Update default settings and bundled assets
This PR makes a number of changes to the bundled essential brush assets
for Weight Paint, along with a number of other mode / default changes
to improve the experience for beginners.

### Brush Changes

* The default brush is now the "Add Weight" brush, which uses the "Add"
  blend mode, accumulation, and a low strength.
* The existing "Paint" brush is renamed to "Set Weight" and now has a
  Constant falloff curve. This brush also has a new icon to distinguish
  it from the "Add Weight" brush.
* The "Blur" brush has been changed to use accumulation with a low
  strength.
* For all brushes, the stroke spacing has been changed to 5% to feel
  more responsive.
* For all brushes which formerly used a Custom falloff curve that
  approximated a smoothstep function, the built-in "Smooth" curve is
  now used.

### Mode Changes
* Multi-Paint defaults to enabled
* Auto-Normalize defaults to enabled
* Mirror Vertex Groups defaults to enabled

Along with the above, the asset shelf is now shown by default in Weight
Paint mode, as there are now more brushes than tools in the toolbar.

Only the default startup files will use these new options, for existing
files, if the old "Paint" brush was active, the new "Add Weight" brush
will be active upon loading.

See #149470 for further context.

Asset PR: blender/blender-assets!67

Pull Request: https://projects.blender.org/blender/blender/pulls/158671
2026-06-05 23:34:27 +02:00
Clément Foucault
528483c68d EEVEE: Add shading_offset to the test blocklist on intel
This is to mitigate the test failure we are
currently having after updating the testing
infra.

Rel #159634
2026-06-05 15:31:15 +02:00
Brecht Van Lommel
5c06bf4361 Fix #159340: Cycles hair not following deforming mesh in viewport
Introduced in e9c36249f7, missing update tags that caused the BVH to
not be rebuilt. Remove dedicated booleans on Geometry so they can not be
out of sync with the attribute modified boolean.

Pull Request: https://projects.blender.org/blender/blender/pulls/159540
2026-06-04 23:42:16 +02:00
Brecht Van Lommel
016b624065 Tests: Blocklist Cycles interactive render + AMD + Windows
This is timing out, and no solution has been found yet. It might require
a bigger rewrite to avoid a dedicated context entirely.

Ref #155536

Pull Request: https://projects.blender.org/blender/blender/pulls/159500
2026-06-03 15:51:49 +02:00
Howard Trickey
c53b03f46a Geometry Nodes: Bevel Node
This is for a Bevel Geometry node.  The code is a kind of port of the BMesh bevel code in bmesh_bevel.cc, but it needs substantial changes to use Mesh data structures instead of BMesh ones. And therefore, it needs to deal with the fact the the Mesh is not efficiently mutable. The approach is to make an "ExtendibleMesh" that holds data about the original Mesh but also deltas to that mesh to be applied at new Mesh construction time.  Many other changes in the code were needed to use ints for Vert, Edge, Face, and Corner instead of pointers to BMesh elements.

In designing the Geometry Node, we made some decisions about some changes to the interface as compared to the BMesh interface to bevel.  These were discussed in issue #98674. Some of the bigger decisions:

- Offsets are given per edge (4 of them, one for each side of each end) or per vertex (only the first slot is used) depending on whether we are edge beveling or vertex beveling. There is no "offset kind" spec -- you can achieve kinds other than "offset" by calculating outside the node.
- Miters are both simplfied and expanded. There is a boolean per corner called "miter". If it is true, and the given corner is just past a beveled edge, then the gap between that beveled edge and the next will be mitered. It will be in "patch" miter if the angle is reflect and an "arc" miter otherwise.
- So far there is no "clamp" and "loop slide" option.  I remain undecided about what to do here. The eventual hope is that "clamp" will go away because I will use a "straight skeleton" algorithm to "eat away" geometry when it starts to overlap.  But this won't happen in time for the intitial release.  For now, I may implement clamp as "always on", but this isn't yet implemented. Loop slide can be done by calculation of offsets outside the node, but this could be tedious.  I may or may not decide to implement loop slide inside the node; if I do, maybe it will be "always on" -- not sure.
- There is an "effect Faces" option in the UI but it isn't hooked up to anything yet. I'll probably disable that for the first release.  Eventually I want to have it, as kind of inset operator.
- There is a "profile" input, meant to take a curve, that will be used for custom profiles, but that is not hooked up to anything yet.
- There are output fields, not yet hooked up, which will give selections of various parts of the new beveled mesh, to be used for things like special materials or normal handling. (As a consequence, there will be no hardening code native to this node.)

The state of the code as of this initial WIP is that many things work (with the exceptions noted above re clamping and loop slide and custom profiles).  There are about 70 regression tests, ported from the bevel_operator.py tests (with more UV maps). They all "pass" right now but that's just because I made the expected_object match the current code output. I still have to go through them carefully one-by-one to see that they match the current BMesh behavior.

I added reviewers but this isn't really in a state to review yet, unless you are interested.
One thing I intend to do: update all the "old-style" math functions (that use raw float arrays) to "new-style" math functions.

This code was heavily assisted using Claude Sonnet 4.6 in Antigravity. But I have carefully read the output and will continue to do so, and will stand by the code as if it were totally my own (and, since I wrote the original BMesh code, it is in that sense mostly mine anyway).

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/158151
2026-06-03 01:04:22 +02:00
Sean Kim
615bd0750d Tests: Add multires reshape and delete higher tests
Pull Request: https://projects.blender.org/blender/blender/pulls/159453
2026-06-02 23:48:59 +02:00
Brecht Van Lommel
a1422f306e Python API: Extend bpy.data.file_path_foreach for UDIMs, sequences, tx files
Add three new flags to bpy.data.file_path_foreach so render farms and
other scripts can find all relevant files for the Cycles texture cache.

- EXPAND_TOKENS: visit each UDIM tile path.
- EXPAND_SEQUENCES: visit each image and volume sequence file path.
- EXPAND_CACHES: visit cache files, like texture cache files
   associated with images.

The previously reserved metadata field is now provided to callers,
with is_expanded and is_cache booleans to indicate the file kind.
Also is_readonly indicates if the path can be edited.

Ref #158964

Pull Request: https://projects.blender.org/blender/blender/pulls/159159
2026-06-02 20:14:21 +02:00
Christoph Lendenfeld
d00c0d81e0 Anim: Pose Slide operators for objects
This implements the pose slide operators for objects.
It extends the `AnimTransformable` API to support objects,
which makes most of the pose slide code work right away.

The auto keying code had to be adjusted because it used
the "Whole Character" keying set which doesn't work for
objects.

Discussed in an animation & rigging module meeting [1]

Part of #156579

[1] https://devtalk.blender.org/t/2026-05-28-animation-rigging-module-meeting/45331#p-162762-ongoing-work-5

Pull Request: https://projects.blender.org/blender/blender/pulls/158906
2026-06-02 10:34:38 +02:00