Commit Graph

150822 Commits

Author SHA1 Message Date
Bastien Montagne
f86806dca3 CMake: Make ninja pool jobs setup report computed values.
Usefull especially in buildbots.
2025-07-07 17:11:59 +02: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
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
Bastien Montagne
368652f806 I18N: Updated UI translations from git/weblate repository (bc8ebd2acbe6a5). 2025-07-07 14:05:04 +02: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
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
61b0ff9e57 I18n: Extract node panel names using translation contexts
Commit 9ce0a2d1d5 added the ability to specify translation contexts to
node UI panels, but it failed to update the regex that extracts them.
This commit solves that by adding the proper `add_panel` function to
the extraction regex.

Reported by Satoshi Yamasaki 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
Jeroen Bakker
f40e6e8a60 Fix: Vulkan: Use feature struct
Detected an incorrect structure type. A property struct was used to
store feature data. This could lead to incorrect values for enabling
descriptorBufferPushDescriptor, what isn't used.
2025-07-07 11:14:09 +02:00
YimingWu
6957242a53 Fix #140615: Grease Pencil: Use brush.strength for context panel
Grease Pencil from 4.3 and above uses `brush.strength` instead of the one from
Grease Pencil brush settings. This fix makes the UI consistent.

Pull Request: https://projects.blender.org/blender/blender/pulls/140632
2025-07-07 11:12:01 +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
59173b6f92 Fix #141399: Operator search throws error in empty VSE
Python AttributeError was thrown, because `strip.type` was accessed, while
`strip` was `None`.

Pull Request: https://projects.blender.org/blender/blender/pulls/141421
2025-07-05 01:34:24 +02:00
Campbell Barton
ad7943d6c2 Cleanup: spelling 2025-07-05 08:45:51 +10:00
Falk David
eff92923ec Fix: Grease Pencil: Soft eraser leaves points with zero opacity
The soft eraser could leave points with zero opacity. To fix this issue
for now, we apply a post-process step when the stroke is done to remove
these points.

In the future, it would be better to refactor the eraser a bit more and
delete points during the stroke.

Part of #131686.

Pull Request: https://projects.blender.org/blender/blender/pulls/141454
2025-07-04 17:22:49 +02:00
Dalai Felinto
7d3b93ed4e Multi-View: Fix (unreported) wrong icons for disabled Render Views
This is likely broken since 60cc73afe6, when I sorted the icons
alphabetically.

Multi-View lives on!
2025-07-04 16:05:49 +02:00
Philipp Oeser
eb82ff6166 Fix #141387: Light Probes not integrated into Animation Editors
You could basically not interact with the animation (except for
keyframes in the main region), channels region was totally empty, NLA
could not be used, ...

It is not something users will animate a lot, but we should still have
animation editors in mind when adding a new object type.

Just missing from cc31d7bb49

Pull Request: https://projects.blender.org/blender/blender/pulls/141449
2025-07-04 15:01:15 +02:00
Falk David
859d271528 Fix: Grease Pencil: Crash when geometry has no drawings
Adds checks to the `get_drawing` functions to make sure that there is at
least one drawing in the geometry.
2025-07-04 14:57:08 +02:00
Jason C. Wenger
014be23586 Fix #141351: Default edge dissolve angle leaves many verts undissolved
Adjust angle threshold defaults to dissolve verts as before,
while preserving selected geometry.

The new behavior works as follows:

- If a dissolve terminates on an edge loop or the the corner vert of a
  face, do the dissolve.
- If a set of dissolve edges (either a chain, or a set of 3+ edges)
  crosses a loop cut, do the dissolve.
- If a chain of dissolve edges touch the corner of an unselected face,
  and then leave in a different direction without crossing a loop cut,
  preserve that vert. Just because the selection touches it doesn't mean
  it should be altered.
- If a dissolve edge is separating two triangles,
  then the face join creates a quad. Users generally prefer
  and strive to create meshes that contain quads.
  Instead of destructively dissolving the corners of the quad and
  automatically turning it to a triangle or wire,
  instead prefer to preserve the quad.

Ref !141097
2025-07-04 20:14:55 +10:00
Patryk-Skowronski
c53a0cfcb6 NDOF: use fixed speed values for translations in "Fly Mode"
Use fixed speed values for translations in Fly mode to constant
values for each axis. Until now, after switching to the Fly mode,
the latest speed value calculated based on RegionView3D::dist
was used for translations.
Now, the translation speed in Fly mode is an adjusted constant
for each axis.

Ref !141285
2025-07-04 19:33:43 +10:00
Pratik Borhade
27b205f579 Fix #141420: Grease Pencil: Crash enabling material overlay without material
Crashed due to accessing members of nullptr Material. Add extra
condition to avoid this.

