Commit Graph

120406 Commits

Author SHA1 Message Date
Jeroen Bakker
6899c2dbfd Fix #140342: Vulkan: Assert when quiting
When quiting Blender the timeline doesn't get updated and an assert is
triggered that the order isn't correct. The order isn't that important
anymore as the mechanism has been tested. The assert was useful during
initial development.

This PR removes the assert as it isn't valid in all cases.
2025-06-13 13:28:37 +02:00
Pratik Borhade
1d83e9bfe3 Fix #140224: Group ID in drag search of merge layer is not working
This is due to missing `make_available` callback for Group ID socket.
Use it to change the mode of the merge layer node so that socket is
available in `connect_available_socket()`

Pull Request: https://projects.blender.org/blender/blender/pulls/140251
2025-06-13 11:55:19 +02:00
Omar Emara
b62ef2cdd6 Compositor: Add forward compatibility for removed storage
This patch removes node init functions that currently exist only for
forward compatibility and moves the logic to the forward compatibility
section of node writing. This is to avoid allocating unused data
throughout the 5.x series.

Pull Request: https://projects.blender.org/blender/blender/pulls/140273
2025-06-13 11:15:51 +02:00
Clément Foucault
a639f99987 Fix #140325: EEVEE: Uninitialized memory used in raytracing specialization
These two variables were only set during `trace()` and not for
`warm_shader_specialization`.
2025-06-13 11:05:11 +02:00
Jacques Lucke
d21d7702ca Fix #140289: only show link warnings when link is visible 2025-06-13 10:17:19 +02: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
51b1ade20d Cleanup: spelling in comments 2025-06-13 10:55:53 +10: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
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
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
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
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
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
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
Alaska
843a596b84 Fix #140040: Curve to Points length input should be a field
This commit changes the length input of the Curve to Points node to be
a field input, allowing users to more easily set a seperate length per
curve.

Pull Request: https://projects.blender.org/blender/blender/pulls/140048
2025-06-12 14:53:23 +02:00
Hans Goudey
91684f0de4 Mesh: 4.5 forward compatibility for active/default UV maps as names
The transition to `AttributeStorage` requires the active and default
UV map status to be stored separately, since currently they're
stored as flags on `CustomDataLayer`. This commit adds forward
compatible reading for when the status is written as attribute names
on `Mesh` instead, which is what we already do for color attributes.

Pull Request: https://projects.blender.org/blender/blender/pulls/140134
2025-06-12 14:47:48 +02:00
Christoph Lendenfeld
b9d282b317 Fix #136372: Outliner hierarchy modification not auto keying
When recursively modifying a property via the Outliner while holding Shift,
only the property that was actually clicked got keyed.

With this fix, the clicked property gets keyed twice. Once with the added call,
and once in the ui button code. This shouldn't be a performance concern though.

Pull Request: https://projects.blender.org/blender/blender/pulls/140131
2025-06-12 13:47:24 +02:00
Jacques Lucke
5f69878126 Fix #140234: missing bounds check in Offset Corner in Faces node
Pull Request: https://projects.blender.org/blender/blender/pulls/140269
2025-06-12 13:08:52 +02:00
David Murmann
d0c4c308ce Fix #139952: ffmpeg ProRes 10 bit output has premultiplied alpha
A video written as 8 bit per channel uses blenders internal byte
buffer directly, which has straight/unpremultiplied/unassociated alpha.
Any other bit depth is converted from the float buffer, which has
premultiplied/associated alpha. This discrepancy was not taken into
account, and is now converted for formats which support alpha and
more than 8 bits per channel (which is only prores and ffv1).

Pull Request: https://projects.blender.org/blender/blender/pulls/139953
2025-06-12 13:05:42 +02:00
Clément Foucault
455fac3e9b Fix #140230: GPU: GPU debug draw excessive memory usage
Simply reduce the default maximum number of vertex to a
more reasonable amount.
2025-06-12 12:57:17 +02:00
Jeroen Bakker
f6ec5570d4 Fix #140215: Vulkan: performance descriptor buffers
We added descriptor buffers to 4.5 as it contains some core API changes.
However there have been various reports that the system isn't fully
mature resulting in lower performance especially on NVIDIA GPUs.

