Commit Graph

2341 Commits

Author SHA1 Message Date
Lukas Tönne
443ced685e Merge branch 'blender-v5.0-release' 2025-10-16 12:15:44 +02:00
Christoph Neuhauser
91e83d94c5 Fix: Tests: Pass noise dependent EEVEE render tests on Intel GPUs
This PR slightly raises the accepted noise level for the following EEVEE
tests that were likely incorrectly marked as failed on Intel GPUs:
- render_layer: aov_transparency
- light: triangle_light_sampling
- bsdf: metallic_thinfilm_physical, metallic_thinfilm_f82
- principled_bsdf: principled_bsdf_transmission
2025-10-16 10:39:24 +02:00
Sean Kim
59746fde64 Merge branch 'blender-v5.0-release' 2025-10-15 19:32:24 -07:00
Sean Kim
e059c75ef5 Tests: Add delay for UI multi window tests on Windows
Similar to #146143, the `view3d_edit_mode_multi_window` currently fails
on the Windows build bot. This commit extends the platforms that
require an extra delay to avoid failures.

Pull Request: https://projects.blender.org/blender/blender/pulls/148078
2025-10-16 04:30:56 +02:00
Sergey Sharybin
5ee406a743 Merge branch 'blender-v5.0-release' 2025-10-15 17:13:54 +02:00
Sergey Sharybin
969214cba8 Tests: Blocklist known failures for Cycles render tests
This change marks hair_linear_close_up.blend is blocked for Metal-RT.
Linear curves parameterization is different, see #146072

Pull Request: https://projects.blender.org/blender/blender/pulls/148119
2025-10-15 17:13:16 +02:00
Jesse Yurkovich
024f396d06 Cleanup: Fix typos in tests subdirectory
Fixes various typos

Co-authored-by: luz paz
Pull Request: https://projects.blender.org/blender/blender/pulls/148090
2025-10-14 22:35:54 +02:00
Hans Goudey
52e169b59c Merge branch 'blender-v5.0-release' 2025-10-14 14:51:41 -04:00
Hans Goudey
8be01c2ce0 Fix #147270: Smooth by angle asset detection broken
Previous attempts:
- 6d884e0da5
- 80e8493c11

It seems `BLI_path_normalize` was doing more than necessary and that
was getting in the way. This PR adds an automated test to avoid the issue
in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/148069
2025-10-14 20:50:36 +02:00
Hans Goudey
667054a2eb Merge branch 'blender-v5.0-release' 2025-10-14 10:54:08 -04:00
Hans Goudey
5cf0076d7e Fix #148050: Mesh join crash with no faces in inputs
Pull Request: https://projects.blender.org/blender/blender/pulls/148066
2025-10-14 16:53:31 +02:00
Falk David
8543083656 Merge branch 'blender-v5.0-release' 2025-10-14 10:53:20 +02:00
Nathan Vegdahl
c93d94d2e1 Anim: Add Python unit tests for vertex group Normalize All operator
Follow-up to #147272. These tests are not exhaustive, but protect
against regression of bug #147009.

Pull Request: https://projects.blender.org/blender/blender/pulls/147422
2025-10-14 05:10:13 +02:00
Weizhen Huang
b4cd23d0fe Merge branch 'blender-v5.0-release' 2025-10-13 12:15:33 +02:00
Sybren A. Stüvel
07ccb021d2 Armature: Elongate tiny bones instead of deleting them
Blender cannot handle bones with (near) zero length. Prior to this
commit such bones were deleted when exiting Armature Edit mode. Now
they are kept and elongated so that they are numerically stable (or at
least they should be, given the threshold to the length that was
already in place).

To avoid the elongation from impacting the position of child bones,
they are disconnected from the tiny bone.

