Commit Graph

150077 Commits

Author SHA1 Message Date
Jason C. Wenger
702efd6846 BMesh: add a BM_faces_join() to return a duplicate face (if found)
Every call to BM_faces_join and BM_faces_join_pair has been adjusted to
provide the new face pointer, and a BLI_assert_msg has been added so
that doubles are now consistently identified and flagged as a problem.
BM_faces_join is now also capable of automatically reusing a double
when it is found. This new behavior is currently unused at this point.
Future patch-sets will begin to use it, allowing simplification of
calling functions.

Ref: !137406
2025-04-15 11:03:15 +00:00
Omar Emara
aacd22c186 Fix: Compositor: Boolean socket fails in shader node
Boolean sockets were not handled in shader nodes, so they were assigned
a NONE GPU type which causes crashes later on. No such sockets exist
yet, so this is a fix for future work.
2025-04-15 12:51:41 +02:00
Bastien Montagne
22818f4a6d Fix #136894: Crashes due to invalid code in ID management.
Own mistake in 3e03576b09, confused `BLI_listbase_findafter_string_ptr`
with a (not yet existing) `BLI_listbase_findafter_string` function.
2025-04-15 12:35:54 +02:00
Bastien Montagne
3d52ac536e BLI_listbase: Add a new BLI_listbase_findafter_string util.
Similar to existing `BLI_listbase_findafter_string_ptr`, but for cases
where the searched property is a char array, and not a char pointer.
2025-04-15 12:35:54 +02:00
Christoph Lendenfeld
d2f1b6570d Anim: Separate transform snapping flags in the driver editor
With the move to the new snapping system,
the snapping flags were no longer stored on the editor but on the scene.
While that is good for all editors that deal with animation,
it also affected the Driver Editor since that is effectively a Graph Editor.
However since the driver editor doesn't deal with frames,
it is unlikely that settings should be shared with other animation editors.

With this PR the Driver Editor gets it's own snapping flag,
which means snapping can be controlled without affecting
other animation editors.

This also removes snapping options
* Snap to markers doesn't make sense, there are no markers in drivers
* Snap to seconds also makes no sense

Only snap to frames, i.e. whole numbers is kept with the option
to snap directly to whole numbers or offset the current position
by a whole number.

Pull Request: https://projects.blender.org/blender/blender/pulls/136826
2025-04-15 12:35:18 +02:00
Jeroen Bakker
5102f33ef9 Fix #137081: Vulkan: Memory leak in descriptor pools.
Descriptor pools were never discarded, leading to out of memory issues
when running for a long time. This PR discards used descriptor pool when
the render graph is submitted to the device.

- Detected that to descriptor sets could be uploaded multiple times
  however once was always empty.
- When render graph is flushed all descriptor pools are discarded.
- Improved debugging of discard pools.

Pull Request: https://projects.blender.org/blender/blender/pulls/137521
2025-04-15 12:18:34 +02:00
Jeroen Bakker
9eb0f59264 Cleanup: Vulkan: Remove obsolete extension 2025-04-15 12:16:52 +02:00
Omar Emara
a4e7028b4c Compositor: Turn Split node options into inputs
This patch turns the options of the Split node into inputs.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137518
2025-04-15 11:43:20 +02:00
Sybren A. Stüvel
57fdaadebb Anim: pose mode Select Mirrored keep unmirrorables selected
The pose mode Select Mirrored operator now keeps bones selected when
they cannot be mirrored.

This means that you can now select the spine and the left arm, mirror
the selection, and it'll have the spine and the right arm selected.
Before this change, all non-mirrorable bones (like the spine) would
always get deselected.

I also snuck in a little bugfix, where locked-for-selection bones could
still get selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/136836
2025-04-15 11:41:46 +02:00
Sybren A. Stüvel
442fba3889 Refactor: clean up code of Pose mode Select Mirror operator
A few smaller cleanups to the pose mode Select Mirror operator.

- Don't store flags in a `void *` on the pose channel, but just use a
  map to store the pre-mirroring selection flags.
