Commit Graph

152804 Commits

Author SHA1 Message Date
Jacques Lucke
26d2c7af0d Nodes: remove field inference test
This test can't easily be updated because it relies on the old socket shape
design before #144119. Parts of it could be done from scratch again, but
most of this stuff is also tested by the new structure type inferencing test
in `bl_node_structure_type_inference.py`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144185
2025-08-08 09:18:46 +02:00
Jacques Lucke
4a1020df6c Fix #143585: wrong structure type inferencing for lists
Mixing dynamic data with other data always results in dynamic now. While this
wasn't true without lists, it is true now and also makes sense generally. Also
mixing lists and single values or fields results in a list now.

Pull Request: https://projects.blender.org/blender/blender/pulls/144183
2025-08-08 09:07:20 +02:00
Lukas Tönne
18ec47361f Fix: UI: Node layout buttons not visible in material node view
Node buttons declared with `NodeDeclarationBuilder::add_default_layout`
are not visible in the `uiTemplateNodeView` used for shader nodes among
others. This happens in the Glass BSDF shader node.

The `ui_node_draw_node` was not handling node layout items in case the
node is using a custom socket order.

This was originally fixed in #143781 which was closed accidentally.

Pull Request: https://projects.blender.org/blender/blender/pulls/144159
2025-08-08 08:56:06 +02:00
Campbell Barton
062fcd00d1 Cleanup: improve confusing/incomplete code-comments 2025-08-08 16:41:38 +10:00
Falk David
1d6a0b7070 Cleanup: VSE: Replace STRIP_DUPE macros with enum
This removes the `STRIP_DUPE_UNIQUE_NAME` and `STRIP_DUPE_ALL` macros
and replaces them with an `enum StripDuplicate`.

A flag with a value of 0 was implicitly used as "duplicate selected strips" so the
enum uses `Selected = 0` to document this behavior better.

Pull Request: https://projects.blender.org/blender/blender/pulls/144125
2025-08-08 08:33:35 +02:00
Campbell Barton
1c0b17fb3d Cleanup: use single quotes for enum literals 2025-08-08 06:32:03 +00:00
Campbell Barton
3d0cff02c1 Fix: incorrect icon ID in the UV menu 2025-08-08 16:27:23 +10:00
Jeroen Bakker
97f1aeb84c Vulkan: Remove support for render passes
Vulkan 1.0 render passes have been replaced by dynamic rendering in 1.2.
Blender Vulkan backend was implemented with dynamic rendering in mind.
All our supported platforms support dynamic rendering. Render pass support
was added to try to work around an issue with legacy drivers. However these
drivers also fail with render passes.

Using render passes had several limitations (blending and some workbench
features were not supported).  As no GPU uses it and it is quite some code
to support it is better to remove it.

Pull Request: https://projects.blender.org/blender/blender/pulls/144149
2025-08-08 08:08:58 +02:00
Campbell Barton
73afa1c94f UV: support island selection with sync-select in vertex/edge mode
This was disabled because island selection used to be exposed as a
UV selection mode (along with vertex/edge/face) where selecting
parts of other islands would seem like a bug.

Now island selection has been moved to a separate toggle it makes
sense to allow connected geometry to be included in the selection when
other selection options enforce this.
2025-08-08 05:58:04 +00:00
Campbell Barton
1b618461f3 Correct error in 359599a16b
Passing false for "update" was needed to remove the redundant update.
2025-08-08 13:47:13 +10:00
Campbell Barton
359599a16b Modeling: avoid redundant update call for bevel when auto-merge is used 2025-08-08 13:43:54 +10:00
Eitan Traurig
a584197ab3 Modeling: Support "Auto Merge" for the bevel operator
The bevel operator can leave overlapping vertices.
Support "Auto Merge" so these are cleaned when the tool-setting is
enabled.

Ref !142008
2025-08-08 03:11:56 +00:00
Campbell Barton
a27b309009 Modeling: add "Connected" support for auto-merge
Support limiting the merge by connected geometry.
This is useful for operations such as bevel where it's not desirable
for the merge to connect isolated surfaces.

Accessible from the Python API, no user visible changes.

Ref !144036
2025-08-08 13:04:42 +10:00
Campbell Barton
28e9e87786 PyDoc: add missing arguments to bpy.app.handlers 2025-08-08 08:47:41 +10:00
Campbell Barton
53cae68ee8 Cleanup: hyphenate the term data-blocks in strings/doc-strings 2025-08-08 08:47:13 +10:00
Campbell Barton
cccc2c77c5 Cleanup: consistent for C-style comment blocks 2025-08-08 07:37:33 +10:00
Campbell Barton
86dcdb418d Cleanup: use doxy sections for resources 2025-08-08 07:37:00 +10:00
Campbell Barton
ff10f7803e Cleanup: correct comment 2025-08-08 07:36:32 +10:00
Campbell Barton
0b091db913 RNA: require the enum flag is set before enum items are set
Failure to do this can cause the the property default to be incorrect
and some sanity checks fail to run.

