Commit Graph

151206 Commits

Author SHA1 Message Date
Jeroen Bakker
e63a20fee1 Vulkan: HDR support for Wayland
This change enables HDR support for wayland as an experimental feature.
It supports both non-linear extended sRGB and un-clamped sRGB.

Windows isn't supported as the HDR settings are not accessible via an
API and would require similar settings that games use to configure the
monitor. Adding those sliders isn't what we would like to add.

Vulkan (working group) is working on new extensions that might change
the shortcomings. It isn't clear yet what the extension will do and what
the impact is for applications that want to use it. When the extension
is out we should review at the situation again.

Pull Request: https://projects.blender.org/blender/blender/pulls/133159
2025-06-24 11:51:14 +02:00
Jacques Lucke
f94ec130c3 Fix: outdated structure type test
This was changed in 7b7c630018.
2025-06-24 11:33:16 +02:00
Bastien Montagne
301d421234 Fix missing brushes in UI after IDProps split commit.
Yesterday's 7276b2009a commit splitting idprops between 'user' and
'system' defined ones fully broke brushes in the UI.

The issue is, Asset metadata stores additional info in its idprops,
without exposing them to user, but without creating RNA access for them
either.

For now, revert their RNA definition to be 'user-defined' ones, enabling
their access through 'dict-like' syntax in Python.

On the longer run, we probably want a cleaner solution for them. While
the issue is similar to the 'Node Modifier' (and 'Node Tool') cases, not
sure if we would actually want to define RNA access for these asset
metadata, as they are likely more like a 'raw data' container, without
requirement for setters, getters, updates etc. that are provided by
actual RNA properties?

So maybe we rather need to define a proper way to access this type of
storage (raw idprops, but strictly managed by Blender, and not the
user)? Could be by exposing them as an explicit property, with probably
a new sub-type of `PropertyGroup`?

CC @JulianEisel & @dr.sybren
2025-06-24 10:49:04 +02:00
Campbell Barton
a88ff71148 Merge branch 'blender-v4.5-release' 2025-06-24 17:58:50 +10:00
Campbell Barton
56898fafcf Merge branch 'blender-v4.5-release' 2025-06-24 17:58:45 +10:00
Campbell Barton
cda9ce9777 Fix #136396: Metaball Cube can't be selected with solid shading
The metaball selection radius was inside the cube and could only
be selected with wire-frame shading.

Resolve by expanding the radius by the dimensions of the cube.
2025-06-24 07:56:50 +00:00
Jacques Lucke
cd952a1a70 Cleanup: Nodes: improve eager closure evaluation comment 2025-06-24 09:54:55 +02:00
Christoph Lendenfeld
32d2bc0a59 Fix #139277: box selecting on the summary line fails with NLA in tweak mode
The issue was that the summary channel was marked as
possible to do NLA mapping in `ANIM_nla_mapping_allowed`.
When it comes to doing the actual mapping it would silently do nothing
though because `bAnimListElem.adt` is always a `nullptr` for the summary.
However in `action_select.cc:580` the `KED_F1_NLA_UNMAP`
and `KED_F2_NLA_UNMAP` flags were already removed.
Those flags tell the summary line to do NLA mapping in `keyframes_edit.cc:368`.
(We may be able to remove those in the future)

The fix is to ensure that the summary line is
recognized as unable to do NLA mapping. That makes sense to
me at least because the summary line points to data but in itself
does not know about the NLA.

As a side effect, this also fixes circle select.

