Commit Graph

120605 Commits

Author SHA1 Message Date
Sebastian Parborg
38b178f7db VSE: Make prefetch RAW cache aware
Before this change prefetching would not work correctly with only RAW
caches. The RAW caches wouldn't previously be emptied either if
switching them off while prefetching was turned on.
2025-06-13 11:12:34 +02:00
Sebastian Parborg
7a291d6e5f VSE: Make prefetch aware of playback loops
Now the prefetch will start prefetching from the start frame if it hits
the end frame and still have cache space to spare. This improves
playback when playing loops. It also makes it possible for end users to
define an area to pre-fetch by setting the preview range.
2025-06-13 11:12:34 +02:00
Jacques Lucke
323e1432e7 Merge branch 'blender-v4.5-release' 2025-06-13 10:17:46 +02:00
Jacques Lucke
d21d7702ca Fix #140289: only show link warnings when link is visible 2025-06-13 10:17:19 +02:00
Bastien Montagne
ec02c89666 Cleanup: BLO: Remove last bits of endianness handling in readfile.cc
Forgot to remove this once we decided to not keep BE support for the
thumnailer.
2025-06-13 09:49:40 +02:00
Bastien Montagne
a91dbf1d41 Cleanup: Warnings in non-debug builds. 2025-06-13 09:49:40 +02:00
Campbell Barton
1a479122eb Fix the animation player making multiple calls to free depsgraph nodes
More of a technicality as it didn't seem to cause problems.
2025-06-13 16:11:25 +10:00
Campbell Barton
4f4ce05435 Fix memory leak with the animation player exited with an error
When dropping files onto the player window the animation the player
would restart, freeing everything except for the GHOST_System.
This caused a memory leak in the case of an error, returning without
freeing the system.

Resolve by freeing the system along with everything else.
2025-06-13 15:49:17 +10:00
Sean Kim
6640729191 Merge branch 'blender-v4.5-release' 2025-06-12 19:41:02 -07:00
Sean Kim
9c946e87a5 Fix #140305: Smooth Paint brush corrupts color attribute data
Pull Request: https://projects.blender.org/blender/blender/pulls/140311
2025-06-13 04:39:53 +02:00
Campbell Barton
8e1bca3ce4 CMake: suppress noisy deprecated-copy warnings in freestyle 2025-06-13 01:46:40 +00:00
Campbell Barton
63600f806b Cleanup: spelling in comments (make check_spelling_*) 2025-06-13 11:23:28 +10:00
Campbell Barton
e10f0a9c58 Merge branch 'blender-v4.5-release' 2025-06-13 11:22:55 +10:00
Campbell Barton
51b1ade20d Cleanup: spelling in comments 2025-06-13 10:55:53 +10:00
Sean Kim
9e2ab3d7a6 Merge branch 'blender-v4.5-release' 2025-06-12 13:13:13 -07:00
Sean Kim
858d767413 Cleanup: Silence unused function warning
Pull Request: https://projects.blender.org/blender/blender/pulls/140307
2025-06-12 22:12:00 +02:00
Harley Acheson
ca3076ed35 UI: Improved Display as Panels Narrow
As panels narrow to extremes the various parts overlap oddly. this PR
improves this by fading out icons as their available space becomes too
narrow to fit. Other items stop displaying under limits.

Pull Request: https://projects.blender.org/blender/blender/pulls/136581
2025-06-12 21:57:50 +02:00
Harley Acheson
7c110f265e UI: Snapping for Sidebars
This PR adds snapping to the sizes of various Sidebars, showing only
the category tabs. While in this state you can click a tab to expand
out that panel, click again to hide it.

Pull Request: https://projects.blender.org/blender/blender/pulls/136575
2025-06-12 20:38:35 +02:00
Sean Kim
0b3e4a221c Cleanup: Convert SubdivCCGAdjacencyType to enum class
Pull Request: https://projects.blender.org/blender/blender/pulls/140255
2025-06-12 20:26:50 +02:00
Aras Pranckevicius
68111db969 Nodes: Speedup Voronoi by changing the hash function
The 2D->2D, 3D->3D, 4D->4D hash functions used in Voronoi node were
using quite an expensive hash function. Switch these to dedicated
2D/3D/4D hash functions (pcg2d, pcg3d, pcg4d) -- these are still very
good quality, but the hash function itself is 3x-4x faster.
Which makes Voronoi node calculation overall be around 2x faster. In
some cases when using OSL, the speedup is even larger.