Fail when an error if this isn't set.

Ref !144133
2025-08-07 20:45:45 +00:00
Hans Goudey
02181347ce Geometry Nodes: Change closure color, reset repeat zone color
Follow up to f646948ace
The repeat zone color is changed back to the color it used in 4.5, to
avoid the need for people to re-learn the color. The closure socket and
zone share the same color, which is made more yellow-ish to distinguish
it from the bundle socket color.
2025-08-07 15:27:02 -04:00
Brecht Van Lommel
6dc9cd366a Fix: Cycles volume assert on Windows due to wrong comparator
Introduced in 13ab5067ce.

Pull Request: https://projects.blender.org/blender/blender/pulls/144167
2025-08-07 21:23:28 +02:00
Sean Kim
63cee26814 Fix #144135: Weight Paint gradient toolbar missing
Introduced in 4434a30d40

Pull Request: https://projects.blender.org/blender/blender/pulls/144165
2025-08-07 21:00:32 +02:00
Jesse Yurkovich
2822b3badf Fix: USD: Use exr instead of hdr for world light texture
The spec for .usdz permits only a small handful of file formats to be
contained in the archive, and HDR is not among those supported[1]. This
also causes validation errors with the `usdchecker` tool (will be
properly tested in a follow up change).

Ignoring the potential for a user to export a .usdz file with materials
referencing unsupported file formats, Blender itself should use only
the supported formats for its business.

[1] https://openusd.org/release/spec_usdz.html#usdz-specification

Pull Request: https://projects.blender.org/blender/blender/pulls/144101
2025-08-07 20:54:22 +02:00
Ray Molenkamp
8bf975325b bf_imbuf_movie: Fix warnings building with MSVC 2019
in 236b6513cf which was supposed to
remove warnings, 6 new warnings were added, this fixes those warns

See PR #144164 for exact details

Pull Request: https://projects.blender.org/blender/blender/pulls/144164
2025-08-07 20:29:57 +02:00
Habib Gahbiche
6d129290a7 Nodes: Use frame with label for versioning Use Nodes (World)
Ref: #143441

Add label to indicate that the new nodes were added for versioning:

Pull Request: https://projects.blender.org/blender/blender/pulls/144083
2025-08-07 20:08:25 +02:00
Miguel Pozo
908fd7ab57 Fix: EEVEE: VolumeProbeModule do_full_update_
`VolumeProbeModule::do_full_update_` can be true while
`irradiance_pool_size_` being already correct and `irradiance_atlas_tx_`
being valid, so `brick_pool_` ends up being "allocated" with
`atlas_col/row_count` being 0.
This can happen if `VolumeProbeModule::init` is called, but the
`VolumeProbeModule::set_view` call is skipped (due to ongoing shader
compilation), so the `do_full_update_` flag is not cleared before the
next `init`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144154
2025-08-07 19:37:09 +02:00
Miguel Pozo
7263d19c1e Fix #142046: EEVEE: Deferred Lighting shader doesn't run (Nvidia)
The issue in #142046 is caused by the deferred lighting pass not
running.
Despite plenty of testing and debugging we have not been able to spot
any errors in the Blender code.
Checking the link status of specialization shader variants seems to fix
the issue, which may suggest a bug on the driver side.

Pull Request: https://projects.blender.org/blender/blender/pulls/144150
2025-08-07 19:36:06 +02:00
Hans Goudey
45f3180bc8 Fix #143539: Assert in UI auto complete after StringRef refactor
Caused by d216476458
2025-08-07 12:57:33 -04:00
Hans Goudey
5925233e4d Fix #143847: Assert in attribute operator poll after refactor
Mistake in fa03c53d4a.
We need to test for negative indices here too.
2025-08-07 12:38:27 -04:00
Jacques Lucke
3f94a4ab1c Animation: minor speedup when accessing id properties
This is fundamentally quadratic code until #140907 is implemented. However, the
old approach that didn't use `StringRef` was a few percent faster because it
didn't have to call `strlen` as often. So this brings back a little bit of
performance in cases like #140706.

Pull Request: https://projects.blender.org/blender/blender/pulls/144012
2025-08-07 16:38:04 +02:00
Maxime-Cots
7f8d01f809 UI: "Delete Other Workspaces" operator
Adds a context menu entry to delete all workspaces but the one the menu
was spawned from.

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/138530
2025-08-07 16:07:05 +02:00
Christoph Lendenfeld
a43359eb88 Anim: Store pose bone visibility flag on pose bone
This PR adds a flag to the pose bone that determines its visibility.
Doing so allows to hide a pose bone and
* don't affect other instances of the same armature
* save the visibility even if the rig is linked

