Commit Graph

122078 Commits

Author SHA1 Message Date
Harley Acheson
74b6e675d4 UI: Replace Top Bar Region Emboss with Fade
This removes code that adds a line to region edges, used only to add
a slight divider between Top Bar workspace list and the Scene selector.
The replaces that divider with a fade out effect instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/137921
2025-08-05 01:53:47 +02:00
Sean Kim
d3918515d1 Fix #143238: Weight & Vertex Paint crash when applying deform modifier
Fix in dd651ef5d6 was incomplete, the
cache logic needs to match as well to ensure that the correct cache is
being populated or set as dirty when updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/143968
2025-08-05 01:07:41 +02:00
Harley Acheson
283bc177a4 Fix #143939: Fix Win32 External Ops, Open Folder/CMD for Files
File Browser list, Context Menu, External. On Win32 for items that are
not folders we need to use the list root for "open folder" and for
"command prompt here".

Pull Request: https://projects.blender.org/blender/blender/pulls/143964
2025-08-05 00:11:33 +02:00
Hans Goudey
bf40023aa4 Fix #143333: Custom bone shape does not include subdivision surface
This was caused by a mismatch in the conditions that enabled GPU
subdivision. The mesh normals domain for meshes with no faces was
reported incorrectly, causing the code to think there are auto-smooth
style split normals when there actually aren't.

Also the GPU subdiv normals extraction had a crash binding a vertex
buffer that doesn't exist when there are no faces. Add an early return
for the wire-only mesh case to avoid that.

Pull Request: https://projects.blender.org/blender/blender/pulls/143961
2025-08-04 23:13:31 +02:00
Casey Bianco-Davis
21fcf524b1 Curves: Treat curve as selected when any handle is selected
This makes it so that operators that function on curves will work if
only handles are selected. For Grease Pencil this also makes it so that
the control points of a stroke will be visible if any handles are
selected.

Part of #121574

Pull Request: https://projects.blender.org/blender/blender/pulls/143867
2025-08-04 22:15:35 +02:00
Hans Goudey
b9f48ceee6 Cleanup: Use BitVector for mesh mapping function
Also:
- Use MutableSpan instead of raw float pointer
- Remove outdated confusing comments
2025-08-04 15:34:18 -04:00
Jacques Lucke
8133f7aa13 Fix: crash due to wrong duplicate node name handling
Generally, node names are expected to be unique within a node tree. However,
`ntree_shader_copy_branch` currently does not enforce this for performance
reasons. This was broken by recent changes in 5b73f798d0 and 9fd877e174 which
allows for passing already unique names and identifiers to the node copy
function.

The main problem here was that the `use_unique` parameter of the `node_copy`
function was not well defined. Now, this function is completely removed in favor
of using `node_copy_with_mapping` directly. This also has a new
`allow_duplicate_names` parameter now which makes the expected behavior more
explicit.

Pull Request: https://projects.blender.org/blender/blender/pulls/143951
2025-08-04 19:57:43 +02:00
Ramon Klauck
efef8a201a VSE: delete keyframes from preview
This PR makes it easier to delete strip keyframes from the preview.
It works similarly to the 3D viewport and also works with keying sets.
Pressing "alt + I" deletes the keyframe on the current frame of the
selected strips, when a keyset is active it only deletes the keyframes
of the selected keyset.

Pull Request: https://projects.blender.org/blender/blender/pulls/140385
2025-08-04 19:15:00 +02:00
Jacques Lucke
72e810a45a Geometry Nodes: put closure sockets in panel
This moves the closure interface sockets into a separate panel so that they
can't be confused with the main closure input.

Pull Request: https://projects.blender.org/blender/blender/pulls/143821
2025-08-04 18:35:20 +02:00
Bastien Montagne
fbdf21fb52 Fix #143888: Repeated deletion & Ctrl+Z on a linked data crashes.
The issue comes from the fact that placeholder IDs where not properly
cleared before writing, leaving all kind of potential broken pointers
once read back.

Also use the `BLO_Write_IDBuffer` for these, with dedicated 'cleanup'
logic since in their case, we want to write almost nothing.

