Commit graph

1902 commits

Author SHA1 Message Date
Miguel Pozo
b6ef80f9b9 Tests: Block shadow_min_pool_size on Nvidia Linux as well
The issue is not Windows-only.
2026-06-01 19:22:53 +02:00
Clément Foucault
154eedd25b EEVEE: Increase motion blur tests threshold for M1
The Apple M1 GPU seems to have slightly different
bump values in this test.
2026-06-01 14:29:43 +02:00
Clément Foucault
6ce49cab38 Fix: EEVEE: Undefined behavior in polygonal bokeh depth of field
This caused a discrepancy between Metal and other platforms.

From the MSL specification:
```
atan2(y, x)
Implemented as
if x > 0, atan(y / x),
if x < 0 and y > 0, atan(y / x) + M_PI_F
if x < 0 and y < 0, atan(y / x) – M_PI_F
and if x = 0 or y = 0, the result is undefined
```
Also the GLSL specification:
```
The result is undefined if x=0.
```

Fixed by adding a small epsilon to `atan`.

Pull Request: https://projects.blender.org/blender/blender/pulls/159305
2026-05-29 20:26:25 +02:00
Miguel Pozo
3eee99eb92 Tests: Add missing render tests
Part of #148449.
Add untested features, mostly driven by recent regressions.

- camera_negative_scale
- camera_negative_scale_ortho
- motion_vectors
- holdout (updated to test multiple methods, transparency, and
  reflections)
- material_output_selection

Pull Request: https://projects.blender.org/blender/blender/pulls/154032
2026-05-29 15:07:58 +02:00
Oxicid
13f4a0d3da Fix: crash from lookups on an unbalanced mathutils.kdtree.KDTree
Performing a lookup on an empty tree was detecting as being balanced.

Ref !158730
2026-05-29 16:31:50 +10:00
Clément Foucault
5a60abee1d EEVEE: Improve test differences
- Try to reduce difference in tests caused by hardware filtering.
- Increase sample count for tests with raster difference.
- Reduce threshold after 528d859105
- Remove test from blocklist after d0ae9292f9

Pull Request: https://projects.blender.org/blender/blender/pulls/159176
2026-05-28 15:11:50 +02:00
Brecht Van Lommel
5fc85d1cb7 Refactor: Cycles: Move MNEE walk into separate kernel
The new intersect_mnee kernel runs before shade_surface, and
shade_surface_mnee is eliminated. That large kernel was causing problems
for some GPU compilers.

MNEE state is packed into a shadow path state to avoid significantly
increasing the path state size. This shadow state is then either turned
into an actual shadow ray state or discarded in shade_surface.

MNEE was re-enabled on HIP RDNA2 as it works again now. Texture cache
misses now also work correctly with MNEE.

This adds some extra code to the regular shade_surface kernel even when
MNEE is not used, to use the MNEE sampled point instead of sampling a
light. But there seems to be no significant performance impact.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/158698
2026-05-27 20:34:06 +02:00
Jacques Lucke
428c9987f5 Geometry Nodes: move geometry bundles out of experimental
This enables support for storing bundles in geometries by default. This provides
the ability to store arbitrary data on a geometry set, allowing it to be passed
whereever the geometry is passed, including across object boundaries.

This opens up significant new opportunities for building declarative systems
where the overall behavior is controlled by multiple objects. For example, it
allows creating force field objects which can be fed into simulation systems.

The geometry bundles can generally store all kinds of data that is supported by
geometry nodes, including fields, closures, other bundles and other geometry.
One notable exception is that anonymous attributes are removed as geometry
leaves geometry nodes, aka at the end of the evaluation of each modifier. This
constraint is necessary currently, because the lifetimes of these attributes
can't be tracked reliably outside of Geometry Nodes.

This adds two new nodes:
* Set Geometry Bundle: Updates the bundle stored in the geometry. If there was a
  bundle already, the old one is discarded.
* Get Geometry Bundle: Retrieve the bundle in a geometry, optionally removing it
  from the geometry.

Pull Request: https://projects.blender.org/blender/blender/pulls/159175
2026-05-27 19:51:05 +02:00
Jacques Lucke
4d3ce6cf62 Fix: Geometry Nodes: wrong anonymous attribute lifetimes with fields in geometry bundles
This fixes missing anonymous attributes when a reference to them is
stored in a geometry bundle.

A regression test that checks for this has been added (it breaks without
this change).

