Commit Graph

150645 Commits

Author SHA1 Message Date
Jacques Lucke
d83bfee347 Core: support LargeBHead8 in blendfile.py
This indirectly also fixes `blend2json.py` because it's build on top of
`blendfile.py`.

Main changes:
* Update .blend file header parsing to support the different header types.
* Support unpacking `LargeBHead8`.
* Use `namedtuple` instead of index access when accessing block header because
  the order of items is different now.
* Update comments that were either fully redundant or already outdated.

Pull Request: https://projects.blender.org/blender/blender/pulls/140195
2025-06-11 14:30:37 +02:00
Jacques Lucke
4df037e582 Merge branch 'blender-v4.5-release' 2025-06-11 14:26:56 +02:00
Jacques Lucke
7b291de3c3 Fix #140193: error when deleting panel with subpanel as first item 2025-06-11 14:26:00 +02:00
Clément Foucault
db79a2e737 Fix: GPU: Wrong attribute types for UNORM 8bit attributes
This was a mistake inside e57359726f.
Simply replacing SNORM_8 by UNORM_8 fixes the issue.
2025-06-11 14:21:38 +02:00
Clément Foucault
4c655f076c GPU: Shader: Parallel warmup of builtin shaders
This reduces the time needed to get to the first pixel
on screen by multithreading the builtin shader compilation.

We avoid doing this if subprocess compilation is on as
the overhead of potentially partially starting all subprocess
is far greater than the benefit of paralllel compilation.

For some reasons, the compilation is much slower when
done async for these shaders (on Metal ~200ms > ~1.2ms),
so the saving might not be substantial.

Mac M1: First frame 6s > 5s.

Pull Request: https://projects.blender.org/blender/blender/pulls/139627
2025-06-11 14:08:38 +02:00
Jacques Lucke
abe7f8cb13 Geometry Nodes: support creating Separate Bundle node with correct sockets
Similar to #140185. This allows creating a Separate Bundle node using
link-drag-search. All the sockets are created automatically based on the linked
Combine Bundle node.

Pull Request: https://projects.blender.org/blender/blender/pulls/140187
2025-06-11 13:56:56 +02:00
Bastien Montagne
26779c2d67 Merge branch 'blender-v4.5-release' 2025-06-11 13:28:40 +02:00
Bastien Montagne
103778f68a I18N: Updated UI translations from git/weblate repository (e4ad383c7490f5b4b). 2025-06-11 13:27:32 +02:00
Bastien Montagne
d7b6c584e1 Merge branch 'blender-v4.5-release' 2025-06-11 13:12:48 +02:00
Damien Picard
798f85a710 Fix #139838: UI: Improve languages list and labels
Edit the language list to make it simpler to scan.

- Display languages in a form "Language (Variant)", such as
  "English (US)" instead of "American English" and
  "Portuguese (Brazil)" instead of "Brazilian Portuguese".
  This allows alphabetical sorting by language first.
  This does not apply to endonyms (languages in their own language).
- Use a dash instead of parentheses to separate the endonyms.
- Deduplicate languages (Automatic, American English, British
  English), which all are in English and don't appear in another
  language.

- Remove language categories as headers. They are replaced with
  percentages in the language tooltips. The percentages are
  generated in utils_languages_menu.py and stored in
  locale/languages.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/140087
2025-06-11 13:11:40 +02:00
Omar Emara
9bcb536c95 Fix #138009: Extend Bounds doesn't work with Fast Gaussian
The Extend Bounds input has no effect when the Fast Gaussian filter is
used. Similarly, it has no effect if the Bokeh Blur node is using
variable size. This is a known limitation and was just not implemented.

So to fix this, we implement a general solution that works globally
across the node by pre-padding the inputs of the blur. This uses more
memory but also speeds up the base case when Extend Bounds is disabled,
while also reducing the binary size due to fewer blur specializations.

The variable size Bokeh Blur test was updated since it Extend Bounds was
silently ignored.