Pull Request: https://projects.blender.org/blender/blender/pulls/143949
2025-08-04 18:01:49 +02:00
Bastien Montagne
6dbcc84cc0 Fix #143844: Assert when loading an image in Image Editor (debug build).
'Regular' ID RNA pointer not refcounting its usages, not properly tagged
as such.
2025-08-04 17:56:45 +02:00
Bastien Montagne
0e52304772 Fix building (missing include). 2025-08-04 17:54:15 +02:00
Brecht Van Lommel
526b776417 Fix: Build error with USD/Hydra with some build systems
Move API shared between USD and Hydra to usd_private.hh. It seems ninja
added an include directory other build systems don't.
2025-08-04 17:21:09 +02:00
Jeroen Bakker
2da51cef50 Cleanup: Silent unused parameter 2025-08-04 16:15:59 +02:00
Hans Goudey
5d1bea7ff5 Fix #143780: Bounds overlay ignores edit mesh
For quite a while, for edit mode mesh object evaluation we haven't
put the evaluated edit mesh in the evaluated geometry set. I don't
think the reason for that applies anymore. The code is much simpler
if all the evaluated geometry is a consistent place, so just put it there,
the same way as non-edit-mode evaluation.

Pull Request: https://projects.blender.org/blender/blender/pulls/143896
2025-08-04 16:04:04 +02:00
Mattias Fredriksson
535842fb92 Cleanup: Confusing and varied naming of 'last_control_point_index'
Function curves::nurbs::calculate_basis_cache() varies the name of the
variable 'last_control_point_index '. Name is also confusing and not
descriptive as it  refers to the total number of points including
padded/repeated points for cyclic curves (repeated by wrapping the
index by the size of the array).

Use of 'points_num' generally also refers to the size of the array and
not total number of wrapped points.

Pull Request: https://projects.blender.org/blender/blender/pulls/143921
2025-08-04 16:03:35 +02:00
Dawid Kurek
9afa991316 Hydra: Handle dome light rotation
This refactors the code for world to dome light to be shared between USD and
Hydra, and makes rotations work for Hydra the same way they do in USD.

One small behavior change is that missing image files now render black,
matching Cycles and EEVEE more closely.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/143035
2025-08-04 15:58:37 +02:00
Hans Goudey
89a45a66aa Cleanup: Use consistent parameter name, remove const in declaration 2025-08-04 09:42:24 -04:00
Jeroen Bakker
2da5969fdc Vulkan: Remove framebuffer slot assert
This assert was to notify developers that they are using a framebuffer
configuration that isn't supported when using render passes. Render
passes should not be used and will be removed later in 5.0. Removing the
assert will already help during triaging.

Pull Request: https://projects.blender.org/blender/blender/pulls/143936
2025-08-04 14:42:10 +02:00
Casey Bianco-Davis
6e7eb4d7b6 Fix: Grease Pencil: Sculpt Smooth Tool Bezier Handles
This makes so that bezier handles will be smoothed by the `Smooth Tool`.

Note: A `BLI_assert` is removed, the logic used was wrong.

Pull Request: https://projects.blender.org/blender/blender/pulls/141912
2025-08-04 14:23:53 +02:00
Casey Bianco-Davis
3e181be081 Fix: Grease Pencil: Hide Bezier handles overlay in Curve selection mode
This makes so `Bezier` handles are not show when in `Curve` selected mode.

This also makes it so that handle are only displayed in edit mode.

Resolves #143928.

Pull Request: https://projects.blender.org/blender/blender/pulls/143868
2025-08-04 14:20:17 +02:00
YimingWu
02977873fb Fix #143685: Use correct shader for points for vertex slide
Previously it was using `GPU_SHADER_3D_UNIFORM_COLOR`, should be
`GPU_SHADER_3D_POINT_UNIFORM_COLOR` for points so we don't get asserts.

Pull Request: https://projects.blender.org/blender/blender/pulls/143683
2025-08-04 14:02:11 +02:00
Omar Emara
cf32baff18 Fix #143892: Crash inside node group in viewport compositor
The viewport compositor crashes if the user enters a group node if no
viewer node exists. This is because the code still allowed group output
nodes to be added as compositor outputs in none root contexts, which is
forbidden since e34e6373b6. To fix this, we refactor the code to
disallow such cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/143933
2025-08-04 13:39:02 +02:00
Loïc DAUTRY
720cc7d08c Fix #143014: make the rip operator's error message more user-friendly
As discussed in #143014, the ripping operators gave error messages that
left the user clueless as to why the operator fails and what to do from
there. This PR aims to fix that by changing the error messages.

