Commit Graph

154369 Commits

Author SHA1 Message Date
Simon Thommes
43fbbc95bc Modifiers: Add icons to remaining modifier assets in Generate category
This adds new icons for the remaining two modifier Essentials assets
bundled with Blender in the `Generate` category.
(`Curve to Tube` and `Scatter on Surface`)

Pull Request: https://projects.blender.org/blender/blender/pulls/147115
2025-10-01 15:50:34 +02:00
Sergey Sharybin
152107590e Fix #147083: Playing then pausing causes instant crash
Ensure that function which requires evaluated depsgraph does get
such a depsgraph.

The BKE_scene_ensure_depsgraph() is not guaranteed to give evaluated
depsgraph, it only ensures that the depsgraph exists for the given
combination of bmain, scene, and view layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/147111
2025-10-01 15:30:28 +02:00
YimingWu
63d77f028f Fix #147097: Prevent crash when joining meshes with different shape keys
In 113d91aba8 the mesh joining operator is
largely rewritten but the `join_positions_and_shape_keys` part didn't
supply valid `bmain` and `id` for `BKE_key_add` which leads to crash.
Now fixed by supplying correct arguments.

Pull Request: https://projects.blender.org/blender/blender/pulls/147101
2025-10-01 15:17:47 +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
илья _
8edf746621 Fix: Geometry Nodes: Wrong field interface of topology node
This socket is not optional field but a source of only a field with input dependency.

Pull Request: https://projects.blender.org/blender/blender/pulls/146540
2025-10-01 15:10:13 +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
Bastien Montagne
3f6ef965b9 Refactor: LightLinking: Add creation/copy/delete API for Object data.
Similar to what we do with modifiers, constraints, and so on. Avoids
spreading knowledge about internal data handling in several parts of the
code.

Pull Request: https://projects.blender.org/blender/blender/pulls/147122
2025-10-01 15:03:41 +02:00
Weizhen Huang
04166ea0ea Cycles: support printf in Metal 15.0
For metal version after 3.2 it's possible to log debugging messages, it
works similar to `printf()`, except for a few differences:
- `%s` is not supported,
- `double` doesn't exist, so no casting to double for `%f`,
- no `\n` needed at the end of the format string.

To see the print in the console, environment variables `MTL_LOG_LEVEL`
should be set to `MTLLogLevelDebug`, and `MTL_LOG_TO_STDERR` should be
set to `1`. See
https://developer.apple.com/documentation/metal/logging-shader-debug-messages

Right now `printf()`, `print_float()`, `print_float2()`,
`print_float3()` and `print_float4()` are supported.

Thanks to @fclem for finding this out.

Pull Request: https://projects.blender.org/blender/blender/pulls/146585
2025-10-01 14:25:44 +02:00
Richard Antalik
698268f927 VSE: Remove transform effect
Functionality has been replaced by strip transform properties. Transform
strips in existing files will be replaced with gaussian blur with radius
of 0 to preserve modifiers and overall strip stack.

Pull Request: https://projects.blender.org/blender/blender/pulls/147003
2025-10-01 13:37:54 +02:00
Simon Thommes
6691d89f9e Geometry Nodes: Adjustments to Essentials assets
Curve to Tube:
- Discard non-curve inputs.
- Warn and pass-through when no curves are out in.
- Handle single point curves.
- Make label of Parameter U/V menu inputs show.

Instance on Elements/Scatter on Surface:
- Change `Pick Instance` to be off by default.
- Add fallback to info message when `Pick Instance` is on.

Array:
- Change randomization inputs to be single values.

All modifier assets:
-  Disable `Show Manage Panel` option in all modifier assets.