Pull Request: https://projects.blender.org/blender/blender/pulls/140192
2025-06-11 11:41:00 +02:00
Pratik Borhade
39a138aa92 Fix #139887: Outliner crash after excluding collection
Caused by 6fe4496f4c
This is due to missing null check

Pull Request: https://projects.blender.org/blender/blender/pulls/140024
2025-06-11 11:38:53 +02:00
Campbell Barton
f8eec542f4 Core: always free memory on exit, always report leaks
Instead of allowing leaks when parsing arguments, always cleanup before
calling exit(). This impacts -a (animation player), --help & --version
arguments, as well as scripts executed via --python which meant tests
that ran scripts could leak memory without raising an error as intended.

Avoid having suppress warnings & rationalize in code-comments when
leaking memory is/isn't acceptable, any leaks from the animation-player
are now reported as well.

This change exposed leaks: !140182, !140116.

Ref !140098
2025-06-11 19:33:34 +10:00
David Murmann
8bb6f8062f Fix #110701: ffmpeg: Output settings lost when switching the output format
When switching render output between different formats (e.g.
ffmpeg video and png images), the previously used ffmpeg settings
were lost if audio codec was set to "No Audio" (which is the default).

Pull Request: https://projects.blender.org/blender/blender/pulls/139878
2025-06-11 12:11:19 +03:00
Campbell Barton
07121d44ae Cleanup: use braces (follow own style guide) 2025-06-11 09:05:26 +00:00
Clément Foucault
afd778ec01 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-11 11:04:10 +02:00
Aras Pranckevicius
145a69e001 Cleanup: typo "is_inveetible_" 2025-06-11 11:45:58 +03:00
Cartesian Caramel
bc1d2194bd Compositor: Add tooltip to Map UV node UV input 2025-06-11 09:25:09 +02:00
David Murmann
c15850e09c Fix #110701: ffmpeg: Output settings lost when switching the output format
When switching render output between different formats (e.g.
ffmpeg video and png images), the previously used ffmpeg settings
were lost if audio codec was set to "No Audio" (which is the default).

Pull Request: https://projects.blender.org/blender/blender/pulls/139878
2025-06-11 09:19:57 +02:00
Jacques Lucke
3da6d84466 Geometry Nodes: support creating Combine Bundle node with correct sockets
When creating a Combine Bundle node using link-drag-search from a
bundle-input-socket, the new node will be initialized to have all the sockets
that linked Separate Bundle nodes have. This uses the same mechanism that's used
for creating closure zones, so it works even if the Separate Bundle node is in
some nested node group.

Pull Request: https://projects.blender.org/blender/blender/pulls/140185
2025-06-11 08:31:17 +02:00
Campbell Barton
0e5d2a3fc7 Merge branch 'blender-v4.5-release' 2025-06-11 16:23:28 +10:00
Campbell Barton
3d99ad2e89 Cleanup: correct typo in comments, use doxygen doc-strings 2025-06-11 16:22:18 +10:00
Campbell Barton
c8e31d34b4 Cleanup: quiet CMake warnings from use of undefined variables 2025-06-11 16:22:18 +10:00
Campbell Barton
672fbb7246 Merge branch 'blender-v4.5-release' 2025-06-11 16:06:17 +10:00
Campbell Barton
5c8193bf1e Fix memory leak from builds without XR enabled
Even when built without XR, the window-manager properties
could be accessed & created but weren't freed.

Exposed by !140098.
2025-06-11 15:59:55 +10:00
Sean Kim
322c620a03 Merge branch 'blender-v4.5-release' 2025-06-10 22:39:48 -07:00
Sean Kim
47523a4192 Fix #140153: Cavity automasking with hidden faces can corrupt mesh
When calculating the cavity factor, it is possible for the relative
distance of all traversed connected vertices to be zero. This results in
a division by zero which does not get clamped correctly to the expected
[0.0, 1.0] bounds. Prior to 4.2, this would have had no effect, as the
processing of this vertex would be have been skipped entirely. Due to
changes during the brush refactor, this flaw in the existing code was
exposed.

