Commit Graph

152646 Commits

Author SHA1 Message Date
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
Bastien Montagne
4bd48fcd41 I18N: Updated UI translations from git/weblate repository (942b7e0e2cea7d). 2025-08-04 12:10:17 +02:00
Bastien Montagne
6acdca7b92 I18N: Add Malayalam language to UI translations. 2025-08-04 12:08:17 +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
Christoph Neuhauser
a5043308f2 Fix: Tests: Avoid RecursionError in EEVEE performance tests
The EEVEE performance tests call scene.frame_set at the end of the warmup stage, which recursively
calls frame_change_handler. Eventually, this leads to a RecursionError. This PR adds a guard for
checking if frame_set is currently active and returns early for this recursive call of the function.

Pull Request: https://projects.blender.org/blender/blender/pulls/143203
2025-08-04 08:54:10 +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
9c29815d00 Docs: include a note on when key-map versioning runs 2025-08-02 13:37:19 +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
Jesse Yurkovich
bdc0d39aa4 Fix #143722: Set a default exposure for Hydra dome/world light
The Storm hydra delegate requests this property and USD will trace, per
the bug report, if it is not present.

This started happening with the library update for 4.4 which is odd.
The code[1] in Storm has existed forever and so has the USD trace for
requesting data from an empty VtValue.

[1] https://github.com/PixarAnimationStudios/OpenUSD/blame/release/pxr/imaging/hdSt/light.cpp#L305

Pull Request: https://projects.blender.org/blender/blender/pulls/143746
2025-08-01 20:48:23 +02:00
Ian Yoo
62b532040d Tests: Reduce glare streaks threshold
The current glare streaks threshold for highlights is too high so the
 input is just a black image, and no effects are output.
The threshold was reduced from 2.0 to 0.2 to produce a visible change.

Pull Request: https://projects.blender.org/blender/blender/pulls/142320
2025-08-01 20:36:11 +02:00
Ian Yoo
903fefff48 Tests: Add pixelate test
`node_pixelate` sets the output pixel size to 1, meaning no
transformation occurs and it is essentially the same as a single value
input. This will add a new test that pixelates the image, and renames
the original test to better reflect that edge case

Coverage:
- Function: 62.50% -> 100%
- Line: 37.36% -> 100%
- Region: 45.83% -> 100%
- Branch: 20.00% -> 90.00%

Pull Request: https://projects.blender.org/blender/blender/pulls/142438
2025-08-01 19:49:57 +02:00
Harley Acheson
1ecd193488 Fix #143439: Explicit Properties for Knife Tool
This adds "use_occlude_geometry=True" and "only_selected=False" to the
keymap entry for K, mesh.knife_tool, even though these are the default
values for this operator. This fixes the complaint. And these same
props are set  for "Knife Topology Tool" on the VIEW3D_MT_edit_mesh
menu so that it displays the shortcut correctly (#139393 remains
corrected).

Pull Request: https://projects.blender.org/blender/blender/pulls/143673
2025-08-01 18:55:36 +02:00
Christoph Neuhauser
0cce8536dc Fix: Tests: Two-stage shader compilation in EEVEE performance tests
The EEVEE performance tests wait for shader compilation to finish before
beginning to record performance. However, shader compilation can also
happen after the first frame. This PR adds a check to the warmup phase
to see if shader compilation is still happening. This happens, e.g., for
the Mr. Elephant demo scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/143690
2025-08-01 18:35:27 +02:00
Bastien Montagne
aa50de76a7 Fix assert when assigning active material of an object through RNA.
This is yet another fully virtual property (it does not exist as-is in
DNA, and requires both getter and setter) that does handle ID
refcounting of the affected materials. Now these require an explicit
definition of `PROP_ID_REFCOUNT`, as this flag cannot be defined
automatically by makesrna.
2025-08-01 18:24:54 +02:00
Miguel Pozo
5725176312 Fix: GPU: Shader cache clearing on subprocess crash
`delete_cached_binary` didn't work correctly since the cache hash could
be overwritten before the subprocess crashed.
This fix requires an extra memory copy, but it doesn't seem to incur any
measurable overhead.
An alternative could be to store the cache name in its own variable in
ShaderBinaryHeader, but that would break cache files compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/143649
2025-08-01 17:50:44 +02:00
Miguel Pozo
89380338c0 Cleanup: Remove unused variable 2025-08-01 17:44:05 +02:00
Habib Gahbiche
a64083d6e4 Cleanup: use version_node_* for Map Value
Pull Request: https://projects.blender.org/blender/blender/pulls/143796
2025-08-01 17:35:01 +02:00
Miguel Pozo
e8ddaff8ea Fix #143087: OpenGL: Startup crash on old AMD drivers
Try to cover more cases for detecting workarounds,
and prefer false positives.

(4.5 backport candidate)

Pull Request: https://projects.blender.org/blender/blender/pulls/143106
2025-08-01 16:42:49 +02:00
Habib Gahbiche
142d491064 Tests: Compositor: tests for Value Map node
Pull Request: https://projects.blender.org/blender/blender/pulls/143795
2025-08-01 16:42:21 +02:00
Jacques Lucke
e6c12f19b5 Fix: Geometry Nodes: wrong socket syncing for nested bundles 2025-08-01 16:34:52 +02:00
Sybren A. Stüvel
3ca28acbb3 Introduce Python code generator for OpenAPI spec to dataclasses
Add a [Python code generator][1] that takes an OpenAPI definition and
outputs the corresponding data model as [dataclasses][2]

This is intended to be used in the Remote Asset Library project, to
create, download, parse, and validate information of a remote asset
library.

[1]: https://koxudaxi.github.io/datamodel-code-generator/
[2]: https://docs.python.org/3/library/dataclasses.html

## Running the Generator

The generator is a Python script, which creates its own Python
virtualenv, installs the dependencies it needs, and then runs the
generator within that virtualenv.

The script is intended to run via the `generate_datamodels` CMake
target. For example, `ninja generate_datamodels` in the build
directory.

## Details

The virtualenv is created in Blender's build directory, and is not
cleaned up after running. This means that subsequent runs will just
use it directly, instead of reinstalling dependencies on every run.

## Generated Code & Interaction with Build System

It is my intention that the code generation _only_ happens when the
OpenAPI specification changes. This means that the generated code will
be committed to Git like any hand-written code. Building Blender will
therefore _not_ require the code generator to run. Only people working
on the area that uses the generated code will have to deal with this.

Pull Request: https://projects.blender.org/blender/blender/pulls/139495
2025-08-01 16:33:56 +02:00
Brecht Van Lommel
24a7c42766 Cleanup: Remove unused and outdated render test files
Pull Request: https://projects.blender.org/blender/blender/pulls/143438
2025-08-01 16:02:48 +02:00
Nika Kutsniashvili
7158e02aed Modeling: Set shape key default value to 1.0
When adding a shape key, set its blend value to 1.0 / 100%.

There is no practical use case where user wants to add shape key but
not work on it. New shape keys at value 0 have no purpose. Adding
shape key should be interpreted by Blender as user wanting to
sculpt/model on it. Also, being at 1.0 initially doesn't change
anything visually, because key isn't edited yet and it doesn't deform
mesh.

The default value of the shape key is also set to 1.0. When using
right-click to reset values, user most often wants to return to 1
(which is "correct" state of deformation without multiplication)
rather than 0 (which is no deformation at all).

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133399
2025-08-01 15:43:31 +02:00