Commit graph

1902 commits

Author SHA1 Message Date
Miguel Pozo
a67ba0c309 Build: Force disable Overlay tests
We need to enable WITH_GPU_RENDER_TESTS_HEADED on the builder for the
Overlay tests (#154533).
However, since an early version of the tests is already on main/release
(without reference images), simply enabling the flag on the builder
would cause `+test_gpu_draw` to fail.

So the plan of action is:
1. Merge this PR into 5.1 and main (and LTS branches?).
2. Enable the `WITH_GPU_RENDER_TESTS_HEADED` flag on the builder.
   (https://projects.blender.org/infrastructure/builder/pulls/23)
3. Revert this commit in #154533 and merge it only into main.

Pull Request: https://projects.blender.org/blender/blender/pulls/154885
2026-02-26 17:34:33 +01:00
Miguel Pozo
0ec4fd4d02 Render Tests: Show max error and number of pixels over threshold
Retrieve the oiiotool stats and show them on the HTML report.

Pull Request: https://projects.blender.org/blender/blender/pulls/154769
2026-02-26 15:34:40 +01:00
Campbell Barton
4b0a35887b Cleanup: resolve license warnings (make check_licenses) 2026-02-26 14:25:45 +11:00
kunal
9c185de6bd Sculpt: Add primitive tool in Sculpt Mode.
This commit exposes the Add Mesh tools of Object and Edit Mode to
Sculpt Mode.

This functionality only works when Multires or Dyntopo are disabled.

At a high level, the mesh drawn by the gizmo in the 3D viewport is
created as a `BMesh`, converted to a `Mesh`, and then joined to the
existing geometry.

No new functionality or defaults are changed compared to the existing
tools. Further changes are planned for future PRs.

Addresses the first point of #149216

Pull Request: https://projects.blender.org/blender/blender/pulls/152856
2026-02-26 01:06:33 +01:00
Hans Goudey
540c842eb9 Merge branch 'blender-v5.1-release' 2026-02-25 14:49:05 -05:00
Mark van de Ruit
24d6138e16 EEVEE: Add ShaderToRGB+Subsurface test
Adds a simple test to catch some behaviors I fixed in #154819, buggy
interactions between Diffuse/Glossy/ShaderToRGB/Subsurface shaders.

Pull Request: https://projects.blender.org/blender/blender/pulls/154872
2026-02-25 16:29:08 +01:00
Sean Kim
c9ac62fd36 Remesh: Interpolate vertex and corner attributes
This commit changes the behavior of the remesh operator(s) to
interpolate vertex and corner attributes instead of taking the nearest
value.

The behavior is similar to the "Sample Nearest Surface" node in that a
barycentric weight is calculated from the new vertex position which is
then used to interpolate across the underlying original attributes.

Note that this commit exposes and adds a number of utility functions
in `BKE_mesh_sample.hh`.

Corner attributes (such as color) are sampled on the vertex domain (e.g
on each vertex of the resulting mesh before being converted back into
corner attributes.

Resolves #130525

Pull Request: https://projects.blender.org/blender/blender/pulls/154638
2026-02-25 02:36:40 +01:00
Sean Kim
b2334df002 Merge branch 'blender-v5.1-release' 2026-02-24 13:04:46 -08:00
Sean Kim
109721cf00 Fix: Errors in python test helper script
Introduced in 4b7ffbe48c

Pull Request: https://projects.blender.org/blender/blender/pulls/154779
2026-02-24 22:03:20 +01:00
Sean Kim
9f5cd90dbf Fix: Syntax error in test logic
Introduced with f7806ffbf9

Pull Request: https://projects.blender.org/blender/blender/pulls/154778
2026-02-24 22:02:30 +01:00
Christoph Lendenfeld
e1c8abcf49 Merge branch 'blender-v5.1-release' 2026-02-24 14:43:41 +01:00
Alejandro Aguirre
ca0884abb0 Fix: Mesh: Active/default color attribute and UV map not set when created via Python
Caused by 8adba33029.

Since this commit the active/default color and UV were only set in
edit mode. The code path using AttributeStorage did not set them.

Pull Request: https://projects.blender.org/blender/blender/pulls/154775
2026-02-24 13:51:30 +01:00
Lukas Tönne
63fccca32d Fix #152602: Avoid type conversion when making node groups
Making node groups uses the first internal socket type for an input,
which is shared with all the internal group sockets connected to the
same external socket. This can force a type conversion where there
wasn't any before making the group, leading to changes in behavior.

Exposing output sockets also adds multiple redundant group outputs,
which all use the same socket type and are connected to only one
external socket.

This patch fixes both of these issues:
- The type of a group node input is based on the external socket type.
  If this is connected to multiple internal inputs they still share the
  same   group input connection, but no new type conversions are
  created.
- Exposing an output socket with multiple links creates just one unique
  group socket now.

To make this work the `add_interface_socket_from_node` function has been
extended with an `in_out` argument, so that the socket type can be based
on the external (output) socket but create a group input socket. Some
variants of this function have been removed because they are
unnecessary. The function had a `socket_type` argument that wasn't
actually used, and wouldn't have worked anyway because
`interface_from_socket` expects matching socket/io_socket types.

Pull Request: https://projects.blender.org/blender/blender/pulls/153992
2026-02-24 09:38:14 +01:00
Sean Kim
b094785bbc Tests: Enable debug level operator log messages for UI tests
When UI tests fail on the buildbot, it can be rather difficult to tell
exactly what the last user-level action was before a failure occurred
due to the relatively broad set of actions taken in each of these tests.

This commit enables the `operator` debug level information to make it
easier to tell from the text log what the last started action was. This
is rather noisy output, but should be fine to enable since we only print
messages on failure.

Pull Request: https://projects.blender.org/blender/blender/pulls/154395
2026-02-23 19:08:01 +01:00
Sean Kim
deaca53501 Cleanup: Reorganize remesh tests
Pull Request: https://projects.blender.org/blender/blender/pulls/154639
2026-02-23 19:06:59 +01:00
Sergey Sharybin
8e9f124de3 Merge branch 'blender-v5.1-release' 2026-02-20 10:27:24 +01:00
Sergey Sharybin
4f050d82dc Cycles: Add OSL compilation test
The test explicitly requests an OSL script to be compiled, without
relying on possibly cached bytecode in a node, or an oso file on a
disk.

It is aimed to catch issues line the ones in the referenced issue
and pull-request.

The reason why the compilation error was not caught before is because
render tests were using bytecode that was cached in the node storage.

This change uses internal Cycles API to test OSL compilation. This
seems to be the easiest way to hook up to this API. The operators from
node or text editor requires a context override, which is a bit tedious
to setup.
Alternative could be to use an external OSL script, but the issue with
that is Cycles would store OSO next to the input, so we can't have a
script stored in the tests folder and it'll need to be saved in a temp
directory anyway.

The test code might be a bit too verbose, but it just follows the
typical boiler plate code from other Python tests, preparing for the
future where we might want to store input scripts outside of the
python script.

The reason why comment line compilation using oslc succeeded is because
it is not really required to pass include to the "system" `shaders`
directory: the oslc/liboslcomp has a special logic that looks for the
`share/OSL/shaders`: `oslc ~/script.osl -o ~/script.oso` works just
fine.

Ref #154476
Ref #154576

Pull Request: https://projects.blender.org/blender/blender/pulls/154623
2026-02-20 10:26:59 +01:00
Sean Kim
9b1e92156d Fix: modifiers_multires test broken
Broken by f7806ffbf9

Pull Request: https://projects.blender.org/blender/blender/pulls/154631
2026-02-19 21:47:27 +01:00
Sean Kim
429817d96a Merge branch 'blender-v5.1-release' 2026-02-19 11:40:06 -08:00
Sean Kim
f7806ffbf9 Refactor: Tests: Make OperatorSpecObjectMode more generic
The existing `OperatorSpecObjectMode` operator was unnecessarily
restrictive.

Prior to this change, it specifically handled setting the object to
Object mode and then calling a specific `bpy.ops.object` operator with
given parameters.

Instead of extending this to define one per-mode, and to allow calling
operators outside of the `object` module, this commit converts the class
and its usages to `OperatorSpec` where the target mode and containing
module are specified as parameters.

Pull Request: https://projects.blender.org/blender/blender/pulls/154625
2026-02-19 20:39:04 +01:00
Sean Kim
a7310de767 Merge branch 'blender-v5.1-release' 2026-02-18 15:38:29 -08:00
Sean Kim
b52b77165e Fix: Error in topology automasking test
Pull Request: https://projects.blender.org/blender/blender/pulls/154542
2026-02-19 00:37:47 +01:00
Miguel Pozo
d80e87858d Merge branch 'blender-v5.1-release' 2026-02-18 17:59:46 +01:00
Miguel Pozo
4cc54a73a2 Cleanup: EEVEE Tests: Fail thresholds clarification
Add extra info.
Swap camera and texture locations.
2026-02-18 17:58:52 +01:00
Pratik Borhade
0b0bee62e2 Merge branch 'blender-v5.1-release' 2026-02-18 16:00:17 +05:30
Jeroen Bakker
bbbc20fb81 Fix #154515, #154516: EEVEE rendertests on AMD/Linux/OpenGL
Increased the fail threshold for texture, rayquery and camera tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/154520
2026-02-18 09:25:46 +01:00
Lukas Tönne
a79e4c78bd Merge branch 'blender-v5.1-release' 2026-02-18 08:57:32 +01:00
Lukas Tönne
beafb31be4 Fix: Node "make_group" operator creates invisible links (regression)
Grouping a single node with hidden sockets can create links between the
group node input/output and the hidden sockets, which also hides the
new internal link.

This is a regression in #151894. Before this the make group operator
would always un-hide all sockets and un-collapse all panels of the
grouped node.

Make sure that created links in node group operators are always visible
and that panels are always uncollapsed. This is a little slower than
the previous approach of simply expanding everything, because we have
to slow-search through the panel hierarchy. But it is more consistent
behavior because we don't have to know which links the operator
creates, it just make anything visible that gets connected.

Pull Request: https://projects.blender.org/blender/blender/pulls/154264
2026-02-18 08:56:45 +01:00
Sean Kim
3bad587040 Merge branch 'blender-v5.1-release' 2026-02-17 15:53:46 -08:00
Sean Kim
ac17d71d27 Tests: Add sculpt automask test for 'Face Set' and 'Topology' modes
Adds a new file for testing automask modes, specifically testing the
'Face Set' and 'Topology' modes.

This is achieved by performing a stroke on a Suzanne mesh with the face
sets initialized by loose parts (i.e. the eyes of the mesh).

Additionally, minor changes are included to the common paint test
helper to make testing easier.

Pull Request: https://projects.blender.org/blender/blender/pulls/154342
2026-02-18 00:50:18 +01:00
phantomsoldierking
7ff9668c49 Grease Pencil: Python: Add masks.add and masks.remove functions
Restore RNA API for layer mask add/remove.

This adds two functions on the `layer.mask_layers` property:
* `mask_layers.add(Layer)` to add a new mask.
* `mask_layers.remove(Mask)` to remove a mask.

Ref: #152782
Pull Request: https://projects.blender.org/blender/blender/pulls/154181
2026-02-17 18:17:07 +01:00
Jacques Lucke
8a925a51b1 Fix: Tests: initial updated regression test is not correct
When creating a new mesh test (e.g. a geometry nodes test), the code would just
copy the object without applying modifiers. This results in the test failing
initially.

I noticed this due to another issue in `verify_attributes_compatible` which
allows meshes to compare equal when they have a different set of attributes
right now. This results in my test file not being properly created at all,
because the test succeeded even without applying the modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/154463
2026-02-16 22:04:01 +01:00
Sean Kim
b09e55d7b8 Merge branch 'blender-v5.1-release' 2026-02-16 10:29:16 -08:00
Sean Kim
ff0161c348 Fix: Paint: Mimic modal execution when calling PaintStroke::exec
Currently, when using `sculpt.brush_stroke`, the raycast that updates
active attributes and certain properties on the `SculptSession` is not
executed, preventing certain brush features from working.

There were a few  problems that prevented this from working correctly:
* When `test_start` was called, all non-`invoke` calls were considered
  valid.
* We need to call `test_start` on each stroke step until we find the
  actual starting point
* The wrong "mouse" event was passed to `test_start`

Additionally, this allows a handful of tests that formerly had to be
skipped to be ran as part of the sculpt brush test suite.

Pull Request: https://projects.blender.org/blender/blender/pulls/154341
2026-02-16 19:28:15 +01:00
Sean Kim
962a37ce35 Tests: Add more multires simple & linear subdivision tests
Pull Request: https://projects.blender.org/blender/blender/pulls/154401
2026-02-16 18:53:56 +01:00
Sybren A. Stüvel
93ca4bb7e1 Assets: Sanitize (py) and reject (C++) absolute file paths in listings
Sanitize file paths in the downloaded asset listing of remote asset
libraries.

File paths are considered malicious when they reference a directory
outside the asset library. This covers both absolute paths and paths
that use `../` walk 'too far up'.

On the Python side, right after the listing was downloaded, any
malicious file paths are rewritten to relative file paths. On the C++
side, malicious file paths are rejected (because the Python code
should have already removed them).

Pull Request: https://projects.blender.org/blender/blender/pulls/154453
2026-02-16 18:18:31 +01:00
Sybren A. Stüvel
ce34c5de34 Assets: Python code for generating and downloading assets & listings
Part of the remote asset libraries project, see:
https://projects.blender.org/blender/blender/issues/134495

No user visible changes expected.

This commit contains all the Python code necessary integration with
Blender's asset system (so for downloading asset listings, previews, and
the assets themselves), and for the `blender -c asset_listing` CLI
command.

The OpenAPI datamodel generator no longer includes the OpenAPI schema in
the generated code. That was intended to be used by a validation
library, but as it turns out, that couldn't handle the recursive
definitions we need. Now the code just relies on the validation from the
cattrs library, which is good enough for our purpose.

Available CLI commands:

blender -c asset_listing generate:
  Generates the asset listing for all assets in the current directory &
  subdirectories.

blender -c asset_listing download <URL>:
  This is more of a test command, to download the asset listing. The URL
  should point to the root of the asset library, so basically a
  HTTP-exposed version of the same directory in which the `generate`
  command above was given.

  The files are downloaded to `./_asset_download_location`. That way the
  current directory isn't spammed with multiple files.

Downloading includes a time-based 'stamp' for cache-busting, when
requesting the top-level JSON file of a remote asset library's listing.
This stamp is the number of seconds since some point in time, divided by
60, to make it change once per minute. This means that a caching service
like CloudFlare can cache the response, and only forward the query to
our HTTP server once every minute.

Co-authored-by: Julian Eisel <julian@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/153284
2026-02-13 16:32:51 +01:00
Sean Kim
b59c27d12a Merge branch 'blender-v5.1-release' 2026-02-11 17:30:36 -08:00
Sean Kim
4b7ffbe48c Tests: Extract common sculpt functions to helper module
Pull Request: https://projects.blender.org/blender/blender/pulls/154233
2026-02-12 02:29:49 +01:00
Sean Kim
7d20d4cf50 Merge branch 'blender-v5.1-release' 2026-02-10 14:57:21 -08:00
Sean Kim
557365b304 Tests: Add blocklist for intel linux undo test
Pull Request: https://projects.blender.org/blender/blender/pulls/154229
2026-02-10 23:52:25 +01:00
Campbell Barton
6ebf986c4f Merge branch 'blender-v5.1-release' 2026-02-10 19:16:35 +11:00
Campbell Barton
9ad35799c4 PyAPI: support None arguments documented as defaulting to None
A long standing confusion with the C/Python API is arguments
that are optional and documented as defaulting to "None" yet,
will fail with a type error if None is passed in.

This is confusing both for API users & developers,
as well as making the code difficult to properly type check.

The reason for this is PyArg_Parse* functions don't support
parsing arguments that can optionally be None for most types.
Resolve by adding our own argument parsing helpers.

Also rename bmesh 'example'  parameter to 'source'
for verts/edges/faces.new and face_split.
To match BMesh internal naming, although this is only for documentation
purposes as it isn't a keyword argument.

Ref !154178
2026-02-10 19:13:16 +11:00
Brecht Van Lommel
e3145bcc59 Merge branch 'blender-v5.1-release' 2026-02-09 23:20:45 +01:00
Brecht Van Lommel
f7bca00032 Fix #154128: Cycles normal map wrong renders after corner normal changes
After refactoring to deduplicate code, the normal for the tangent frame was
no longer properly transform to object space. Revert code to how it was
before and add a more explicit function name and comment.

Pull Request: https://projects.blender.org/blender/blender/pulls/154102
2026-02-09 23:20:15 +01:00
Jeroen Bakker
abac53f140 Vulkan: Disable workbench render tests
AMD/Windows platform is unstable, but we don't have an option (yet) to
disable render tests on specific platforms. Better to disable it now
and use the `+test_gpu_vulkan` flag for enabling.

It is unclear if this needs to be done on 5.1 as well. It seems that
there the issue doesn't appear. But better do that when there is
some proof as that could give some insight as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/154130
2026-02-09 16:16:26 +01:00
Christoph Lendenfeld
0bf9bcf8ad Merge branch 'blender-v5.1-release' 2026-02-09 13:50:24 +01:00
Christoph Lendenfeld
bce83c83b1 Fix #153229: Driver on bone lost on rename
The issue was that when renaming the bone, the function to fix the rna
paths on the Armature data checked for the `pose.bones` prefix (which
is on the Object data).

This is a simple fix, but to be sure this is still working
(and because we had a bunch of bugs in that area already)
I covered the case with a few unit tests.

I found another bug while writing the unit tests.
Driver targets don't get renamed.
The testing code is there, just commented out so we can quickly
get the test to fail once we start fixing the bug.

report mentioned in comment above the buggy line
#29822

Pull Request: https://projects.blender.org/blender/blender/pulls/153573
2026-02-09 13:45:14 +01:00
Brecht Van Lommel
60242271ee Merge branch 'blender-v5.1-release' 2026-02-09 13:13:46 +01:00
Brecht Van Lommel
fac8b300e0 Fix #152455: OpenEXR DWAA/DWAB saving leads to inf values
DWAA/DWAB lossy compression uses DCT-based encoding, where values near
HALF_MAX can overshoot to infinity after decompression, due to DCT ringing.

There are different ways to resolves it and it's not so clear what the ideal
solution would be and how it would be handled upstream. By default it
will already convert values > HALF_MAX to inf and it's up to the application
to clamp if they want to (like we do).

As a workaround, clamp half float values before writing with an empirically
determined value that takes into account that lower quality makes this
problem worse. The resulting files should then decompress without inf in
existing software.

Pull Request: https://projects.blender.org/blender/blender/pulls/154061
2026-02-09 13:10:39 +01:00