Commit Graph

122815 Commits

Author SHA1 Message Date
Campbell Barton
8def618fd9 Cleanup: quiet unused argument warnings on macOS 2025-09-04 16:49:54 +10:00
Aras Pranckevicius
e632d7992f Fix: compile warning when building without ffmpeg 2025-09-04 09:48:31 +03:00
Aras Pranckevicius
2b01753170 ffmpeg: cap maximum thread count to 16
ffmpeg internals log a warning when telling it to use more than 16
threads, so cap thread count to that.

Testing the change locally on Ryzen 5950X (where it was using 32
threads previously), capping at 16 is actually faster:
- Playback of one 4K video downsampled at 1080 res:
  seq_render_strip_stack average 9.12ms -> 7.83ms
- Playback of two blender 1080p videos: seq_render_strip_stack
  average 5.79ms -> 4.94ms

I suspect this might be because this CPU has 16 physical cores
with SMT (so 32 "logical" threads), and depending on the workload
capping at number of physical cores might be better.

Pull Request: https://projects.blender.org/blender/blender/pulls/145665
2025-09-04 08:21:52 +02:00
Campbell Barton
f508d676db Cleanup: unused argument warning 2025-09-04 15:59:40 +10:00
Jacques Lucke
df68dc5768 Nodes: remove writing legacy node group interface
When panels in node groups were introduced, the interface data of a tree was
moved from `tree.inputs_legacy/outputs_legacy` to `tree.tree_interface`. For
forward compatibility, the old interface was still written. Since Blender 4.5
can read the new format and older versions are not able to open files created in
5.0 directly anymore, it's fine to remove this forward-compatibility code now.

Also fixes #145278.

Pull Request: https://projects.blender.org/blender/blender/pulls/145489
2025-09-04 06:45:32 +02:00
Harley Acheson
b538aad192 UI: Improved Enforcement of Minimum Area Height
With the changes to area border drawing and the addition of selectable
border width it is possible to get areas that are below header height
while moving them around. This PR just tightens that up so they always
remain at least the minimum height.

Pull Request: https://projects.blender.org/blender/blender/pulls/145704
2025-09-04 04:06:59 +02:00
Harley Acheson
ac6f290720 UI: Don't Show Region AZone for Tiny Areas
This just removes region disclosure action zones when the area is too
small to be useful.

Pull Request: https://projects.blender.org/blender/blender/pulls/145700
2025-09-04 03:34:02 +02:00
Mattias Fredriksson
1789a7c3d1 Fix #145600: UV Editor crash with Text objects
Introduced with e02eb13a59

Pull Request: https://projects.blender.org/blender/blender/pulls/145601
2025-09-04 02:50:27 +02:00
илья _
6c51993aa3 Geometry Nodes: COW Elision for attribute default filling
Avoid `*_for_write` calls if will not perform any write actions later.
This is a theoretical optimization, only in some fairly specific
situations though.

Pull Request: https://projects.blender.org/blender/blender/pulls/145540
2025-09-04 02:41:55 +02:00
Harley Acheson
726b1ed8ad Fix #143617: Do Not Draw Tiny Regions
Flag regions that are only a couple pixels tall as "too small" so they
are not drawn.  The previous border drawing overwrote the outer pixels
of the area but the new drawing does not, which can sometimes show a
single line of pixels when the area is minimized to just header height.

Pull Request: https://projects.blender.org/blender/blender/pulls/145696
2025-09-04 00:19:44 +02:00
John Kiril Swenson
426e45effa Fix: VSE: Slip always cancels
PR #143513 forgot to grab the scene from `CTX_data_sequencer_scene`
since this was before the sequencer scene patch landed.

So if the scene differed from the sequencer scene it would find the
wrong strips to slip.
2025-09-03 15:59:31 -05:00
Richard Antalik
a745d6cc69 Fix: Strips are moved when adjusting properties in redo panel
This was caused by incorrectly implemented store/restore mechanism for
`move_strips` property. The property was restored to original state
immediately after strip was added when using drag and drop. So when any
other property was modified, on redo the modal move operation would
start.

The store/restore mechanism was removed, because it is possible to only
rely on checking whether invoke function was called by drag event.

The move strips property is now hidden in redo panel, because it does
not make sense to ever change it there. This is done by setting hidden
`skip_move` property and setting `move_strips` property hidden flag.

Another slightly related bug was discovered, that move strips feature
is incompatible with replace selection feature being disabled. So the
property is not drawn when move strips feature is enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/144172
2025-09-03 19:38:33 +02:00
Falk David
3978908c98 Python: VSE: Remove deprecated "sequence" context API
Remove APIs that have been deprecated since Blender 4.4.
See https://developer.blender.org/docs/release_notes/4.4/python_api/#deprecated_1.

Pull Request: https://projects.blender.org/blender/blender/pulls/145597
2025-09-03 19:31:30 +02:00
Namit Bhutani
8536fd1223 Sculpt: Compress position undo step data
Stored undo step data for position changes in sculpt mode are now
automatically compressed. Compression is run in background threads,
reducing memory consumption during sculpting sessions while adding
little performance overhead.

