Commit Graph

154798 Commits

Author SHA1 Message Date
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
Philipp Oeser
0bcc088a36 Fix #147934: VSE: Reset retiming never active
Caused by 2b53ed9add

The "is not None" check wasnt not working because it was used against a
boolean.
(Also bring two occasions of the "is_retiming" in sync)

Pull Request: https://projects.blender.org/blender/blender/pulls/147960
2025-10-14 11:48:30 +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
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
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
Nathan Vegdahl
c93d94d2e1 Anim: Add Python unit tests for vertex group Normalize All operator
Follow-up to #147272. These tests are not exhaustive, but protect
against regression of bug #147009.

Pull Request: https://projects.blender.org/blender/blender/pulls/147422
2025-10-14 05:10:13 +02:00
Aaron Carlisle
624ebd69e5 Docs: Update RNA to user manual URL mapping 2025-10-13 21:46:57 -04: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
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
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
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
Harley Acheson
f75658110a UI: Revert Changes to Restriction Icons
Partial revert of c03fdf5d9d, going back to previous versions of the
icons for hide_on (closed eye), restrict_select_on (unfilled mouse
cursor), and the combined versions (vis_sel_xx). These changes are a
bit too contentious to be added so late in the release. Note this
leaves in the changes to the lock icons.

Pull Request: https://projects.blender.org/blender/blender/pulls/147836
2025-10-13 18:25:34 +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
7d3810a1b5 I18N: Updated UI translations from git/weblate repository (45838df2e6668). 2025-10-13 18:21:53 +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
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
Bastien Montagne
822cc518af I18N: Updated UI translations from git/weblate repository (9e2605390062561). 2025-10-13 17:11:00 +02:00
Raimund Klink
30fd6537b9 Cycles: Disable the render time pass for GPU
Also, extend the description in the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/147054
2025-10-13 15:09:40 +02:00
Bastien Montagne
c1781eba51 Revert "Fix: Simplify import in VR add-on"
This breaks tests (and the VR addon itself of course).

Needs to be done differently, will create new PR for proper fix.

This reverts commit 0c22ef5ae7.
2025-10-13 14:40:22 +02:00
Alaska
de16ed4e8c Cycles: Improve performance on uneven GPU renders
When a Cycles render is uneven (E.g. a small portion of the image takes
significantly longer to render than the rest of the image), then GPUs
typically suffer from poor performance due to low occupancy unless a
large number of samples is scheduled to compensate for that small
complex region.

Due to how Cycles render scheduler is setup, Cycles tries to
increase GPU occupancy by increasing the number of scheduled samples,
but also balance render preview update time by scaling back
the number of scheduled samples based on the previous workloads time
per sample to try and fit within the target update time.

However using the previous workloads time per sample to scale back the
scheduled number of samples gives suboptimal results because the
previous workloads time per sample is usually not representative of the
new time per sample that occurs as GPU occupancy increases, because
increasing GPU occupancy typically results in reduced time per samples.

This commit improves on this issue by assuming that increasing GPU
occupancy linearly improves performance, and adjusts the function
that scales back the sample count to fit within a specific update
window to use this assumption. This leads to Cycles increasing the
amount of work scheduled onto the GPU quicker at the beginning of
uneven/low occupancy scenes, generally leading to improved performance,
especially when rendering at low sample counts or with strict
time limits.

Ref #147954

Pull Request: https://projects.blender.org/blender/blender/pulls/147950
2025-10-13 14:40:01 +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
Damien Picard
0c22ef5ae7 Fix: Simplify import in VR add-on
In the Viewport VR Preview, an unusual and complicated import
manipulates sys.path to import a class from a file that is already
importable anyway.

There is no documented reason for this, and the common way to subclass an RNA type in python is by using its `bpy.types....` registered class, _not_ by directly subclassing the python type used to declare/register the parent type.

Pull Request: https://projects.blender.org/blender/blender/pulls/147656
2025-10-13 12:53:17 +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
0b0ea916ff Fix #147846: Cycles: Viewport not updating when changing global step rate
Should also update when the global multiplier changes

Pull Request: https://projects.blender.org/blender/blender/pulls/147968
2025-10-13 12:14: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
Falk David
d7555b5064 Fix: Grease Pencil: UI: Wrong usage of contains operator
Introduced with 1fa2be8a9b.
This should have used `==` instrad of `in`.
2025-10-13 10:50:14 +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
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
ebbc034e44 Fix tests following OSL camera fix 2025-10-13 01:17:16 +02:00
Lukas Stockner
d458416f4d Fix #146850: Assert when removing custom camera after loading file 2025-10-13 01:07:13 +02:00
Damien Picard
a2f94ab1ad Fix #147062: OSL Camera: Aperture size depends on focal length
In OSL custom cameras, the current aperture size depends on the focal
length of the Blender camera, even though it is not usable by the
shader. This gives incoherent values to the depth of field.

To ignore this factor, this commit makes the custom camera behave the
same as the orthographic camera, by not being multiplied by the focal
length.

To compensate for that, the multiplication must happen inside the
shader. This adjustment was done in the advanced camera shader
template.

Pull Request: https://projects.blender.org/blender/blender/pulls/147346
2025-10-13 00:23:25 +02:00
John Kiril Swenson
99b9f6cafc Fix #147655: VSE: Sequencer scene datablock missing in combined view
UI code forgot to check for `SEQUENCER_PREVIEW` view type.
2025-10-13 00:01:38 +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
Casey Bianco-Davis
1fa2be8a9b Fix #147394: Grease Pencil: Opacity operator missing for the menu
The Grease Pencil operator for changing the Opacity of selected strokes
was missing from the transform menu, which is the where the `Radius`
operator lives.

This prevented the operator from being searched.

4.5 backport candidate.

Pull Request: https://projects.blender.org/blender/blender/pulls/147672
2025-10-12 02:10:14 +02: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