Pull Request: https://projects.blender.org/blender/blender/pulls/140168
2025-06-11 07:38:45 +02:00
Eitan Traurig
64d3a92530 Fix: "Remove All Particle Systems" is not greyed out when there are no particles
Fix the polling of the operator. The operator is now greyed
out when there are no particle systems on the object.

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/140166
2025-06-11 07:18:56 +02:00
Jacques Lucke
1568117aaf Geometry Nodes: give bundle sockets the dynamic structure type
This allows storing fields etc. in bundles.
2025-06-11 07:18:06 +02:00
Campbell Barton
2a1be1f704 Fix memory leaks in Python argument parsing
Resolve some of the leaks exposed by running tests with guarded-alloc
checks enabled.
2025-06-11 15:15:20 +10:00
Sean Kim
13fa79aa37 Merge branch 'blender-v4.5-release' 2025-06-10 20:08:07 -07:00
Sean Kim
339abe76d0 Tests: Reset sculpt performance test state between every run
Prior to this commit, the sculpt scene and object was only initialized
once, at the very beginning of the test. This has the downside of slowly
changing the performance characteristics as more and more strokes are
performed, as the number of vertices within a given stroke may
eventually approach 1. To ensure a consistent measurement each time,
rebuild the scene between each brush stroke.

Pull Request: https://projects.blender.org/blender/blender/pulls/139960
2025-06-11 05:06:44 +02:00
Sean Kim
c8d0e76ebd Tests: Lower Sculpt Dyntopo mesh size to 250000 in performance test
This commit lowers the size of the mesh from approximately 2 million
verts to 250 thousand verts. This brings the graph more in line with the
mesh and multires usecase, and is more helpful in measuring and
detecting real performance issues.

While the upper end of dyntopo can certainly be massively improved,
strokes that take in the seconds to complete are already unusable from a
user perspective,
2025-06-11 05:06:43 +02:00
John Kiril Swenson
5283c408a1 Merge branch 'blender-v4.5-release' 2025-06-10 21:08:51 -05:00
John Kiril Swenson
fa5178e366 Cleanup: VSE: Remove Legacy Handle Tweaking
This patch removes the older handle selection and transformation logic,
which was accessible through user preferences by switching off the
default "simple tweaking" mode in Editing -> Video Sequencer.

There was some initial bugginess with the new handle behavior, hence
the option to revert to legacy mode, but with recent updates this no
longer applies. With the new system, all selection workflows
are still possible -- this just drops older code to make things simpler.

No functional changes intended.

Pull Request: https://projects.blender.org/blender/blender/pulls/140031
2025-06-11 04:03:17 +02:00
John Kiril Swenson
82d20f6a22 Fix: VSE: Remove Playhead Snapping menu from Preview
The other snapping menu in the preview is specific to that view type,
so it doesn't really make sense to have a timeline-specific snap
mode listed here.

Pull Request: https://projects.blender.org/blender/blender/pulls/140171
2025-06-11 03:57:25 +02:00
John Kiril Swenson
f16cc57409 Cleanup: VSE: Ensure strip->type check uses equals comparison
Usually, this enum should only ever be compared with `==`.
Confusingly, however, to check if a strip is an effect, one must
'bitwise-and' it instead. This can backfire if e.g. one tries to do
(strip->type & STRIP_TYPE_IMAGE) which doesn't work.

