Commit Graph

123746 Commits

Author SHA1 Message Date
Casey Bianco-Davis
0e44c5d851 Fix #147432: Grease Pencil: Pen tool Assert when Resolution attribute exists
The problem was that the Pen Tool would not set the `Resolution` attribute
and so when the `Resolution` attribute didn't exist, the newly added curve
would default to a value of 0, which would then lead to an Assert.

This problem would also effect `Curves` Objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/147673
2025-10-13 18:13:58 +02:00
Falk David
7026911502 Fix: Core: Crash when trying to link shapekey from driver target
Found while trying to append the scene from this file:
https://studio.blender.org/characters/rain/showcase/1/

Before calling `id_lib_extern` when setting the id in the driver target,
check that the ID is linkable.

Pull Request: https://projects.blender.org/blender/blender/pulls/147829
2025-10-13 17:33:08 +02:00
Clément Foucault
4ce37852fe GPU: Preprocessor: Remove disabled code before builtin parsing
This avoid issues with drw_debug_ prefix being scanned in
disabled code.

Fixes assert in debug builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/147974
2025-10-13 14:35:42 +02:00
Sybren A. Stüvel
84d99a5902 Fix: Timeline versioning conflict with pre-2.80 files
Move the versioning code that switches the Timeline editor to Dope
Sheet from the 'first' to the 'after linking' versioning stage.

There was already versioning code that effectively turns the Dope
Sheet back into a Timeline, for pre-2.80 files, and this runs in the
'after linking' stage. The 5.0 versioning code now correctly runs
after this.

Fixes: #147742

Pull Request: https://projects.blender.org/blender/blender/pulls/147734
2025-10-13 12:53:50 +02:00
Sybren A. Stüvel
5460601da3 Fix #147259: new Timeline / Dope Sheet always shows summary backdrop color
Only draw the Summary backdrop color when the Summary channel has been
expanded. This prevents the default used-to-be-timeline Dope Sheet
from showing a big red bar at the bottom of the window.

The channel box backdrop (when the channel bar is expanded) also
follows this, so when expanded it is red as before, and when collapsed
it is dark grey.

Pull Request: https://projects.blender.org/blender/blender/pulls/147708
2025-10-13 12:24:48 +02:00
Sybren A. Stüvel
07ccb021d2 Armature: Elongate tiny bones instead of deleting them
Blender cannot handle bones with (near) zero length. Prior to this
commit such bones were deleted when exiting Armature Edit mode. Now
they are kept and elongated so that they are numerically stable (or at
least they should be, given the threshold to the length that was
already in place).

To avoid the elongation from impacting the position of child bones,
they are disconnected from the tiny bone.