Pull Request: https://projects.blender.org/blender/blender/pulls/159149
2026-05-27 15:12:28 +02:00
Miguel Pozo
6908cd1350 EEVEE: Disable shadow_min_pool_size on OpenGL for Nvidia Windows
The test shows non-deterministic behavior.
The reason is unknown, the max pool size is not exceeded.
The test shows a slightly different result each time, as long as the
volume probe is rendered.
Storing the bake result in the blend file (using a `Volume_Probe_Baked`
object) doesn't fix it.
Given that Linux doesn't seem to fail, it may be a driver issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/159121
2026-05-26 22:14:36 +02:00
Falk David
301fceb1d3 Object: Add Geometry Nodes support for Empty object type
This PR adds Geometry Nodes modifier support for empties.

One of the motivations of this is to be able to create simulation
effectors (like wind, turbulence, etc.) using Geometry Nodes modifiers.
But this is also useful for fully procedural effects where original
geometry is not needed.

When creating a new node group for the first modifier in the stack,
the input geometry socket is omitted.

The `Object` > `Convert To` and `Visual Geometry to Mesh` operators have
been updated to also work for empty objects.

The overlay for the empty is not drawn when there's a modifier that
outputs geometry.

The python API `GeometrySet.from_evaluated_object` also has been updated
to work with empty objects.

Co-authored-by: Jacques Lucke <jacques@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/157804
2026-05-26 11:27:50 +02:00
Jacques Lucke
da62f3b9e8 Fix: revert accidental rename
This was accidentally renamed and missed in 761c881737.
2026-05-25 16:06:52 +02:00
Bastien Montagne
3e3ede6a1c Fix: LibOverride resync issue when active scene is not local.
Liboverride resync would do bad things (like adding local collection to
linked scene) in case the active scene was non-local.

Discovered while working on !158950.

Pull Request: https://projects.blender.org/blender/blender/pulls/159041
2026-05-25 14:57:38 +02:00
Nathan Vegdahl
8a53802b15 Anim: Add unit test for joining armatures that have action constraints
Add a unit test to verify that when bones are renamed while joining
armatures, that the channels of corresponding action constraints are
remapped properly.

This is a follow-up to #153391 and #153449, which were tested with
this, but landed before this.

Pull Request: https://projects.blender.org/blender/blender/pulls/153745
2026-05-25 10:22:26 +02:00
Miguel Pozo
6602850224 EEVEE: Raycast Visibility toggle
Implement a visibility toggle for Raycast queries.
Available in `Properties Panel > Object > Visibility > Raycast`.

Allows selecting which objects are visible to the Raycast node.

Pull Request: https://projects.blender.org/blender/blender/pulls/157799
2026-05-25 07:42:25 +02:00
Jacques Lucke
761c881737 Refactor: Geometry Nodes: add BundleKey type
Previously, a raw `UString` was used as bundle key. However, that did not
capture all the constraints put on the key (some characters are forbidden). This
patch adds a smaller `BundleKey` wrapper around `UString` that ensures these
constraints during construction so that code using the type does not have to
check it again.

This might also become useful when we want `Bundle` to become a thinner wrapper
around `Map` instead of duplicating large parts of its interface.

Pull Request: https://projects.blender.org/blender/blender/pulls/159023
2026-05-25 01:01:43 +02:00
Clément Foucault
14774b31b5 EEVEE: Update failure threshold for different Nvidia architectures
The sampling pattern are different per architecture.
Increases threshold slightly for tests that fails.
2026-05-22 20:50:16 +02:00
Hans Goudey
84865ae41d Tests: Add tests for two Geometry Nodes essentials assets
Add a test for all the modes of the array modifier, and a test
using almost all the features of the scatter on surface modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/158960
2026-05-22 19:00:47 +02:00
Kévin Dietrich
fab51c3e35 Alembic: support camera and visibility animation via FCurves
This adds support to import animations on the various camera properties
and on object visibilities via FCurves for non-sequence Alembic files.

This adds a single routine `create_keyframes` to create FCurves for all
objects which need some for the entire duration of the animation in the
archive.

The FCurves creation and key frame addition are done via some newly
added `FCurveCreationHelper` objects which are created and gathered
during object creation if need be.

For camera data animation, as Alembic does not separate the various
properties into separate sample arrays, we initially create FCurves for
all properties and remove the ones which were unnecessary at the end.

