* Switch to more accurate half and float conversion supporting denormals
to match native instructions. This makes CPU and GPU match more
closely in some tests and avoids clipping some low values.
* Inf and NaN are not supported still, as we already filter these out
and there is no reason to have the overhead.
* Change avx2 kernel to require f16c. For all physical CPUs avx2 implies
f16c, and it's only for emulation and virtual machines that this would
not be the case. So it's fine to fall back to the sse4.1 kernel then.
* Assume half instructions are available with ARM NEON. There is no
defined minimum architecture, but Blender assumes the same and ARMv8.2-A
is relatively old.
* For everything else there are SIMD optimized fallbacks.
* New unit tests were added, coverting both native instructions and
fallback implementations, and half/half3/half4.
Fix#152763: Half float image low values are clipped
Pull Request: https://projects.blender.org/blender/blender/pulls/154042
Adds annotation RNA API for editing strokes and points.
New RNA functions to restore these basic operations:
- `frame.strokes.new()`
- `stroke.points.add(count=..., pressure=..., strength=...)`
- `stroke.points.remove(index=...)`
- `frame.strokes.remove(stroke)`
Also added tests in a new file in `tests/python/bl_pyapi_annotations.py`.
Ref: #147963
Pull Request: https://projects.blender.org/blender/blender/pulls/153639
It can be used for saving HDR images that work in most web browsers and
image editors. Unlike HDR PNG, this can use lossy compression to make file
sizes much smaller.
The options are 8/10/12 bit and a quality percentage.
Pull Request: https://projects.blender.org/blender/blender/pulls/153540
This reduces the thumbnails generated by a tests run from about
5k to less than 10.
In practice, some tests can still reset this userpreference e.g. by calling
`bpy.ops.wm.read_factory_settings()`. Further tweaks are possible
should this still be an issue in the future.
See also blender/blender#153811 and infrastructure/meta#197
Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/153817
This fixes the issue in "Replace Action" where it didn't replace actions
on embedded IDs.
I extended the unit test with a case to cover it and added a shapekey
object for good measure.
Pull Request: https://projects.blender.org/blender/blender/pulls/153827
This patch adds a new operator to replace all uses
of a given animation with a newly created one.
The operator can be found just below the "Replace Action" operator
in the Action editor (Action dropdown) and in the 3D viewport
(Object or Pose -> Animation)
I extracted the common code with `ANIM_OT_replace_action`
into common functions
Part of #150572
Pull Request: https://projects.blender.org/blender/blender/pulls/153812
#### This patch adds **Direct** and **Indirect Light intensity controls** to **EEVEE**.
The new controls allow artists to scale the contribution of **direct** and **indirect**
lighting paths independently, without modifying the underlying lighting algorithms,
sampling, or ray tracing settings.
Both controls default to `1.0`, resulting in **no visual change** for existing files.
### Design Rationale
This feature is intentionally narrow in scope and exists to address cases that cannot
be handled correctly or efficiently using render passes or the compositor.
A compositor-based solution is currently not viable because Direct and Indirect light
passes **do not yet exist**, and when they do, they will not support **blended materials**.
This would create discrepancies between **dithered** and **blended** materials.
Using render passes for this purpose would also require additional accumulation passes
and buffers, would not be compatible with `TAA`, and would be disproportionate to a simple
scalar operation. For these reasons, the controls are implemented directly in the EEVEE
lighting pipeline.
The scaling is applied after clamping to preserve firefly suppression behavior and to
match the **behavior** of a **post-lighting compositing** adjustment.
### Intended Use
In spirit, this is similar to *Light Probe intensity* and is useful for:
- Large-scale environments where lighting balance needs adjustment
- Scenes requiring stronger or weaker indirect illumination
- Balancing direct vs indirect contribution without reauthoring lights
- HDR and color grading workflows
The controls do **not** alter ray depth, sampling, accumulation, or performance
characteristics, and apply uniformly across the EEVEE lighting paths.
Pull Request: https://projects.blender.org/blender/blender/pulls/153340
Adds basic tests for the following types of operations:
* Hide
* Mask
* Face Set
* Trim
With the following types of gesture / selection modes:
* Box
* Lasso
* Line
Note that "Polyline" is not explicitly tested for now, since it is
primarily a form of the lasso tool that requires clicks to define the
area.
A new helper method is also added to `ui_test_utils.py` for drawing
the path of a circle.
Pull Request: https://projects.blender.org/blender/blender/pulls/153790
This commit updates the existing sculpt brush tests to include the
multires modifier.
For all of the existing brush tests, with the exception of:
* Mask tests
* Paint tests
We now run both the mesh and the multires scenarios as subtests. For
multires, to provide the same sort of comparison that the mesh tests
provide, we duplicate and apply the object to have direct access to the
position data.
Additionally, the multires specific brushes are now tested.
Note that currently we do not apply multires mask data when applying the
multires mesh, so the two brushes that rely on this do not run for
multires at the moment. Finally, multires itself does not support color
attributes, so the color attribute tests are also skipped.
Pull Request: https://projects.blender.org/blender/blender/pulls/153738
This removes most of the low-level usage of libwebp in favor of using
OIIO directly. The thumbnail code remains the same as it's more
efficient to use the built-in scaling support there.
Added additional tests for lossless quality. No other changes to
features and performance are expected or noticed.
Note: the error message when saving unsupported large images is
suboptimal until the library update associated with #153493 is complete.
Pull Request: https://projects.blender.org/blender/blender/pulls/153567
This patch adds an operator to switch all users of one action to a different action.
It works on the action of the active object, which makes it possible to use in the 3D viewport.
We need this operator since we switched to slotted actions and many datablocks
can now point to the same action. Swapping out said action was previously possible
with the "Remap Users" operator in the Outliner, but that replaces *all* references to
said action including NLA strips and Action constraints.
This operator will *only* work on `AnimData.action`.
The operator can be found in the Action menu of the Action Editor or the Animation menu in the 3D viewport.
for Design #133725
part of the winter of quality #150572
Pull Request: https://projects.blender.org/blender/blender/pulls/153455
Ungrouping multiple group nodes handles each group node in sequence. After the
first group is ungrouped the topology cache is invalidated which makes asserts
fail when ungrouping the next node.
The fix is to update the topology cache before mapping the node group interface
(`map_group_node_interface` function).
The bl_node_copy_operators test is extended to cover this test case, using two
group nodes that are ungrouped together. Supporting this requires a few
modifications of the test, such that multiple "internal" nodes are allowed in
the "ungroup" and "separate" functions.
Recursively mapping groups to compare operator results is now integrated into
the NodeMapping class.
Additionally this includes a fix for node selection after group operators:
Instead of deselecting nodes each time a set is copied, deselect once at the
beginning. This ensures multiple groups can be ungrouped and all the internal
nodes are selected in the end. Selection is how the test identifies ungrouped
nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/153755
The socket link drag search allows adding nodes based on the other side of a
node link. However this is only executed inside a custom button search menu and
is not available through the API or an operator. This makes it difficult to
test, and the link search feature breaks undetected quite often.
A new test is added which executes all link search operations on builtin socket
types. The test runs in python and uses and internal operator to invoke the link
operations for a given socket.
The `NODE_OT_link_drag_operation_test` can be used to both discover and execute
link search operations. It writes to an ID property of the node tree to "return"
test case names, which avoids the need for DNA storage.
Each link operation is executed as a sub-test (in the python `unittest`
framework). This way all failing socket cases can be reported in a single test
run.
Pull Request: https://projects.blender.org/blender/blender/pulls/153330
Inserting nodes into a node group with the "Insert Into Group" operator crashes
when the node group already has existing sockets. The code was primarily tested
with the `make_group` operator and tests don't include a case with existing
group sockets yet.
When the group has sockets already there will not be an entry in the
`NodeTreeInterfaceMapping` for every socket. These cases should just be skipped.
The `bk_node_copy_operators` test has been extended to cover this behavior.
This uses a special option `GROUP_INSERT` which indicates that the test case
uses an existing node group, instead of creating an empty group from scratch.
----
<img width="544" alt="image.png" src="attachments/141e3753-794c-4c2b-880f-d43faee835f2">
Pull Request: https://projects.blender.org/blender/blender/pulls/153656
This commit adds the environment variable
`BLENDER_TEST_IGNORE_VENDOR_BLOCKLIST` to the GTest and Python tests.
In contrast to `BLENDER_TEST_IGNORE_BLOCKLIST`, this only ignores the
blocklists for tests that are blocked for individual hardware vendors.
When a test fails in Blender due to driver issues, the test is blocked
for the hardware vendor until a fixed driver is available for the CI
workers. This means that hardware vendors need to manually remove the
blocklists when they check the state of test failures.
The new environment variable gives an easy option to also run these
tests in case where seeing these failures (but not general failures,
e.g., due to issues in Blender) is preferrable.
Pull Request: https://projects.blender.org/blender/blender/pulls/153549
Adaptation of !138738 by @SietseB.
Adds two new python API endpoints:
* `GreasePencil.root_nodes`: Collection of all the top most nodes in the
layer tree.
* `LayerGroup.children`: Collection of all the top most children of the layer
group.
Both of these iterate the nodes in stack order, meaning bottom to top.
This matches the internal representation of the Grease Pencil data.
Pull Request: https://projects.blender.org/blender/blender/pulls/152913
In CMake, set(VAR) without a value unsets the variable rather than
initializing it to empty. This causes issues with --warn-uninitialized
and can lead to unexpected behavior when the variable is used later.
Use set(VAR "") when initializing variables that will be appended to
or used in expressions. Use unset() to explicitly remove temporary
variables after use.
Ref !153503
Decouples the concept of "active" from the actual operation, which
simply operates on the specified index. This allows for easier testing
and more flexible non-interactive usage of the operator.
Additionally, this PR adds a number of tests for this operator.
Pull Request: https://projects.blender.org/blender/blender/pulls/153501
Support for additional opcodes in driver bytecode security check:
- COPY
- TO_BOOL
- POP_JUMP_IF_TRUE
- POP_JUMP_IF_NONE
- POP_JUMP_IF_NOT_NONE
- LOAD_FAST_AND_CLEAR
- LOAD_FAST_LOAD_FAST
- STORE_FAST_LOAD_FAST
- STORE_FAST_STORE_FAST
- LOAD_FAST_BORROW
- LOAD_FAST_BORROW_LOAD_FAST_BORROW
These are all stack manipulation, conditional jumps, or local variable
access opcodes - categories already considered safe in the security
model.
Includes tests for the new opcodes.
Ref !153476
This commit builds up on the work done in #140790 for it to completely
eliminate header status text jump for commonly used operations
(translate, inset, shrink flatten and more), improving readability with
the new centered header introduced in #139507.
To achieve this, multiple modifications were made:
- In the main `unit_as_string` function, limit the width of numbers of
magnitude below 1 if fixed width is requested by passing a negative
`prec` parameter, previously only used for trailing zero (e.g., with
3 both 1.014 and 0.014 use the same decimal count, rather than 1.01
missing an extra digit).
- Due to the above change reducing precision for numbers with |val| < 1,
bump the overall precision for commonly used operations
(translate, bevel, inset and shrink/flatten) by 1.
- When precision mode (holding shift) is enabled during transform
operations, bump the displayed digit precision. This also has the
bonus advantage of acting as an extra visual indicator to know when
precision mode is enabled.
- Add a new `BLI_string_pad_number_sign` string util function, which
prepends positive numeric string with a [figure space character]
(https://en.wikipedia.org/wiki/Figure_space) to ensure they keep the
same length as their negative counterpart with the proportional font
used in the header.
The first modifications affects every part of Blender where conversion
of unit to string with trailing zeros preservation was previously used
(such as the depth eyedropper). The sign padding modification however
needs to be manually added to operators / transform operations on a
case by case basis as to not add empty minus sign padding in places
where it shouldn't be present.
Note that this commit removes jumping for *non-separated* unit
(None/Metric/Imperial *without* the Separate Units checkbox enabled in
the Scene unit settings), as separated unit (1m 50cm instead of 1.50m)
are bound to change width and cause jumps.
Pull Request: https://projects.blender.org/blender/blender/pulls/148574
This PR adds separate Vulkan backend tests for Storm Hydra/USD and UI.
The new tests are called:
- storm_hydra_[backend]_*
- storm_usd_[backend]_*
- ui_[backend]_*
The Vulkan tests are not yet enabled by default due to open issues.
For enabling them, the CMake options WITH_STORM_TESTS_VULKAN and
WITH_UI_TESTS_VULKAN can be turned on.
Pull Request: https://projects.blender.org/blender/blender/pulls/149142
Certain WEBP image test variations had issues on the ARM platforms where
the result would not quite match the reference images generated on x64
machines. With the update to `libwebp` for 5.1 these seem fixed now.
Fixes#105006
Pull Request: https://projects.blender.org/blender/blender/pulls/153306
- Fix variable name typo in `buildinfo.cmake`.
- Use `CMAKE_CXX_COMPILER_ID` instead of `CMAKE_C_COMPILER_ID`
when adding C++ compiler flags in `gflags` and `gtest`.
- Change message type from `ERROR` to `STATUS` for missing system Python
in tests configuration, matching similar messages that aren't fatal.
This is a new lossless encoding in OpenEXR 3.4 based on high throuhput
JPEG 2000. It produces somewhat smaller files than other lossless
compression methods, but is very new and not widely supported yet by
other software.
Pull Request: https://projects.blender.org/blender/blender/pulls/153292
Selecting multiple keyblocks are now possible. It has been mentioned
before to expose an API function that returns all selected shape keys.
Now created `shape_keys_selected()`, it can be accessed from object.
Also added `select` property on KeyBlock in RNA.
Example:
```
selected_keys = C.active_object.shape_keys_selected()
selected_keys[0].select = False
```
Resolves#151712
Pull Request: https://projects.blender.org/blender/blender/pulls/152285
* Cycles and EEVEE 3D viewport rendering while adding and deleting
objects, undo and redo, assigning and unassigning materials,
and editign shader nodes.
* Final animation render and viewport animation render, and check
that animation player launches without errors.
These do not verify that the resulting render is correct, but should
at least catch 3D viewport rendering and animation player crashes
that slipped through recently.
Pull Request: https://projects.blender.org/blender/blender/pulls/153159
* Some functions were copied between tests, now import a common
module for these.
* Merge _test_vars and _test_window into a single function, and
use the window index instead of excluding windows.
* Rename idle_until to not be a hack, and explain that it can be
used for testing operator jobs while keeping the disclaimer that
it should not typically be used.
Pull Request: https://projects.blender.org/blender/blender/pulls/153159
If the item to be copied is not within the target interface tree, this PR now
adds the item to the end of the interface instead of performing a NOOP.
Co-authored-by: Lukas Tönne <lukas@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/151567
Extend node group tests to cover change of subtype and dimensions
The node group interface tests did not include changes to socket subtypes and/or
vector dimension details. These settings affect the RNA struct type of the
socket and the size of default value arrays.
The change of subtype details has the unfortunate effect of invalidating any
existing python object representing the interface socket or node socket. This
isn't easy to fix, but the test now covers this expected behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/153254
This commit includes new minimum compiler requirements for Blender 5.1 as well as updated and new libraries.
**New compiler requirements**
* Windows x64: Visual Studio 2022 (17.14.14 or newer)
* Windows arm64: Visual Studio 2022 (17.14.23 or newer)
* Linux x64: gcc 14 (when used with our libraries)
**New libraries**
Abseil 20250814.1
ThorVG 1.0.0-pre31
OpenJPH 0.25.2
**Updated libraries**
AOM 3.13.1
Expat 2.7.2
FFI 3.5.2
HIPRT 606b4886efabce918dd0634ef71c06615a47c83b
Imath 3.2.2
ISPC 1.29.1
libheif 1.20.2
MaterialX 1.39.4
MESON 1.9.0
minizip-ng 4.0.10
Numpy 2.3.4
oneAPI Level Zero 1.21.9
OneTBB 2022.3.0
OpenColorIO 2.5.0
OpenEXR 3.4.3
OpenImageDenoise 2.4.1
OpenImageIO 3.1.7
OpenSubDiv 3.7.0
OpenVDB 13.0.0
OpenXR 1.1.53
PIP 25.2
Python 3.13.9
ShaderC 2025.4
Vulkan 1.4.328
webp 1.6.0
Yaml CPP 0.8.0
ZSTD 1.5.7 (z-standard 0.25.0)
**Library changes**
FMT (moved from /extern to libs)
Ceres (updated version in lib, will be removed from /extern in a later commit)
Eigen (updated version in lib, will be removed from /extern in a later commit))
Ref #147201
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Ray Molenkamp <github@lazydodo.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>
Co-authored-by: Bart van der Braak <bart@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/149852
As the recently added delimit options only made since for edge-loops,
its better to split this into two separate operators.
Having "ring=False" for edge-loop select was an awkward design.
Also remove the "ring" option from MESH_OT_loop_select and
MESH_OT_edgering_select which was only used to differentiate
between the two operators.