Commit Graph

2310 Commits

Author SHA1 Message Date
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
Brady Johnston
0a77a57c4e Geometry Nodes: Add OpenVDB grid operators
Adds four new grid operator nodes that wrap OpenVDB's differential
operators. All nodes take a grid input and output a grid, potentially
with a different data type.

New nodes:
- Grid Curl: Calculate curl of vector field (Vec3 → Vec3)
- Grid Divergence: Calculate divergence of vector field (Vec3 → Float)
- Grid Gradient: Calculate gradient of scalar field (Float → Vec3)
- Grid Laplacian: Calculate Laplacian of scalar field (Float → Float)

These operators enable vector calculus operations on volume grids for
effects like flow analysis, vortex detection, etc.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146845
2025-10-02 16:28:46 +02:00
Sybren A. Stüvel
3171a22dfd Refactor: adjust unit tests to no longer use the legacy Action API
Adjust various unit tests so that they no longer use the legacy Action
API (which was deprecated in Blender 4.4 and will be removed in 5.0).

No functional changes.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/147060
2025-10-02 14:42:42 +02:00
Sybren A. Stüvel
e077c189ec Refactor: Action unit tests, replace deprecated self.assertEquals() call
In the Action unit tests, replace the calls to the deprecated
`self.assertEquals()` function with `self.assertEqual()`.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147185
2025-10-02 11:41:38 +02:00
Hans Goudey
4aae4a983a Tests: Add another mesh join test for recent report
Add a test for the case where the active mesh doesn't yet
have shape keys #147097.

Pull Request: https://projects.blender.org/blender/blender/pulls/147126
2025-10-01 16:45:02 +02:00
Brecht Van Lommel
7f94df2926 Tests: Block failing object_dicing test on OptiX OSL
This does not support wireframe yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/147124
2025-10-01 16:23:38 +02:00
Bastien Montagne
ada45519a7 Fix #146221: Concurrent access to IDPropertyGroup in liboverride code.
Crash seems to happen due to parallelized access of data in liboverride
diffing code (presumably when a same linked data is used as reference
for several local liboverrides?).

Since there is zero reason to actually create IDGroup properties there
(it's actually fairly bad, also adding useless overhead and trash data
in system IDProperties), add a new API to access a Pointer PropertyRNA,
`RNA_property_pointer_get_never_create`, which ensures that the call
never creates data, and simply returns `PointerRNA_NULL` instead.

Also reverts abd683fcb5 and re-enable liboverride unittests.

NOTE: This only addresses the case from the report, the current behavior
of `RNA_property_pointer_get` is simply wrong and needs to be rethought.
This is not a simple change though most likely. See also #147072.

Pull Request: https://projects.blender.org/blender/blender/pulls/146990
2025-10-01 15:14:28 +02:00
Habib Gahbiche
fb7818e55e Python: Create default node tree for new materials and worlds
The motivation is to keep backward compatibility after deprecating
 `material.use_nodes()` and `world.use_nodes`. For example the
following script would behave the same way in 4.5 and 5.0:
```python
mat = bpy.data.materials.new("My new mat")
mat.use_nodes = True
```

Pull Request: https://projects.blender.org/blender/blender/pulls/147052
2025-10-01 15:05:16 +02:00
Brady Johnston
8b3be68b3d Geometry Nodes: new Join Bundle Node
Adds a Join Bundle node with a multi-input Bundle socket. Bundles are
iterated on the top level of each input bundle and items added to the resulting
single bundle. While creating the final bundle existing items have priority and
new items with an already existing name are discarded.

There is an info message when there are duplicate keys in the input bundles.