Ref: #69191
Ref: #54050

See PR for video examples.

Pull Request: https://projects.blender.org/blender/blender/pulls/158321
2026-05-22 16:08:34 +02:00
Weizhen Huang
6e2b342c9f Render: Add thin wall mode in Principled BSDF
- Thin glass:
An infinitesimally thin sheet of dielectric, approximated by a reflected
lobe and a trasmitted lobe, the respective weights of both lobes are
analytically computed by summing up infinite geometric series that
account for internal reflections.

- Thin subsurface:
An infinitesimally thin sheet of dense scattering material, approximated
by a diffuse lobe and a translucent lobe, the respective weights of both
lobes are given by subsurface anisotropy, with specifies the relative
amount of backward and forward scattering.

Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>

Pull Request: https://projects.blender.org/blender/blender/pulls/157469
2026-05-22 12:53:43 +02:00
Julien Duroure
c01060dd2d tests: glTF: simple tests for glTF files compressed with meshopt or Draco
Decompressing the buffers of glTF files needs lots of code that can leads to own bugs & errors.
And may differ from an environment to another, due to algorithm natures.

So, for glTF files with meshopt compression extensions (KHR_meshopt_compression or EXT_meshopt_compression), or with KHR_draco_mesh_compression, we are going to compare only a few part of the export.

- Comparing the list of extension used, to be sure that the roundtrip can import & export with compression
- For meshopt, check that we have 2 buffers, 1 compressed and the other one for fallback

Pull Request: https://projects.blender.org/blender/blender/pulls/158693
2026-05-22 09:12:25 +02:00
Clément Foucault
df30a8b3ec EEVEE: Update test failure threshold
After fixing a bunch of issues over the years,
the render tests failure threshold it too high and
let valid errors become undetected.

Divide the fail threshold by 10 in most cases
and by 2 in worst cases.

This reduces the threshold to a very low number since
most EEVEE renders have a low amount of noise.

Some tests are updated to reduce platform differences.

This unveiled quite a few issues that will be fixed
in main later on (see blocklist edits).

Test refinement:
- 🟩 NVidia Opengl (reference)
- 🟩 AMD Opengl
- 🟩 AMD Vulkan
- 🟩 Intel Opengl
- 🟩 Metal

Pull Request: https://projects.blender.org/blender/blender/pulls/158810
2026-05-22 07:36:11 +02:00
Campbell Barton
041c0d4be7 Tests: multi-resolution un-subdivide
Add tests that run the code-paths to address issues exposed
by #158858 & #158032 as well as a test to ensure non-trivial
MDISPS keep their shape when un-subdividing.

Also correct the example command.

Ref !158881
2026-05-22 04:09:24 +00:00
Sean Kim
8ecebf0ce7 Image: Add autosave support
This commit adds support to the autosave functionality to handle images
and allows autosave to work in Texture paint.

This requires two main changes:
* Packing all edited & editable images.
* Allow autosave to function when the most recent step is an image undo
  step.

The majority of this PR addresses the first change.

For all images that are to be autosaved, we pack to a new field on the
`Image`, `autosave_packedfiles` and mark the datablock with a new flag,
`IMA_AUTOSAVE_TEMPPACK`.

This field is used to prepopulate the `Image` datablock runtime cache
on file load, which then marks the ImBuf as dirty, so the user will be
informed to either save or discard changes.

If an image is saved, packed, or reloaded, the autosave information
(both the flag and the autosave packed file list) is cleared.
Additionally, the autosave information is cleared when the cache is
populated when loading the file.

As a similar area of concern, we also do this when creating the recovery
file, `quit.blend`

Part of #134518

Pull Request: https://projects.blender.org/blender/blender/pulls/152453
2026-05-21 20:19:54 +02:00
Jeroen Bakker
1567225fd1 Fix #158269: Inconsistency between framebuffer default size and size
Due to an inconsistency in MTLFramebuffer `default_size` and its current
`size` could show an incorrect error message when reading from the
framebuffer using Python.

This has been fixed by making sure by disconnecting the default size in
Metal and base class. Sizes are set when needed. There is still
inconsistency when running in background.

Pull Request: https://projects.blender.org/blender/blender/pulls/158586
2026-05-21 16:01:51 +02:00
Sybren A. Stüvel
e36f48f8b4 Assets: add min/max version of Blender to online asset listing
Add two Blender versions to each asset in the online asset listing:
`min` and `until`. The asset is shown in Blender if `min <=
BLENDER_VERSION < until`.

