Commit Graph

121358 Commits

Author SHA1 Message Date
Campbell Barton
12f0e3ee78 Merge branch 'blender-v4.5-release' 2025-07-08 10:38:10 +10:00
Campbell Barton
d6079c666f Merge branch 'blender-v4.5-release' 2025-07-08 10:38:04 +10:00
Campbell Barton
4431d7a369 Fix #141514: Broken cryptomatte picking with multi-windows on Wayland
Only perform window under cursor checks for GHOST back-ends that
have the window positioning capability.
2025-07-08 10:36:10 +10:00
Campbell Barton
01f064d7c6 BLF: suppress assertions when displaying non UTF8 text
Showing non UTF8 paths in the file browser asserted.
2025-07-08 10:12:19 +10:00
Harley Acheson
36b53a6ce7 Merge branch 'blender-v4.5-release' 2025-07-07 17:00:19 -07:00
Harley Acheson
cfc42f7f54 Fix #141501 - Allow Transparency for marker/Scrubbing Region
When Timeline and similar regions become very short we try to remove
overlapping parts as they can no longer fit. While doing this I didn't
consider that the marker/Scrubbing Region color could include
transparency. This PR just backtracks a little and hides the marker
region in a different way, allowing transparency if wanted.

Pull Request: https://projects.blender.org/blender/blender/pulls/141581
2025-07-08 01:58:56 +02:00
Hans Goudey
75f4cd19e6 Merge branch 'blender-v4.5-release' 2025-07-07 16:17:40 -04:00
Hans Goudey
0ce5738415 Fix #141262: Undo speed regression (4.5)
The memfile undo data-block change detection didn't work for meshes
because we ended up writing a new pointer every time. In practice the
array the pointer references is always empty anyway, so we can just add
a check and write null instead.

Unfortunately this fix only applies to 4.5, since the attribute DNA
data (which is actually used at runtime in 5.0) is created temporarily
specifically for writing, so it gets a new address every time.
We'll probably need to solve #127706 in 5.0 to fix this.

Pull Request: https://projects.blender.org/blender/blender/pulls/141457
2025-07-07 22:06:59 +02:00
Sean Kim
333e2068b6 Fix #141556: Multires Apply Base deforms mesh greatly
Introduced in 27433106cd

Pull Request: https://projects.blender.org/blender/blender/pulls/141566
2025-07-07 19:27:26 +02:00
Julian Eisel
db115c6e4f Fix: UI: Extend select for tree-view not always working
Noticed that when clicking a tree-view item with multi-select support
(shape keys in this case) twice without ctrl held, and then another one
with ctrl held, the previous one would get deselected.

That's because the second click would first deselect all items and then
call `AbstractViewItem::activate()` on the clicked item. This would fail
to re-select the item, because it skipped touching selection when the
active state didn't change (as was the case here).
2025-07-07 18:25:54 +02:00
Pratik Borhade
36d7925a72 Fix #141522: Asset shelf: Choosing brush from hotkey keeps previous highlighted
Caused by a559fb833c.
Clear `is_selected_` when the active item changes, then retrieve
correct value from `should_be_selected()` to set the boolean.

Pull Request: https://projects.blender.org/blender/blender/pulls/141534
2025-07-07 18:09:34 +02:00
John Kiril Swenson
99f8e6724e Merge branch 'blender-v4.5-release' 2025-07-07 10:58:06 -05:00
John Kiril Swenson
a7f6d80395 Fix: VSE: Zooming all the way in scrolls to the right
Zooming in `view_zoomstep_apply_ex` ignores any kind of v2d limits,
which are only applied later in `UI_view2d_curRect_validate`. After
zooming in all the way, further attempted zooms get undone by
`ui_view2d_curRect_validate_resize` in the following manner:
1. VSE has no `V2D_LIMITZOOM` flag set, so a v2d that is too small tries
   to grow to `v2d->min[0]`.
2. Since `V2D_KEEPOFS_X` flag is set so that resizing the VSE can be
   anchored to the left, the way that the v2d is altered to grow to the
   minimum width (10 frames) is by increasing only `cur->xmax` instead
   of both sides.

Fix by gating keepofs logic behind a similar `do_keepofs` to the one
which was added to `view_zoomstep_apply_ex` in 385a8a4d6a.