- Instead of checking the `extend` flag for every bone, use two
  functions to either add to the selection or set the selection, and use
  the 'extend' flag to choose between those once.
- Flip some conditions and use `continue` to reduce cognitive
  complexity.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/136836
2025-04-15 11:41:46 +02:00
Clément Foucault
47d2dffe8c GPU: Shader CodeBase use constexpr instead of const
Do this only when applicable.

This allow better compile time checking in Shader C++ compilation.
Moreover, this allows to have `constexpr` in shared code between
C++ and GLSL.

After investigation the `const` keyword in GLSL has the same
semantic than C/C++.

Rel #137333 and #137446

Pull Request: https://projects.blender.org/blender/blender/pulls/137497
2025-04-15 11:36:53 +02:00
Omar Emara
f71358d281 Compositor: Turn Switch node options into inputs
This patch turns the options of the Switch node into inputs.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137512
2025-04-15 11:04:20 +02:00
Jacques Lucke
e02a88929f Refactor: Geometry Nodes: extract function to create compute context for zone
This functionality was duplicated in two places and #137403 adds another place
where it is needed.
2025-04-15 10:36:51 +02:00
Jacques Lucke
59e6cfb43b Fix: Geometry Nodes: add check if closure should log
Note that currently this function always returns false until #137403.
2025-04-15 10:34:18 +02:00
Jacques Lucke
234cfbb865 Nodes: add zone utility functions
Those are used by #137403.
2025-04-15 10:32:00 +02:00
Omar Emara
3c61691559 Compositor: Mark Mask node options as deprecated
Those were converted into options already.
2025-04-15 09:56:11 +02:00
Alaska
21add72f31 Tests: Add Cycles test for RDNA1 Principled BSDF rendering issue
This commit adds a render test for the issue reported in
blender/blender#137420.

Ref: blender/blender-test-data!84
2025-04-15 09:20:09 +02:00
Alaska
0a7a12f873 Cycles: Print additional warnings about unsupported oneAPI driver versions to terminal
This commit adds some extra prints to terminal related to oneAPI driver
information in the situation that the driver version is considered
incompatible with the current version of Cycles.

Pull Request: https://projects.blender.org/blender/blender/pulls/137272
2025-04-15 09:03:45 +02:00
Campbell Barton
5741e28770 Revert "Fix: Compositor: Crash in Movie Distortion node with extreme distortions"
This reverts commit 2dff457a7c.

This caused compositor_cpu_distort test to fail.
2025-04-15 15:26:14 +10:00
Campbell Barton
c49e6a7dd4 Cleanup: reference operators as symbols, spelling in comments 2025-04-15 15:22:53 +10:00
Campbell Barton
8e40e21124 Cleanup: use boolean for "found" vars & return values 2025-04-15 12:08:08 +10:00
Campbell Barton
217406ec42 Cleanup: move IMB_convert_rgba_to_abgr to a static function
This is a fairly specific function and was only used by the IRIS format.
2025-04-15 12:08:08 +10:00
Campbell Barton
f54dcb2c6c Tools: use arguments for suppressions where possible
These were generated then filtered out, in most cases these can
be suppressed via arguments.
2025-04-15 12:08:08 +10:00
Sean Kim
1f003c08ee Fix #137449: Face Set gesture in Dyntopo doesn't create attribute
Prior to this commit, Using the gesture Face Set operators on a mesh
that doesn't have the `.sculpt_face_set` attribute created would lead to
invalid data being written and ultimately a crash.

To fix this, use the `ensure_face_sets_bmesh` function.

This commit also ensures that the `find_next_available_id` function
doesn't return `1` for the next face set id for BMesh.

Pull Request: https://projects.blender.org/blender/blender/pulls/137492
2025-04-15 03:51:01 +02:00
Sean Kim
f8622702f5 Fix #137494: Dyntopo crash after undoing Random Mask
Introduced with 1d83a88fdc.

Pull Request: https://projects.blender.org/blender/blender/pulls/137495
2025-04-15 03:45:15 +02:00
Sean Kim
0c116e7a83 Fix #137496: Dyntopo mask undo doesn't update paint BVH state
When undoing dyntopo actions, we have a fast path where if the mask
layer was affected, we avoid a full depsgraph tagging and BVH rebuild.