Co-authored-by: Brady Johnston
Co-authored-by: Jacques Lucke
Pull Request: https://projects.blender.org/blender/blender/pulls/146750
2025-10-01 09:20:11 +02:00
Aras Pranckevicius
1af6ac57f5 Fix #146943: VSE crash due to recursive mask rendering
When a strip modifier uses an adjustment layer that is above it
as the mask input, this leads to recursive rendering. Similar to the
fix in !146624, pass SeqRenderState to modifiers as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/147029
2025-09-30 16:54:46 +02:00
Falk David
c08fccae53 Fix #146155: VSE: Too agressive sequencer scene versioning
The sequencer scene was set to the active scene in the window
in all cases. This is not great because we really only expect
the sequencer scene to be assigned when it was used.

The fix changes the versioning code to ensure that
1) The window has any VSE open.
2) The active scene uses an `Editing` struct (e.g. the user created
  strips, or interacted in some way with the VSE).

This also changes back the test that checks for the usages
of IDs. Before this test had to include the workspace for
the default scene. Now this scene is no longer used
by the workspace, because the versioning that sets
the sequencer scene is no longer run.

Pull Request: https://projects.blender.org/blender/blender/pulls/147044
2025-09-30 15:04:57 +02:00
Sybren A. Stüvel
dbcb701eb2 Anim: make it easier to convert from legacy to current Action API
The changes:

1. Add `group_name` to the `channelbag.fcurves.new()` and
   `action.fcurve_ensure_for_datablock()` RNA functions.
2. Add `anim_utils.action_ensure_channelbag_for_slot(action, slot)`.
3. Add `channelbag.fcurves.ensure()` RNA function.

This makes it possible to replace this legacy code:

```py
fcurve = action.fcurves.new("location", index=2, action_group="Name")
```

with this code:

```py
channelbag = action_ensure_channelbag_for_slot(action, action_slot)
fcurve = channelbag.fcurves.new("location", index=2, group_name="Name")
```

or replace this legacy code:

```py
fcurve = action.fcurves.find("location", index=2, action_group="Name")
if not fcurve:
    fcurve = action.fcurves.new("location", index=2, action_group="Name")
```

with this code:

```py
channelbag = action_ensure_channelbag_for_slot(action, action_slot)
fcurve = channelbag.fcurves.ensure("location", index=2, group_name="Name")
```

Note that the parameter name is different (`action_group` became
`group_name`). This clarifies that this is the name of the group, and
not a reference to the group itself.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/146977
2025-09-30 14:43:56 +02:00
marcopavanello
390f053e32 Fix #146630: Single Scattering Sky has darker pixels near horizon
Store the ground fading of Single Scattering sky directly in the LUT.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/146659
2025-09-29 20:56:32 +02:00
Jacques Lucke
02bdc709c2 Shader Nodes: support Menu Switch node
This implements the Menu Switch node in shader nodes. It's the same node that is
used in Geometry Nodes and the Compositor.

The Menu Switch node is purely handled during preprocessing and thus builds on
top of #141936. Hence, it's input has to be a single value, just like the
iteration count for repeat zones. This limitation can be lifted in the future,
but currently there is no way to produce a non-single menu value in shader
nodes. This will become possible if other Switch nodes are added though.

Pull Request: https://projects.blender.org/blender/blender/pulls/146896
2025-09-29 17:26:38 +02:00
Bastien Montagne
1c64e403c4 Fix #146802: Py-defined property min/max handling is broken.
Regression from 469f54f484, somehow the clamping for default set of Int
properties was removed in this big refactor, merely add it back, and add
some unittests covering min/max handling.

Pull Request: https://projects.blender.org/blender/blender/pulls/146975
2025-09-29 15:01:08 +02:00
Jacques Lucke
4d91f5c8ef Fix #146588: raise exception when attempting invalid idproperty renaming in Python
Each name has to be unique within a group, so when renaming an idproperty, one
has to make sure that the parent group does not contain duplicates afterwards.
This patch raises a `NameError` when setting the name to one that exists
already. Alternatively, one could delete the already-existing property, but that
seems unexpected and the user should rather do that explicitly.

This also adds a new unit test for this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/146892
2025-09-29 13:54:08 +02:00
Casey Bianco-Davis
d2269441bb Python: Rename bpy.data.grease_pencils_v3 to bpy.data.grease_pencils
This renames `bpy.data.grease_pencils_v3` to `bpy.data.grease_pencils`.