Pull Request: https://projects.blender.org/blender/blender/pulls/140664
2025-06-24 09:53:06 +02:00
Omar Emara
4f32795ed5 Fix: Compositor assert on wrong result type
Since image coordinates now uses Float2 types, implicit input operations
should use the same type, which was missed in a recent refactor.
2025-06-24 10:26:16 +03:00
Clément Foucault
066cdf1d94 Fix #140894: EEVEE: ASAN error loading the 2D Animation workspace
ASAN report errors for a value of -1 (all bits high) but
dones't for a value of 0. In this case it doesn't matter which
of the two values are used since they are both invalid and
will be updated inside `assign_if_different`.
2025-06-24 09:24:10 +02:00
Jacques Lucke
5bfe1692f9 Merge branch 'blender-v4.5-release' 2025-06-24 09:03:30 +02:00
Jacques Lucke
f3ba5bf08d Fix #140876: input socket interface not correctly propagated by link-drag-search
The solution is to use the same utility function that's also used when
connecting links to the extend socket of the Group Input node.
2025-06-24 09:02:18 +02:00
Campbell Barton
cebcb9c682 Merge branch 'blender-v4.5-release' 2025-06-24 15:57:08 +10:00
Campbell Barton
0be817a01c Fix knife tool showing axis in the wrong direction before cursor motion
Changing constraints required cursor motion to refresh the display.
2025-06-24 15:53:47 +10:00
Jacques Lucke
7b7c630018 Refactor: Nodes: use structure type inferencing for field links
The goal here is to reduce our reliance on the existing field inferencing code
and use the new and more general structure inferencing code instead.

This patch changes patch refactors link drawing so that whether links are drawn
dashed does not depend on field inferencing anymore. Same for the invalid field
links.

I don't expect that this changes the drawing of any existing links. It just
makes it easier to fully remove the old field inferencing in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/140869
2025-06-24 07:25:15 +02:00
Campbell Barton
7e2926233d Fix #138742: Knife tool not locking to axis when snapping to edge
Regression in [0] which moved the logic from
knife_closest_constrain_to_edge from 2D to 3D space.
The 3D location used (kcd->curr.cage) didn't have constraints
applied, causing snap not to lock to the constrained axis.

Resolve by passing in the constrained location which is then used when
edge snapping is calculated.

[0]: 7249b78b6b
2025-06-24 15:24:49 +10:00
Hans Goudey
23da20bbc0 Merge branch 'blender-v4.5-release' 2025-06-23 22:04:58 -04:00
Hans Goudey
2e568d31ed Fix #140767: Render Simplify "Normals" option doesn't work
One obvious problem is that `mr.use_simplify_normals` was assigned after
face corner normals were retrieved. The other more complex problem is
that now the normals caches automatically mix custom normals from other
domains. This can cause the expensive "Tangent Space" normals to be
calculated even though we don't explicitly request face corner normals.
To fix this, clarify the purpose of the option to only apply to that custom
normals format and use the true normals instead in that case.

Pull Request: https://projects.blender.org/blender/blender/pulls/140879
2025-06-24 03:52:40 +02:00
Guillermo Venegas
e300d44e69 Refactor: UI: Add uiLayout use_property_decorate methods
This replaces uiLayout use_property_decorate API with uiLayout
methods, following uiLayout refactors and the Python API naming.

Pull Request: https://projects.blender.org/blender/blender/pulls/140887
2025-06-24 03:52:17 +02:00
Campbell Barton
b2f8f1c1c5 Cleanup: remove unused variable, imports, correct typo 2025-06-24 11:35:53 +10:00
Howard Trickey
ab96ffadb9 Merge branch 'blender-v4.5-release' 2025-06-23 21:29:35 -04:00
Rob Blair
379fffaf0d Fix #139664: bevel weight is now used for offset collisions #140436.
Problem - offset collision check for bevels did not consider the reduced
offset when using bevel edge weights, thus greatly reducing the allowed offset.
Solution - calculate the offset check using the weighted value and not
the full offset.
Alternatives - Since this error was introduced in the patch dd334faa58
a solution would be to revert the patch. This is not optimum since the
patch did correct the inf/inf condition in the offset calculation (ex at
90 degs, tan is 1/0).
Limitations - This patch is a correction to return the bevel function to
it's previous abilities. Further work is needed to properly handle edge
offset interference when looking at n-gons with reflex angles. There are
also situations where the bevel operation exceeds the checked offset distance
(exs. inner arc spread and bevel profiles that are not normal to the bevelled edge).
2025-06-23 21:15:48 -04:00
Campbell Barton
6dd941bf69 Fix NDOF camera view zoom & pan direction
Correct merge error from 4.5.
2025-06-24 09:39:24 +10:00
Bastien Montagne
82534672d4 Fix broken Node Tools after IDProps storage split.
Caused by 7276b2009a.