Pull Request: https://projects.blender.org/blender/blender/pulls/147112
2025-10-01 12:07:19 +02:00
Habib Gahbiche
5c58e29bd2 Fix: Motion Tracking: Clip->Setup Tracking Scene broken
Using the operator caused Python exceptions. The reason was the script
was not updated after the recent breaking changes in the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/147109
2025-10-01 11:48:51 +02:00
Brady Johnston
bef38ec3fa UI: Change volume grid type name 'Float Vector' to 'Vector'
Change the display name of `Float Vector` to `Vector` for the **Store Named Grid** node.
While this is specific for OpenVDB grids, elsewhere we only ever reference Vector for the
data type in the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/147051
2025-10-01 11:40:20 +02:00
Jacques Lucke
96bb18de1e Nodes: add versioning to set new optional label flag for existing menu sockets
Before this option existed, all menu sockets were drawn as if this setting was enabled.
This patch sets this flag by default for all menu sockets to avoid changing the drawing
of existing node group inputs.

Ref: #146939

Pull Request: https://projects.blender.org/blender/blender/pulls/147107
2025-10-01 11:23:25 +02:00
Pratik Borhade
c627ea9aca Fix #147067: gpu.types.GPUFrameBuffer absent in latest 5.0 build
Mistake in 9d0fe5573b

Pull Request: https://projects.blender.org/blender/blender/pulls/147099
2025-10-01 11:18:26 +02:00
luz paz
8b16934623 Cleanup: Fix typos in source/blender/editors comments
Fixes different typos in comments throughout the source/blender/editors subdirectory.

Pull Request: https://projects.blender.org/blender/blender/pulls/146196
2025-10-01 11:08:48 +02:00
Aras Pranckevicius
ed9fc54e0e Fix #147006: VSE preview crashes with too high output resolution
Check whether creating GPU textures succeeds before using them.
However, currently when that happens there is no indication to the user
that "hey the resolution is maybe too big". Not sure what is the best
way to do that however; e.g. Workbench rendering also does not
indicate that in a similar scenario.

While at it, add GPU_is_safe_texture_size instead of duplicating
the same logic in two places.

Pull Request: https://projects.blender.org/blender/blender/pulls/147043
2025-10-01 10:08:18 +02:00
Jacques Lucke
6614244a69 Geometry Nodes: improve warning panel title
The goal is to give more information to the user without having to open the
panel. Specifically, it's useful to know if there are any warnings/errors or
just info messages.

Pull Request: https://projects.blender.org/blender/blender/pulls/147103
2025-10-01 09:36:27 +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
Campbell Barton
f8c4d743bc PyDoc: use set[Literal[...]] as part of the type definition
Move literal values into the type definition in BMesh PyAPI docs.
2025-10-01 17:16:44 +10:00
Campbell Barton
f29330c7b2 PyDoc: correct type links in bmesh Python module
Type links without a leading module weren't recognized,
links to the types were not created in generated docs.
2025-10-01 17:05:54 +10:00
Campbell Barton
c10d9a1a3c Cleanup: remove unused context members from sphinx_doc_gen.py
Quiet warnings building docs.
2025-10-01 16:46:17 +10:00
Campbell Barton
4199e4b9c0 Cleanup: remove outdated TODO's in space_view3d_toolbar.py
Since adding this TODO, the panels can be shown from the tool-header,
properties editor & active tools tab, so there isn't a good reason to
move them to space_view3d.py. Remove the TODO comments instead.
2025-10-01 16:03:18 +10:00
Campbell Barton
2107bd7326 Cleanup: rename as_needed -> if_needed
Follow the naming convention used elsewhere in the code.
2025-10-01 16:01:48 +10:00
Campbell Barton
7d67113a8a Fix: failure to set relative paths when adding an image strip
Calling SEQUENCER_OT_image_strip_add from Python attempted to
read a non-existent property "filepath" to check if the path was
relative. Use the "directory" for this instead.

The error occurred with the test file from #146433.

Ref !147100
2025-10-01 15:46:37 +10:00
Campbell Barton
1884e049e8 Fix #147088: Crash copying custom-normal in face + vertex selection mode
The logic to copy custom normals checked for selection but didn't
account for the selection-history failing to initialize any
custom-normal loops.

Resolve by using the regular selection if the selection-history
cannot be used as a source for loop-normals.