This is quite safe and regression-proof since every space but the
VSE has `V2D_ZOOM_IGNORE_KEEPOFS` unset, in which case the logic is
unchanged.

Ref: 7d9499bdc4, 8b36cf3eac, 385a8a4d6a, 28b1a33e16.
2025-07-07 17:56:05 +02:00
Guillermo Venegas
cba19c3b8c Fix #141496: discard relative path prefix while writing to properties
Mistake in d441ac2d6f, the blender `//` relative prefix is handled
internally with path functions, however the prefix is not recognized
by python `os.path` functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/141498
2025-07-07 17:30:37 +02:00
Germano Cavalcante
289adf8616 Merge branch 'blender-v4.5-release' 2025-07-07 11:56:35 -03:00
Germano Cavalcante
cd143ca900 Fix: Wrong depth status in gizmo selection
When selecting gizmos (such as one of the scale handles in the
Transform tool), the depth test state does not match what is shown in
the viewport. This can lead to unintuitive gizmo selection.

The issue is caused by the incorrect assumption that the depth state is
already `GPU_DEPTH_NONE` before rendering the gizmos for selection.

The solution is to ensure the status before rendering.

Pull Request: https://projects.blender.org/blender/blender/pulls/141412
2025-07-07 16:54:22 +02:00
Sean Kim
7f3aa617ce Refactor: Move Paint_Runtime out of DNA
This commit takes the previously defined `Paint_Runtime` struct and
moves it into the BKE namespace, initializing it on demand instead of it
being a default-allocated member. This data does not need to be
persisted and is runtime only.

Pull Request: https://projects.blender.org/blender/blender/pulls/141413
2025-07-07 16:53:12 +02:00
Zijun Zhou
7c2b1d226b Color Management: Improve white point consistency in OCIO config
This PR does four things, and shouldn't have visible impact to users.

* Use fewer decimal places for D65 white point, to match e.g. sRGB and
  Rec.2020 standards.
* Fix mistake in grayscale matrix for Grayscale look and False Color view
  transform.
* Remove unused luminance_compensation_srgb/p3
* Improve AgX Log's matrix comment

Pull Request: https://projects.blender.org/blender/blender/pulls/141027
2025-07-07 16:14:35 +02:00
Bastien Montagne
a345b83f1a Merge branch 'blender-v4.5-release' 2025-07-07 15:53:53 +02:00
Lukas Tönne
090d3ea994 Refactor: Armature deform API and threading function cleanup
Improved readability of `armature_deform.cc` high level API functions
by using spans, references, and optional values instead of raw pointers.
Threading callbacks are reorganized to avoid unused function parameters
in code branches and makes it easier to verify which parts of the code
are executed for given input arguments.

Pull Request: https://projects.blender.org/blender/blender/pulls/141453
2025-07-07 15:50:38 +02:00
Jeroen Bakker
f98049692a Fix #141245: Assert in VFX editor
Caused by incorrect merge from 4.5.

Pull Request: https://projects.blender.org/blender/blender/pulls/141557
2025-07-07 15:47:42 +02:00
Sybren A. Stüvel
d4961dac0b Fix #141341: Assert using proportional editing in object mode
Remove `BLI_assert(tc->sorted_index_map);` calls. Add one special case
in the function that investigates whether there is any selected item in
`tc->data`.

Earlier, I've been quite liberal in spreading these asserts around, to
guard against code paths that should have originally sorted `tc->data`
but by mistake didn't create `tc->sorted_index_map`.

They've been removed now, as they seem to be causing more trouble than
they're worth: the "sorting selected first" behaviour is only explicitly
there for proportional editing. With proportional editing disabled,
`tc->data` **only** contains selected items, and those are trivially
sorted first.

By now `tc->foreach_index_selected` can work without `sorted_index_map`;
if it is `nullptr`, it will assume that we're in the trivial case, and
that the array items can just be visited in index order.

Pull Request: https://projects.blender.org/blender/blender/pulls/141386
2025-07-07 15:44:12 +02:00
Jeroen Bakker
b4e8ee02cc Fix #141238: Vulkan: Crash during upload huge geometry
In case Blender was able to allocate a vertex buffer for huge geometry,
but isn't able to allocate its staging buffer it would crash. In this
case errors will be reported in the console.

This PR fixes this by clearing the data in stead of uploading.

