Commit Graph

153557 Commits

Author SHA1 Message Date
Campbell Barton
d1e0e32769 Cleanup: use more common abbreviation for ToolSettings 2025-09-03 20:10:49 +10:00
Julian Eisel
1b2401cdc3 Fix #142670: Crash when opening search menu after file save
Menus listing assets (which the search menu covers) rely on notifiers to
know when their chached asset catalog tree is invalid and needs
rebuilding. The 3D view notifier listener would not check for the
notifier that is sent when the asset storage was cleared after a file
save.

Pull Request: https://projects.blender.org/blender/blender/pulls/145583
2025-09-03 11:37:22 +02:00
Nikita Sirgienko
a984114d5e Cleanup: oneAPI: Fix warnings about unused variables
No performance or functional changes are expected
2025-09-03 11:01:20 +02:00
Eitan Traurig
72cbe7adad UI: Add descriptions for UV Select Similar options
Pull Request: https://projects.blender.org/blender/blender/pulls/145486
2025-09-03 10:53:03 +02:00
Omar Emara
3d3f0d1b64 Fix #145498: Cryptomatte assets are not selectable by name
Cryptomatte assets are not selectable by name in the Cryptomatte node
due to missing metadata. This patch adds he necessary meta-data to make
this work.

Pull Request: https://projects.blender.org/blender/blender/pulls/145643
2025-09-03 10:48:00 +02:00
Omar Emara
180accfbaa Fix #145439: Artifacts in Movie Distortion with half precision
The Movie Distortion node produces artifacts when used with half
precision context. This is because distortion grids require full
precision for high quality results, which this patch does.

Pull Request: https://projects.blender.org/blender/blender/pulls/145640
2025-09-03 10:46:33 +02:00
Aras Pranckevicius
37b1886769 Fix #145244: FBX importer does not import textures from some files
Some FBX files contain somewhat incorrect relative paths for their
material textures. The old Python importer was "working" only as a side
effect that it was exhaustively searching the subfolder hierarchy.

Try to do a smaller version of that here too: if referenced image
is still not found after trying the regular relative/absolute paths,
try taking longer path parent chains from the absolute path coming
from FBX file, and using that as relative path wrt the FBX file itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/145641
2025-09-03 10:26:10 +02:00
Campbell Barton
59949b04b3 Cleanup: sort file lists in CMake 2025-09-03 17:54:04 +10:00
Campbell Barton
b2abb81b65 Cleanup: repeated word 2025-09-03 17:53:27 +10:00
Campbell Barton
6a562caaae Cleanup: group package imports
Resolve warning from ruff.
2025-09-03 17:52:22 +10:00
Campbell Barton
d77aac594f Fix #145590: translations causing driver expressions to fail
Resolve regression in [0] where name was translated for the name but
not the Python expressions, it's possible to translate both but this
doesn't seem so simple as these functions don't necessarily run at
the same time.

[0]: 6926596174
2025-09-03 17:40:29 +10:00
Omar Emara
6384bb34bd Fix #145607: Stabilize 2D node has no clip selector
The Stabilize 2D node has no clip selector, which was accidentally
removed in a previous commit. This patch adds it back.

Pull Request: https://projects.blender.org/blender/blender/pulls/145634
2025-09-03 09:02:33 +02:00
tariqsulley
4fe13c70cf Fix #126909: checker deselect fails with cyclic topologies
Checker deselect on circular vertex selections or loops produced
irregular patterns instead of a consistent checker pattern.

Resolve by handling cyclic chains as a special case.

Ref !145465
2025-09-03 17:01:49 +10:00
Eitan Traurig
d0740846f4 Modeling: "Auto Merge" support for Symmetrize
Ref !142412
2025-09-03 16:00:57 +10:00
Sean Kim
3c0f8b0def Refactor: Move paint cursor fields to runtime struct
* Moves the paint cursor pointer to `PaintRuntime`
* Removed the stored runtime color value - this was effectively
  hardcoded to a shade of red (255, 100, 100) with an alpha of 128.

The red color was only used for the smooth stroke overlay (the trailing
line) and the alpha value was only ever used for the *Line* stroke type.