The visibility of the bone in object mode is now also determined by the
pose bone whereas before it was the `Bone`.

**This breaks backwards compatibility** on the Python API since the visibility property,
on the `Bone` behaves differently now as it hides the edit bone instead of the pose bone.

In order to remove all active uses of `BONE_HIDDEN_P` the changes in `armature_skinning.cc` are required.

Part of #138482

Pull Request: https://projects.blender.org/blender/blender/pulls/139167
2025-08-07 15:54:58 +02:00
YimingWu
6f57268e9a LineArt: Use "Radius" instead of "Thickness" for generating strokes
Previously line art uses the same thickness value as found in grease
pencil before blender v4.3 for generating strokes, now everything is
migrated to using "radius", so it makes more sense to change that it to
using "radius" so it's consistent with everywhere else.

Pull Request: https://projects.blender.org/blender/blender/pulls/144121
2025-08-07 15:40:17 +02:00
Jeroen Bakker
4333e070b4 Fix: SubDiv: Out of bound write loose normals
Updating loose normals leads to out of bound writes on the GPU.
The reason is that normals are float3, but the code assumed
they were float4.

Pull Request: https://projects.blender.org/blender/blender/pulls/144128
2025-08-07 15:26:42 +02:00
Omar Emara
68dc278fe5 Compositor: Redesign File Output node
This patch redesigns the File Output node to provide better UX and UI.
This is mainly achieved by allowing the user to create inputs by
dragging into an Extend socket and adjust existing inputs using the
familiar UI list design available in Blender. Additionally, various UI
changes were done:

- The Use Node Format option was renamed to Override Node Format for
  clarity.
- Socket types are now fixed and do not change as new links are made,
  allowing users to specify the exact output type and employ implicit
  conversion if needed.
- The distinction between images and Multi-Layer EXR was made clearer.
- Final output paths are drawn in the UI to remove guess work.
- The Base Path was split into a Directory and a File Name.
- Panels were added to group options, include a panel for the node
  format, items, and item formats.

Pull Request: https://projects.blender.org/blender/blender/pulls/141091
2025-08-07 14:46:34 +02:00
Hans Goudey
23ad91ce53 Nodes: Change collapsed node shape
This PR changes the collapsed node socket shape to remove the "pill"
shape, so that the input and output sockets are stacked vertically
instead of around semi-circles.

The main motivation is to improve the look with single value sockets,
where the combination of their vertical shape and the rounded pill shape
of the node looked quite bad.

Regardless of that though, I'd argue this makes the smaller collapsed
nodes look much nicer: more consistent with other nodes and even a bit
smaller. For larger collapsed nodes, at least it gets rid of the
"gigantic circle" shape.

There is still some overlap with stacked single-value sockets. That's
a compromise to keep the node small (half the distance between sockets
as regular nodes), but it could be tweaked.

Pull Request: https://projects.blender.org/blender/blender/pulls/144028
2025-08-07 14:37:21 +02:00
Jeroen Bakker
82d18d2f66 Vulkan: Add resource tracker to debug output
Helps detecting memory leaks as these numbers shows the number of
allocated buffer/image resources.
2025-08-07 13:40:22 +02:00
Pratik Borhade
0f8f9057a9 UI: Shape key right click context menu
Invoke context menu for shape key with right click.
Added `MESH_MT_shape_key_tree_context_menu`, this include operators
that takes action on selected/active tree items:
- Make Basis
- Duplicate
- Move to Top -> Move After Basis
- Move to Bottom -> Move to Last

See Video in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/143444
2025-08-07 12:41:26 +02:00
Aras Pranckevicius
2f68e7e4b4 Fix #142912: VSE thumbnail cache processing slows down UI
VSE cache processing was handling thumbnail generation requests in
parallel, however often that was resulting in CPU core over-subscription
that negatively affects user interface smoothness. Process requests
serially; some parts of image/video loading are internally multi-threaded
already. This makes thumbnails load somewhat slower, but while that
is happening the rest of blender feels much smoother, and the CPU
fans don't spin up as much.

Additionally, make the video thumbnail loading code use smallest
available proxy file, if present. This was overlooked in the original
new thumb cache implementation (!126405).

SpriteFright timeline edit v135 (mostly JPG images, some movies),
loading thumbnails for the whole timeline on Ryzen 5950X (Windows):
- 4.2.1: 35 seconds, CPU usage ~35%, UI smooth
- Main: 13 seconds, CPU usage ~90%, UI choppy
- This PR: 19 seconds, CPU usage ~35%, UI smooth