Make sure we only ever 'and' against the type enum when checking if
it is an effect. There was only this one case that didn't adhere.
2025-06-10 20:50:16 -05:00
John Kiril Swenson
5c9e7f52b5 Fix: VSE: Prevent slipping single image strips
This was possible even before the slip 2.0 refactor (#137072) but the
behavior doesn't make sense.
Allow slipping only if it is an image sequence.
2025-06-10 20:46:30 -05:00
Sean Kim
c463860a82 Merge branch 'blender-v4.5-release' 2025-06-10 16:34:41 -07:00
Sean Kim
ee67c098d9 Fix #110879: Multires relative subdivide navigation subdivides mesh
Prior to this commit, the `object.subdivision_set` would prevent
actually applying a subdivision to a multires modifier when the relative
option was set. This is commonly accessed via Alt-1 / Alt-2 or D / Shift
D in Sculpt mode.

However, when the multires modifier did not already exist, pressing
these keybinds would still create the modifier and further subdivide the
mesh.

To fix this, this commit adds a hidden property to the operator:
`ensure_modifier` to indicate if the keybind should create the modifier
or not.

Pull Request: https://projects.blender.org/blender/blender/pulls/130254
2025-06-11 01:34:08 +02:00
Harley Acheson
50927827ff Merge branch 'blender-v4.5-release' 2025-06-10 15:40:32 -07:00
Harley Acheson
3e58016c13 UI: Remove Modulation of Drag Threshold with Pen Pressure
Partial revert of 5102880f51. That commit decreased pen tablet drag
threshold as pressure is added. Unfortunately, although this allowed a
quicker response to start of drag, this also increased the difficultly
of initiating a press when both actions are available. With numerical
inputs for example, although dragging is more responsive clicking into
the input to edit was more difficult.

Pull Request: https://projects.blender.org/blender/blender/pulls/140066
2025-06-11 00:38:54 +02:00
Sean Kim
bcfd276825 Merge branch 'blender-v4.5-release' 2025-06-10 13:39:34 -07:00
Sean Kim
8801af6042 Fix: 'By Active Tool' Filter shows no brushes in asset shelf
Introduced with ab3c129dd9

Pull Request: https://projects.blender.org/blender/blender/pulls/140148
2025-06-10 22:36:50 +02:00
Sean Kim
42b75c2cc4 Fix #140120: Multiplane Scrape behaves incorrectly
Introduced with 23951e1b12

The multiplane scrape brush uses two separate distances, one in world
space and the other in local brush space. Both need to be filtered on
for determining the brush strength.

Pull Request: https://projects.blender.org/blender/blender/pulls/140143
2025-06-10 22:35:44 +02:00
Pablo Vazquez
71e02b3229 UI: Draw sidebar tabs as pills
The tabs in the sidebar are aligned to the content, which looks great
when region overlap is off, but when it isn't, it looks like the tabs
are attaching to nothing. Solve this by drawing sidebar tabs as pills,
when using region overlap. This matches the top-bar workspace tabs.

Pull Request: https://projects.blender.org/blender/blender/pulls/139951
2025-06-10 21:59:55 +02:00
Jesse Yurkovich
860172484a Merge branch 'blender-v4.5-release' 2025-06-10 11:20:43 -07:00
Jesse Yurkovich
9381caf484 Fix: USD: Pass correct frame time when checking ORCO evaluation
Similar to the recent fix 457cccd964.
There was another code path which could pass in the wrong time into USD
for certain Mesh Sequence Cache scenarios.

I was not able to craft a faulty scenario by hand to observe a real
problem though. The scenario begins by importing a USD file needing a
Mesh Sequence Cache modifier and then attaching a particle system  (like
Hair) to the object. This will trigger the specific check calling into
`can_use_mesh_for_orco_evaluation` with the wrong time.

This makes the code path more explicit and passes in the correct time to
USD regardless now e.g. frame 28 vs time 1.166666666666667 (24fps)

Pull Request: https://projects.blender.org/blender/blender/pulls/140092
2025-06-10 20:20:00 +02:00
Hans Goudey
b2589be579 Fix: Build error after recent UI refactor
Additional uses of uiLayoutSetActive were added since the PR was created.
2025-06-10 13:46:54 -04:00
Guillermo Venegas
ff9c883154 Refactor: UI: Add uiLayout active get and set methods
This replaces API for accessing the uiLayout active state
with methods, following uiLayout refactors and the Python
API naming.

Part of #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/139963
2025-06-10 19:12:00 +02:00