Turns out that for the same reasons as the Nodes modifier, Operator RNA
struct also needs to keep the 'old' IDProperties access for now, to
support Node Tools.

Can't wait for #132129 to be implemented...
2025-06-23 20:16:30 +02:00
Clément Foucault
2cc5787885 Fix #67700: EEVEE: Particle Viewport Display affects Render result
This is caused by the display check not taking into consideration
the render mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/140877
2025-06-23 19:39:56 +02:00
Jesse Yurkovich
8219e2202f Cleanup: USD: Various non-functional changes for usd_hook.cc
Follow our C++ coding guidelines related to member variable naming and
ordering within classes.

Pull Request: https://projects.blender.org/blender/blender/pulls/140785
2025-06-23 19:25:36 +02:00
Sean Kim
bf483ae2eb Merge branch 'blender-v4.5-release' 2025-06-23 10:23:17 -07:00
Sean Kim
7274fdb377 Fix #140556: Mask filter operations behave incorrectly on dense meshes
Mistake in 57c4e9dd2c

Pull Request: https://projects.blender.org/blender/blender/pulls/140570
2025-06-23 19:22:33 +02:00
Sean Kim
41d8066b1e Fix: Potential NaN when calculating average values
It is possible for a vertex to be processed by some function that
attempts to calculate the average of an attribute of all neighboring
elements when all elements are hidden. This results in NaN when using
`math::rcp` for the size of the related indices.

This commit switches the `rcp` call for the safe variant and removes an
invalid assert that previously existed.

Further cleanup to consolidate the various different average methods
will occur in the main branch (e.g. the `check_loose` and `interior`
functions)

Pull Request: https://projects.blender.org/blender/blender/pulls/140569
2025-06-23 19:21:53 +02:00
Guillermo Venegas
d600b1002a Refactor: UI: Add uiLayout use_property_split methods
This replaces uiLayout use_property_split API with uiLayout methods,
following uiLayout refactors and the Python API naming.

Pull Request: https://projects.blender.org/blender/blender/pulls/140874
2025-06-23 19:07:09 +02:00
Bastien Montagne
7276b2009a Core: Add new 'system IDprops' storage for runtime-generated RNA properties.
This commit cleanly splits IDProperties storage for its two very different
usages:
* "User-defined" data, also known as "custom properties". Mostly exposed
  in UI and as 'dictionary' in Python scripting, these are unique to each data
  (each object can have its own set of custom properties).
* "System-defined" data, mainly as backend-storage for runtime RNA
  structures and properties. While these are not necessarily present in the
  storage, they are registered for a data type, and therefore always available
  to all data of that type through RNA access.

See #123232 for rationales, designs and alternative investigated solutions.

## User-facing Changes

When using Blender, the only noticeable change is that python-defined RNA
data are not listed anymore in the Custom Properties panels (e.g. Cycles
data).

From a Python API perspective, the main changes are:
* Runtime RNA structs defined by sub-classing `PropertyGroup` and
  registering them are no more accessible through the 'dict' syntax.
  * They remain accessible through a dedicated 'bl_system_properties_get()`
    callback, but its usages are only expected to be for testing and
    debugging.
  * The result of this call will be `None` by default when there has been
    nothing written into it yet, unless its optional `do_create` parameter
    is set to `True`.