Pull Request: https://projects.blender.org/blender/blender/pulls/141553
2025-07-07 15:33:42 +02:00
YimingWu
22e8980b01 Cleanup: Unused variables in grease_pencil_join_selection_exec
Introduced by 5acd62b39d. The variable is
unused in release and not affecting any existing logic downstream. So
removing it.
2025-07-07 20:48:07 +08:00
YimingWu
d47175d6fd Fix #141448: Geometry Nodes: UI panel property name trimming logic Fix
Previously in 95259228d9, property names
within geometry nodes panels are trimmed to make it less verbose if the
property name contains the parent panel's name as prefix, this didn't
take into account where property name can be the same as panel name, in
which case there will be an empty property name which is undesired. So
we should not trim the name in this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/141500
2025-07-07 13:59:23 +02:00
YimingWu
5acd62b39d Fix #141513: Grease Pencil: Remove strokes joined from other layers
Previously when joining a stroke from other layers, those original
strokes are kept even when joining mode isn't "Join and Copy". Now the
operator will correctly remove the incoming strokes from their original
layers.

Pull Request: https://projects.blender.org/blender/blender/pulls/141527
2025-07-07 13:03:54 +02:00
Jacques Lucke
549e4c6274 Fix #139079: crash switching scene due to double depsgraph rebuild
The root cause of the crash was that currently the depsgraph does not support
being rebuilt twice without being evaluated in the meantime. While not ideal to
rebuild the depsgraph twice, it's really something I'd expect to work without
crashes/leaks.

The double-rebuild when switching the scene was introduced by b6e1afb6e1
which tagged the depsgraph relations indirectly. Tagging relations at that place
should be valid though. The same bug can easily be reproduced by explicitly
writing code that rebuilds the depsgraph twice as shown in
https://projects.blender.org/blender/blender/issues/139079#issuecomment-1615029.

So far, we've found two places that need to be fixed to properly support
rebuilding the depsgraph before it has been evaluated:
* `update_invalid_cow_pointers`: `previously_visible_components_mask` was used
  to check if the id is new and therefore not expanded yet. However, this check
  is wrong in the case when the depsgraph was not evaluated yet. Instead, check
  whether the ID is expanded directly. IDs which don't use copy-on-eval are
  still handled properly due to another existing check.
* `DepsgraphNodeBuilder::begin_build`: This just discarded
  allocated-but-not-expanded IDs without freeing them. Now they are freed when
  their ownership is not transferred to `IDInfo`.

See
https://projects.blender.org/blender/blender/issues/139079#issuecomment-1615029
for more details.

Pull Request: https://projects.blender.org/blender/blender/pulls/141199
2025-07-07 13:00:04 +02:00
Habib Gahbiche
8bd8754268 Fix #141515: Compositor: Crash when tweaking gizmos
Fix crash when tweaking following gizmos:
- Box Mask
- Ellipse Mask
- Crop

This commit uses the same workaround to trigger an update for gizmos
(see also Sun Beams, Corner Pin and previous versions of the above
mentioned gizmos).

A better solution is needed for gizmo updates. This will be
investigated and submitted separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/141542
2025-07-07 12:19:08 +02:00
Damien Picard
ca38e3be94 I18n: Use proper existing context for "Dimensions"
This occurrence of "Dimensions" uses the existing "Texture" translation
context.

Reported by Satoshi Yamasaki in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/141491
2025-07-07 12:02:26 +02:00
Damien Picard
68189253df I18n: Disambiguate "Median"
"Median" can have:
  - a geometrical meaning, as in the median of points in a mesh,
  - a statistical meaning, as in the median of a set of values. Used
    in node attribute statistics.

This commit adds the specific "NodeTree" translation context to the
latter sense.

Reported by Satoshi Yamasaki in #43295.
2025-07-07 12:02:25 +02:00
Damien Picard
995b700e71 I18n: Disambiguate "Edges" in Keying compositing node
"Edges" usually refers to the edges of a mesh. In the context of the
Keying compositing node, it should be the image processing sense of
edges between color areas. This mirrors the singular "Edge", already
similarly disambiguated.