This visibly changes output of the Voronoi noise however. The actual
noise "behaves" the same, just if someone was depending on the noise
pattern being exactly like it was before, this will change the pattern.

Images, more performance results and details wrt OSL are in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/139520
2025-06-12 20:07:52 +02:00
Pablo Vazquez
7818082d02 UI: Theme: Add global style for panel colors
Move panel header, panel background, and sub-panel background color
settings to be global, under `User Interface`, like other widgets.

Remove per-editor panel styling. This way users can edit the panel
colors once, and affect all panels.

See pull request for screenshots and details.

Pull Request: https://projects.blender.org/blender/blender/pulls/140295
2025-06-12 20:05:34 +02:00
Jesse Yurkovich
283666675c Merge branch 'blender-v4.5-release' 2025-06-12 10:33:38 -07:00
Jesse Yurkovich
37f8616bd5 Fix #140225: Always ensure mesh topology is up to date during USD import
It is possible for a mesh to change topology across frames but still be
detected as not needing a topology update.

Until we can make a finer-grained check against the before and after
topology, unconditionally ensure it's updated for now.

Adds a new test that checks a few frames of changing topology that is
similar, but not the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/140253
2025-06-12 19:32:43 +02:00
Pablo Vazquez
e8735c3203 UI: Theme: Use tab widget colors for sidebar tabs
Make sidebar tabs use the `wcol_tab` widget colors, instead per editor
settings. Simplifying theme tweaking and the following benefits:

* Set colors in one place, affect all tabs.
* Support for text colors for inactive and active tabs.
* Support for the new `Outline Selected` property.
* In the future sidebar tabs could support `Shaded` style.

The tabs region background color remains per-editor, to be able to
customize it in a way that fits the surrounding colors (sidebar region,
header, or navigation bar background).

See pull request for screenshots and details.

Pull Request: https://projects.blender.org/blender/blender/pulls/140288
2025-06-12 19:09:23 +02:00
Hans Goudey
72e49ba20a Cleanup: Add protection for void CPPType and GPointer
Previously using these types with a void type would give a
linker error. Compile errors are much easier to diagnose.

Pull Request: https://projects.blender.org/blender/blender/pulls/140296
2025-06-12 18:44:58 +02:00
Falk David
d3b567f47f Merge branch 'blender-v4.5-release' 2025-06-12 18:32:08 +02:00
Lukas Tönne
a25e1c9267 Fix #139875: Curve interpolation writes uninitialized vertex group data
The curve interpolation operator write uninitialized data to vertex
attributes if there is more than one interpolated curve pair.
This is because _partial writes_ to `VArraySpan` wrappers only work
if the original VArray is already a span or if the wrapper span is
fully initialized with the original data beforehand.

In the case of the curve interpolation tool for Grease Pencil the
interpolation is invoked for each curve pair separately, creating a
new output attribute `VArraySpan` wrapper each time. This wrapper
is only filled for the curve pair in question and writes uninitialized
data to all the other curves' vertex weight attributes.

To prevent this from happening the simple solution is to use
`lookup_or_add_for_write_span` which initializes the entire span.
This causes quite a lot of unnecessary copying, but that is acceptable
for the Grease Pencil interpolation tool. The alternative is to change
the tool so that the destination GSpanAttributeWriter is only created
once, but that is a much bigger change.

Pull Request: https://projects.blender.org/blender/blender/pulls/140283
2025-06-12 18:28:37 +02:00
Hans Goudey
913918a16e Merge branch 'blender-v4.5-release' 2025-06-12 12:25:21 -04:00
Hans Goudey
9b80f8dc36 Fix #140130: Crash with shared edit mode mesh with subdivision modifier
This assert added by 321ec72c74 notes that changing the mesh
wrapper type from subdivision to normal mesh data just discards the
potentially-subdivided geometry and doesn't make sense, and possibly
breaks other assumptions.