Part of #125058.

Pull Request: https://projects.blender.org/blender/blender/pulls/146904
2025-09-29 12:32:08 +02:00
Amogh Shivaram
2bd06093c7 Cycles: Thin film iridescence for metals
Applies thin film iridescence to metals in Metallic BSDF and Principled BSDF.

To get the complex IOR values for each spectral band from F82 Tint colors,
the code uses the parametrization from "Artist Friendly Metallic Fresnel",
where the g parameter is set to F82. This IOR is used to find the phase shift,
but reflectance is still calculated with the F82 Tint formula after adjusting
F0 for the film's IOR.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Co-authored-by: Weizhen Huang <weizhen@blender.org>
Co-authored-by: RobertMoerland <rmoerlandrj@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141131
2025-09-29 02:58:20 +02:00
Hans Goudey
3bed61b33c Fix #146497: Geometry Nodes: Don't display deprecated "Texture" socket type
Ideally we'll remove this socket type at some point,
but for now we should make sure not to display it.

Pull Request: https://projects.blender.org/blender/blender/pulls/146502
2025-09-27 19:52:18 +02:00
Hans Goudey
eef9a1b9ae Geometry Nodes: UV tangent node
This node outputs tangent values for face corners. There are two methods:
- **Exact** is the same MikkTSpace calculation used elsewhere in Blender.
- **Fast** (from #131308) is over 4x faster, and useful in many of
  the same situations, though not necessarily tangential to the surface.

The reason to include both methods is that there are use cases where the
quality of the tangents don't matter (though the results are actually very
similar visually), we just need some continuous values across faces.

Pull Request: https://projects.blender.org/blender/blender/pulls/145813
2025-09-27 18:57:18 +02:00
Jeroen Bakker
8409f81f9f Workbench: Use strip curve rendering during rendertests
This PR enables strip curve drawing when performing the workbench
rendertests. On Intel/vulkan the lines are to far off. Using strip will
reduce platform differences. Downside is that (basic) line rendering is not
covered anymore by a render test.

Pull Request: https://projects.blender.org/blender/blender/pulls/146820
2025-09-26 12:38:47 +02:00
Weizhen Huang
2b0a1cae06 Cycles: Add an option to use ray marching for volume rendering
Null Scattering currently has performance and noise issues, and it will
take time to address them. For now add the previous Ray Marching back as
an option.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146317
2025-09-26 12:14:45 +02:00
Jacques Lucke
4e4976804e Core: Add packed linked data-blocks
This adds support for packed linked data. This is a key part of an improved
asset workflow in Blender.

Packed IDs remain considered as linked data (i.e. they cannot be edited),
but they are stored in the current blendfile. This means that they:
* Are not lost in case the library data becomes unavailable.
* Are not changed in case the library data is updated.

These packed IDs are de-duplicated across blend-files, so e.g. if a shot
file and several of its dependencies all use the same util geometry node,
there will be a single copy of that geometry node in the shot file.

In case there are several versions of a same ID (e.g. linked at different
moments from a same library, which has been modified in-between), there
will be several packed IDs.

Name collisions are averted by storing these packed IDs into a new type of
'archive' libraries (and their namespaces). These libraries:
* Only contain packed IDs.
* Are owned and managed by their 'real' library data-block, called an
  'archive parent'.

For more in-depth, technical design: #132167
UI/UX design: #140870

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133801
2025-09-26 10:53:40 +02:00
Brecht Van Lommel
e91c8300a6 OpenEXR: Write colorspace metadata for multilayer EXR
Previously it was only working for the single layer case. For multipart
we write the colorspace in each part. For single part we write the first
non-data colorspace, and hope data passes will be identified based on channel
name like Blender does (e.g. XYZ instead of RGB).