Reported by Satoshi Yamasaki in #43295.
2025-07-07 12:02:25 +02:00
Damien Picard
3aa633304a I18n: Disambiguate "Strip" for exporter filepath mode
"Strip" generally is a sequencer or animation strip, but in this
context it is a string manipulation action for file names. It is
defined as part of the Path Mode defined in the FBX and OBJ exporters.
Those exporters are defined in Python and C++, respectively. This
commit changes both exporters to use the "File browser" translation
context.

In addition, the tooltip for "Relative" from the FBX exporter was
changed to match its OBJ counterpart, and the "Strip Path" mode was
also matched to the other version which reads better as an enum item.

Reported by Ye Gui in #43295.
2025-07-07 12:02:25 +02:00
Damien Picard
d16c9003d2 I18n: Translate link items for Integer Math node
Link items need to be gathered using the same translation context as
the actual enum prop they come from, in this case "Nodetree".

Reported by Ye Gui in #43295.
2025-07-07 12:02:25 +02:00
Damien Picard
23b217662e I18n: Translate some node socket tooltips
Node socket tooltips can include substrings from many different
sources. This commit adds two that were previously untranslated:
- hardcoded strings that simply need to be manually translated using
  `TIP_()`,
- the socket name, which should use its context. This simply copies
  the translation code from the socket name label.

Reported by Gabriel Gazzán in #43295.
2025-07-07 12:02:25 +02:00
Damien Picard
14957fe2ac I18n: Translate Window manager job names
Job names displayed in the status bar were not extracted or
translated. This commit adds a regex to the bl_i18n_utils settings to
detect `WM_jobs_get()`, and the `RPT_` translation macro to translate
the message in the UI.

About 30 new messages are translated.

Reported by Ye Gui in #43295.
2025-07-07 12:02:25 +02:00
Damien Picard
ac8a3f98c2 I18n: Translate "Boolean" output in Boolean GN node
This node uses the recently-introduced uiLayout API to draw its UI.
This still needs to do manual translation using `IFACE_()`. This
commit adds this macro.

Reported by Ye Gui in #43295.
2025-07-07 12:02:25 +02:00
Damien Picard
771af1a0ad I18n: Translate "Equalizer" strip modifier name
New sequence strip modifiers get a name that is to be translated if
translation of data is enabled. This used the default translation
context, but "Sequence" must be used because this is the context used
to extract the modifier names (`modifiersTypes` array in modifier.cc).

Reported by Ye Gui in #43295.
2025-07-07 12:02:25 +02:00
Damien Picard
6914e04f5c I18n: Translate node groups' interface socket subtypes
Node tree interface sockets can have subtypes depending on their type.
These use enum items extracted elsewhere using the "Unit" translation
context. The sockets' subtypes thus need to use the same context as
well.

Reported by Satoshi Yamasaki in #43295.
2025-07-07 12:02:25 +02:00
Lukas Tönne
c40d8f50b6 Fix #141535: Lattice deform without dverts causes crash
Using armature deformation with a lattice object that doesn't have
vertex groups creates an invalid span that crashes during deformation.
This was caused by refactoring which replaced raw pointers with spans,
but has to check for nullptr to avoid creating an invalid span.

Pull Request: https://projects.blender.org/blender/blender/pulls/141538
2025-07-07 12:01:01 +02:00
Pratik Borhade
d6f22a7810 Fix: Update selection in shapekey dopesheet
Shift+LMB selection in tree view doesn't update selection state in
shapekey dopesheet. To fix this, add notifier for area redraw.
In other cases, `on_activate()` function of inherited class handles
the notifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/141543
2025-07-07 11:57:05 +02:00
Falk David
2b100e0a7e Merge branch 'blender-v4.5-release' 2025-07-07 11:14:52 +02:00
Casey Bianco-Davis
f01bc4d811 Fix: Grease Pencil: Material Select doesn't select bezier handles
This makes it so that the `Material Select` operator also selects bezier handles.

Pull Request: https://projects.blender.org/blender/blender/pulls/141478
2025-07-07 07:28:50 +02:00
Casey Bianco-Davis
729fc1ed47 Fix: Grease Pencil: Set Handle Type operator for single handle
When only handles were selected they could not be set.
The problem is that `retrieve_editable_and_selected_strokes`
only counts strokes that have selected control points.

Pull Request: https://projects.blender.org/blender/blender/pulls/141437
2025-07-05 11:02:57 +02:00
Richard Antalik
4d65362550 Fix #141332: Add movie operator crashes Blender
Caused by null dereference, because operator was executed with
overridden context with region not set.