This includes changes to the schema, the listing generator, and
Blender itself to do the filtering.

This is intended for two things:

- Ensuring older Blenders don't see assets that are made with a newer
  version of Blender.
- Making it possible to replace assets, where older Blender versions
  still see the older version of the asset, and newer versions of
  Blender only see the newer asset.

Example listing JSON:

```json
{
  "name": "Mrežnica",
  "id_type": "WORLD",
  "files": ["worlds.blend"],
  "bl_versions": {
    "min": "5.2"
  },
  "thumbnail": {
    "url": "worlds_thumbnails/World/mreznica.webp",
    "hash": "SHA256:9785a7e242dbd8ff973736c51fb09a6a1efe401dfff62d38f38d9fb48b7f6e46"
  },
  "meta": {
    "catalog_id": "efd4ea51-c968-44a6-9781-09c20796e8a6",
    "tags": ["River", "Croatia", "HDRi"],
    "author": "Sybren A. Stüvel",
    "description": "HDRi of river Mrežnica in Croatia"
  }
},
```

The listing generator writes the version of Blender that was used to
save the blend file.

Once an asset is downloaded, it will always be shown, regardless of
the version of Blender used. That may be changed in a future PR, but
such filtering is out of scope for this one.

Note: after landing this, all remote asset listings need to be
regenerated. Without a `bl_versions.max` field, the asset will not be
shown in Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/158768
2026-05-19 13:58:59 +02:00
Brecht Van Lommel
8a99f35a75 Tests: Split cycles bake tests to sidestep OSL OptiX timeouts
Compile time here can be long, run bake tests that require shader
ray-tracing separately so that these heavy kernels are compiled
separate from the others and each category fits within the timeout.

Pull Request: https://projects.blender.org/blender/blender/pulls/158770
2026-05-18 22:29:04 +02:00
Sybren A. Stüvel
98360c3e98 Refactor: rename .../assets/remote_library_listing to remote_library
Rename `scripts/modules/_bpy_internal/assets/remote_library_listing/`
to `.../remote_library/`. The Python module started out as code for
the remote listing, but now has all the asset-related code (so also
downloading the assets themselves).

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/158651
2026-05-15 16:30:51 +02:00
Sybren A. Stüvel
8781b96a4f Assets: improve download progress reporting
Download progress is now reported as `DownloadProgress` object, which
contains:

- The number of bytes streamed so far,
- the total number of bytes expected to be streamed (if the HTTP
  response included a `content-length` header, otherwise `None`).
- the number of bytes written to disk so far.

This also adds support for servers that did not send a `content-length`
header. In that case it's not possible for the downloader to compute a
percentage, but the user (in our case, the asset system) may know the
expected on-disk size of the asset, and with the 'number of bytes
written to disk so far' number, can still calculate this.

Related: !157644

Co-authored by: Jakub Ružička <yac@noreply.localhost>

Pull Request: https://projects.blender.org/blender/blender/pulls/158340
2026-05-14 17:11:02 +02:00
Campbell Barton
aeb8a44803 PyAPI: update the ImBuf API to only support one buffer-type at a time
Each `ImBuf` now behaves as if it can only have one pixel buffer.

- `imbuf.new()` takes a new keyword-only `buffer_type` argument
  (FLOAT, BYTE).
- `ImBuf.buffer_type` - new read only attribute.
- `ImBuf.convert_buffer_type(bufrer_type)` - function for
  converting between types.
- `ImBuf.with_buffer()` no longer takes a type argument.
- In the unlikely even both buffers are missing,
  `ValueError("ImBuf has no pixel data")` is raised.

Removed: (recently added, not regressions)

- `ImBuf.ensure_buffer`
- `ImBuf.has_buffer`
- `ImBuf.clear_buffer`

Ref !158532
2026-05-14 12:54:58 +10:00
Clément Foucault
4bbe6e4dab EEVEE: Add support for lightprobe plane on Blended material
This adds back lightprobe plane support for Blended Material
and Shader to RGB evaluation.

This adds a parallax property on the Lightprobe Planes to tweak
the amount of (non-physical) distortion caused by normals.

Unlike legacy EEVEE (4.1) this implementation does not do any
raytracing even if raytracing is enabled in the render options.
Instead, it uses the same heuristic when raytracing was disabled
in 4.1. However, it now uses the new parallax amount from the
planar lightprobe property.