This PR will disable descriptor buffer feature for NVIDIA GPUs.

Pull Request: https://projects.blender.org/blender/blender/pulls/140263
2025-06-12 12:50:32 +02:00
Philipp Oeser
cd43760843 Fix: Graph Editor proportional editing wrong distances
This is a followup to 1345ed9214 which caused a regression in that not
the "real" closest distance was chosen.

The "real" closest distance should be based on the closest selected
item, but instead, it was now more or less based on the _last_ selected
item, so seemingly the whole influence-thing was shifted to the right...

Since we were not applying the closest distance directly (but
postponing), we continued iterating and the min_ff call was not taking
into account the "stored" value.

So to resolve, additionally min_ff the "stored" value as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/140209
2025-06-12 12:40:48 +02:00
Jacques Lucke
794cd8974b Fix #140240: overlapping buttons in color input node 2025-06-12 11:52:51 +02:00
Jacques Lucke
7099cb3c9a Fix #132944: improve handling of high subdivision levels in nodes
Previously, the subdivision level was clamped to 11. While such high subdivision
levels are rare, there are still use-cases for going above those if hardware
resources allow for it.

This patch sets the hard upper limit to 15. When going above that, even
subdividing a single triangle would result in data that's too large to store in
`Mesh` because it has too many face corners for an `int`. Furthermore, instead
of clamping the subdiv level, there is an error when going above that. This
might help when accidentally connecting a value >= 16 to the subdiv level input.

Pull Request: https://projects.blender.org/blender/blender/pulls/140057
2025-06-12 11:31:33 +02:00
Sietse Brouwer
c40a1a9836 Fix #120291: Grease Pencil: Geometry not selected after paste
In Grease Pencil, when pasting geometry from the clipboard, the pasted
geometry should always be selected, so that the user can continue
working with it. In some cases though, the geometry wasn't selected.
And selection failed when there was a mismatch between the selection
domain on the clipboard and the active selection domain when pasting
(e.g. selection domain on the clipboard was 'Point' and the active
selection domain was 'Curve').
This PR ensures that the pasted geometry is always selected, in the
correct selection domain.

Pull Request: https://projects.blender.org/blender/blender/pulls/140127
2025-06-12 08:20:46 +02:00
Christoph Lendenfeld
283ae193d9 Fix: Autokeying properties does not deselect keys
When autokeying properties, it didn't deselect
keys in editors like it does now for other ways of keying.

------

Part of #138877
Not tagging this PR as a fix because it doesn't completely resolve the issue

Pull Request: https://projects.blender.org/blender/blender/pulls/139886
2025-06-12 07:42:44 +02:00
Christoph Lendenfeld
96daf409c0 Fix: Autokey subframes when editing buttons
Previously, autokeying properties from the UI (outliner, n-panel)
would snap to full frames even when the current frame is a subframe.

This PR also fixes the display of properties in the
outliner when subframes are used. If the property is keyed
on the current subframe it is now yellow.

Found while trying to fix #136372

Pull Request: https://projects.blender.org/blender/blender/pulls/140117
2025-06-12 07:40:42 +02:00
Christoph Lendenfeld
04162c9a93 Fix #138695: Pasting single keyframes not taking NLA offset into account
When pasting single keyframes NLA mapping was not applied.

Pull Request: https://projects.blender.org/blender/blender/pulls/139891
2025-06-12 07:39:11 +02:00
Christoph Lendenfeld
da2a09fe63 Fix #139788: Applying a pose no longer autokeys
When applying a pose asset created with 4.4 and later,
autokeyframing no longer worked. That is because poses
are generated without any FCurve groups now, and the
code assumed there to be an FCurve group for every
bone in the pose action.