Apart from that it's quite nice for users that Blender no longer
silently deletes bones, this is also useful for the USD importer, as
it can import bones and expect them to exist afterwards (see
#147048).

Note: this only impacts armatures with bones of length ≤ 0.000001
units.

Pull Request: https://projects.blender.org/blender/blender/pulls/147814
2025-10-13 12:12:25 +02:00
Campbell Barton
3349b97987 Core: add --no-window-frame command line option
Add a command line option to load Blender without a window frame.

Currently this is only used on Wayland, enabled for WITH_UI_TESTS since
attempting to load LIBDECOR caused the tests to crash on start on Fedora.
For tests there is no need to use LIBDECOR, so disable the window frame.
This can also be used by users who don't want to use the X11 fallback if
LIBDECOR can't be found.

Ref !147716
2025-10-13 09:47:07 +00:00
Campbell Barton
9cfa925916 Merge branch 'blender-v5.0-release' 2025-10-13 20:37:56 +11:00
Campbell Barton
1216651ca9 PyAPI: make internal modules explicitly "private"
Rename modules in `./scripts/modules/` to use an underscore prefix to
make it clear they aren't intended to be part of public API's. This
also means there is no implication that these modules should be stable,
allowing us to change them based on Blender's internal usage.

The following modules have been marked as private:

- `animsys_refactor`
- `bl_console_utils`
- `bl_i18n_utils`
- `bl_previews_utils`
- `bl_rna_utils`
- `bl_text_utils`
- `bl_ui_utils`
- `bpy_restrict_state`
- `console_python`
- `console_shell`
- `graphviz_export`
- `keyingsets_utils`
- `rna_info`
- `rna_manual_reference`
- `rna_xml`

Note that we could further re-arrange these modules
(under `_bpy_internal` in some cases), this change is mainly to mark
them as private, further changes can be handed on a case-by-case basis.

Ref !147773
2025-10-13 09:35:09 +00:00
Lukas Stockner
6428723a85 Merge branch 'blender-v5.0-release' 2025-10-13 01:20:36 +02:00
Lukas Stockner
ebbc034e44 Fix tests following OSL camera fix 2025-10-13 01:17:16 +02:00
Hans Goudey
ba1779c58f Merge branch 'blender-v5.0-release' 2025-10-09 13:30:12 -04:00
илья _
bfb0d2ad20 Fix #144846: Mesh triangulation can generate duplicate faces and edges
Mesh invariants imply that edges and faces must be unique, so things
like reversed edges or duplicate faces with equal vertices are invalid.
For this reason, every time we generate new elements we have to ensure
that all new elements are unique between each other and already existing
elements. The recent refactor (ea875f6f32) introduced a new
algorithm to generate new mesh elements, and deduplication of new
elements was also a part of it. The problem is that the deduplication
only guaranteed that the original elements and new elements don't
overlap; deduplication between each new elements is not complete.

To solve the problem both new triangles and new edges have to be
deduplicated, even if there is no duplicates. Just to know this we have
to build a hash sets.

Triangle deduplication is a special part of the triangulation code,
but edges already handled elsewhere in the code base.

This refactor fixes this by replacing the original approach with one
which guarantees distinct faces and edges in the result.

Unfortunately, this fix increases runtime of the node 10x for a simple
cube with 500-vertex sides. It should be possible to make the
performance better again, but that requires more work.

Other work had to be done to enable this, so this depends on:
- [x] 157e7e0351
- [x] fa8574b80b

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/147634
2025-10-09 19:29:18 +02:00
Aras Pranckevicius
f2f4434f75 Merge branch 'blender-v5.0-release' 2025-10-09 19:38:02 +03:00
Aras Pranckevicius
1973bad86c Fix #147636: VSE compositor modifier output translation has no effect
The final image produced by the compositor can have domain translation
on it (e.g. caused by a Translate or Transform node). Similar to how
the regular compositor viewer node remembers the output domain
translation, do the same in the compositor modifier.

Bubble back that translation up to VSE rendering code, where it is
then added to regular strip transform.

In order to make this "bubble up" part easier, refactored modifiers
so that instead of soup of parameters they all get a struct
ModifierApplyContext with all the relevant data.

Added a new VSE render test that covers various compositor
transformation nodes (translate, rotate, transform, corner pin).

Pull Request: https://projects.blender.org/blender/blender/pulls/147695
2025-10-09 18:36:44 +02:00
Ray Molenkamp
7ec48a6ed1 Benchmark: allow exclusion filters using !
This allows exclusions to be set in the `tests` filter for the
benchmarks using the exclamation mark. Exclusions apply *after*
inclusions ie:

tests = ['*', '!victor', '!koro']

would select all available tests then specifically exclude victor
and koro, while:

tests = ['!victor']

would just exclude victor, since nothing is marked for inclusion
no tests will be run.

tests = ['!victor','bmw27,'victor']

would exclude victor, but include bmw27 and victor but as victor was
marked for exclusion only bmw27 will be ran.

Requested by bart in #146019

Pull Request: https://projects.blender.org/blender/blender/pulls/147588
2025-10-09 10:46:25 +02:00
Hans Goudey
397e28923b Merge branch 'blender-v5.0-release' 2025-10-08 13:27:08 -04:00
Hans Goudey
dd75c0b5ec Fix #147429: Set Resolution node doesn't use default for unselected curves
The fix in this case is to properly use the stored builtin attribute defaults
when capturing the field on the mesh. I extracted that to a function so
the code would read better with early returns.

Pull Request: https://projects.blender.org/blender/blender/pulls/147646
2025-10-08 19:26:12 +02:00
Miguel Pozo
8cdcb6ba54 Merge branch 'blender-v5.0-release' 2025-10-08 16:39:47 +02:00
Miguel Pozo
71f4277467 GPU: Codegen: Native support for repeat zones
Support loops at the GLSL level instead of relying on
NOD_shader_nodes_inline.
This improves compilation and runtime performance, avoids causing
recompilations on iteration count changes, and allows supporting
dynamic iteration counts.

(EEVEE-only)

Pull Request: https://projects.blender.org/blender/blender/pulls/145269
2025-10-08 16:38:14 +02:00
Hans Goudey
3a82ac0a33 Mesh: Use attribute API in merge by distance code
Split the result mesh generation to work into two loops. The first loop
builds topology maps used for propagating attribute values, and the next
loop mixes attribute values with those maps. This has a few benefits:
The propagation can be done in parallel, and the topology mapping code
can get simpler. Also, we reduce the overhead that comes with iterating
over all attributes for every single element. Overall I didn't measure
a large performance difference though, because the new code has the
downside of needing to allocate two more arrays.

There is a small difference of a propagated byte color (250 vs. 251) in
the geometry nodes test due to a subtle difference in the mixing
implementation.

Part of #122398.

Pull Request: https://projects.blender.org/blender/blender/pulls/147367
2025-10-08 16:37:07 +02:00
Clément Foucault
ab4c245a7e Fix: EEVEE: Lightprobe Volume backfacing toggle is inverted
The UI property was changed 7b97bc48d8
to a negative boolean but the boolean conversion inside EEVEE was
not inverted.

This mean that since 4.2, the default behavior for Lightprobe
volume has been broken / inverted.

To make an existing scene bake the same as before, all material
needs to have their `BackFace Culling > Light Probe Volume` options
inverted. This is done automatically through the versioning code.

The only test cases broken are the ones using default materials which
do not have their property turned off.

Release Notes should contains the compatibility breakage.

Pull Request: https://projects.blender.org/blender/blender/pulls/147218
2025-10-08 14:55:14 +02:00
Jesse Yurkovich
60325c7a9c Fix #147465: Distribute Points in Volume node has inaccurate offset
Account for recent changes in how volumes are offset from
blender/blender@12f0bc7736

Pull Request: https://projects.blender.org/blender/blender/pulls/147495
2025-10-07 20:38:23 +02:00
Christoph Lendenfeld
a09d0cfd8c Anim: Move pose bone selection state to bPoseChannel
Move the selection flag for pose bones, from the (edit)bone to the
pose bone.

Previously having multiple instances of armatures in pose mode at the
same time caused issues because selecting a pose bone on one armature
would automatically select it on all instances of it.

This is now fixed since the selection state is stored on the pose bone
(Object level) Doing so breaks API compatibility with 4.5 since the
RNA property on the Bone no longer affects the pose bone. Instead,
there is a new property on the pose bone for that.

Due to this change, some runtime flags for the transform system also
had to be moved to the pose bone. This is due to the fact that these
flags are used by the transform system to pass information between
functions. If we keep the flag at the bone level, this wouldn't work
with armature instances. See `bPoseChannelRuntimeFlag`

Fixes #117892

Pull Request: https://projects.blender.org/blender/blender/pulls/146102
2025-10-07 19:59:36 +02:00
Omar Emara
a113121562 Compositor: Perform LGG Color Balance in linear space
This patch adjusts the LGG Color Balance mode to operate in linear space
as opposed to sRGB space, which is more inline with other software and
is more expected to the user.

Versioning was added using pre and post gamma correction, but it is
very slightly different in the blacks because the gamma node only does
power correction.

Pull Request: https://projects.blender.org/blender/blender/pulls/147533
2025-10-07 17:04:34 +02:00
Brady Johnston
56bb70fee8 Geometry Nodes: Advect Grid node
Given a grid of velocities, this node advects the values of the input
grid. Different options for integration scheme and clamping are
exposed. Currently their names are just as defined in OpenVDB.

Pull Request: https://projects.blender.org/blender/blender/pulls/147273
2025-10-07 16:19:19 +02:00
Cartesian Caramel
8f41d46d74 Constraint: Geometry Attribute
Add a new constraint called "Geometry Attribute", which directly
samples vector, quaternion, or 4x4 matrix attributes from geometry and
applies these to an object's or bone's transform.

This can be used to transfer data generated by geometry nodes to the
object or bone level. By default the constraint will sample a vector
on the vertex domain. The default attribute is `position` for
simplicity, but the attribute value does not have to have anything to
do with neither the transform of the geometry object nor the geometry
itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/136477
2025-10-07 15:14:22 +02:00
Aras Pranckevicius
8a74f7c0b0 VSE: Execute modifiers in strip-local space (#145688)
Currently when a strip has a transform that does not fill the whole
render area, first the image of the strip is transformed, and then
any modifiers are applied on that. This is mostly in the new
Compositor modifier, where procedural textures, gradients, image
coordinates "stick to the screen" instead of following the transformed
strip.

This changes the behavior so that first the modifiers are applied
to the strip image, and then the strip is transformed. This is
potentially a visually breaking change:
- This can alter visual look of existing strip, especially if they are
  scaled. Previous behavior was first scale filtering, then modifier;
  now it is first modifier, then scale filtering.
- Most obvious change is Compositor modifier (which is new in 5.0).
- Compositor modifier can actually expand the input image (e.g. Blur
  node with "expand bounds" option set), and that works.
- Note that Masks continue to be applied in global/screen space. There
  can be small look differences with rotated/scaled strips that use
  masks, due to Mask application now needing to do filtered mask image
  lookups.
- If anyone needs previous behavior (modifier is applied on the
  "whole screen"), they can put transformed strip into a meta strip,
  and apply the modifier on the meta strip itself.

Compositor modifier examples with images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/146181
2025-10-07 13:51:41 +02:00
Jesse Yurkovich
780c6ad024 Tests: Alembic: Add coverage for point cloud attribute import validation
Adds coverage for recently added import of pointcloud attributes.
See PR blender/blender!145946

Pull Request: https://projects.blender.org/blender/blender/pulls/147494
2025-10-07 05:46:34 +02:00
Jesse Yurkovich
fd3f8c1265 Tests: add PointCloud datablock to IO report
Adds support for comparing PointCloud datablocks inside the IO report.

Pull Request: https://projects.blender.org/blender/blender/pulls/147490
2025-10-07 05:13:43 +02:00
Campbell Barton
62d72bd0b5 UV: initial implementation of UV sync select
Support sync selection in the UV editor, with face-corner selection,
so it's possible to select individual UV vertices/edges in the UV editor
without UV's attached to the same underlying edge also becoming selected.

There is limited support for maintaining the UV selection when selecting
from the 3D viewport, common operations such as picking &
box/circle/lasso select support this, however other selection operations
such as "Select Random" or "Select Similar" will clear this data,
causing all UV's connected to selected mesh elements to become selected.
We may add support for additional operators as needed.

Details:

- UV Sync Selection is now enabled by default.
- In edit-mode the UV selection is stored in BMLoop/BMFace which are
  written to custom-data layers when converted to a Mesh.
- To avoid unnecessary overhead - this data is created on demand.
  Operators may clear this data - selecting all or none do so,
  as there is no reason to store this data for a uniform selection.
- The Python API includes functions to synchronize the selection to/from
  UV's as well as flushing based on the mode.
- Python scripts that manipulate the selection will either need to clear
  this synchronized state or maintain it.

See:
- Design task: #78393.
- Implementation task: #131642.

Ref !138197
2025-10-07 01:41:16 +00:00
Brady Johnston
438b8c303e Geometry Nodes: SDF Grid filtering nodes
This PR gives access to OpenVDB's level set filtering operations
through individual **SDF Grid** nodes.

- **Mean Curvature**: Smoothens high curvature areas more than flatter
  ones.
- **Laplacian**: Approximates mean curvature flow for true SDFs at lower
  computational cost.
- **Median**: Reduces noise while preserving sharp features.
- **Mean**: Fast separable averaging filter for general-purpose
  smoothing with linear computational complexity.
- **Offset**: Uniform dilation/erosion operation that shifts the SDF
  surface by a world-space distance.
- **Fillet**: Rounds off concave internal corners by operating only on
  regions with negative principal curvature.

Pull Request: https://projects.blender.org/blender/blender/pulls/147224
2025-10-06 17:54:25 +02:00
Sybren A. Stüvel
d33a6a1723 Python: add function for file iteration/remapping bpy.data.file_path_foreach()
Add a function `bpy.data.file_path_foreach()` with a callback function
`visit_path_fn`:

```py
def visit_path_fn(
    owner_id: bpy.types.ID,
    file_path: str,
    _meta: typing.Any,
) -> str | None:
    return file_path.replace('xxx', 'yyy') or None

bpy.data.file_path_foreach(
    visit_path_fn,
    *,
    subset=None,
    visit_types=None,
    flags={},
)
```

When the function returns `None`, nothing happens. When it returns a
string, the reported file path is replaced with the returned string.

`subset` and `visit_types` have the same meaning as `subset` resp.
`key_types` in `bpy.data.file_path_map()`. Since the latter parameter
doesn't affect keys in a map, but rather the visited ID types, I named
it `visit_types` instead.

`flags` wraps most of `eBPathForeachFlag` as `set[str]`, with their
prefixes removed. `BKE_BPATH_FOREACH_PATH_RESOLVE_TOKEN` becomes
`RESOLVE_TOKEN`, etc. `BKE_BPATH_FOREACH_PATH_ABSOLUTE` is excluded,
as it only affects a field in the C++ callback structure that is not
passed to Python at all. If it turns out to be useful at some point,
we can always add it.

`_meta` is for future use, and is intended to give metadata of the
path (like whether it's an input or an output path, a single file or
the first file in a sequence, supports variables, etc.). By adding
this to the API now, we avoid a breaking change when this feature is
actually implemented.

Design task: #145734

Pull Request: https://projects.blender.org/blender/blender/pulls/146261
2025-10-06 17:10:49 +02:00
Omar Emara
d9d8f8e777 Fix #147284: Dilate threshold test fails on Qualcomm GPU
The dilate threshold test fails on Qualcomm GPU due to an unknown
reason, but the tests shows significant differences in all platforms
regardless, they are just small enough to pass the test threshold. The
difference is most likely the new SMAA implementation done to match the
GPU version, so updating the reference is reasonable here.

Pull Request: https://projects.blender.org/blender/blender/pulls/147451
2025-10-06 15:26:54 +02:00
Omar Emara
488efb8ca9 Fix #147289: Keying Screen node test succeed with bad result
The result of the Keying Screen node tests is very different yet the
test succeeds, that's because the test result has a very small number of
pixels compared to the final image. To fix this, we match the size of
the result with the render size.

This also updated the test reference which should have been updated
after the new RBF interpolation implementation of the node.

Pull Request: https://projects.blender.org/blender/blender/pulls/147449
2025-10-06 15:23:03 +02:00
Aras Pranckevicius
4e00b37348 Tests: add more VSE render tests
- Compositor modifier
- Modifier that uses Mask ID on a rotated strip

Pull Request: https://projects.blender.org/blender/blender/pulls/147441
2025-10-06 13:44:13 +02:00
Miguel Pozo
ce29226a6c Shader Nodes: Default to 0 iterations for invalid Repeat Zones
Previously, Repeat Zones with non-static iterations would be fully
disconnected.
With this patch, they behave as if they have 0 iterations.

Co-authored-by: Jacques Lucke

Pull Request: https://projects.blender.org/blender/blender/pulls/147211
2025-10-03 11:49:39 +02:00
Hans Goudey
340f9d7ff3 Refactor: Use separate result for mesh joining, fix multires data join
Instead of modifying the active mesh in place, which means we can't
use the size of its data arrays when copying its data, and its caches
are immediately invalidated, copy data to a separate out-of-main
result mesh first. The only downside is that for a moment during
the operator the shape key array sizes will be out of sync with the
mesh size.

Also the custom data for multires layers wasn't copied properly
after the recent refactor that rewrote this code. Take the opportunity
to fix that too.

The motivation for this change is an improvement to copy different
kinds of custom normals properly to the joined mesh, which never
worked since free custom normals were introduced.

This contains a few changes to the expected results in the tests.
Those are edge cases, and the new results make more sense.
2025-10-03 01:57:49 +02:00
Campbell Barton
c8302a08e8 PyAPI: match word order from Scene.frame_start/end
For the render operator match word order from Scene.frame_start/end.

Ref !147169
2025-10-02 22:07:06 +00:00
Brady Johnston
4a56973fe7 Geometry Nodes: Set Grid Transform
Explicitly set the transform of a grid.

The new transform can fail to be applied if the input transform isn't
invertible or for some extremes of scaling (0 or combinations of
negative and positive) and numerical errors with `openvdb`. If a
transform is not applied an error is raised and the `Is Valid`
returns false.

Pull Request: https://projects.blender.org/blender/blender/pulls/146824
2025-10-02 19:12:39 +02:00
Thomas Dinges
66224d69b0 Deps: Library changes for Blender 5.0
This commit includes the changes to the build system, updated hashes to the actual new libraries as well as a required test update.

* DPC++ 6.2.0 RC
* freetype 2.13.3
* HIP 6.4.5010
* IGC 2.16.0
* ISPC 1.28.0
* libharu  2.4.5
* libpng 1.6.50
* libvpx 1.15.2
* libxml2 2.14.5
* LLVM 20.1.8
* Manifold 3.2.1
* MaterialX 1.39.3
* OpenColorIO 2.4.2
* openexr 3.3.5
* OpenImageIO 3.0.9.1
* openjpeg 2.5.3
* OpenShadingLanguage 1.14.7.0
* openssl 3.5.2
* Python 3.11.13
* Rubber Band 4.0.0
* ShaderC 2025.3
* sqlite 3.50.4
* USD 25.08
* Wayland 1.24.0

Ref #138940

Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Co-authored-by: Kace <lakacey03@gmail.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>

Pull Request: https://projects.blender.org/blender/blender/pulls/144479
2025-10-02 18:34:11 +02:00