Commit Graph

123884 Commits

Author SHA1 Message Date
Omar Emara
28f84831c3 Fix #144815: Assert when loading certain files
Th compositor asserts when loading certain files. Those file were saved
with an invalid active viewer key, possibly due to a bug that was fixed
already in c8cb24121f, but blend files were never updated.

So starting in 5.1, we fix those files by essentially doing what
ED_node_set_active_viewer_key is supposed to do at load time during
versioning.

Pull Request: https://projects.blender.org/blender/blender/pulls/148047
2025-10-14 14:39:27 +02:00
Omar Emara
df8683ec2a EEVEE: Support different dimensions vector sockets
This patch adds support for the dimensions property of vector sockets,
support 2D and 4D sockets in addition to the currently supported 3D one.
This just involves assigning the correct GPU type when constructing the
GPU materials from nodes.

The only node that uses 2D sockets for now is the Radial Tilling node,
so we just need to update its interface.

Pull Request: https://projects.blender.org/blender/blender/pulls/148034
2025-10-14 13:24:17 +02:00
Pratik Borhade
bf09f90338 Merge branch 'blender-v5.0-release' 2025-10-14 16:35:51 +05:30
Pratik Borhade
084f04ec09 Fix: Gray out shape key when muted
Missed during migrating shape keys to tree view.

Pull Request: https://projects.blender.org/blender/blender/pulls/147798
2025-10-14 13:03:29 +02:00
Jacques Lucke
5be95161a4 Fix #147747: Shader Nodes: wrong code gen order
Currently, sometimes shader code generation fails because the code of top-level
nodes is interleaved with the code of a repeat zone. See #147747 for more
details.

Previously, the code-generation order was just the standard toposort of the node
tree, but it does not guarantee that all nodes in a zone are next to each other.
Also, it can't easily, because the zone detection itself depends on the
toposort. This patch implements another sorting step on top of the default
toposort. It packs nodes in zones together without changing the validity of the
toposort.

This is an alternative to #147999.

Pull Request: https://projects.blender.org/blender/blender/pulls/148005
2025-10-14 12:08:32 +02:00
Jacques Lucke
2fc32a2f18 Fix #147747: Shader Nodes: wrong code gen order
Currently, sometimes shader code generation fails because the code of top-level
nodes is interleaved with the code of a repeat zone. See #147747 for more
details.

Previously, the code-generation order was just the standard toposort of the node
tree, but it does not guarantee that all nodes in a zone are next to each other.
Also, it can't easily, because the zone detection itself depends on the
toposort. This patch implements another sorting step on top of the default
toposort. It packs nodes in zones together without changing the validity of the
toposort.

This is an alternative to #147999.

Pull Request: https://projects.blender.org/blender/blender/pulls/148005
2025-10-14 12:06:56 +02:00
Omar Emara
a2146839d7 EEVEE: Unify float2 implicit conversion with other parts of Blender
This patch adjusts the implicit conversion rules involving float2 to
match other parts of Blender, like BKE Conversions, Geometry Nodes, and
the Compositor. The new rules also make much more sense to me on their
own.

The GPU_VEC2 is no currently used for GPU materials as far as I can see,
so this should not be a breaking change.

Pull Request: https://projects.blender.org/blender/blender/pulls/148033
2025-10-14 12:04:40 +02:00
Philipp Oeser
8cb79389de Merge branch 'blender-v5.0-release' 2025-10-14 11:48:52 +02:00
Philipp Oeser
88aff1400d Compositor: dont show exection time if node is unconnected
This is in line with what Geometry Nodes do

NOTE: this originated as a "workaround" for #147752
( but does not tackle its root cause at all... that one is
already fixed with 577a66aea2 )

Pull Request: https://projects.blender.org/blender/blender/pulls/147802
2025-10-14 11:48:10 +02:00
Jacques Lucke
578f50aaa6 Merge branch 'blender-v5.0-release' 2025-10-14 11:19:05 +02:00
Jacques Lucke
7fd0a5acef Fix #147878: bad usage inferencing when there is a link cycle
The inferencing algorithm does not work reliably when the tree has cycles. So
return early and assume everything is used. The user is expected to fix the bad
link as soon as possible.

Pull Request: https://projects.blender.org/blender/blender/pulls/148009
2025-10-14 11:18:22 +02:00
Falk David
8543083656 Merge branch 'blender-v5.0-release' 2025-10-14 10:53:20 +02:00
Casey Bianco-Davis
2bb7a9f05d Fix #147402: Pen Tool doesn't return to the Aligned type after LeftCtrl
This makes it so that the Pen Tool will return the handle type back
to `Align` after letting go of `LeftCtrl`