This wrapper type change was done years ago by 0f89bcdbeb to
fix issues with shared object data during evaluation. It noted that
the mesh drawing data extraction didn't handle BMesh wrappers correctly
when the object isn't in edit mode, but that doesn't seem to be the
case after two trivial changes. The other bugs mentioned by that commit
are still solved after this change.

Pull Request: https://projects.blender.org/blender/blender/pulls/140290
2025-06-12 18:24:52 +02:00
Clément Foucault
7add4e177b GPU: Add deprecation notice to the docstring of GPUShader constructor 2025-06-12 18:20:40 +02:00
Hans Goudey
33a8b99efc Geometry Nodes: Preserve shape keys in node tools
Currently every node tool operation removes all shape keys. This PR
temporarily convert shape keys to attributes for the node group
execution, instead of removing them afterwards.

Fixes #113662.

Pull Request: https://projects.blender.org/blender/blender/pulls/139732
2025-06-12 18:12:17 +02:00
Julian Eisel
6c5590ebeb Cleanup: Assets: Remove now unused AssetHandle type
`AssetHandle` was a hacky design solution that was never meant to be
permanent. `AssetRepresentation` is a better designed type superseding
it. A lot of work was put into relying less and less on `AssetHandle`,
now it's finally unused.

Final step for #108806.
2025-06-12 17:10:39 +02:00
Julian Eisel
fbd8d30d63 Fix: Correction to previous commit
Asset representations shouldn't have an owner ID. They are owned by the
asset system, not the ID system.
2025-06-12 17:04:37 +02:00
Julian Eisel
3f9c943243 Refactor: Assets: Avoid hacky asset handle context query
The `AssetRepresentation` should now be available directly in context
where previously the `AssetHandle` type was required.

By adding an `"asset"` context member to the file browser, this should
avoid any behavior change. (Previously we would get the asset from
context by constructing a asset handle from the "active_file" context
member. So make sure "asset" is available wherever "active_file" is.)

This is another important step towards removing `AssetHandle`, see
blender/blender#108806.
2025-06-12 17:01:01 +02:00
илья _
767d86b543 Geometry Nodes: Improve the Grid socket shape
Added consistent overlay to socket shape and made some extrusion to
handle multi-input sockets.

Pull Request: https://projects.blender.org/blender/blender/pulls/139976
2025-06-12 16:52:02 +02:00
Julian Eisel
85878cf541 Assets: Remove asset handle RNA type
The `AssetHandle` RNA type was added to enable the asset view template,
which was removed in ae9ca35e3b. The type itself was hacky and always
considered a temporary design, as suggested in the type's RNA
description. It has by now been superseded by the `AssetRepresentation`
type.

This is another important step towards removing `AssetHandle`, see
blender/blender#108806.
2025-06-12 16:48:37 +02:00
Clément Foucault
ceef9e0f01 Merge branch 'blender-v4.5-release' 2025-06-12 16:44:29 +02:00
Clément Foucault
bb60b85fc7 Fix #139939: GPU: Driver Timeout when switching to Material Preview
This is caused by the late changes to shader compilation.

Using the main thread to compile shaders in a blocking manner
should fix the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/140140
2025-06-12 16:43:41 +02:00
Clément Foucault
b1f222648d Fix #139740: Overlay: Wire armatures are invisible in pose mode
This PR moves back the wireframe slider option back to the
bones overlay popover. It is only showed in paint weight mode
and only active if in wireframe mode.

It was concluded that this feature should be revisited to maybe
cover all shading modes in the future. But for now it is safer
for 4.5 to limit it to the weightpaint mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/140276
2025-06-12 16:43:03 +02:00
Arye Ramaty
aced349e3d Geometry Nodes: Add Shape Method parameter to Pack UV Islands node
Adds a Shape Method parameter to the UV Pack Islands node, enabling
artists to choose between faster packing and more efficient space
utilization.

Those are the three shape method options:
* Bounding Box: Fastest, less efficient space usage
* Convex Hull: Balanced performance and efficiency
* Exact Shape: Optimal packing, higher computational cost