Pull Request: https://projects.blender.org/blender/blender/pulls/141431
2025-07-04 10:40:09 +02:00
Aras Pranckevicius
641824753a Fix #141434: OBJ importer should apply bounds clamp size to the whole scene
It was applying the bounds clamp to each object individually,
which changed spatial relationships between objects. Make the logic
match what used to be done in the Python OBJ importer back in the day.

Pull Request: https://projects.blender.org/blender/blender/pulls/141446
2025-07-04 10:36:18 +02:00
Philipp Oeser
ab9f03555c Fix #141384: Anim Channel Pinning: object data pin only for cameras
As mentioned in 98c7e75897, the idea of "pinning" was to have certain
animation always visible (regardless of object selection -- e.g.
animating camera movement even while animating something else).

dea7ef4dd9 added a special case that would also
include the object regardless of it being selected or not if its
**object data** is animated and pinned.

It only fully implemented that for Cameras though (that was the primary
request at that time), leaving ugly blank/empty space (pin icon missing)
for other object data types.

It is understandable that it only did it for Cameras a that time, but
there is no reason to **not** do it for other (viewport selectable)
object data types as well (animators might as well be interested in
pinning other types as well for timing reference) -- which is what this
PR does.

Adding this to 4.5 (since it fixes the blank space (even though it is
somewhat adding a feature as well...)

Pull Request: https://projects.blender.org/blender/blender/pulls/141396
2025-07-04 10:11:34 +02:00
Philipp Oeser
5787b74580 Fix #141378: Anim Channel Pinning on object data lost adding object anim
Seems like a mistake in dea7ef4dd9

The decision to display an object or not in animation filtering is done
in `animdata_filter_base_is_ok`
So e.g. if an **object** has `AnimData` and that one is pinned
(`ADT_CURVES_ALWAYS_VISIBLE`) it would be included regardless of it
being selected or not. dea7ef4dd9 added a special case that would also
include the object regardless of it being selected or not if its
**object data** is animated and pinned.

What dea7ef4dd9 did wrong though in that special case was that it also
required the object to **not** have animation.
This seems wrong, the object can have animation which itself is not
pinned (ultimately causing `animdata_filter_base_is_ok` to return
`false`).

So to resolve, remove the check for NULL object animation, it should be
entirely enough to have object data animation which is pinned to include the
object in animation filtering.

Pull Request: https://projects.blender.org/blender/blender/pulls/141379
2025-07-04 10:09:34 +02:00
Jorn Visser
94f4df8ec4 Fix #141339: Mantaflow: Clear Python errors when grids aren't available
Adding a Flow to a Mantaflow domain could sometimes cause a crash. This
was because the grids are allocated lazily, and as such, getting them
through `PyObject_GetAttrString` will fail when they are not yet
available. As the resulting Python errors were not cleared, Python could
be left in a bad state, leading to crashes. This is avoided by clearing
these errors before returning from `callPythonFunction` when such an
error is raised.

Ref !141364
2025-07-03 23:17:25 +00:00
Sean Kim
954dbedc57 Fix #140309: Invalid normals when using external render engine in Sculpt Mode
External render engines, like Cycles, do not use the paint BVH for
rendering. As part of the stroke update process, normal caches are
tagged as dirty. These normals need to be recalculated to be valid on
the next stroke step.

This commit is a mitigation for the reported issue, but does not
fully fix the underlying issue that causes the cycles data to
be in this state.

Pull Request: https://projects.blender.org/blender/blender/pulls/140503
2025-07-03 22:58:16 +02:00
Hans Goudey
dd535aba68 Fix #141406: "Wait for Click" changes Node tools Grease Pencil toggle
A mistake in the original commit a7d2b7850e
2025-07-03 15:59:05 -04:00
Jesse Yurkovich
c8a4026984 Mesh: Tune the parallelism of normals_calc_corners
Tune the grain size used for the parallel_for to alleviate excessive
mutex contention inside `handle_fan_result_and_custom_normals`.

I happened to notice that the 4004 Moore Lane USD scene[1] experienced a
load time regression compared to the prior release. It looks due to the
grain size used and here are some 3-run averages for the import:
```
Grain      | Time in seconds
256 (main) | (14.6+14.6+14.8)/3 = 14.6667
1024       | (13+12.8+12.9)/3 = 12.9
4096       | (13.3+13.1+13.1)/3 = 13.1667
16384      | (12.2+12+ 12.5)/3 = 12.2333
65536      | (9.4+9.2+9.6)/3 = 9.4
131072     | (7.9+7.7+8)/3 = 7.8667
262144     | (7.3+7.1+7.2)/3 = 7.2
max(16384, #verts/2) (PR) | (7.1+6.9+6.8)/3 = 6.9333
```

This PR gets the scenario loading in just under 7 seconds now compared
to over 14 originally.
[1] https://dpel.aswf.io/4004-moore-lane/

Pull Request: https://projects.blender.org/blender/blender/pulls/141249
2025-07-03 20:43:43 +02:00
Harley Acheson
d92523d0b4 Fix #138909: Use space_type_set_or_cycle for Ctrl-Tab in Graph Editor
Our keymap, when pressing Ctrl-Tab in Graph Editor, currently changes
the space type to "Dope Sheet" with "wm.context_set_enum". But this
method is not aware of subtypes. This PR instead changes the space type
using "screen.space_type_set_or_cycle". While in Timeline it will go to
Graph Editor, press again to go back to Timeline.  While in Dope Sheet
you go to Graph Editor, press again to go to Dope Sheet.

Pull Request: https://projects.blender.org/blender/blender/pulls/141360
2025-07-03 19:32:31 +02:00
Miguel Pozo
dbd9dc8a71 Fix #141398: Overlay: Missing Metaball selection circle
The alpha push constant wasn't set,
so it relied on whatever value it was set in a previous pass.
2025-07-03 19:00:51 +02:00
Harley Acheson
acfccdcb83 Fix #141357: Increase Size of Some Gizmo Arrow Parts While Picking
Most gizmo parts have a hit space larger than the visible part. Some
parts have a hardcoded expanded hitspace, while some parts have a
(hidden) expansion of the line widths during selection. So when using
the Transform widget most pieces are easier to hit than they appear.
Except for the "cubes" at the end of the scaling arrows. This means
they are hard to hit when in orthographic views since the rotation
lines are on top of them. This PR increases the size of the cubes
during selection so they are wider than the rotation lines. This also
similarly increases the selection hit size of the arrowheads, but
mostly wider. The little squares for plane translation are also
increased but just a bit.

Pull Request: https://projects.blender.org/blender/blender/pulls/141362
2025-07-03 18:28:11 +02:00
Christoph Lendenfeld
d7dd45e4da Fix #138399: Key handle jumping when scaling to 0
When moving a handle so its length is 0, the other handle was automatically set to 0 as well.
Cancelling the action didn't move the other handle back to 0, but set its length to 1.

The reason for that was that the code tries to maintain the relation between the two handles,
but that would lead to a divide by 0 when either of the handles has a length of 0.
So it would set the handle length to 1 in that case.

The fix is to ensure that the length of a handle is never 0. This is done by clamping it at the key
position with a threshold of 0.001 and an extra floating point step to support large floating
point values.
This should not affect animation in any way.

This was discussed in the animation & rigging module meeting
https://devtalk.blender.org/t/2025-06-26-animation-rigging-module-meeting/41272#p-153605-patches-review-decision-time-5

Co-authored by Nathan Vegdahl

Pull Request: https://projects.blender.org/blender/blender/pulls/141029
2025-07-03 12:47:15 +02:00
Lukas Tönne
7b403a2b10 Fix #141261: Support outline generation for single point curves
The outline perimeter generation was exiting without result for any
curve with less than two points. For single-point curve a simple circle
is now generated with the same resolution as two caps/corners combined.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/141380
2025-07-03 12:13:27 +02:00
Sybren A. Stüvel
d08c4e8cc9 Fix: Overlay: Invalid RGB order in overlay theme colors
Fix an accidental swap of the green & blue channel when drawing theme-
colored elements in the overlay engine.

Thanks @fclem for finding the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/141382
2025-07-03 11:57:33 +02:00
Pratik Borhade
fa1f9226d7 Fix #140845: Outliner: Allow reordering linked collections
Drag-drop operation of outliner doesn't allow dragging linked collection
ID. Poll function returns false for non-editable IDs. This make
sense if drop target is `INTO` linked collection.To fix this, support
drag-drop operation for `before/after` case and return false when
insert type is `TE_INSERT_INTO`.

Pull Request: https://projects.blender.org/blender/blender/pulls/140848
2025-07-03 11:26:53 +02:00
Thomas Dinges
c94d5340b6 Cleanup: Make format 2025-07-03 11:14:58 +02:00
Andrej730
1a9e90e965 PyDoc: bpy_struct, add missing types and more explicit signatures
- `bpy_struct.id_data` - provide a type.
- `bpy_struct` - add missing return types to
  `bpy_struct.get`, `bpy_struct.pop`, `bpy_struct.path_resolve`.
- `bpy_struct` - add missing argument types to some methods.
- `bpy_struct` - provide explicit `/` and `*` in signatures to make it
  clear which arguments are positional / keyword-only.

Ref !141334
2025-07-03 18:25:09 +10:00
Campbell Barton
4127f5c47c Extensions: suppress errors printed because of missing directories
When dropping an extension onto Blender, the URL lookup would print
errors to the STDOUT if a repository directory was missing.

While this didn't break installation, these kinds of errors should
only be shown when the directory is expected to exist.

The issue was raised in #141212.
2025-07-03 18:21:16 +10:00