This effects Grease Pencil and Curves objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/147943
2025-10-14 10:50:21 +02:00
Sybren A. Stüvel
3a75bae825 Fix #148010: instant crash opening any file with Dopesheet and Keyframes
Fix the code path that left the `color` pointer uninitialized when
drawing.

Pull Request: https://projects.blender.org/blender/blender/pulls/148013
2025-10-14 09:17:03 +02:00
Harley Acheson
d6dad498b6 Merge branch 'blender-v5.0-release' 2025-10-13 18:42:31 -07:00
Harley Acheson
1ae52b6bd0 Fix: Quick Tooltip Position Can Jiggle
Quick tooltips immediately show a word or two and then shows more
detailed information after a pause. It is possible to have these two
things shows at differing positions (vertically or horizontally) and
therefore jiggle. Some padding code uses the width and height and half
of a padding amount, which can result in differing values if the first
width or height is an odd amount but the second is even, or vice versa.
This happens quite infrequently and depends on the user scale. This PR
just replaces one line that does the padding in a way that results in
consistent values.

Pull Request: https://projects.blender.org/blender/blender/pulls/148019
2025-10-14 03:40:28 +02:00
Campbell Barton
5cda4b188c Docs: add missing newline to debug_gpu_shader_source doc-string
Also use term "directory" (as used elsewhere) & minor tweak to warning.
2025-10-14 11:27:01 +11:00
Campbell Barton
eedf15e3b7 X11: add support for --no-window-frame 2025-10-14 11:07:50 +11:00
Nathan Vegdahl
63d65bebf0 Fix #147803: Assert triggered on keyframe jump on NLA control curves
The cause was a missed case from #130440 where
`use_nla_remapping = true` was being unconditionally passed to
`fcurve_to_keylist()` rather than determining the value with
`ANIM_nla_mapping_allowed()` as it should have been.

The fix is simply to use `ANIM_nla_mapping_allowed()` instead of
unconditionally passing `true`.

This PR also changes an outdated comment to properly explain why `adt`
was null in the first place (which is precisely to catch bugs like
this).

Pull Request: https://projects.blender.org/blender/blender/pulls/147957
2025-10-14 01:29:01 +02:00
Campbell Barton
f058780f6b Merge branch 'blender-v5.0-release' 2025-10-14 09:15:02 +11:00
Campbell Barton
8bb10b2d33 Build: resolve error with Python 3.13
Follow up to !147783, it should have included 3.13 in the version range.
2025-10-14 09:11:07 +11:00
Falk David
0ec4e23fa6 Merge branch 'blender-v5.0-release' 2025-10-13 18:30:17 +02:00
Falk David
1b73a53d0c Fix #139501: VSE: Build separate dependency graph for scene strip previews
Currently, the scene strip preview uses the existing dependency
graph built for that scene. This was not a big issue before
the sequencer scene was introduced, because the user would have
to create two main Blender windows to run into problems.
Now with the sequencer scene, it's possible to look at the scene
of a scene strip within the same window.
When the user is editing the scene (e.g. moving an animated object)
any open sequencer preview will cause the edits to be flushed.
This can e.g. result in visual jumping of animated objects, and more.

This PR attempts to fix the issue in a straightforward way: Use
a separate dependency graph for rendering the sequencer preview.
While this fixes the immediate issues, there are some consequences:
* The memory usage of the scene dependency graph _can_ roughly
  double (since there are now likely two instances of the same
   dependency graph). Because of implicit sharing, unmodified data
   will not be copied. But for example modifiers on meshes would
   currently create two copies of the evaluated data in the two
   dependency graphs.
* Creating the dependency graph can be costly, which will cause the
  first frame that the scene has to render to be slower.

Note: The current code changes some properties of the original scene
like the frame, subframe etc. before rendering and then restores
the original state. In theory, this part of the code can be removed,
but may be a bit too risky for just a fix. This should be improved
at a later stage.

Also resolves #146769, #139501.

Pull Request: https://projects.blender.org/blender/blender/pulls/147457
2025-10-13 18:29:28 +02:00
Jacques Lucke
51fbcd84ce Merge branch 'blender-v5.0-release' 2025-10-13 18:25:36 +02:00
Jacques Lucke
d690ffd44f Fix #146949: Geometry Nodes: cache usage inference on modifier
This speeds up drawing of the UI of the Geometry Nodes modifier, especially for
very large node trees like in the files from #146949.

A couple previous commits and #147883 speed up the inferencing significantly
already. However, there is a certain limit to how fast this can be on large
complex node trees. While there is some more optimization potential, this patch
implements a cache on the Geometry Nodes modifier level. This means that as long
as the inputs and the node tree stays the same, the inferencing only has to
happen once, instead of on every redraw.