The heuristic fades out reflections if the normal differs from
the reflection direction or if roughness is not small.

To avoid big regression in compile time, the sampling of the
planar probe is done only once for all the BSDFs and using the
average normal.

Fix #135198

Pull Request: https://projects.blender.org/blender/blender/pulls/158483
2026-05-13 19:50:22 +02:00
Brecht Van Lommel
3a572c5745 I/O: Harden geometry import for invalid data
* Use int64_t to avoid overflows, following our C++ guidelines.
* Add various index range checks for code that runs before mesh
  validation.
* Match some loop iteration variables to the size type.
* Ensure number of elements fit into int where needed.
* OBJ vertex weight import issue with || true (debug leftover?).
* USD invalid shape key size check (> instead of >=).
* USD now preserves vertex positions for some invalid topology,
  this the reason for usd_mesh_custom.txt test update.
* Note FBX import has fewer checks because ufbx already handles most.

Some of these are defensive, some prevent actual crashes. Tests were
added for various crashes.

These checks are meant to run in combination with mesh validation. We
try to prevent out of bounds access before validation but leave invalid
topology detection to the validation code.

Pull Request: https://projects.blender.org/blender/blender/pulls/158307
2026-05-13 14:24:11 +02:00
Brecht Van Lommel
3844bfe0f7 Tests: Don't print absolute path in I/O report
This make the test output not work on different machines.

Pull Request: https://projects.blender.org/blender/blender/pulls/158307
2026-05-13 14:24:11 +02:00
Criss-Ivana
550092a5ca Tests: Compositor: Update & simplify rotation regression tests
Follow-up to #154845

- moves tests from `tests/files/compositor/rotation/` into
`tests/files/compositor/utilities/`
- simplifies the `conversion_float2/3/4_to_quaternion`

Pull Request: https://projects.blender.org/blender/blender/pulls/158382
2026-05-13 14:19:17 +02:00
Brecht Van Lommel
aeb510c2ca Fix: Mesh validate fails to handle some invalid topology
* Handle cases where there is a combination of bad vertices, bad corner
  edges and duplicate edges. Regenerate edges when corner edges are bad,
  which simplifies the code and helps with this.
* Don't check only the first and last face offset, but also ensure face
  offsets are monotonically increasing.
* Bad span size in CD_ORIGINDEX checking.
* Material index checking incorrectly assumed there is a mesh to fix
  even when only a check should happen.

Pull Request: https://projects.blender.org/blender/blender/pulls/158306
2026-05-12 20:58:05 +02:00
Jesse Yurkovich
107d3950eb Tests: Add regression tests for recent append and link-pack bugs
Adds test coverage for the following 3 bugs:
- \#154707
- \#155006
- \#155087

Pull Request: https://projects.blender.org/blender/blender/pulls/158363
2026-05-12 20:29:27 +02:00
Aras Pranckevicius
14d549b16e Refactor: change ImBuf::planes to be ImColorMode enum, and rename to color_mode
- Instead of using integers 8, 16, 24, 32 (planes), use an enum
  ImColorMode (BW, BW_A, RGB, RGBA respectively) and rename the member
  to color_mode.
- Change IMB_allocImBuf to always set color mode to RGBA (that was
  majority of use cases); code that needs something else can just set
  color mode separately.
- Fix several places were checking "can an image possibly contain alpha"
  were not handling "grayscale + alpha" (planes==16) case correctly.
  E.g. VSE was treating a strip with such an image as opaque, and could
  wrongly occlude strips behind it.
- Several image file formats were not roundtripping gray+alpha images
  correctly, even when they can; that is now fixed.
- As a side effect, Jpeg 2000 images can be saved as grayscale (BW) now.
- RNA Image.color_mode and color_depth were marked as "enum_bitflag"
  seemingly by accident, that is no longer so.
- IRIS image writing code had option to write "Z" channel that was
  never used; removed.
- Cineon/DPX writing code had an even number of "wrong arguments" being
  passed to logImageCreate; behavior was fine since the errors cancelled
  out.
- uiTemplateImageInfo had incorrect check for grayscale format display.

Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/158207
2026-05-12 18:34:01 +02:00
Christoph Lendenfeld
32f621c6b4 Anim: Enable Only Insert Available by default
This changes the default user preference for autokeying
"Only Insert Available" to be `on`.

Discussed in an Animation & Rigging module meeting [1]