Pull Request: https://projects.blender.org/blender/blender/pulls/145371
2025-09-03 07:13:11 +02:00
Toby Yang
5f8311f596 Paint: Add pressure mapping curves for size, jitter, and strength
This commit adds support for users to customize individual pressure
mapping curves for size, strength, and position jitter on a per-brush
basis to improve expression when using drawing tablets. This feature is
already implemented in Grease Pencil, and this PR adds the same
functionality to Texture/Image paint, Vertex/Weight paint, and Sculpt
modes.

The UI and functionality are the same as those in Grease Pencil.

Co-authored-by: Sean Kim <SeanCTKim@protonmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/144428
2025-09-03 05:34:38 +02:00
Hans Goudey
848ced8fe6 Curves: Parallelize nurbs custom knots offsets cache calculation
Build the size for each curve in parallel, then accumulate the sizes
to offsets afterwards. This way it's easy to parallel. Also only count
custom knots for NURBS.

Pull Request: https://projects.blender.org/blender/blender/pulls/145581
2025-09-03 04:29:08 +02:00
Campbell Barton
623f3c2585 Docs: clarify intended use of build defines regarding --help 2025-09-03 10:52:27 +10:00
Campbell Barton
c129ea1b9a Revert "CLI: only show "--qos" on WIN32"
This reverts commit 30837eca7c.