The main difficulty with this cache is that we don't have a good way to
invalidate it eagerly when any of the modifier inputs changes. That can
hopefully become simpler with #138117. For now, we have to check all input
values on redraw to check if anything has changed compared to the last redraw
and recompute the cache if there is any change.

Pull Request: https://projects.blender.org/blender/blender/pulls/147930
2025-10-13 18:23:50 +02:00
Bastien Montagne
06a7f2bfe9 Merge branch 'blender-v5.0-release' 2025-10-13 18:22:19 +02:00
W_Cloud
07205bf441 Nodes: Adjust reroute node label position to reduce overlap
Moved the label closer to the reroute node to reduce overlap.

Pull Request: https://projects.blender.org/blender/blender/pulls/147991
2025-10-13 18:19:14 +02:00
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
Nika Kutsniashvili
75eaecf350 UI: Dope Sheet: Custom theme color for interpolation modes
Split the "Interpolation Line" theme property into three for each
interpolation mode, and use them accordingly. In the current theme
refactor, almost all theme properties of the dope sheet are getting
either removed (unused), or moved (shared). This decluttering opens up
the possibility to allow more theming, and let artists read the Dope
Sheet better.

## Avoiding Confusion

There's two "Bézier" interpolation types:
- Called "Bézier" in the interpolation type menu, and
- Called "Bézier" in the code, for the types that are labeled as
  **"Easing" and "Dynamic"** in the interpolation type menu.

Since this commit is about the interpolation lines, which are **not**
drawn for the former, **this PR only covers Constant, Linear, and the
latter form of Bézier interpolation types.**

Pull Request: https://projects.blender.org/blender/blender/pulls/144255
2025-10-13 18:01:21 +02:00
Omar Emara
97e3fb0e03 Compositor: Add internal support for 2D vectors
This patch adds proper internal support for 2D vectors in GPU materials,
while previously it used a 3D vector with the Z component ignored as a
workaround. This has no user-facing consequences.

The type conversion file was split into an additional code generation
file for easier refactoring.

Pull Request: https://projects.blender.org/blender/blender/pulls/147983
2025-10-13 17:35:23 +02:00
Falk David
2a88d748af Merge branch 'blender-v5.0-release' 2025-10-13 17:33:39 +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
Hans Goudey
1d372bdc8b Refactor: Split CustomData attribute and newer attribute headers
Avoid including DNA_customdata_types.h everywhere we include the
attributes header. Over time the older attribute header should be
used less and less.

Part of #122398

Pull Request: https://projects.blender.org/blender/blender/pulls/147980
2025-10-13 15:38:26 +02:00
Omar Emara
5517941a60 Compositor: Support implicit conversion across 2D vectors
This patch adds the necessary functions needed to support implicit
conversion in GPU execution across 2D vectors in the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/147975
2025-10-13 15:12:56 +02:00
Clément Foucault
139fa532c1 GPU: Add command line option to output shader source
This command line outputs only shaders whose name
matches the argument string.

Metal is missing as it waits until #147010 lands.

Pull Request: https://projects.blender.org/blender/blender/pulls/147970
2025-10-13 14:37:54 +02:00
Clément Foucault
304461e761 Merge branch 'blender-v5.0-release' 2025-10-13 14:36:00 +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
Dan Oak
633102c219 Fix: add label to View Center property
For unknown reasons, this property did not have a label before.

Pull Request: https://projects.blender.org/blender/blender/pulls/147712
2025-10-13 13:11:15 +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
Weizhen Huang
b4cd23d0fe Merge branch 'blender-v5.0-release' 2025-10-13 12:15:33 +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
3349b97987 Core: add --no-window-frame command line option
Add a command line option to load Blender without a window frame.

Currently this is only used on Wayland, enabled for WITH_UI_TESTS since
attempting to load LIBDECOR caused the tests to crash on start on Fedora.
For tests there is no need to use LIBDECOR, so disable the window frame.
This can also be used by users who don't want to use the X11 fallback if
LIBDECOR can't be found.

Ref !147716
2025-10-13 09:47:07 +00:00
Sybren A. Stüvel
d79a23e6b9 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 11:46:12 +02:00
Campbell Barton
9cfa925916 Merge branch 'blender-v5.0-release' 2025-10-13 20:37:56 +11: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
58a49274a0 Merge branch 'blender-v5.0-release' 2025-10-13 09:11:57 +02: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
72ffd4e0a1 Merge branch 'blender-v5.0-release' 2025-10-13 09:53:37 +03:00