[1] https://devtalk.blender.org/t/2026-02-19-animation-rigging-module-meeting/44381#p-160747-patches-review-decision-time-5

Pull Request: https://projects.blender.org/blender/blender/pulls/154645
2026-05-12 14:03:21 +02:00
Campbell Barton
9de4db3070 PyDoc: missing args from the function signature now show as an error
In Python doc-string function signatures function arguments that had
no docs were reported however arguments that didn't reference known
arguments allowed.

Now warn on both and run tests with `--strict-docs`
so they will cause tests to fail.

Ref !158467
2026-05-12 16:43:32 +10:00
Campbell Barton
eef51afe17 Tests: add Python API doc-generation for RST & PYI stub files
Run the doc generator and stub generator with stub validation.

This helps ensure the doc-strings follow stricter conventions,
and should help avoid errors in the future.

Ref !158397
2026-05-12 04:59:15 +00:00
Campbell Barton
49f0703fd1 PyDoc: type hints for sphinx_doc_gen.py, various minor changes
Various changes in preparation for including documentation generation
in Blender's CTests (not HTML generation, as that takes much longer).

- Collect errors while building docs, print them to the stderr,
  then exit with an error exit code.
- Support passing in arguments to its `main(argv=None)`,
  so other scripts can invoke documentation generator.
- Use type hints for the doc generator, passes `mypy --strict`.
- Add a helper that type-checks the bundled scripts
  against the generated stubs - to help expose issues.

Ref !158399
2026-05-11 22:37:57 +00:00
Alaska
cba5b6c8c4 Cycles: Disable MNEE on Windows RDNA2
With the update to ROCm 7, Windows RDNA2 experiences artifacts when
using HIP with MNEE.

This commit temporarily disables MNEE on this configuration until it
can be fixed.

Ref #157541

Pull Request: https://projects.blender.org/blender/blender/pulls/158432
2026-05-11 20:45:27 +02:00
Jonas Holzman
d5d927b670 Deps: Library changes for Blender 5.2 LTS
### New libraries
- meshoptimizer v1.0
- tomli-w 1.2.0
- Tracy 0.13.1

### Updates of existing libraries
- OpenShadingLanguage 1.15.3.0
- OpenPGL 0.7.1
- ThorVG 1.0.3
- OpenUSD 26.03
- OpenImageIO 3.1.13.1
- libpng 1.6.58
- DPC++ 6.3.0
- Embree 4.4.1
- Intel Graphics Compiler v2.30.1
- Manifold 3.4.1
- x265 4.1
- ROCm / HIP 7.1.1 / 7.1.51803
- libexpat 2.7.5
- libtiff 4.7.1
- mesa 25.3.6
- OpenEXR 3.4.10
- OpenSSL 3.5.6
- Python 3.13.13
- sqlite 3.51.3
- libxml2 2.14.6
- ffmpeg 8.1
- Draco 1.5.7
- SDL 3.4.2

Library changes tracking issue ref: #153974

Co-authored-by: Sebastian Parborg <sebastian@blender.org>
Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Sahar A. Kashi <salipour@noreply.localhost>
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Bart van der Braak <bart@blender.org>
Co-authored-by: Thomas Dinges <thomas@blender.org>
Co-authored-by: Alaska <Alaskayou01@gmail.com>

Pull Request: https://projects.blender.org/blender/blender/pulls/157180
2026-05-11 19:04:45 +02:00
Campbell Barton
0cc7cc9e3e PyDoc: add *.pyi stub generator, that generates stubs from docs
Currently the stub generation mostly serves to expose gaps/errors in
Python's documentation, although it should be reasonably complete too.

While it is possible to use the generated stubs with mypy,
most scripts generate many errors, mainly because of `bpy.props.*`
annotations which aren't recognized by mypy.

- Generate mypy-compatible `.pyi` stubs from RST (`sphinx_stub_gen.py`).
- Validate stubs via syntax + import check (`sphinx_stub_validate.py`).
- Add `python_stubs` make target.
- Include dunder methods (`__*__` methods) in RST doc-strings,
  these used for the stub files, but also available in generated docs.
- Use foldable `.. details::` so as not to add unnecessary noise
  to the HTML output.
- Use literal default reprs for Matrix defaults so signatures can be
  evaluated.