Reading is unchanged and still the same as before, in that it only reads the
colorspace from the first part. There is only one color space per image
datablock, so we can not store anything more currently. In practice it
would be unusual for all passes in a file not to either have the same
colorspace or be data.

All the compositor file output test images were updated to include the
metadata, so that the test will check if the metadata is there.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/146809
2025-09-25 23:27:14 +02:00
Brecht Van Lommel
be1619f4ad OpenEXR: Multi-part writing
New "Interleave" option in image format settings, enabled by default in old
files and disabled by default in new files to write multi-part files.

By not storing all channels interleaved, it is possible for other applications
to load individual passes more efficiently. This might also work better with
compression.

We follow the OpenEXR docs in that the channel name is the full
Layer.Pass.Channel rather than just Channel. Some other renderers
(e.g. Houdini Karma) write just the channel and that is what our reading
code assumed so far.

I've verified that Nuke can read the multipart EXR files produced by Blender,
including multiview and cryptomatte.

Fix #123727

Pull Request: https://projects.blender.org/blender/blender/pulls/146650
2025-09-25 22:58:11 +02:00
Brecht Van Lommel
689f182792 Cycles: Make adaptive subdivision a non-experimental feature
* Add adaptive subdivision properties natively on the subdivision surface
  modifier, so that other engines may reuse them in the future. This also
  resolve issues where they would not get copied properly.
* Remove "Feature Set" option in the render properties, this was the last
  experimental one.
* Add space choice between "Pixel" and "Object". The latter is new and can
  be used for object space dicing that works with instances. Instead of
  a pixel size an object space edge length is specified.
* Add object space subdivision test.

Ref #53901

Pull Request: https://projects.blender.org/blender/blender/pulls/146723
2025-09-25 16:18:50 +02:00
Brecht Van Lommel
488ff26d35 Tests: Update multilayer image tests for 5.0 changes
The frame number is no longer included on F12.

Pull Request: https://projects.blender.org/blender/blender/pulls/146725
2025-09-25 15:08:30 +02:00
Brecht Van Lommel
ab644f2ecb Tests: Compare all subimages in compositor file output tests
For multilayer files it was only comparing the first pass, so any issues
with other passes would be missed.

Also don't clear the filename for multilayer file output nodes, as that
doesn't work when there are multiple such nodes all writing to the same
file name. This will be used in an upcoming EXR multipart writing test.

Ref #146650

Pull Request: https://projects.blender.org/blender/blender/pulls/146726
2025-09-25 15:02:13 +02:00
Bastien Montagne
541f41c628 Tests: Split 'versioning' smoke-tests further.
While adding more tests does add a tiny bit of overhead, having tests
within the 10s range is better to ensure a good distribution of them
over many threads. It also helps narrowing down the actual blendfile in
case of issues.
2025-09-25 13:04:32 +02:00
Sean Kim
344040a891 Tests: Update workspace UI tests
* Removes unused entries for 2D Animation
* Adds 'Storyboarding' test

Pull Request: https://projects.blender.org/blender/blender/pulls/146760
2025-09-25 11:57:14 +02:00
Sean Kim
327a1925cf Paint: Rename curve and curve_preset
This commit renames the following DNA fields and corresponding RNA
properties to better represnt usage:

* `Brush.curve` to `Brush.curve_distance_falloff`
* `Brush.curve_preset` to `Brush.curve_distance_falloff_preset`

Pull Request: https://projects.blender.org/blender/blender/pulls/146254
2025-09-25 11:54:53 +02:00
Richard Antalik
97297bd167 Fix #146484: Stack overflow due to recursive strip rendering
When effect of adjustment layer strip is moved below the adjustment
layer, this causes infinite loop in strip rendering. Same happens when
you use multicam strip and set source channel to one of its effects.

This is fixed by passing `SeqRenderState` to the effects. If any strip
renders "seqbase" pointer of strip is stored in set in the render state
struct. If the pointer exists in this set, function returns without
rendering anything. In other words, The strip must never render itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/146624
2025-09-25 08:48:56 +02:00