For testing and benchmarks, memory usage is now available through
`bpy.app.undo_memory_info()`. Undo memory usage is now tracked by the
existing automated benchmark tests. Some changes to the web benchmark
visualization present the data a bit better.

ZSTD compression is run asynchronously in a backround task pool.
Compression is only blocking if the data is requested immediately for
undo/redo.

Co-authored-by: Hans Goudey <hans@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/141310
2025-09-03 19:15:05 +02:00
Richard Antalik
ff2fe55c5d Fix build error in previous commit
Likely caused by incorrect merge when landing PR.
2025-09-03 18:31:29 +02:00
Ramon Klauck
098be390ca VSE: Implement Select Circle
This feature works like the select circle in any other modes. The user
can press "C" in preview or timeline and then select or deselect strips
by pressing the left or middle mouse button.

It’s an enhancement for the VSE preview because:
1. It makes it more similar to other editors in Blender
2. This behavior makes it easier to select specific overlapping strips
in preview, that is because the select circle only checks for the
origin of the strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/141422
2025-09-03 17:57:00 +02:00
Hans Goudey
57f35337e9 Fix #145666: Crash separating all curves
The offsets array is empty when there are no curves, even
though its size is usually one more than the number of curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/145669
2025-09-03 16:57:58 +02:00
Brecht Van Lommel
5cc6ad6afe Video: Save colorspace metadata based on display, remove HDR option
Now that there are Rec.2100 PQ and HLG displays, the additional HDR option
for video export is redundant. Typically you would now select a HDR display
early on and do all your video editing with it enabled.

For saving a HDR video, the encoding panel will now show the name of the color
space, and warn when the video codec or color depth is incompatible.

Since this is now based on interop IDs for the dislpay color spaces, we can
map more of those to the appropriate CICP code. This works fine for Display P3,
in my tests it looks identical to sRGB except that the wide gamut colors are
preserved.

However Rec.1886 and Rec.2020 are problematic regarding the transfer function,
although the latter at least has the correct primaries now. So it should be
a net improvement and this could be looked at later if anyone wants.

---

Background:

* Rec.1886 and Rec.2020 display color spaces in Blender use gamma 2.4.
* BT.709 trc is almost the same as gamma 2.4, so seems like the correct choice.
* We already write sRGB with BT.709 trc, which seems wrong.
* Yet sRGB matches exactly between Blender display and QuickTime, while
  Rec.1886 and Rec.2020 do not.
* Display P3 with BT.709 trc matches sRGB with BT.709 trc, just adding the wide
  gamut colors. So that is what is used for now. Also using the sRGB trc the
  file is not recognized by QuickTime.

There is apparently a well known "QuickTime gamma shift" issue, where the
interpretation of the BT.709 trc is different than other platforms. And you need
to do workarounds like writing gamma 2.4 metadata outside of CICP to get
things to display properly on macOS.

Not that QuickTime is necessarily the reference we should target, but just to
explain that changing the previous behavior would have consequences, and so
it this commit leaves that unchanged.

Pull Request: https://projects.blender.org/blender/blender/pulls/145373
2025-09-03 16:32:33 +02:00
Brecht Van Lommel
66bf994590 Refactor: Color Management: Add API functions for color space interop ID
Pull Request: https://projects.blender.org/blender/blender/pulls/145373
2025-09-03 16:32:33 +02:00
Brecht Van Lommel
9d7330a223 Refactor: Color Management: Pass ImageFormatData to movie writing
Like image saving, this may be modified from the scene ImageFormatData
to contain the effective color management settings taking into account
overrides.

For upcoming changes, we will need to know the image buffer colorspace when
starting to write the video instead of only on the first frame.

Pull Request: https://projects.blender.org/blender/blender/pulls/145373
2025-09-03 16:32:01 +02:00
Brecht Van Lommel
3c9bc4070c Fix #145340: Object.to_mesh API change with subdivision and shape keys
Don't inherit shape keys in this case, as they are not valid.

This is to avoid an API breaking change that affects the glTF exporter.

Pull Request: https://projects.blender.org/blender/blender/pulls/145343
2025-09-03 16:17:49 +02:00
Campbell Barton
90764de24d Fix: Python memory leak when deferred property registration fails
Regression in [0], resolve by moving error handling
before creating new objects.

[0] a7b3047cef
2025-09-03 22:10:31 +10:00
Bart van der Braak
a80b4ce22b Fix #145566: Crash in GPU_shader_builtin_warm_up when unbound GL context
glCreateProgram was called without a valid OpenGL context after
DRW_gpu_context_create unbound it. Rebind context before GPU_init
to prevent crash.

Fixes #145566

Pull Request: https://projects.blender.org/blender/blender/pulls/145606

Co-Authored-By: Miguel Pozo <pragma37@gmail.com>
2025-09-03 12:39:29 +02:00
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
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
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
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
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
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