Manually made timeline with 10 video files:
- 4.2.1: 12 seconds, CPU usage ~50%, UI smooth
- Main: 6 seconds, CPU usage ~100%, UI choppy
- This PR: 9 seconds (no proxies) / 4 seconds (with proxies), CPU usage
  ~50%, UI smooth

Candidate for 4.5.x backport

Pull Request: https://projects.blender.org/blender/blender/pulls/144120
2025-08-07 12:33:18 +02:00
Omar Emara
d84d779661 Compositor: Improve unsupported passes warning
This patch improves warnings displayed when the user attempts to use
passes in render engines other than EEVEE with the viewport compositor.

Previously, an error icon was always displayed if the viewport
compositor was in use as well as a viewport overlay text. This error
existed even when the render engine was set to EEVEE and even if the
passes are not actually used, which was always confusing for users.

This patch improves this by only displaying the error when a pass is
actually used and when a non-EEVEE render engine is used.

This is implemented internally as an extra info callback for the node.
And the compositor_unsupported_message member hack was removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/144005
2025-08-07 12:18:06 +02:00
Falk David
4a013194dd Cleanup: Core: Replace FPS scene macro with member function
Replaces the `FPS` macro with `scene->frames_per_second()`.

The macro has two major issues:
* It hides that it depends on a `Scene *` variable named `scene`.
* It makes debugging harder.

This is now replaced with a member function on the scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/144127
2025-08-07 11:30:25 +02:00
Omar Emara
74e23b1c36 Fix: Assert in Keying node with no input
The Keying node asserts if its input is single value or not connected.
This is due to a typo when getting the input, where the output was used
instead.
2025-08-07 12:14:36 +03:00
Pablo Vazquez
840310f607 UI: Add Icons for Edge/Vertex Crease and others
Edge and Vertex marks such as Crease, Bevel Weight, Seam, Sharp, have
specific use cases and colors assigned to them that users get familiar
with over time.

It can be hard to remember which color belong to what, this PR tries to
address this by introducing colored icons that follow the theme setting
for that edge mark/flag.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/144075
2025-08-07 11:09:56 +02:00
Omar Emara
28e59d3e36 Fix #144070: Keying morphology can not do erosion
The morphology operations in the Keying node in the compositor can no
longer do erosion by using negative Feather and Dilate inputs. Clamping
to positive values was accidentally done when porting options to inputs,
so this patch fixes this by removing the clamping.
2025-08-07 11:56:10 +03:00
Christoph Lendenfeld
1dd06e6623 Fix #143818: Clear Keyframes operator unassigns action
The `ANIM_OT_keyframe_clear_v3d` had a few issues

The reason for the action disappearing was the call to `animdata_remove_empty_action`.
This checked the curves on the action directly, thus failed with the layered actions.

However with the change to the layered action, the convention is that actions are not
unassigned when it is empty. This is why I also added a check for legacy actions before the call.
I am doing this even though legacy actions will be removed in 5.0 because this
needs to be backported.

The third issue was that `changed` was never set to true with layered actions,
which meant the notifier was never sent to update the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/144001
2025-08-07 10:41:46 +02:00
Campbell Barton
5b78323450 Cleanup: use RNA_def_enum_flag 2025-08-07 18:10:50 +10:00
Clément Foucault
16430b10f1 EEVEE: World Sun Shadow no longer works in 4.5
On some drivers, the GLSL compiler doesn't reflect the omitted
`local_size_*` of a compute shader inside `gl_WorkGroupSize`.

This lead to the 2D size computation of 1D workgroups to become
0 which was bypassing the parallel reduction algorithms.

Ensuring `local_size_*` are always set fixes the issue.

For clarity, also fix the 1D shaders to not use `gl_WorkGroupSize.y`.
This also fix a copy paste error in the Metal backend.

This issue affected AMD drivers on Windows.

Rel #142046

Candidate for backporting to 4.5 LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/144056
2025-08-07 09:40:57 +02:00
Campbell Barton
936457871e Fix #143980: Invalid default values for RNA enum-flag properties
Enum-flag properties uses non-flag logic to set their default,
often setting the value to the first item in the array passed
to RNA_def_property_enum_items.

The incorrect default was shown in the Python API docs.

Resolve by using the enum values as a mask.
2025-08-07 17:29:28 +10:00
Campbell Barton
e883a6f803 RNA: declare flags before calling RNA_def_property_enum_items
RNA_def_property_enum_items checks for PROP_ENUM_FLAG which
doesn't work if the flag is set afterwards.

This can be enforced - although that can be handled separately.

Needed to fix #143980.
2025-08-07 17:29:28 +10:00
Philipp Oeser
c466d1744b Fix #143231: Vulkan Renders Curve Profile Control Points Incorrectly
Resolve using a shader intended for drawing points.

Pull Request: https://projects.blender.org/blender/blender/pulls/143798
2025-08-07 09:05:16 +02:00