Pull Request: https://projects.blender.org/blender/blender/pulls/141419
2025-07-05 01:34:30 +02:00
Campbell Barton
0ceedc2a7d Cleanup: various non-functional changes in C++ 2025-07-05 09:03:09 +10:00
Campbell Barton
932d37ba0b Cleanup: sort file lists in CMake 2025-07-05 08:54:18 +10:00
Campbell Barton
68e363ddc8 Cleanup: typos in code-comments, quote code literals 2025-07-05 08:52:49 +10:00
Julian Eisel
183420bd07 Refactor: Make file-list cache struct non-trivial C++ one
Makes it possible to use non-trivial C++ types in `FileListEntryCache`.
I'm planning to use this for blender/blender!130543, to store status
information about downloaded previews. While it's possible to use
C-style types instead, this is easier and a worthwhile general
improvement.

I turned `FileList.filelist_cache` into an allocated pointer, so
`FileList` doesn't have to be ported to be a non-trivial type as well.
We probably want to do that too at some point.

Pull Request: https://projects.blender.org/blender/blender/pulls/141411
2025-07-04 23:09:02 +02:00
Germano Cavalcante
58af30f9b9 Refactor: Transform: Unify logic of "orient_axis" and "constraint_axis"
In rotation-based transform operations, the rotation axis can be
determined in two ways:
1. Through "orient_axis" (X, Y or Z)
2. Through "constraint_axis"

When the axis is obtained through the constraint, "orient_axis" is
ignored, and the angle may be negated depending on the view orientation
to match the mouse movement.

However, "orient_axis" never has its angle negated. Since the default
orientation is "View", the Z axis is inverted by default, aligning with
the mouse movement but not with the constraint axis.

This causes problems in the Redo Panel because the constraint fields
are hidden in the Rotation operation, so they need to be unset for the
Axis field to work. However, if you change the value of the Rotation
field, the object may have its rotation negated unexpectedly.

This issue was partially shown in #93078. Commit c30e6a37b0 attempted
to fix it by unsetting the constraint property when the Axis was
changed. However, this solution is incomplete: if the Axis is changed
and then reverted, the negative rotation issue reappears. In addition,
it has not been implemented in all operations.

This commit resolves the issue by reverting c30e6a37b0, aligning the
behavior of "orient_axis" and "constraint_axis", and unsetting
"constraint_axis" in `saveTranform`.

A downside of this solution is that it may break operators invoked from
Python that rely on "orient_axis" as the rotation axis, as the rotation
value now needs to be negated.

Pull Request: https://projects.blender.org/blender/blender/pulls/141101
2025-07-04 20:47:25 +02:00
Namit Bhutani
e5db240434 Mesh: Spatial Reordering for Sculpt Speed Improvements
**Problem Description**

Blender's current mesh data layout often lacks spatial coherence,
causing performance bottlenecks during BVH construction for sculpting
and painting operations. Each time a BVH is built, the system must
recompute spatial partitioning and vertex groupings from scratch,
leading to redundant calculations and suboptimal memory access patterns.

**Proposed Solution**

This patch implements pre-computed spatial organization of mesh data
through a new `mesh_apply_spatial_organization()` function that:

- Reorders vertices and faces based on spatial locality using recursive
  spatial partitioning.
- Stores pre-computed MeshGroup hierarchies in MeshRuntime for reuse.
- Enables the BVH system to bypass expensive spatial computation when
  pre-organized data is available.

This approach separates the expensive spatial computation from more
frequent BVH rebuilds, providing sustained performance improvements
across multiple sculpting operations.

**Limitations**

- Requires manual invocation (occurs automatically only during remesh
  operations).
- Additional memory overhead for storing MeshGroup metadata.
- One-time computational cost during initial organization.
- Spatial group references are not yet stored in files.

**User Interface**

The feature is accessible via a new "Reorder Mesh Spatially" operator in
the Mesh Data Properties panel under the Geometry Data section. Users
can invoke it manually when needed, or it will be applied automatically
during quadriflow and voxel remesh operations. The operator provides
feedback confirming successful spatial reordering.

Pull Request: https://projects.blender.org/blender/blender/pulls/139536
2025-07-04 20:02:37 +02:00