I decided to remove that assumption and instead use
`BKE_action_find_fcurves_with_bones` which iterates
fcurves in an action+slot combination
and calls the provided callback. This is the logic that
the code to apply a pose uses as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/139794
2025-06-12 07:34:38 +02:00
YimingWu
f87c821b96 Fix #140082: Line Art: Use original object id to check dupli objects
In 884ef238c0 line art added a safe guard in depsgraph iterator to
properly handle dupli-objects, but it should check original objects id
for inclusion instead of evaluated objects. Now dupli-objects will show
up correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/140095
2025-06-12 08:35:01 +08:00
Harley Acheson
1f1c20fa08 Fix: Allow Properties Snap To Min at 2X Scale
Slight adjustment to the minimum area snapping size to ensure that
Properties snaps to a minimum that shows the category tabs. Currently
this snaps nicely at 1X scale but does not show the categories at 2X.

Pull Request: https://projects.blender.org/blender/blender/pulls/140241
2025-06-12 01:54:28 +02:00
Jesse Yurkovich
fe0aa375ac Fix: USD: Correctly process point instancers using overs for the prototypes
The canonical way to define Point Instancers in USD is to use "overs"
for the prototype instances[1]. However, our current support was coded
and tested against setups using Scope prims to contain the prototypes
instead.

Both approaches are valid USD, but we need to support the canonical way
which we so far did not; the overs were incorrectly excluded from
processing.

Original patch from Michael Kowalski

[1] https://openusd.org/release/api/class_usd_geom_point_instancer.html#UsdGeomPointInstancer_protoProcessing

Pull Request: https://projects.blender.org/blender/blender/pulls/140232
2025-06-12 00:52:07 +02:00
Sean Kim
633ca37641 Sculpt: Revert recently introduced brush strength curve changes
This commit effectively reverts the changes introduced in
23951e1b12 that changed how the brush
strength curve calculation works. Since that commit, a number of high
severity regressions have been reported, and the decision to remove
filtering from this method now seems dubious and likely to cause further
problems.

Other interim fixes that were made have not been reverted, as they are
generally correct to do, even if they cause an extra loop over all of
a node's factors & distances. In general, all existing unnecessary calls
to `filter_distances_with_radius` are planned to be removed in 5.0.

Finally, to address the original issue that the mentioned commit was
intended to fix, we now check distance for the constant falloff and
zero out the factor if necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/140181
2025-06-11 23:44:11 +02:00
Hans Goudey
8b764124c2 Fix #140123: Data-block inputs not drawn in node tools inputs
Caused by 26ce934148

Pull Request: https://projects.blender.org/blender/blender/pulls/140147
2025-06-11 18:45:39 +02:00
Brecht Van Lommel
02c1e959cf Fix #139950: OpenColorIO crash running Blender from path with $
As with the previous fix for #119560, this does not address the problem
in OpenColorIO itself but at least catches the exception to avoid crashing.
Which might have also happened with invalid OpenColorIO configurations.

Pull Request: https://projects.blender.org/blender/blender/pulls/140145
2025-06-11 16:15:11 +02:00
Brecht Van Lommel
697d13bbfc Fix #139918: Color management assert displaying render
This buffer can not just be scene linear, but data too.

Pull Request: https://projects.blender.org/blender/blender/pulls/140141
2025-06-11 16:10:03 +02:00
Clément Foucault
20803fb307 Fix: GPU: Mesa driver on AMD GPU matches GPU_DRIVER_OFFICIAL
The check for Mesa needed to be before the more coarse
check about an AMD GPU. Also, it seems the newer drivers
do not have `X.Org` in the vendor string.
Checking for `Mesa` in the version string seems to be
the correct way.

Pull Request: https://projects.blender.org/blender/blender/pulls/140204
2025-06-11 15:43:50 +02:00
Clément Foucault
2f63488ce9 Fix #140113: White flickering when changing a texture on EEVEE
Fixed by not doing async loading and always stage correct
texture reference.

Unfortunately the code is getting a bit messy since the
texture loading is not done at the GPUMaterial level.
So we need one async and one synchronous path inside
`PassBase<T>::material_set`.

`ImageGPUTextures` now contains references to the location
of the future `GPUTexture *`.

Also fix #140001

Pull Request: https://projects.blender.org/blender/blender/pulls/140203
2025-06-11 15:23:24 +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
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
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
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
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
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
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
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