Pull Request: https://projects.blender.org/blender/blender/pulls/143102
2025-08-04 10:44:35 +02:00
youle31
2aae3c4ec7 Fix #143490: Missing uniform for POLYLINE_UNIFORM_COLOR gpu python API
Add vec4 color as uniform in PYDOC_BUILTIN_SHADER_DESCRIPTION for POLYLINE_UNIFORM_COLOR
builtin shader in accordance with gpu_shader_3D_polyline_info.hh.

Pull Request: https://projects.blender.org/blender/blender/pulls/143703
2025-08-04 08:52:02 +02:00
Jacques Lucke
54bfc11f68 Cleanup: avoid indenting entire geometry nodes modifier blend-write function 2025-08-04 06:39:16 +02:00
Hans Goudey
578c5f57d3 Fix #143368: Prefer tangent space custom normals when joining meshes
As part of the addition of free normals, the join geometry and realize
instances nodes were updated to properly join custom normals. When one
mesh input had tangent space normals and another had no custom normals,
I chose to use free custom normals for the output mesh since that has
drastically better performance. However, it turns out users get into
that situation much more often than I expected, and because many areas
still don't support free custom normals very well, and their presense
isn't obvious, this causes confusion.

This commit changes this code to output tangent space custom normals
whenever any of the input meshes have tangent space custom normals.
That also maintains the most information for propagation later, since the
"default" status of (0,0) custom normals is maintained.

Fixes #143368

Pull Request: https://projects.blender.org/blender/blender/pulls/143498
2025-08-03 19:40:40 +02:00
Iliya Katushenock
0c41f53cf7 Fix #143738: Broken lines overlay in curve overlay
In a58dd0b5c3 sequential overlay segments
writing was replaced by a parallel one. But there was one hidden issue:
each curve knows its number of points and starting offset. If you want
to drop one curves set from domain -- you have to sequentially offset
all other curves. And this was not done. Gap between poly and nurbs
curve ,point indices created for bezier still there. And once it stop
being filled by 0 after 3e8250e60c we meet
all the segments of garbage. Proper fix: lay left handle segments in
space created for bezier segments. This fix: hide issue until proper
fix (non trivial refactor).