Apart from that it's quite nice for users that Blender no longer
silently deletes bones, this is also useful for the USD importer, as
it can import bones and expect them to exist afterwards (see
#147048).

Note: this only impacts armatures with bones of length ≤ 0.000001
units.

Pull Request: https://projects.blender.org/blender/blender/pulls/147814
2025-10-13 12:12:25 +02:00
Habib Gahbiche
e7a220e056 Fix #146724: Crash when deleting node group from outliner
An update to set the right context was missing after the current
`edittree` was updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/147828
2025-10-13 12:00:32 +02:00
Campbell Barton
1216651ca9 PyAPI: make internal modules explicitly "private"
Rename modules in `./scripts/modules/` to use an underscore prefix to
make it clear they aren't intended to be part of public API's. This
also means there is no implication that these modules should be stable,
allowing us to change them based on Blender's internal usage.

The following modules have been marked as private:

- `animsys_refactor`
- `bl_console_utils`
- `bl_i18n_utils`
- `bl_previews_utils`
- `bl_rna_utils`
- `bl_text_utils`
- `bl_ui_utils`
- `bpy_restrict_state`
- `console_python`
- `console_shell`
- `graphviz_export`
- `keyingsets_utils`
- `rna_info`
- `rna_manual_reference`
- `rna_xml`

Note that we could further re-arrange these modules
(under `_bpy_internal` in some cases), this change is mainly to mark
them as private, further changes can be handed on a case-by-case basis.

Ref !147773
2025-10-13 09:35:09 +00:00
Jeroen Bakker
d510baa4b8 Fix #147815: Vulkan: Performance NVIDIA
An oversight in b9dcc087a9 where textures aren't allocated correctly
leading to performance issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/147959
2025-10-13 09:06:11 +02:00
Aras Pranckevicius
218317b8b9 Fix #147381: VSE preview shows incorrect transparency for masks
Since VSE HDR preview was implemented (18110744a2), the preview image
is put into RGBA 16F format "color texture", and the overlay
(checkerboard, grids etc.) is put into RGBA 8U format "overlay texture".
This was rendering the color image as NON premultiplied alpha in
the viewport color texture, which is not what happens in other places
(e.g. image space).

Later commit (c279d894db) fixed transparency of the overlay texture,
in order to make pure emissive (color non zero, alpha zero) colors
from EXR files show up in VSE preview. However that exposed the issue
that underlying color texture is not premultiplied.

Fix this by premultiplying the output color in gpu_shader_display_transform
that is used by VSE preview. This is done at the end of the shader
isntead of using fixed function blending, since premultiplication needs
to happen in a way that preserves pure-emissive colors.

Comparison images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/147892
2025-10-13 08:52:33 +02:00
Harley Acheson
6691529dcc Fix #147926: Incorrect Icon used for Generic Collection
We have icons that represent specific individual collections. like
Icon_Outliner_Collection for a default (uncolored) collection, and
Icon_Collection_color_x for ones with colors. For "collections" as a
general thing though we have icon_group. Sometimes we confuse the two,
for example the list of tabs to show in Properties uses a different
icon than the actual category icon. This PR fixes the complaint by
using the correct icon for each of these purposes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147942
2025-10-13 01:26:16 +02:00
Lukas Stockner
d458416f4d Fix #146850: Assert when removing custom camera after loading file 2025-10-13 01:07:13 +02:00
Hans Goudey
6d884e0da5 Fix #147270: Smooth by angle asset detection broken
The previous commit 80e8493c11 was incorrect. I must have
tested it incorrectly, because `BLI_path_contains` only tests the
beginning of the path. Instead just make the shorter asset path
native, and explicitly use StringRef for the test.
2025-10-12 11:14:03 -04:00
Hans Goudey
8c4c92f304 Fix #147907: Geometry Node Viewer Item "Auto Remove" toggle crash
The RNA property had an incorrect update callback assigned. The
update callback assumed the RNA pointer data was a node rather
than a node's viewer item.
2025-10-12 10:51:08 -04:00
W_Cloud
ef58bd609b Fix: Nodes: String node initialization regression with link-drag-search
I think the special handling for string input node, added in #139478,
was broken by #146033. The early check for src_value (`if (!src_value)`)
caused the string-specific logic to be skipped. This PR moves the
string-specific handling before the src_value check.

Pull Request: https://projects.blender.org/blender/blender/pulls/147697
2025-10-12 16:33:50 +02:00
tariqsulley
2db54c43d8 Fix #147246: Translate with absolute increment snap fails
Snap translation to the world grid when absolute grid increments is
enabled. Previously, absolute increment snap shifted in perspective
view, causing objects to misaligned with the world grid.

Resolves regression introduced since 3.6.

Ref !147246
2025-10-12 10:34:11 +00:00
tariqsulley
f8a592a7f0 Fix #147905: No radius indicator for proportional UV editing
Resolve regression in [0] which hid transform overlay in the image view.

The indicator now displays when overlays are enabled in the UV editor.

[0]: 1df4a09539
2025-10-12 20:03:24 +11:00
Campbell Barton
87937059b1 Fix #147639: Crash When Clicking On Extrude Region in Edit Mode
Account for change in !141303 which increased the size by 1 returned
by RNA_property_string_length, which now includes the nil byte.
2025-10-12 08:43:04 +00:00
Germano Cavalcante
b42e4052b7 Fix #121378: Can't snap parent to children with Affect Only Parent activated
The flag that skips objects for snapping (`BA_SNAP_FIX_DEPS_FIASCO`) is
set for all objects that have a `DEG_OB_COMP_TRANSFORM` relation.

However, when the **Affect Only Parent** option is enabled, children
are not transformed and therefore could still be snapped to.
Despite this, the `DEG_OB_COMP_TRANSFORM` dependency remains present on
them.

To address this, a new callback was introduced that skips
Transform-to-Transform dependencies while preserving
Transform-to-Geometry dependencies in this scenario.

This approach may introduce some false positives, leading to spurious
dependency cycles (e.g., when constraints are involved).
Nevertheless, the trade-off favors accepting these false positives
rather than disabling the feature altogether.

Also make non-functional change that just removes a flag before the snap
loop, thus avoiding checking if the flag exists inside the loop.

Ref !142007
2025-10-12 16:49:58 +11:00
Howard Trickey
d58afb615c Fix #147718: Bevel accuracy at small scale.
There was a bug in the move_weld_profile_planes function where
it would only move the profile plane involved in a "weld" if
certain vectors were not too small (less than BEVEL_EPSILON in
length). The intent of the code was just to avoid problems with
zero length normals (post normalization), and the normalize_v3
function indicates that with an exact 0.0f return, so there was
no need for an epsilon test.
The example file in the issue had a small-scale model (100 times
smaller than typical), which ended up causing the old code to
prevent moving the profile plane to where it belongs.

Pull Request: https://projects.blender.org/blender/blender/pulls/147898
2025-10-12 02:03:46 +02:00
Harley Acheson
2d9a883822 Fix #147487: Disable Area Maintenance Animations
Disabling (at least temporarily) the fading animations shown during and
after some area maintenance routines (like splitting, joining, closing)
as this causes memory leaks during automated testing. This doesn't
occur during regular usage, just when the window is closed within the
animation time. We'll look for an improved solution in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/147890
2025-10-11 20:09:08 +02:00
Harley Acheson
64b4db4a12 Fix #147765: Padding of Quick Tooltips
Some tooltips pop up up instantly with just a word or two and then
expand later to show more information, for example for the Properties
categories. This type of tooltip is not considering padding when
clamping to the window bounds, making it possible for them to be
positioned in such a way that clips some content. This PR just adds
padding to the window bounds.

Pull Request: https://projects.blender.org/blender/blender/pulls/147835
2025-10-10 20:04:27 +02:00
Christoph Neuhauser
abc2cb24c9 Fix: EEVEE: Write to vertex shader outputs to avoid Intel linking errors
eevee_geom_world_vert.glsl and eevee_geom_volume_vert.glsl do not
support shadows, but the shader validation pipeline still compiles the
shadow variant of these shaders. This results in the fragment shader
reading from inputs that are not written to as vertex shader outputs.
On the Intel Windows OpenGL driver, this leads to a shader linking
failure. This PR avoids the issue by writing zeros to the interface
variables when MAT_SHADOW is defined.

Pull Request: https://projects.blender.org/blender/blender/pulls/147821
2025-10-10 19:11:46 +02:00
Nick Alberelli
4f8e4044ae API Documentation: Add note to gpu.shader to explicitly set all uniforms
Fix #103176

Pull Request: https://projects.blender.org/blender/blender/pulls/146860
2025-10-10 18:38:24 +02:00
Harley Acheson
0262b939a0 Fix #147804: Alignment of Playhead parts
With changes to the playhead to correctly draw when separated from the
vertical line (for time stretching) some parts are slightly misaligned.
This PR corrects the vertical alignment of the top of the triangular
part to the number box. It also corrects horizontal alignment of the
vertical line to be pixel-aligned based on the interior, not the shadow
exterior.

Pull Request: https://projects.blender.org/blender/blender/pulls/147825
2025-10-10 18:18:58 +02:00
Christoph Neuhauser
7b5dfdf759 Revert "Fix: EEVEE: Write to vertex shader outputs to avoid Intel linking errors"
This reverts commit 16ad7524a7.
The commit was accidentally pushed to the upstream branch instead of a
fork branch.
2025-10-10 17:23:05 +02:00
Christoph Neuhauser
16ad7524a7 Fix: EEVEE: Write to vertex shader outputs to avoid Intel linking errors
eevee_geom_world_vert.glsl and eevee_geom_volume_vert.glsl do not
support shadows, but the shader validation pipeline still compiles the
shadow variant of these shaders. This results in the fragment shader
reading from inputs that are not written to as vertex shader outputs.
On the Intel Windows OpenGL driver, this leads to a shader linking
failure. This PR avoids the issue by writing zeros to the interface
variables when MAT_SHADOW is defined.
2025-10-10 16:35:30 +02:00
Damien Picard
84fc90bb43 I18n: Extract many messages from ED_push_undo
This function is used to add undo steps. It includes a message, for
use in the Undo History menu. This label uses the "Operator" context
for translation.

This commit adds automatic extraction of two functions `ED_undo_push`
and `ED_undo_grouped_push`, as well as manual extraction for many
strings not declared in the function calls.

In order to extract those messages using the proper context, the
extraction logic had to be changed so that a custom context could be
specified. The regexes can now be either a pattern, or
a (ctxt_override, pattern) tuple.

Pull Request: https://projects.blender.org/blender/blender/pulls/147581
2025-10-10 16:01:35 +02:00
Lukas Tönne
2b01bbd73c Fix #147752: Button swap is missing custom tooltip callbacks
Tooltips could crash where callbacks receive the wrong argument.
This is because the swap function was missing the `custom_tip_func` callback,
but was swapping the callback argument.

Pull Request: https://projects.blender.org/blender/blender/pulls/147806
2025-10-10 15:37:55 +02:00
Jeroen Bakker
93cdea62f6 Fix #146560: Vulkan: Improve multires out of memory issue
This seems like an out of memory issue where the storage
buffer could not be allocated but still used as a destination
for a copy. After an out of memory issue memory can be fragmented
and any allocation can still fail.

On `AMD Radeon(TM) 890M Graphics Advanced Micro Devices AMD`
`24.30.58` I got to multires subdivision level 2+6 using the steps
described in the report. 2+7 is failing for me. 2+6 already requires 16GB
of memory using large chunks.

OpenGL and Vulkan work with other limits and memory models and can
have different behavior. This PR only improves the mentioned issue, but
can still fail in other areas.

Pull Request: https://projects.blender.org/blender/blender/pulls/147713
2025-10-10 15:19:43 +02:00
Philipp Oeser
0a35af2fc0 Fix #147623: Compositor: Impossible to toggle Asset Shelf
In certain scenarios, the Node Editor lacks the `RGN_TYPE_ASSET_SHELF` &
`RGN_TYPE_ASSET_SHELF_HEADER` regions.

That is because the versioning code from 0a0dd4ca37 only creates these
for Node Editors that are Compositors.
That does not seem right. The thing is, if you change a non-node Editor
(e.g. an Image Editor) to a Compositor editor, all is fine (`SpaceLink
*node_create` gets called, the regions set up correctly), but changing
an **existing** node editor (e.g. Shader or Geometry Nodes) to a
Compositor, no new Space gets set up (rightfully so) and we are then
missing the regions.

I dont really see an issue with having the versioning setting up shelf
regions for **all** node editors (the shelf polls will already take care
of it only showing in the Compositor) which is what this PR does.

Now we are in the unfortunate situation that people might have saved
their `startup.blend` (or other files affected by that) in the meantime,
so versioning will not kick in anymore, so we probably have to do
another versionbump (which will happen in `main`).

Pull Request: https://projects.blender.org/blender/blender/pulls/147689
2025-10-10 14:58:02 +02:00
Falk David
15d3ef54ee Fix #147653: Deleting a scene while playing it back causes a crash
The `ScreenAnimData` which is saved to the animation timer on the
screen during playback stores a pointer to the scene that is playing.
When deleting a scene, the next time the timer is triggered this will
result in an invalid pointer de-reference.

This fixes the crash by stopping the playback when a scene is deleted.

Pull Request: https://projects.blender.org/blender/blender/pulls/147687
2025-10-10 14:15:45 +02:00
Omar Emara
41dac157b6 Fix #147786: Crash when connecting menu to float input
Compositor crashes when connecting a menu output to a float input, this
is because no implicit conversion is supported between the two, and no
handling was done in this case. To fix this, we fallback to a default
value for unsupported implicit conversions.

Pull Request: https://projects.blender.org/blender/blender/pulls/147801
2025-10-10 13:52:15 +02:00
Clément Foucault
4c97ac9a27 Fix #147168: BLF: Glitchy status bar display
This seems to be a Mesa driver error.

Discarding the buffer before the area drawing fixes the
issue.

Given this is an expensive operation, we try to only do it
where it is needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/147733
2025-10-10 12:58:30 +02:00
Damien Picard
f79165eb7c I18n: Manually extract many node socket menu items
Node menu sockets' items are not currently exposed to RNA, and need to
be extracted manually for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/147579
2025-10-10 11:24:17 +02:00
Aras Pranckevicius
9cbbe1ef73 Fix #147776: VSE strip crop values not scaled to preview/proxy size
1fbd83f72e commit flipped the logic of true vs false, but did not flip
all the usages of it.

Pull Request: https://projects.blender.org/blender/blender/pulls/147792
2025-10-10 10:41:34 +02:00
Jeroen Bakker
ac9de14f03 Fix: Vulkan: Incorrect color attachments
When using a framebuffer without any color attachments there was always
a single color attachment acounted for. This oversight was detected when
looking into #147299.

Pull Request: https://projects.blender.org/blender/blender/pulls/147791
2025-10-10 10:34:03 +02:00
Richard Antalik
61033de969 Fix #146493: Crash after starting playback
Root cause is, that reverse playback would not call
`BKE_sound_play_scene()`, however `BKE_sound_stop_scene()` was called
always.

There was some weird logic in `ED_screen_animation_play()` where
condition for what sound scene was to be stopped exactly was inverted
for sequencer and duplicated for non-sequencer scene. This may also
be incorrect if somebody manages to start playback in active scene, then
create sequencer scene and stop it there.

Fortunately `ScreenAnimData` keeps pointer to scene which started
playback, so this is used to also stop the playback.

To make this code bit more readable, the function was split into
functions starting and stopping the playback, so the logic can also be
simplified a bit.

Finally, `sound_device_use_end_after()` was modified to do sanity check.
If the number of users is already 0, it does nothing and returns.
There assertion to catch this in debug builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/147613
2025-10-10 10:22:55 +02:00
Campbell Barton
224bd118eb Build: resolve error with Python 3.14
Include local version of _PyArg_CheckPositional which is private
for CPython as of Python 3.14.

Ref !147783
2025-10-10 17:53:35 +11:00
Jeroen Bakker
b9dcc087a9 Fix #147604, #146594: Vulkan: Crash on startup
On certain platforms Blender can crash on startup after the update of
VMA. This was because we want to select the correct memory area based on
requirements/preferences, but the overall flag was set to auto.

These options are mutual exclusive. This PR changes the flags to use the
requirements/preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/147781
2025-10-10 08:42:58 +02:00
Campbell Barton
74bd04e09b Docs: clarify the purpose of the --window-border argument
This read as if it enabled window decorations.

Clarify & update the doc-strings of windowing arguments to be consistent.

Also order their inclusion in --help more logically.
2025-10-10 05:00:26 +00:00
Campbell Barton
578a62cc62 RNA: expose the language enum to Python scripts
As far as I know it wasn't possible for scripts to access language
ID's and their names using documented API's.

Ref !147769
2025-10-10 14:01:28 +11:00
Harley Acheson
f4152fa946 Fix: Resizing Multiple Aligned Minimum Height Areas
Bug report #146812 shows areas being vertically resized incorrectly
when there are multiple areas at minimum height adjacently aligned
at the bottom with the lower one being a SPACE_ACTION-type editor.
So timeline minimized at the bottom with another minimized area
directly above it and then window height is increased. Our code that
scales area vertices has specific code to keep a minimized timeline
at minimum height when at the bottom with increased window height. We
also have code that ensures that all areas are at least minimum height.
These two things conflict in this specific case because they are both
done while relying on area->winy, which is not updated between
operations. This PR uses screen_geom_area_height instead, which uses
screen vertex distances.

Pull Request: https://projects.blender.org/blender/blender/pulls/147764
2025-10-10 02:59:03 +02:00
tariqsulley
5a9f88faee Fix #100993: Snap Selection to Active fails to snap to active parent
The Selection to Active operator failed when the selected object was
parented to the active object. Fix by allowing child objects to move to
the active object unless "Offset" is enabled.

Ref !147204
2025-10-09 23:34:44 +00:00
tariqsulley
2f0d433592 Fix #125822: Armature X-ray prevents other objects from being selected
Armature X-ray overlay prevented selecting other objects even with
"Lock Object Modes" disabled.

Ref !146794
2025-10-09 23:13:35 +00:00
Sean Kim
a0ae015a42 Fix #146671: Weight Paint gradient tool can cause NaN
A combination of a linear gradient with the 'Sphere' distance curve
preset could cause NaN values due to evaluating the sqrt of a negative
value. To avoid this, clamp the input value to a lower bound of 0.0f.
This fixes the Smooth, Sphere, and Inverse Square presets.

Pull Request: https://projects.blender.org/blender/blender/pulls/146693
2025-10-09 21:03:28 +02:00
Clément Foucault
73645a1047 Fix #147542: Overlay: Curve Sculpt Mode: Z-fighting with Cage overlay
The overlay just needed a bit of Z bias to avoid Z fighting.
2025-10-09 19:35:47 +02:00
илья _
bfb0d2ad20 Fix #144846: Mesh triangulation can generate duplicate faces and edges
Mesh invariants imply that edges and faces must be unique, so things
like reversed edges or duplicate faces with equal vertices are invalid.
For this reason, every time we generate new elements we have to ensure
that all new elements are unique between each other and already existing
elements. The recent refactor (ea875f6f32) introduced a new
algorithm to generate new mesh elements, and deduplication of new
elements was also a part of it. The problem is that the deduplication
only guaranteed that the original elements and new elements don't
overlap; deduplication between each new elements is not complete.

To solve the problem both new triangles and new edges have to be
deduplicated, even if there is no duplicates. Just to know this we have
to build a hash sets.

Triangle deduplication is a special part of the triangulation code,
but edges already handled elsewhere in the code base.

This refactor fixes this by replacing the original approach with one
which guarantees distinct faces and edges in the result.

Unfortunately, this fix increases runtime of the node 10x for a simple
cube with 500-vertex sides. It should be possible to make the
performance better again, but that requires more work.

Other work had to be done to enable this, so this depends on:
- [x] 157e7e0351
- [x] fa8574b80b

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/147634
2025-10-09 19:29:18 +02:00
Hans Goudey
acbd057680 Fix #147680: Crash when voxel size is too small
These grid creation functions can return a grid without data when
certain parameters are invalid. The "set_output" function of the
geometry node execution parameters asserts that the data is
not null, so I assume this is invalid and causes crashes later on.

Pull Request: https://projects.blender.org/blender/blender/pulls/147741
2025-10-09 19:11:50 +02:00
Hans Goudey
8a98c6992f Fix: Run node link pointer repair again
Run the versioning added in dbf777569b.
Another file from #147694 has this issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/147737
2025-10-09 19:08:37 +02:00