This tagging was missing recalculating the overall node visibility
states, potentially preventing further brush strokes and actions from
working if they filtered out fully hidden nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/137502
2025-04-15 03:44:39 +02:00
Harley Acheson
5102880f51 UI: Decrease Tablet Drag Threshold With Pen Pressure
We have separate drag movement thresholds, and one is specifically for
tablet pen movement. A movement is not considered a drag (when using
left click select) until this amount is detected. This PR decreases
that amount with pen pressure. This results in more immediate and
responsive behavior that feels quite natural. Whether using RCS or
LCS this also similarly reduces the lag when dragging on numerical
inputs and sliders.

Pull Request: https://projects.blender.org/blender/blender/pulls/136685
2025-04-15 02:51:15 +02:00
YimingWu
4794cbe0bf Fix #137493: UI: Show "Active Spline" panel for surface types
Previously in 5fe1051839 the "Active
Spline" panel was moved to the viewport but not updated correctly for it
to display when active object is of "SURFACE" type. Now it will show for
both curve and surface types.
2025-04-15 08:43:03 +08:00
Harley Acheson
2690c0266a Fix #137430: Improved Calculation of Minimum Vertical Area Heights
Since the changes that allow user select-able border widths our
calculation of minimum area heights is incorrect in that it does not
take into account border width.  This PR improves this calculation so
that as you resize windows and areas none go below header height.

Pull Request: https://projects.blender.org/blender/blender/pulls/137498
2025-04-15 01:23:41 +02:00
Jonas Holzman
81efb13f49 UI: Use Theme Color for Initial Window Background
This patch makes it so that the theme color is used for the
initial/loading Blender window background color. Unlike what
it may look like, theme settings are well loaded at this point
in the initialization process, which lets us directly use them
for coloring the window background instead of relying on a
default grey color.

This also makes the colored titlebar window decorations (introduced in
#123982 for macOS, #134054 for Windows 11), always blend with the window
instead of looking somewhat broken during window initialization. On the
technical side, this uses the top-bar header background theme color to
ensure this always matches with the color used by the colored titlebar.

Pull Request: https://projects.blender.org/blender/blender/pulls/137425
2025-04-14 22:36:16 +02:00
Lukas Stockner
2dff457a7c Fix: Compositor: Crash in Movie Distortion node with extreme distortions
While testing some distortion options, I noticed that the Movie Distortion node
would crash when used with e.g. (0.0, 0.0, 0.5) as the lens parameters.

This appears to be caused by 00ee917fd. Turns out that even though the input was
512x384, the extended size ended up being around 600000x500000, which obviously
caused some issues.

Therefore, this patch a) clamps the margin to be at most as wide as the input
(so 9x the pixels in the worst case) and b) fixes the indexing calculations to
not overflow the int32 values in case the input is legitimately huge.

Pull Request: https://projects.blender.org/blender/blender/pulls/137440
2025-04-14 20:29:42 +02:00
Harley Acheson
380f9973b6 UI: Allow Using Mac Option, Command + Arrow Input Movement
On MacOS, while editing text in an input field, allow pressing Option+
Arrow to move to next word, Command+Arrow to move to beginning and end
of the string.

Pull Request: https://projects.blender.org/blender/blender/pulls/136904
2025-04-14 20:28:58 +02:00
Iliya Katushenock
4da97bfbcc Fix: Geometry Nodes: Scale Elements non-deterministic results
Pull Request: https://projects.blender.org/blender/blender/pulls/136046
2025-04-14 14:16:41 -04:00
Jacques Lucke
ee8713d567 Geometry Nodes: add closure pass through test 2025-04-14 20:15:43 +02:00
Hans Goudey
3b9c2c810d Fix #137392: Hair Particle "Shape Cut" operator crash after Mesh BVH caching
Mistake in bcfe4c34da
2025-04-14 11:53:30 -04:00
Hans Goudey
c6d938fa72 Cleanup: Remove unnecessary mesh positions write access 2025-04-14 11:53:30 -04:00
Jacques Lucke
6fda6c2894 Fix: another merge conflict
Caused by 7f1a99e862.
2025-04-14 17:52:38 +02:00
Jacques Lucke
7f1a99e862 Refactor: BLI: Make some CPPType properties public instead of using methods
This makes accessing these properties more convenient. Since we only ever have
const references to `CPPType`, there isn't really a benefit to using methods to
avoid mutation.