Restore the previous behavior as this argument is handled on other
platforms (it's just not used).
2025-09-03 10:43:18 +10:00
Campbell Barton
2ee1b0fa84 Cleanup: minor changes to target_project_edge error checking
- Move divide-by-zero check earlier.
- Operate on int before float conversion.
- Use float literals.
- Use const variables.
2025-09-03 10:40:06 +10:00
Sean Kim
709286ecc9 UV: Add forwards compatibility conversion for brush size
The prior change missed that `UvSculpt` brushes have their own isolated
`size` value stored at the `ToolSetting` level and not stored as either
brush assets or on the `UnifiedPaintSettings` struct

Similar to #139813

Pull Request: https://projects.blender.org/blender/blender/pulls/144837
2025-09-03 00:23:22 +02:00
Jonas Holzman
9d95f02e83 OpenXR: Display error enum string in debug mode
Up until now, when encountering an OpenXR error / exception in debug
mode, only the raw OpenXR error enum int value would be displayed, which
wasn't really descriptive nor useful. To remedy this, this commit adds
an `xrResultToString` call to additionally convert this value into its
corresponding enum string.

See PR for an example error print.

Pull Request: https://projects.blender.org/blender/blender/pulls/142582
2025-09-02 23:05:49 +02:00
Brecht Van Lommel
f49b3dabf1 Fix #144786: Cycles curve thickness missing transform in viewport
This should be in world space, like point radius and most other shader nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/144802
2025-09-02 19:01:50 +02:00
Julian Eisel
8bbefda3fc Fix: Last row in file browser showing sometimes clipped out of view
In the vertical list display mode, if only the top part of a file was
scrolled into view, the file wouldn't actually draw. So while scrolling
down the list, the last item would visibly pop up. This wasn't intended,
not drawing these items is just an optimization.

Issue was the offset for the table header (reading something like "Name
| Modified | Size") wasn't accounted for.
2025-09-02 18:47:38 +02:00
Julian Eisel
18b54085b9 Fix #145427: Last entry in file browser may not be displayed
Calculations for the amount of visible items incorrectly substracted the
top list padding.
2025-09-02 18:40:57 +02:00
Falk David
73530b4bff Cleanup: VSE: Rename uses of "sequence" with "strip" 2025-09-02 18:26:14 +02:00
Hans Goudey
bb3bf5fca0 Fix #145560: Invalid curve flag set in legacy curve pen tool
Instead of just disabling the cyclic bit of the flag, the code
reset the whole flag to -2 which doesn't really make sense.
It cause a problem because the "custom knots" bit was set
but there weren't any allocated custom knots.

Pull Request: https://projects.blender.org/blender/blender/pulls/145580
2025-09-02 18:08:28 +02:00
Brecht Van Lommel
ab97708210 Fix #145263: Cycles normal map with generated texture coordinates fails
Ensure we have the UVs to compute the tangents.

Pull Request: https://projects.blender.org/blender/blender/pulls/145273
2025-09-02 17:50:41 +02:00
Brecht Van Lommel
c693e72841 Fix #145254: Cycles normal map node strength wrong results with displacement
Can not use tangent space interpolation in this case, as the tangent space
is for the undisplaced normal.

Pull Request: https://projects.blender.org/blender/blender/pulls/145273
2025-09-02 17:50:41 +02:00
Julien Duroure
6f8978c71a Fix #144980 - glTF - Fix importing empty glTF files, without nodes or scenes 2025-09-02 17:19:37 +02:00
Hans Goudey
dbf777569b Fix #145133: Invalid node link node pointer in certain file
Somehow the file in this report ended up with a node pointer that
disagreed with the socket pointer. Since we use the latter for drawing,
that's a better source of truth. This commit adds a versioning step
that corrects the node pointer. If this happens again we may need
to run the versioning again at some point, but that's not clear.

Pull Request: https://projects.blender.org/blender/blender/pulls/145409
2025-09-02 16:24:26 +02:00
Habib Gahbiche
588052f97f Fix: viewer shortcut description mentions compositor only
Pull Request: https://projects.blender.org/blender/blender/pulls/145513
2025-09-02 16:19:30 +02:00
Sybren A. Stüvel
15922bec71 Anim: fix crash when loading F-Curve with unknown modifier
When loading a blend file that has an F-Curve with an unknown modifier
on it, this should be gracefully handled.

Pull Request: https://projects.blender.org/blender/blender/pulls/145574
2025-09-02 16:08:38 +02:00
Jeroen Bakker
8b220fa4cf Cleanup: String formatting
Pull Request: https://projects.blender.org/blender/blender/pulls/145575
2025-09-02 15:11:16 +02:00
Campbell Barton
68c1e2fe31 Fix #71593: Changes to PropertyGroup in add-on preferences aren't saved
Use AncestorPointerRNA to detect when property groups from an add-on
or key-map preference are edited so the preferences are marked as dirty
and saved on exit.
2025-09-02 22:58:26 +10:00
Julian Eisel
287550f759 UI: Allow renaming view items in popups
Fixes #145447.

Previously it wasn't possible to rename view (tree view, grid view)
items in popup regions. Before 450f428434, the popup would close, after
it, it would crash.

Pull Request: https://projects.blender.org/blender/blender/pulls/145567
2025-09-02 14:32:14 +02:00
Bastien Montagne
329112c4d3 NodeTree: Add 'real' custom properties to Nodes.
Add back custom properties to nodes, and properly expose them in the UI
as such (new 'Custom Properties' panel for nodes in the the Node
Editor).

This shows like any other custom property panel in the UI, in the Node editor:

<img width="424" alt="image.png" src="attachments/adb50815-0db0-447f-ac3b-7860d9a3e3fc">

Although not initially intended for this, nodes 'mixed' IDProperties
were quite widely used by py/extensions developers to store per-node
data.

During the initial IDProperties split between User-defined (aka custom
data) and system-defined (runtime RNA properties), this was not known,
so decision was made to only keep system properties for Nodes. The fact
that these properties were not exposed at all in UI also played a role
in that decision. See also discussions in #141042.

This commit instead splits system properties out into their own new
storage, and keep existing ones for user-defined/custom properties
(as done for other IDProperty owners, like IDs, bones, etc.).

Pull Request: https://projects.blender.org/blender/blender/pulls/145424
2025-09-02 14:13:28 +02:00
Brecht Van Lommel
f59446624d Fix #145182: Bone custom shape mesh does not have subdivision
This uses a special delayed extraction code path that is not used by
any other drawing code. Ensure we have the subdivided mesh when GPU
subdivision is off similar to the other code paths.

Pull Request: https://projects.blender.org/blender/blender/pulls/145268
2025-09-02 13:16:39 +02:00
Brecht Van Lommel
8421de0277 Fix #143662: Crash with Cycles persistent data and file thumbnail generation
The Embree scene contains a TBB task group that has a parent pointer to the
task group it was created in. In Cycles this task group was only temporarily
created on the stack, resulting in a dangling parent pointer.

The simple solution is to make the Cycles side task group persistent too.

Many thanks to Aras for figuring this one out, this was a very tricky one.

Pull Request: https://projects.blender.org/blender/blender/pulls/145515
2025-09-02 13:14:07 +02:00
Bastien Montagne
5cdc506750 Hotfix #145562: Crash when passing null value to RNA_property_string_set
Regression from today's heavy get/set refactor commit (469f54f484).

Unclear however if this `RNA_property_string_set` function is expected
to accept nullptr value, as reading code before the breaking commit, it
seems like it would call `strlen` or `BLI_strncpy` on a nullptr then,
which should also fail dramatically?
2025-09-02 12:46:44 +02:00
Jeroen Bakker
fc17013cf3 Cleanup: EEVEE: Remove Metal/AMD workaround
This PR removes an unused workaround.
AMD GPUs aren't supported on Metal since Blender 5.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/145564
2025-09-02 12:41:41 +02:00
Christoph Lendenfeld
49d3d29355 UI: move playhead snapping to footer
This patch moves the playhead snapping UI element to the
new footer introduced with 35bcbad7e9
This is in preparation for removing the timeline editor, see #131102

Pull Request: https://projects.blender.org/blender/blender/pulls/144922
2025-09-02 12:22:29 +02:00
Bastien Montagne
469f54f484 BPY: Implement get_transform and set_transform for runtime-defined RNA properties.
Improve handling of runtime defined python RNA properties. Mainly:
* Add `get_transform` and `set_transform` new callbacks.
  These allow to edit the value, while still using the default
  (IDProperty-based) storage system.
* Read-only properties should now be defined using a new `options` flag,
  `READ_ONLY`.
* `get`/`set` should only be used when storing data outside of the
  default system now.
  * Having a `get` without a `set` defined forces property to be
    read-only (same behavior as before).
  * Having a `set` without a `get` is now an error.
* Just like with existing `get/set` callbacks, `get_/set_transform`
  callbacks must always generate values matching the constraints defined
  by their `bpy.props` property definition (same type, within required
  range, same dimensions/sizes for the `Vector` properties, etc.).
* To simplify handling of non-statically sized strings, the relevant
  RNA API has been modified, to use `std::string` instead of
  (allocated) char arrays.

Relevant unittests and benchmarking have been added or updated as part
of this project.

Note: From initial benchmarking, 'transform' versions of get/set are
several times faster than 'real' get/set.

Implements #141042.

Pull Request: https://projects.blender.org/blender/blender/pulls/141303
2025-09-02 11:30:09 +02:00
Jeroen Bakker
75c66158aa Vulkan: Precheck max allowed buffer size
Maintenance4 contains the maxBufferSize property that contains the
maximum allowed buffer allocation.

This PR uses this property to precheck if allocations will fail. It
was an attempt to improve the reliability of failing allocations but
currently they fail at the driver side.

Pull Request: https://projects.blender.org/blender/blender/pulls/145555
2025-09-02 10:57:24 +02:00
Christoph Lendenfeld
ec6dfeb806 Refactor: Remove unused function from UI_view_2d.hh
No functional changes intended.

This removes the unused function `UI_view2d_draw_scale_y__block`
and renames the functions that are `static` to follow the conventions.

Pull Request: https://projects.blender.org/blender/blender/pulls/145342
2025-09-02 09:54:04 +02:00
Jacques Lucke
97ee147f60 Fix: Nodes: wrong structure type inference in Blur Attribute node
The output of this node is always a field, regardless of whether the inputs are fields.
Therefore, using `dependent_field()` is wrong.

Pull Request: https://projects.blender.org/blender/blender/pulls/145548
2025-09-02 09:25:55 +02:00
Jacques Lucke
73b3107168 Fix: Nodes: incorrect structure types in Random Value node
This node is really just a function node. The main thing that's somewhat special about
it is the implicit input for the id, but that's supported for function nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/145549
2025-09-02 09:22:21 +02:00
Jeroen Bakker
42a8c695bf Fix #144636: EEVEE Invalid hit during raytracing
Raytracing pipeline in EEVEE interpolates in time for better results.
But depending on the interpolation could try to load a sample that isn't
available.

This PR fixies this for planar probes and screen tracing. In screen
tracing the issue wasn't visible as it the background samples are
always cleared.

This has an expected performance penalty but it could require an
overhaul of EEVEE raytracing for a more efficient solution.

Pull Request: https://projects.blender.org/blender/blender/pulls/145508
2025-09-02 07:49:16 +02:00
Brad Smith
c114a1f660 Build: resolve linking error on *BSD systems
Ref !144247
2025-09-02 04:04:20 +00:00
Campbell Barton
30837eca7c CLI: only show "--qos" on WIN32 2025-09-02 11:06:31 +10:00