Commit Graph

120488 Commits

Author SHA1 Message Date
Cartesian Caramel
bc1d2194bd Compositor: Add tooltip to Map UV node UV input 2025-06-11 09:25:09 +02:00
David Murmann
c15850e09c Fix #110701: ffmpeg: Output settings lost when switching the output format
When switching render output between different formats (e.g.
ffmpeg video and png images), the previously used ffmpeg settings
were lost if audio codec was set to "No Audio" (which is the default).

Pull Request: https://projects.blender.org/blender/blender/pulls/139878
2025-06-11 09:19:57 +02:00
Jacques Lucke
3da6d84466 Geometry Nodes: support creating Combine Bundle node with correct sockets
When creating a Combine Bundle node using link-drag-search from a
bundle-input-socket, the new node will be initialized to have all the sockets
that linked Separate Bundle nodes have. This uses the same mechanism that's used
for creating closure zones, so it works even if the Separate Bundle node is in
some nested node group.

Pull Request: https://projects.blender.org/blender/blender/pulls/140185
2025-06-11 08:31:17 +02:00
Campbell Barton
0e5d2a3fc7 Merge branch 'blender-v4.5-release' 2025-06-11 16:23:28 +10:00
Campbell Barton
3d99ad2e89 Cleanup: correct typo in comments, use doxygen doc-strings 2025-06-11 16:22:18 +10:00
Campbell Barton
c8e31d34b4 Cleanup: quiet CMake warnings from use of undefined variables 2025-06-11 16:22:18 +10:00
Campbell Barton
672fbb7246 Merge branch 'blender-v4.5-release' 2025-06-11 16:06:17 +10:00
Campbell Barton
5c8193bf1e Fix memory leak from builds without XR enabled
Even when built without XR, the window-manager properties
could be accessed & created but weren't freed.

Exposed by !140098.
2025-06-11 15:59:55 +10:00
Sean Kim
322c620a03 Merge branch 'blender-v4.5-release' 2025-06-10 22:39:48 -07:00
Sean Kim
47523a4192 Fix #140153: Cavity automasking with hidden faces can corrupt mesh
When calculating the cavity factor, it is possible for the relative
distance of all traversed connected vertices to be zero. This results in
a division by zero which does not get clamped correctly to the expected
[0.0, 1.0] bounds. Prior to 4.2, this would have had no effect, as the
processing of this vertex would be have been skipped entirely. Due to
changes during the brush refactor, this flaw in the existing code was
exposed.

Pull Request: https://projects.blender.org/blender/blender/pulls/140168
2025-06-11 07:38:45 +02:00
Eitan Traurig
64d3a92530 Fix: "Remove All Particle Systems" is not greyed out when there are no particles
Fix the polling of the operator. The operator is now greyed
out when there are no particle systems on the object.

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/140166
2025-06-11 07:18:56 +02:00
Jacques Lucke
1568117aaf Geometry Nodes: give bundle sockets the dynamic structure type
This allows storing fields etc. in bundles.
2025-06-11 07:18:06 +02:00
Campbell Barton
2a1be1f704 Fix memory leaks in Python argument parsing
Resolve some of the leaks exposed by running tests with guarded-alloc
checks enabled.
2025-06-11 15:15:20 +10:00
John Kiril Swenson
5283c408a1 Merge branch 'blender-v4.5-release' 2025-06-10 21:08:51 -05:00
John Kiril Swenson
fa5178e366 Cleanup: VSE: Remove Legacy Handle Tweaking
This patch removes the older handle selection and transformation logic,
which was accessible through user preferences by switching off the
default "simple tweaking" mode in Editing -> Video Sequencer.

There was some initial bugginess with the new handle behavior, hence
the option to revert to legacy mode, but with recent updates this no
longer applies. With the new system, all selection workflows
are still possible -- this just drops older code to make things simpler.

No functional changes intended.

Pull Request: https://projects.blender.org/blender/blender/pulls/140031
2025-06-11 04:03:17 +02:00
John Kiril Swenson
f16cc57409 Cleanup: VSE: Ensure strip->type check uses equals comparison
Usually, this enum should only ever be compared with `==`.
Confusingly, however, to check if a strip is an effect, one must
'bitwise-and' it instead. This can backfire if e.g. one tries to do
(strip->type & STRIP_TYPE_IMAGE) which doesn't work.