* Some types (like `Node`, `UIList`, etc.) cannot store raw IDProperties
  anymore (using the 'dict' syntax).

## Technical Details

* Adds System idprops to some data types (IDs, ViewLayer...).
* Moves some other containers (e.g operator properties, or some UI types like
  UILists) to only have system-defined properties.
* For a few specific types (like `PropertyGroup`), the same storage is used,
  but exposed in RNA as both user and system properties.
* Adds RNA API accessor callback to system idprops.
* Adds a function `bl_system_properties_get()`, which wraps system-defined
  idprops and gives 'dict-like' access to them. Currently mainly used by some
  unittests.
* System IDProps are always ignored by RNA diffing code (and therefore
  liboverride processing), as their value is already exposed through RNA
  properties, and should always be processed through these RNA properties.
* Modifies bpy rna binding to use these new system idprops for property
  accesses, and keeps using user-defined idprops for 'dict-type' accesses.
* Handles versioning by copying 'user idprops' (existing ones) into new
  'system idprops'.

### IDProperties Split

These types keep their historic IDProperty storage for user properties,
and get a new `system_id_properties` storage for system properties:

`ID`, `ViewLayers`, `Bone`, `EditBone`, `BoneCollection`, `PoseBone`, `Strip`

These types can both be extended with registrable RNA properties, and
expose Custom Properties in the UI.

### IDProperties become System Ones

These types keep a single IDProperties storage (their DNA struct does not
change), but it is now exclusively used for system-defined properties.