Ref !156260
2026-05-09 05:16:41 +00:00
Sybren A. Stüvel
e57b7a131f Fix: correctly handle HTTP download sizes when stream compression is used
When HTTP stream compression was used, it would break conditional HTTP
downloading, because the streamed (so compressed) number of bytes of the
request was compared with the on-disk (so decompressed) size of the
downloaded file.

This is now fixed, and some other size-related fields have been renamed
to make it explicit that they are about the on-disk size.

Since this changes how the HTTP request metadata is stored on disk,
exising entries never match the on-disk file, and so every conditional
download will just re-download the file. This can't be helped, because
it's unknown whether the original request used stream compression or
not.

Pull Request: https://projects.blender.org/blender/blender/pulls/158334
2026-05-08 15:34:03 +02:00
Hans Goudey
7ca5713d99 Fix: Node Tools: Image data-block inputs broken
- Because these data-blocks don't use the copy-on-eval system,
  they need special handling in the system that creates evaluated
  data-blocks for use inside the node tool execution.
- The UI didn't account for the missing support of string name referenced
  data-blocks in `template_id`. It already did for font sockets a few lines up
  though. Fix the same problem for sound inputs.

Pull Request: https://projects.blender.org/blender/blender/pulls/158301
2026-05-08 15:22:06 +02:00
Hans Goudey
b68a2f3921 Fix #158280: Node Tools: Menu inputs broken since recent refactor
Caused by 1561c1ea4a
There were a few problems. First, the enum items generation callback
didn't get the pointer I had expected when writing this. Instead, generate
them when registering the operator. Second, the asset meta-data stored
things in a confusing way, resulting in the Python-accessible enum items
using numbers as the identifiers instead of the names like similar properties
on modifiers. Add a test to keep this all working in the future.
2026-05-08 15:22:05 +02:00
Sybren A. Stüvel
8f7d756880 Assets: add Python function to cancel download
Introduce download cancellation functions, for the HTTP downloader in
general, and for asset downloading.

Thumbnails and the downloading of asset library listings cannot be
cancelled. These are expected to be relatively small anyway.

The design:

- The HTTP downloader returns the exact URL that's being downloaded.
  This value is returned by the various abstraction layers in between.
  This ensures that the correct URL is known, regardless of the
  adjustments made by these abstraction layers (turning relative URLs
  into an absolute one, adding the expected file hash, etc.)
- The downloading URL is used to identify which download should be
  cancelled.
- When the same URL is queued for downloading multiple times, all of
  them are cancelled by a single call to the cancel function.
- Cancelling a URL that is not known to the downloader (because it was
  never requested, or because it's already fully downloaded) is a
  valid operation. It's simply a no-op.

Relevant for the calls from C++:

- `download_asset_file()` now returns the URL that was queued.
- `cancel_download()` takes the URL of the asset library (to identify
  the downloader instance) and the URL returned by the function above.
- Cancellation will be reported as 'download error' with
  `http_dl.DownloadCancelled` as exception type.

Pull Request: https://projects.blender.org/blender/blender/pulls/158264

Pull Request: https://projects.blender.org/blender/blender/pulls/158264
2026-05-08 14:31:56 +02:00
Jesse Yurkovich
aabaffd311 USD: Implement incremental save for export
USD export currently only saves to disk at the very end of export. Due
to how USD de-duplicates data, all timeSamples remain in memory until
that time. This is problematic for cases such as #156402 that, due to
their size, quickly exhausts memory.

The solution is to call Stage Save() throughout the export process
instead of waiting until the end. However, it needs to be configurable.
Incremental saves have caused issues in the past for Google Drive
locations and it will be slower to export (slightly). Additionally, it's
not trivial or elegant to estimate the size of the exported data either.
We leave it up to the user to decide how frequently to save.

The new option will be displayed when the Animation option is selected.

Fixes #156402

Pull Request: https://projects.blender.org/blender/blender/pulls/158069
2026-05-06 21:02:49 +02:00
Criss-Ivana
f1185c873b Compositor: Port rotation nodes from geometry nodes
This patch adds support for Rotation sockets as well as existing nodes
from Geometry Nodes. This includes the Rotate Vector, Invert Rotation,
Rotation to Euler, Euler to Rotation, Rotate Rotation, Rotation to Axis
Angle, Axis Angle to Rotation, Mix Rotation, Rotation to Quaternion,
Quaternion to Rotation, Align Rotation to Vector, and Axes to Rotation
nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/154845
2026-05-06 13:26:35 +02:00