Pull Request: https://projects.blender.org/blender/blender/pulls/137482
2025-04-14 17:48:17 +02:00
Jacques Lucke
be266a1c0c Refactor: Geometry Nodes: replace ComputeContextBuilder with ComputeContextCache
While `ComputeContextBuilder` worked well for building simple linear compute
contexts, it was fairly limiting for all the slightly more complex cases where
an entire tree of compute contexts is built. Using `ComputeContextCache` that is
easier to do more explicitly. There were only very few cases where using
`ComputeContextBuilder` would have still helped a bit, but it's not really worth
keeping that abstraction around just for those few cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/137370
2025-04-14 17:47:56 +02:00
Jacques Lucke
8a52e0d104 Fix: merge conflict after rename
Caused by e8877df863.
2025-04-14 17:47:05 +02:00
Thomas Dinges
6655c6fa75 Release: Update installer graphic for 4.4
Also switch to .png format for better compression.

Pull Request: https://projects.blender.org/blender/blender/pulls/137471
2025-04-14 17:36:09 +02:00
Miguel Pozo
719351a9e6 Fix #137427: Overlay: Darker curve sculpt overlay
Use alpha blend (same as legacy).

Pull Request: https://projects.blender.org/blender/blender/pulls/137480
2025-04-14 17:32:01 +02:00
Jacques Lucke
38be46012e Geometry Nodes: pass through in Evaluate Closure by default
Now, if no closure is connected to the Evaluate Closure node, it behaves like if
it is muted. Previously, all outputs were just defaulted and the inputs ignored,
but that's less useful.

Pull Request: https://projects.blender.org/blender/blender/pulls/137418
2025-04-14 17:07:19 +02:00
Mattias Fredriksson
468c42ad16 Cleanup: Remove const from moved local variable
Removed const qualifier as variable is later moved, resulting in C26478:
https://learn.microsoft.com/en-us/cpp/code-quality/c26478?view=msvc-170

Move occurs on line 105 which triggers the warning.

Pull Request: https://projects.blender.org/blender/blender/pulls/137424
2025-04-14 17:05:45 +02:00
Omar Emara
bc9176e5e1 Compositor: Turn Mask options into inputs
This patch turns the options of the Mask node into inputs.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137479
2025-04-14 17:00:44 +02:00
Sebastian Parborg
f2081265ac Deps: Linux: Add TBB CMake config files
Ref: blender/blender#137063
4.5 Library tracking issue: #136540
2025-04-14 16:28:50 +02:00
Jacques Lucke
f557b6c047 Cleanup: Separate CPPType method declarations and implementation
This simplifies scanning the API.
2025-04-14 16:19:18 +02:00
Jacques Lucke
3ae20bf166 Cleanup: remove foreach macro from .clang-format
The usage of that macro was removed in 60bec183cb,
but it was still in our .clang-format file. This lead to worse formatting when other code
used methods named `foreach`.

Pull Request: https://projects.blender.org/blender/blender/pulls/137468
2025-04-14 16:17:00 +02:00
YimingWu
47c7000392 Cleanup: Grease Pencil: Remove unused variables.
Previously the change in f5c0c81b7ee6f127f44543179f17fd475f115842 left
an unused variable and is removed by this fix.
2025-04-14 21:21:52 +08:00
Bastien Montagne
df215441eb Fix (unreported): Protect Outliner UI py code util against None context.id value.
Detected by review of !135936, the code checked for a non-empty
`context.selected_ids`, but did not propect against a potential
`None` `context.id`.
2025-04-14 14:17:42 +02:00