Pull Request: https://projects.blender.org/blender/blender/pulls/143858
2025-08-03 17:36:23 +02:00
Hans Goudey
74a2211f95 Geometry Nodes: Increase parallelism in Geometry Proximity node
The default grain size of 10000 for multi function execution was much
too large for the fairly expensive BVH traversal. In the file from
#143455, reducing te grain size to 512 increase the playback FPS from
8 to 20.
2025-08-03 11:18:59 -04:00
Hans Goudey
1229fba5c9 Fix #143856: Data race in curves/point cloud selection
Depsgraph tags cannot be added in parallel.
2025-08-03 10:47:39 -04:00
Hans Goudey
e59fb784ff Geometry Nodes: Use standard node width for face neighbors node 2025-08-03 10:03:30 -04:00
YimingWu
250e809d6f Fix #143870: Grease Pencil: Fix typo in dash modifier
Previously modified by e7a3f0758e, should be `!joined_geo.has_curves()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/143889
2025-08-03 14:09:08 +02:00
Jacques Lucke
77563587cd Geometry Nodes: trace bundles/closures through repeat zone, simulation zone and bake node
This adds support for tracing bundle and closure structures through repeat zones,
simulation zones and bake nodes. Previously, syncing through these nodes just
didn't work.

Pull Request: https://projects.blender.org/blender/blender/pulls/143860
2025-08-02 22:28:17 +02:00
Casey Bianco-Davis
dfeeaa98fd Grease Pencil: Use Curve overlay for Bezier handles
This makes it so that Grease Pencil Bezier handles use the same colors and shaders as `Curves` Objects.

This also makes the handles follow `handle_display` and add the option the the edit mode overlay.

Pull Request: https://projects.blender.org/blender/blender/pulls/141524
2025-08-02 15:37:59 +02:00
Jacques Lucke
f271a48b6b Geometry Nodes: improve link-drag-search for bundle and closure nodes
This adds support for creating Combine Bundle, Separate Bundle and Evaluate Closure
nodes using link drag search in some cases that were not previously supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/143835
2025-08-02 14:09:06 +02:00
Jacques Lucke
69dee02d4f Cleanup: quiet unused variable warning 2025-08-02 13:38:44 +02:00
Jacques Lucke
4f9b66fe4a Fix: Nodes: restore active node after copy-pasting nodes
This remembers which node was active when copying nodes. When pasting, the node
that was active when copied is made active again.

Pull Request: https://projects.blender.org/blender/blender/pulls/143832
2025-08-02 13:24:12 +02:00
Jacques Lucke
99984b3b05 Nodes: optimize freeing all nodes
We generally expect `bNodeTreeRuntime::nodes_by_id` to be valid at all times, so
it also has to have the same order `bNodeTree.nodes`. When freeing a node, the
entire vector set was rebuild currently to ensure that invariant. This leads
O(n^2) behavior when all nodes are freed as is commonly the case with depsgraph
copies etc.

This patch implements an optimization where `nodes_by_id` is not rebuild if only
the last node was removed. In this case, that not can just be popped from
`nodes_by_id` without affecting the order of the other nodes. To use this
optimization, the node tree freeing code now frees nodes in reverse order.

Pull Request: https://projects.blender.org/blender/blender/pulls/143831
2025-08-02 12:35:16 +02:00
Jacques Lucke
9fd877e174 Fix: Nodes: copied node not always added to nodes_by_id 2025-08-02 11:34:09 +02:00
Jacques Lucke
644a1791b9 Fix: Nodes: shader socket missing in some places 2025-08-02 11:14:32 +02:00
Jacques Lucke
9cb50ea83b Refactor: Nodes: pass tree type to supports_socket_type function for socket items
This allows us to support a different set of sockets per tree type in e.g. the
repeat zone as in #141936.
2025-08-02 11:13:38 +02:00
Jacques Lucke
5b73f798d0 Refactor: Nodes: allow passing already unique name/identifier to node copy function
This is useful when the src node name is not unique, but the caller can provide
a unique name more efficiently then if the function has to compute the name
automatically.
2025-08-02 11:02:10 +02:00
Jacques Lucke
252b983c0c Geometry Nodes: change idnames of experimental bundle and closure nodes
This removes the "Geometry" part from their name because we want to use them in
other node tree types too (see #141936).

Usually, we don't change idnames because they are the primary identifier of
nodes and is expected to stay the same. Since they are generally not shown to
users (just Python developers), it's also not urgent to change them. However, in
this specific case we have the opportunity to update the idname before the node
becomes an official feature, so it's not as bad to change it.

This patch has full backward compatibility, but no forward compatibility (for
files that used the experimental feature).

Pull Request: https://projects.blender.org/blender/blender/pulls/143823
2025-08-02 10:17:39 +02:00
Jacques Lucke
9579bca13f Geometry Nodes: disallow leading or trailing whitespace in bundle item names
This makes sure that a bundle item has a more well defined beginning
and end when using e.g. a comma separated list for bundle items.
This allows using e.g. `, ` instead of just `,` as separator (note the
extra space in the first separator).
2025-08-02 06:57:08 +02:00
Campbell Barton
d72e7f9d6e Cleanup: only handle selection when BM_mesh_esubdivide uses selection
While all callers currently operate on the selection, the function
supports other header-flags, so check the selection is being used
before updating & flushing the selection.
2025-08-02 04:41:40 +00:00
Campbell Barton
619d370703 Cleanup: rename click_drag to press_drag functions, variables 2025-08-02 14:04:56 +10:00
Campbell Barton
62aac627a5 Cleanup: rename KM_CLICK_DRAG to KM_PRESS_DRAG for clarity
"Press drag" more accurately describes what the action does.
2025-08-02 13:41:38 +10:00
Campbell Barton
a3bf386d43 Cleanup: use full sentences in text editor code-comments
Also minor improvements, clarifications.
2025-08-02 13:33:05 +10:00
Campbell Barton
6d899a6726 Cleanup: naming & reduce declaration scope in the PyAPI for lib loading
Use terms source/destination instead of from/to.
2025-08-02 02:10:59 +00:00
Campbell Barton
58c7bb3fc7 Cleanup: minor corrections to library loading logic, improve docs
- Share the initialization size for library dictionaries &
  assert this size is up to date.
- Improve doc strings.
2025-08-02 12:05:13 +10:00