Make sure we only ever 'and' against the type enum when checking if
it is an effect. There was only this one case that didn't adhere.
2025-06-10 20:50:16 -05:00
John Kiril Swenson
5c9e7f52b5 Fix: VSE: Prevent slipping single image strips
This was possible even before the slip 2.0 refactor (#137072) but the
behavior doesn't make sense.
Allow slipping only if it is an image sequence.
2025-06-10 20:46:30 -05:00
Harley Acheson
50927827ff Merge branch 'blender-v4.5-release' 2025-06-10 15:40:32 -07:00
Harley Acheson
3e58016c13 UI: Remove Modulation of Drag Threshold with Pen Pressure
Partial revert of 5102880f51. That commit decreased pen tablet drag
threshold as pressure is added. Unfortunately, although this allowed a
quicker response to start of drag, this also increased the difficultly
of initiating a press when both actions are available. With numerical
inputs for example, although dragging is more responsive clicking into
the input to edit was more difficult.

Pull Request: https://projects.blender.org/blender/blender/pulls/140066
2025-06-11 00:38:54 +02:00
Sean Kim
bcfd276825 Merge branch 'blender-v4.5-release' 2025-06-10 13:39:34 -07:00
Sean Kim
42b75c2cc4 Fix #140120: Multiplane Scrape behaves incorrectly
Introduced with 23951e1b12

The multiplane scrape brush uses two separate distances, one in world
space and the other in local brush space. Both need to be filtered on
for determining the brush strength.

Pull Request: https://projects.blender.org/blender/blender/pulls/140143
2025-06-10 22:35:44 +02:00
Pablo Vazquez
71e02b3229 UI: Draw sidebar tabs as pills
The tabs in the sidebar are aligned to the content, which looks great
when region overlap is off, but when it isn't, it looks like the tabs
are attaching to nothing. Solve this by drawing sidebar tabs as pills,
when using region overlap. This matches the top-bar workspace tabs.

Pull Request: https://projects.blender.org/blender/blender/pulls/139951
2025-06-10 21:59:55 +02:00
Jesse Yurkovich
860172484a Merge branch 'blender-v4.5-release' 2025-06-10 11:20:43 -07:00
Jesse Yurkovich
9381caf484 Fix: USD: Pass correct frame time when checking ORCO evaluation
Similar to the recent fix 457cccd964.
There was another code path which could pass in the wrong time into USD
for certain Mesh Sequence Cache scenarios.

I was not able to craft a faulty scenario by hand to observe a real
problem though. The scenario begins by importing a USD file needing a
Mesh Sequence Cache modifier and then attaching a particle system  (like
Hair) to the object. This will trigger the specific check calling into
`can_use_mesh_for_orco_evaluation` with the wrong time.

This makes the code path more explicit and passes in the correct time to
USD regardless now e.g. frame 28 vs time 1.166666666666667 (24fps)

Pull Request: https://projects.blender.org/blender/blender/pulls/140092
2025-06-10 20:20:00 +02:00
Hans Goudey
b2589be579 Fix: Build error after recent UI refactor
Additional uses of uiLayoutSetActive were added since the PR was created.
2025-06-10 13:46:54 -04:00
Guillermo Venegas
ff9c883154 Refactor: UI: Add uiLayout active get and set methods
This replaces API for accessing the uiLayout active state
with methods, following uiLayout refactors and the Python
API naming.

Part of #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/139963
2025-06-10 19:12:00 +02:00
Bastien Montagne
6d2e7a3bee Merge branch 'blender-v4.5-release' 2025-06-10 18:13:26 +02:00
Bastien Montagne
f76ca0e144 Cleanup: Remove left-over debug prints. 2025-06-10 18:12:48 +02:00
Habib Gahbiche
bd61e69be5 Compositor: make compositor node trees reusable
This is part of the short term roadmap goal of simplifying the
compositor workflow
(see https://projects.blender.org/blender/blender/issues/134214).
The problem is that many users don't know how to get started with
compositing in Blender, even when they have used Blender for other
areas, e.g. modeling.

Note: although the solution makes compositor node trees reusable
accross blend files, this is a nice side effect and not the main goal
of the PR.

This PR implements a "New" button that creates a new compositing node
tree, and manages trees as IDs. This has following advantages:
- Consistent with other node editors and other parts of Blender,
therefore making it easier to getting started with compositing if users
are familiar with shading or geometry nodes
- Give users the ability to reuse the compositing node tree by linking
or appending it.

Note: The parameter "Use Nodes" is still present in this PR, but will
be removed (in a backward compatible way) in a follow up PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/135223
2025-06-10 17:46:55 +02:00
Miguel Pozo
5459d11ed9 Merge branch 'blender-v4.5-release' 2025-06-10 17:25:37 +02:00
Miguel Pozo
fca4a16975 Fix: GPU: GPUWorker lock
Prevent race conditions caused by calling `GPUWorker::wake_up` when the
worker is not waiting.
Found to be an issue in #139627, since `wake_up` is likely to be called
before the thread has fully started.

Pull Request: https://projects.blender.org/blender/blender/pulls/139842
2025-06-10 17:24:18 +02:00
Clément Foucault
a5dc8026ee GPU: Shader: Add runtime dependency resolution
This allows to generate source file that will
be injected in a predefined source dependance tree.

This allow much cleaner shader workflow where
all sources are explicitly referenced from the
main source file.

Pull Request: https://projects.blender.org/blender/blender/pulls/140047
2025-06-10 17:22:58 +02:00
Clément Foucault
e57359726f GPU: VertexFormat: Use new data types
This prevents the use of unaligned data types in
vertex formats. These formats are not supported on many
platform.

This simplify the `GPUVertexFormat` class a lot as
we do not need packing shenanigans anymore and just
compute the vertex stride.

The old enums are kept for progressive porting of the
backends and user code.

This will break compatibility with python addons.

TODO:
- [x] Deprecation warning for PyGPU (4.5)
  - [x] Deprecate matrix attributes
- [x] Error handling for PyGPU (5.0)
- [x] Backends
  - [x] Metal
  - [x] OpenGL
  - [x] Vulkan

Pull Request: https://projects.blender.org/blender/blender/pulls/138846
2025-06-10 17:20:45 +02:00
Christoph Lendenfeld
27d2d0a23a Fix: Crash when snapping to first key using subframes
When pressing Ctrl to snap the playhead while scrubbing,
Blender could crash while trying to snap to the first key.
This would happen if the current frame was higher than the
left keyframe, but the difference was less than the `BEZT_BINARYSEARCH_THRESH`.

Pull Request: https://projects.blender.org/blender/blender/pulls/140122
2025-06-10 16:40:07 +02:00
Falk David
af6cbae469 Merge branch 'blender-v4.5-release' 2025-06-10 15:46:46 +02:00
Sietse Brouwer
ab1b451250 Fix: Grease Pencil: Wrong check on editable layer and keyframe in Sculpt Mode and Vertex Paint mode
In Grease Pencil, when using the tools in Sculpt Mode and Vertex Paint
mode, the check on editable layers wasn't entirely accurate. There was
a strict check on an editable _active_ layer, but since the tools work
on _all_ editable layers, the check should be wider: if there is _any_
editable layer, the tool can work.
That is fixed in this PR. Now the tools can be used when, for example,
a layer group is active or when the active layer is hidden, but there
are other editable layers present.

In Vertex Paint mode there was an additional issue: with Auto Keying
enabled, a new keyframe was created for the active layer only. A new
keyframe should be created for _every_ editable layer. As is the case
now with this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/140119
2025-06-10 15:45:44 +02:00
Philipp Oeser
18ebd8adad Merge branch 'blender-v4.5-release' 2025-06-10 15:42:54 +02:00
Philipp Oeser
5c1eb99279 Fix #140109: Grease Pencil - Lasso Erase does not delete single points
By definition, Bounds for single points (size zero) are empty (this
matches BLI_rct behavior), so doing an intersect will actually fail.

So to resolve, use the existing `is_point_inside_bounds` for single-
point-curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/140124
2025-06-10 15:42:27 +02:00
Campbell Barton
6195e84c65 Merge branch 'blender-v4.5-release' 2025-06-10 22:22:12 +10:00
Campbell Barton
1999b72ec2 Fix memory leaks in Python argument parsing
Resolve some of the leaks exposed by running tests with guarded-alloc
checks enabled.
2025-06-10 22:21:58 +10:00
Falk David
eec765fb14 Merge branch 'blender-v4.5-release' 2025-06-10 13:13:53 +02:00
Clément Foucault
4bee4a456a Fix #139553: EEVEE: Vulkan raytracing denoising pink propagation
This was caused by precision issue that made `sqrt(1.0f - NV2)`
evaluate to NaN. Making sure the input is saturated fixes the
issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/140071
2025-06-10 12:37:54 +02:00
Clément Foucault
368a64f386 GPU: Shader: Add support for shader entry points
This works by wrapping the entry point call inside a
`main` function.

Since resources are still defined in global space,
function accessing these are marked with a custom
attribute. This custom attribute expands in a
`#ifdef` guard for the matching stage.
This is a temporary solution and will eventually
be lifted once we support SRD.

### TODO
- [ ] Implement `[[gpu::vertex/fragment_function]]`.

Pull Request: https://projects.blender.org/blender/blender/pulls/139233
2025-06-10 12:37:20 +02:00
Bastien Montagne
dcca2694c5 Merge branch 'blender-v4.5-release' 2025-06-10 12:26:44 +02:00
Bastien Montagne
5d07055b0f Fix #137238: Collection asset placement not working with collection hierarchies.
Code selecting objects in collections that have been instanced was only
handling objects directly owned by the collection, not the objects in
the hierarchy of children collections.

The objects from the whole hierarchy need to be hanlded here, since
children collections will not be processed (as they are already
instanced by their parent one).

Pull Request: https://projects.blender.org/blender/blender/pulls/140068
2025-06-10 12:26:26 +02:00
Jacques Lucke
152471ffdb Geometry Nodes: support structure types in closures
This adds support for specifying structure types on closures. The main immediate
benefit is that this makes it possible to use fields with closures (without
having incorrect warnings in the UI).

A closure zone behaves very similar to a node group with respect to structure
type inferencing. The structure types can be inferenced fully automatically, or
the user can specify them manually on the closure inputs. On the evaluate
closure zone, the user has to specify the structure types of the inputs and
outputs explicitly (or leave them as dynamic).

Working on this, I was a bit surprised that `get_output_socket_shape` depended
on the field state. Is that a left-over? It feels like it shouldn't be necessary
since the socket shape shouldn't depend on field inferencing anymore. I removed
that now and couldn't see a difference yet.

The operator that creates a closure zone from an evaluate closure node copies
the input structure types already. Beyond that, there is no automatic syncing of
the structure types yet. The structure types only affect the UI and not what's
actually done during evaluation.

Pull Request: https://projects.blender.org/blender/blender/pulls/139713
2025-06-10 12:25:51 +02:00
Bastien Montagne
243f093dd4 Fix #137238: Collection asset placement not working with collection hierarchies.
Code selecting objects in collections that have been instanced was only
handling objects directly owned by the collection, not the objects in
the hierarchy of children collections.

The objects from the whole hierarchy need to be hanlded here, since
children collections will not be processed (as they are already
instanced by their parent one).

Pull Request: https://projects.blender.org/blender/blender/pulls/140068
2025-06-10 12:19:42 +02:00
Clément Foucault
62251cad5f Fix #140072: Overlay: UV Stretch ANGLE Overlay always shows green in 4.5
Was caused by the angle being scaled for USHORT storage.
2025-06-10 12:15:58 +02:00
Jacques Lucke
fe81cdb88b Merge branch 'blender-v4.5-release' 2025-06-10 12:15:38 +02:00
Jacques Lucke
7810bbc199 Cleanup: quiet unused variable warning 2025-06-10 12:15:10 +02:00