Ref !147087
2025-10-01 03:40:07 +00:00
Campbell Barton
866c806657 Fix #146564: Crash flipping custom normals
Flipping custom normals assumed BMLoopNorEditDataArray contained all
selected faces which isn't necessarily the case (when mixing modes and
using the selection history).

Resolve using selected faces for custom normal flipping operations,
ignoring the current selection mode.

Ref !147087
2025-10-01 03:40:06 +00:00
Campbell Barton
2fd3b557d8 Refactor: move logic for creating custom-normal arrays into functions
Also add `BM_loop_normal_editdata_array_init_with_htype`
(needed to fix #146515).

Ref !147087
2025-10-01 03:40:04 +00:00
Julien Kaspar
cc04e0128d Lighting: Update bundled MatCap assets
All new and updated MatCaps from the #104285

These are 29 MatCaps in comparison to the old 24. The size went up from
1.5 MB to 2.2 MB.

Thanks to @DanielBystedt @jlampel @Mets and many of the community
members for the contributions and feedback.

See the PR for full details, including comparison images.

Pull Request: https://projects.blender.org/blender/blender/pulls/146591
2025-09-30 23:45:46 +02:00
Clément Foucault
7ad9a2a72b GPU: Move gl_FragStencilRefARB to be scanned and added to created info 2025-09-30 21:33:33 +02:00
Clément Foucault
723f4bc549 GPU: Remove support for matrices and arrays in shader interfaces
These are not supported in Metal. Removing these corner cases
avoid a lot of boiler plate code in the backend.
2025-09-30 21:03:31 +02:00
Sean Kim
0a72429ea8 UV Sculpt: Rename strength_curve and curve_preset
Similar to 327a1925cf

* Renames `strength_curve` to `curve_distance_falloff`
* Renames `curve_preset` to `curve_distance_falloff_preset`

These changes are done for consistency with the other concepts in the
other paint modes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147071
2025-09-30 20:57:19 +02:00
Clément Foucault
f934418af2 Cleanup: Metal: Remove remains of instanced attributes 2025-09-30 20:54:46 +02:00
Clément Foucault
ef8319aaee GPU: ShaderCreateInfo: Add convenience ResourceString
This will improve readability of shader resource generation
code.
2025-09-30 20:54:46 +02:00
Ramon Klauck
412b5b3b3f Fix: VSE: Propagate split to connected strips by default
Currently, attempting to split connected strips that are not both
selected means that only one of the strips are affected.  This violates
the "connected" principle, so this PR makes the split operator propagate
the split to connected strips by default. Holding alt returns old
behavior (ignores connections), similar to selection logic.

Pull Request: https://projects.blender.org/blender/blender/pulls/146380
2025-09-30 18:12:12 +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
Sybren A. Stüvel
44913ffb60 Anim: Remove legacy pose library conversion
Remove the operators to convert a legacy pose library (from Blender 2.93
and older) to the current system (introduced in Blender 3.0).

The removal is mostly because the pose markers do not play well with
slotted Actions. The conversion code was never updated for those, and by
now it's easier to remove them than to update the code to the current
data model.

Technically it was still possible to create a legacy pose library (an
Action with pose markers) in current versions of Blender, and then use
this operator to convert that to a modern pose library. I don't know of
anybody doing that, though.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/147061
2025-09-30 16:13:04 +02:00
Jeroen Bakker
2468b3c7dd Fix: Renderdoc uses incorrect flags
Unit tests passed incorrect flags resulting in renderdoc to not use
debug information when performing step by step debugging.

Pull Request: https://projects.blender.org/blender/blender/pulls/147063
2025-09-30 16:07:52 +02:00
Omar Emara
74b1b95218 Fix #146579: Frame variables not replaced in File Output node
Frame variables in File Output paths are not replaced by the frame in
single renders. This is because the path construction function gets
passed false for frame usage to not force append frames, which also
handles frame replacement.

To fix this, we replace frame variables manually without forcing them
before constructing the path.

Pull Request: https://projects.blender.org/blender/blender/pulls/146779
2025-09-30 15:24:09 +02:00
Sybren A. Stüvel
fb2548afbd Revert "IO: update FBX im-/exporter to use the current Action API"
This reverts commit 8536cd794e. It is
still under review, and was accidentally pushed to `main`.
2025-09-30 15:07:15 +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
8536cd794e IO: update FBX im-/exporter to use the current Action API
Use the current Action API (i.e. move away from the to-be-deleted-in-5.0
one) to import and export F-Curves from/to FBX files.

There is a slight difference in functionality for the exporter, in the
selection of which Actions to export for the "All Actions" option. This
is just a minimal change to ensure the legacy API is no longer used.

Old: `action.fcurves` was iterated, and if all FCurves could resolve to
existing properties, the Action was exported. This would only work
reliably for single-slotted Actions, due to the use of the deprecated
`action.fcurves` property.

New: the above check is done for each Channelbag in the Action. The
first Channelbag that match the above check is exported. This does _not_
export all suitable channelbags; it merely improves on the old behaviour
slightly. The new, C++-based FBX exporter is more feature-complete in
this regard.

This is part of #146586
2025-09-30 14:57:35 +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
Jacques Lucke
1e8636962e Refactor: Nodes: join group sockets with panel toggle panels
This simplifies the code a lot and is also a step towards making this code more reusable.

Pull Request: https://projects.blender.org/blender/blender/pulls/147041
2025-09-30 14:39:18 +02:00
Clément Foucault
2bf86f840d Fix #146813: EEVEE: AO With Shader To RGB fails to compile
This is caused by the forward_lib including eevee_nodetree_lib
before eevee_ambient_occlusion_lib.

Fixed by splitting eevee_nodetree_lib into the part that is
needed for forward_lib so that eevee_nodetree_lib is only
included from eevee_nodetree_frag_lib and eevee_nodetree_vert_lib.

Pull Request: https://projects.blender.org/blender/blender/pulls/146987
2025-09-30 14:05:53 +02:00
Brecht Van Lommel
b92c96e39b Cleanup: Compiler warnings when building without fluids or openvdb
Pull Request: https://projects.blender.org/blender/blender/pulls/146996
2025-09-30 14:02:16 +02:00
Jacques Lucke
c0de8c40ee Fix: Nodes: double clicking to enter/exit node group not reliable
The issue was that the used operator just took the active node into account.
However, clicking in empty space does not make the active node inactive.
Therefore, sometimes clicking on empty space would sometimes remove enter the
last selected group node. Furthermore, double clicking on other nodes may also
trigger exiting the current group.

This is fixed by introducing a new operator that explicitly checks what node is
hovered.

Pull Request: https://projects.blender.org/blender/blender/pulls/147053
2025-09-30 13:30:49 +02:00
Jeroen Bakker
da39dc1da8 RenderDoc: Grouping of unit tests
This PR introduces grouping of the unit tests inside debug groups.
Previously a capture would contain a single test. But for performance
reasons multiple tests are run in a single process, making it unclear
which commands belong to which test.

This PR will add a debug group for each test that is run.

Pull Request: https://projects.blender.org/blender/blender/pulls/147046
2025-09-30 13:25:11 +02:00
Casey Bianco-Davis
fe2b834189 Grease Pencil: Add Set Corner Type to the point context menu.
This adds the `Set Corner Type` operator to the right click menu.

This was missed in #143688.

Pull Request: https://projects.blender.org/blender/blender/pulls/147013
2025-09-30 13:00:04 +02:00
Jeroen Bakker
0428afbfcc Fix: Debugging gpu tests in renderdoc
Step by step debugging of unit tests inside renderdoc didn't work as the
debug information wasn't included when running unit tests. This should
have been the case, but was broken when introducing
`--debug_gpu_compile_shaders` startup parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/147040
2025-09-30 12:54:35 +02:00
Jeroen Bakker
918edbcb4c Cleanup: Remove unused method
Pull Request: https://projects.blender.org/blender/blender/pulls/147038
2025-09-30 12:53:56 +02:00