`OperatorProperty`, `View3DShading`, `UIList`, `AddonPreferences`,
`KeyConfigPreferences`, `GizmoProperties`, `GizmoGroupProperties`,
`Node`, `NodeSocket`, `NodeTreeInterfaceSocket`, `TimelineMarker`,
`AssetMetaData``

Since user properties were never available in the UI for them, they lose
their 'dict-like' IDProperties access in the Python API.

### Single Storage, Exposed as Both in API

These types still use a single IDProperty storage, but expose it both as
user properties and as system ones through RNA API.

* `PropertyGroup`: They need both access APIs since they are both
  used for raw IDProperty groups (the 'dict-like' access), and
  internally to access data of runtime-defined RNA structs.
* `IDPropertyWrapPtr`: Done mainly to follow `PropertyGroup`.
* `NodesModifier`: cannot become purely system idprops currently, as
  there is no other access than the 'raw ID properties' paths to their
  values. This can be changed once #132129 is finally implemented.

Pull Request: https://projects.blender.org/blender/blender/pulls/135807
2025-06-23 18:25:24 +02:00
Omar Emara
c2356b6f27 Fix: Math node from old file is undefined
Maths nodes in files saved in late v4.5 will load as undefined in 5.0.
That's because versioning ran for versions before 4.5, not after. To fix
this, we move versioning to 5.0 to cover such cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/140868
2025-06-23 18:22:26 +02:00
Lukas Tönne
8dd3bc48cb Animation: New test for armature deformation
This tests code in `armature_deform.cc` under various combinations
of input options.

- Interpolation:
    - [x] Linear
    - [x] Dual-Quaternion (aka. "Preserve Volume", `ARM_DEF_QUATERNION`)
- Bone weighting:
    - [x] disabled (no `ARM_DEF_*` flags)
    - [x] envelopes (`ARM_DEF_ENVELOPE`)
    - [x] vertex groups (`ARM_DEF_VGROUP`)
    - [x] envelopes + vertex groups
    - [x] single vertex group (`defgrp_name` parameter)
- Outputs:
    - [x] Position-only
    - [x] "Full" (deform matrix, for crazyspace)
- Target object types:
    - [x] mesh
    - [x] edit-mesh (bmesh)
    - [x] curves
    - [x] unsupported ID type (should pass through)
- [ ] Inverted vertex group (`ARM_DEF_INVERT_VGROUP`)
- [ ] Multi-modifier feature

Pull Request: https://projects.blender.org/blender/blender/pulls/140541
2025-06-23 18:11:33 +02:00
Jacques Lucke
a33881286a Cleanup: extract function determining whether socket is always single 2025-06-23 18:11:06 +02:00
Sean Kim
14bf22ffb5 Merge branch 'blender-v4.5-release' 2025-06-23 08:58:52 -07:00
Sean Kim
ffcbe6205b BLI: Add assert for indexed_data_equal
Typically, we use this function to determine whether or not a subset of
data that has been collected with `gather` needs to be then persisted
into a larger array with `scatter`. As such, it makes sense to assert on
equality of the indices and smaller array size.

Pull Request: https://projects.blender.org/blender/blender/pulls/140752
2025-06-23 17:57:59 +02:00
Philipp Oeser
c3ac501fa0 Merge branch 'blender-v4.5-release' 2025-06-23 17:52:46 +02:00
Philipp Oeser
5790ff3b6a Fix #140801: Particle Weight Overlay Broken
Was not showing weights on the lines (but the points instead).
Points were supposed to show selection though, not weights.

This is now corrected.

Pull Request: https://projects.blender.org/blender/blender/pulls/140862
2025-06-23 17:52:31 +02:00
Philipp Oeser
32d8860316 Merge branch 'blender-v4.5-release' 2025-06-23 17:52:04 +02:00
Clément Foucault
0e6dee37fa Fix: DRW: Assert caused by empty strand buf
Vertex buffers need to be at least 1 vertex in size.
2025-06-23 17:39:06 +02:00
Habib Gahbiche
5f00f9e08a Fix #140381: Crash after creating a node group and undo
We need to ensure that the compositor preview depsgraph gets updated
properly after undo, now that the compositing node tree is not embedded
in the scene anymore.

A test case will be committed separately in #140595

Pull Request: https://projects.blender.org/blender/blender/pulls/140596
2025-06-23 16:18:55 +02:00
Bastien Montagne
13068b2e9c RNA: Add 'self as RNA' flag for RNA functions.
This allows such functions' callbacks to receive the 'self' data as a
PointerRNA, instead of a pointer of the relevant DNA type.

This commit also adds some validation of flags when defining them for
a FunctionRNA.

Part of !135807.
2025-06-23 16:08:52 +02:00
Sebastian Parborg
ef3e30c8fe Merge branch 'blender-v4.5-release' 2025-06-23 15:21:02 +02:00
Brecht Van Lommel
a7bcea76d7 Fix #139769: ACES 2.0 configuration fails with shader errors
This code was initially only for OpenColorIO 2.3, and then later removed in
the refactor. But it appears to still be needed for 2.4 and configs like this.

Pull Request: https://projects.blender.org/blender/blender/pulls/140824
2025-06-23 15:13:59 +02:00
Sebastian Parborg
f42b470902 Build: Update linux libs 2025-06-23 15:05:28 +02:00
Sebastian Parborg
e9bb088f77 Build: Update linux libraries 2025-06-23 15:05:28 +02:00
Sebastian Parborg
c8ba4415c9 Build: Update linux libraries 2025-06-23 15:04:06 +02:00
илья _
a59a70edf4 Curves: Support cyclic curves in Proportional Editing
Small patch to pass the fact of cyclic curve into the search algorithm to
propagate editing weight on connected part via bridge on a curve ends.

Pull Request: https://projects.blender.org/blender/blender/pulls/139700
2025-06-23 15:00:16 +02:00
Julian Eisel
0c25411fd9 Merge branch 'blender-v4.5-release' 2025-06-23 14:41:31 +02:00
Julian Eisel
e852533ddd Fix #140781: Crash on "Adjust Pose asset" from Asset Browser
See:
https://projects.blender.org/blender/blender/issues/140781#issuecomment-1608861.
2025-06-23 14:39:41 +02:00