This change consolidates arguments in `uv_parametrizer_pack()`. Now it
accept ` UVPackIsland_Params` instead of many different separate options.
This also makes it easier to expose more options in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/139110
2025-06-12 16:41:17 +02:00
Julian Eisel
30644d20a8 Cleanup: Assets: Remove now unused asset handle functions & file
These are unused since ae9ca35e3b I think. Removes some of the last
remaining usages of the hacky `AssetHandle` type, see #108806.
2025-06-12 16:36:46 +02:00
Laurynas Duburas
3c407ebeaa Curves: Enhance tesselation of NURBS with corners
Current NURBS evaluation handles corners or sharp angles poorly. Sharp
edges appear when a knot vector value is repeated `order - 1` times.
Users can make sharp corners by creating NURBS curve with `Bezier` knot
mode or by setting `order` to 2 for legacy curves. The problem occurs
because current algorithm takes all the curve's definition interval,
divides it into equal parts and evaluates at those points, but corners
are exactly on repeated knot's. To hit those, the resolution has to be
increased higher than required for the rest of the curve.

The new algorithm divides non zero length intervals between two adjacent
knots into equal parts. This way corners are hit with a resolution of 1.
This does change the evaluated points of NURBS curves, which is why some
test results have to be updated in this commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/138565
2025-06-12 16:22:21 +02:00
Julian Eisel
e9bb58e6df UI: Remove asset view template specific UI list features
Reverts most of the additions from ae1dc8f5f9 and 68c6fc6d38 to allow
internally defined UI lists to set operators to execute on click and
drag events. This was added and used only for the asset view UI
template was removed for 5.0 in the previous commit, as part of #110461.

Pull Request: https://projects.blender.org/blender/blender/pulls/140149
2025-06-12 16:13:56 +02:00
Julian Eisel
ae9ca35e3b UI: Remove based asset-view template
This UI list based template to show assets in panels was initially
introduced for the new pose library in Blender 3.0. It enabled showing
pose assets in a grid with big previews in the 3D View Sidebar. Since
then this UI element has been superseded by the asset shelf. The
template was planned for removal since then, see #110461.

Note that the asset shelf is only available in a few editors so far,
while the template was available in all editors. So it's possible that
some add-ons still rely on this template. However, I haven't found any
add-on using this template. I think it's been broken a few times and we
didn't get reports about it either. So removal seems fine.
2025-06-12 16:13:55 +02:00
Christoph Lendenfeld
f673acb6de Merge branch 'blender-v4.5-release' 2025-06-12 16:12:56 +02:00
Christoph Lendenfeld
95e39f6ff5 Revert "Fix: Autokeying properties does not deselect keys"
This reverts commit 283ae193d9.
It causes issues because the deselection happens regardless of
properties actually getting keyed, meaning
i.e. setting interpolation modes was no longer possible
2025-06-12 16:10:33 +02:00
Clément Foucault
f5dd3ff0b5 Fix #139126: Paint: Undo in Texture Paint mode does not redraw object
This was a case of missing relation tagging update.
The update was functional only after something else
tagged relations.

The relation update needed to be added in both the
Image texture node RNA function (for manually changed
images) and in the add painting slot operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/140270
2025-06-12 15:32:47 +02:00
Jeroen Bakker
629a170ec8 Merge branch 'blender-v4.5-release' 2025-06-12 15:12:59 +02:00
Jeroen Bakker
38a8512e47 Fix #140129: Vulkan: Discard pool/timeline synchronization issues
In several cases synchronization issues around discarded resources could lead
to crashes. These crashes where more prominent on NVIDIA as they reuse
their handles more often.

This PR requires external synchronization when data is moved from a
discard pool to the main orphaned data discard pool. Also the device
timeline should be guarded by the same mutex.

Pull Request: https://projects.blender.org/blender/blender/pulls/140274
2025-06-12 15:12:04 +02:00
Hans Goudey
037121c261 Mesh: Use names to store active/default UV status
Required for the transition to `AttributeStorage`, because this
information was previously stored in `CustomDataLayer` flags.
This is already the way we store the active/default color attribute status.
Migrating runtime usage to use the names isn't done here, just like
we still use `CustomData` everywhere at runtime for `Mesh`.

Pull Request: https://projects.blender.org/blender/blender/pulls/140137
2025-06-12 14:54:32 +02:00