Commit Graph

151025 Commits

Author SHA1 Message Date
Pablo Vazquez
0a22fbc153 UI: Add shadow to panels
At the moment, only menus and tooltips have a shadow. However, other
elements can benefit from having a shadow. This PR adds shadows to
panels in overlapped regions.  Makes the default shadow size slightly
larger, but less opaque so it's not so prominent. While dragging a
panel this makes the shadow larger for a "floating" effect.

Pull Request: https://projects.blender.org/blender/blender/pulls/139847
2025-06-19 02:21:35 +02:00
Jesse Yurkovich
2a86a93349 Merge branch 'blender-v4.5-release' 2025-06-18 14:55:49 -07:00
Jesse Yurkovich
5e5c51215a Fix: USD: Only process displacement if there's a valid source specified
Some USD files have the displacement input specified in the shader but
do not have it marked as an output in either the shader or the material.

Skip processing if we do not have a valid displacement source.

Pull Request: https://projects.blender.org/blender/blender/pulls/140619
2025-06-18 23:55:04 +02:00
Jesse Yurkovich
fe45895064 Merge branch 'blender-v4.5-release' 2025-06-18 11:26:07 -07:00
Jesse Yurkovich
bcd5af34f9 Fix: USD: Traverse through UsdShadeNodeGraph nodes during material import
Follow connections through `UsdShadeNodeGraph` nodes when reading
materials rather than looking only for `UsdShadeShader` nodes.

Found while investigating the Intel Sponza research sample:
https://www.intel.com/content/www/us/en/developer/topic-technology/graphics-research/samples.html

Pull Request: https://projects.blender.org/blender/blender/pulls/140565
2025-06-18 20:25:29 +02:00
Brecht Van Lommel
975322dde5 Merge branch 'blender-v4.5-release' 2025-06-18 19:28:50 +02:00
Brecht Van Lommel
a7f9ad5af6 Fix #140527: Cycles CUDA + Vulkan animation render memory leak
Missing call to free memory for graphics interop.

Pull Request: https://projects.blender.org/blender/blender/pulls/140612
2025-06-18 19:27:44 +02:00
Pablo Vazquez
db9ae93f02 UI: Theme: Add Panel Outline
Add a panel outline theme option, set very low by default. This PR also
adds a slight (2 pixel) padding inset to subpanels.

Pull Request: https://projects.blender.org/blender/blender/pulls/139897
2025-06-18 19:16:24 +02:00
Pablo Vazquez
dd43eae0d3 UI: Theme: Remove NavBar/Execution regions colors
Remove barely used theme settings for "Navigation Bar" and
"Execution Region".

These properties were only used in two areas, which already had a good
candidate to be replaced with.

Visually it should look exactly the same by default.

Part of #135192, simplifying and cleaning up theme settings.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/140352
2025-06-18 19:01:28 +02:00
Habib Gahbiche
d88d4cc8ce Compositor: remove "Use Nodes"
Part of simplifying the compositor workflow:
https://projects.blender.org/blender/blender/issues/134214

The option "Use Nodes" is removed from the UI and marked deprecated.
It will get fully removed in 6.0.

"Use Nodes" is effectively replaced by the existing "Compositing"
option in the post-processing panel

Pull Request: https://projects.blender.org/blender/blender/pulls/138560
2025-06-18 18:39:02 +02:00
Pablo Vazquez
83a9cda08f UI: Clip Graph: Use theme colors for speed axes
Replace the hardcoded red, green, blue colors for speed and
reprojection error curves in the Clip Editor Graph, with
theme X, Y, and Z settings respectively.

Update the tooltip as well to reflect the change.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/140409
2025-06-18 16:42:35 +02:00
Hans Goudey
e743fe6c97 Merge branch 'blender-v4.5-release' 2025-06-18 10:03:44 -04:00
Brecht Van Lommel
7e93c5b387 Merge branch 'blender-v4.5-release' 2025-06-18 16:02:35 +02:00
Hans Goudey
29c623f857 Fix #140530: Crash after writing Grease Pencil drawings in new format
`blend_write_prepare` expects to work on a shallow copy of the
`CurvesGeometry` struct. This is necessary because it changes
the struct to contain only the layers being written. This is
particularly important with writing with the new format enabled,
where attributes are written as part of `AttributeStorage`.

Writing with a shallow copy of the struct also gives us the
flexibility to zero the runtime pointer in the written file which
is generally a good practice.

Pull Request: https://projects.blender.org/blender/blender/pulls/140560
2025-06-18 16:02:15 +02:00
Alaska
353789c559 Fix: Cycles distributed memory toggle could appear on unsupported configurations
The distributed memory access toggle in Cycles preferences would show up
when a user has two GPUs that can access each other's memory, but only one
of them is supported by Cycles.

For example the AMD RX 5700XT and AMD Vega 64 can access each other's
memory, but only the 5700XT is supported by Cycles.

Pull Request: https://projects.blender.org/blender/blender/pulls/140521
2025-06-18 16:02:06 +02:00
Pablo Vazquez
6411c433d2 Fix: Asset Shelf theme versioning
Colors were not reset properly.
2025-06-18 15:50:20 +02:00
Benjamin Beilharz
1cb548fccf Fix: Displace node uses bilinear for bicubic case
Prior implementation failed to look-up bicubic shader name. This commit
adds the case to the `get_shader_name` method.

Pull Request: https://projects.blender.org/blender/blender/pulls/140593
2025-06-18 15:03:25 +02:00
Pablo Vazquez
11e729219a UI: Theme: Add Asset Shelf global styling
Simplify theming by making Asset Shelf style global, not per editor.

See PR for details and screenshots.

Part of #135192

Pull Request: https://projects.blender.org/blender/blender/pulls/140553
2025-06-18 14:54:42 +02:00
Pablo Vazquez
19c15e0218 UI: Theme: Remove List style from Nodes/Spreadsheet
The `Theme Space List` theme settings are often used for channels-like
interfaces such as Graph Editor, DopeSheet, NLA, VSE, Movie Clip.

Node Editor and Spreadsheet also had these settings but they are not
used. Remove them to simplify theme making.

Part of #135192

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/140536
2025-06-18 14:18:08 +02:00
Nika Kutsniashvili
efa8d942b8 Refactor: Remove grid and compact UI list layout in Python scripts
The grid layout type for UI list is planned for removal in 5.0, see
blender/blender#110461.

In previous UI meetings, we talked about deprecating the Grid mode of
the UI list, which is not actually accessible in UI and was never used.
Nowadays, there is a new grid view that can be exposed in the API in
the future.

Initially, I wanted to remove references to layout_type in UI templates
in the text editor, because a lot of add-on developers on the
extensions platform base their lists on that code, and a lot of them
are therefore including soon to be deprecated code in their add-ons,
which I want to avoid in the future. But I thought we might as well
remove it from our python scripts as well, since it's just basically
redundant code that doesn't do anything. And also because many add-on
developers use bundled python scripts for references as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/138395
2025-06-18 13:45:06 +02:00
Clément Foucault
7f5a57d219 Fix #140419: Overlay: "High Quality Normals" mess with edges in Edit mode
This is caused by the latest refactor that made `vnor` be `short4`
when High Quality Normals is on.

Pull Request: https://projects.blender.org/blender/blender/pulls/140586
2025-06-18 12:00:41 +02:00
Pratik Borhade
cf14be7644 Fix: Regression: Invert doesn't work with search filter in some UIList
For UILists that doesn't use `filter_items()`, search filter doesn't work
along with invert button. For filter_items, invert case is already
handled in filter_items_by_name. In absense of that function,
handle the invert case inside `UI_list_filter_and_sort_items`. Existing logic
is a bit wrong. Now flags are adjusted, i.e. when search string matches, check
for invert status to decide whether items should be in the list or not.

Pull Request: https://projects.blender.org/blender/blender/pulls/139523
2025-06-18 11:40:43 +02:00
Thomas Barlow
dc8e2c09d9 Fix #109024: Off-by-1 in rna_access for non-array props without raw access
The `a + array_len > in.len` check was off-by-1 whenever accessing a
non-array property without raw access. This was because `array_len` was
actually the array length of the property, which is `0` for non-array
properties.

Given an array which was too short, this would cause the slower loop to
overrun the end of the array by one item. When getting items this would
cause a crash on a debug build with `Fatal Python error:
_PyMem_DebugRawFree: bad trailing pad byte`.

So use `item_len` instead, wichi is always set to `1` for non-array
properties.

Also do not assume that an `array_len` of `0` means that the property is
an array. While this may be true currently, it is cleaner and safer to
use the dedicated RNA API to check that.

This PR also adds some basic checks for expected failure of `foreach_set`
/`foreach_get` API when the provided array is too small.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/115967
2025-06-18 11:03:27 +02:00
Omar Emara
2f8fb76313 Refactor: Use Vector Math in Color to Float versioning
This patch uses the Vector Math node to implement Color to Float
implicit conversion versioning. This is shorter and much clearer than
the Dot and Math node that were used before.

Pull Request: https://projects.blender.org/blender/blender/pulls/140583
2025-06-18 10:52:43 +02:00
Clément Foucault
234ff21a7b Fix #140490: EEVEE: Broken hair motion vectors
This was caused by a hash colision caused by an incorrect
auto conversion from `Object*` to `ObjectRef`. The `ObjectRef`
would then not contain any instancing data and would create
the same hash for the same particle system on each instance
(since only `foreach_hair_particle_handle` was constructing
`ObjectKey` from an `Object*` it did not affect the instance
itself).

Marking the incriminating constructor `explicit` to avoid
more issues. Changing the `ObjectKey` creation for psys to use
`ObjectRef` fixes the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/140544
2025-06-18 10:46:27 +02:00
Omar Emara
7fe963dcd4 Cleanup: Remove unused code after recent commit
The Separate/Combine YCCA nodes were recently removed, but their drawing
functions still exist. This patch removes it since it is no longer used.
2025-06-18 11:37:27 +03:00
Damien Picard
d323ec0710 Compositor: Rename Rotate node Degr input to Angle
This patch renames the Degr input of the Rotate compositing node to
Angle. That's because it is needlessly shortened and is also wrong,
as the unit is internally radians and it also depends on the scene
settings on the UI side and can be radians.

Reference #96219.

Resolves #53574.

Pull Request: https://projects.blender.org/blender/blender/pulls/110637
2025-06-18 08:56:04 +02:00
Jacques Lucke
1bb49edf7f Geometry Nodes: add structure type inferencing tests
The way these tests work is similar to the existing field inferencing tests.
There is a .blend file that is opened and then we check the inferred structure
types from Python. A new `NodeSocket.inferred_structure_type` property is added
to be able to access this information. Other then the field inferencing tests,
this patch does not directly check the socket shapes, which are not always
exactly determined by the inferred structure type.

This also fixes a few issues I found while adding the tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/140520
2025-06-18 08:39:01 +02:00
Xavier Hallade
588b9ff3cd Merge branch 'blender-v4.5-release' 2025-06-18 08:22:04 +02:00
Xavier Hallade
2df163a648 Fix: Cycles low performance with scenes with many shaders on Arc B570
The performance of the sorted_paths_array kernel on B570 is problematic.
Relying on local sorting+partitioning instead gives a 25% overall rendering
speedup and no regression in shade_surface when rendering Agent 327 Barbershop scene.
On Arc A770, it still gives a 2% speedup when rendering Barbershop.

Pull Request: https://projects.blender.org/blender/blender/pulls/140308
2025-06-18 08:21:19 +02:00
Jacques Lucke
bc1ca4442d Fix: assert due to too few rows in tree view 2025-06-18 08:12:51 +02:00
Philipp Oeser
4ff5330e68 Merge branch 'blender-v4.5-release' 2025-06-18 07:55:04 +02:00
Philipp Oeser
b254a1ac36 Fix: Graph Editor box select selects non-visible handles
We should never select something that is hidden in the viewport.

Generally, there can be multiple reasons why keyframe handles are not
shown in the Graph Editor:
- the `View` > `Show Handles` option is disabled
- the `Only Show Selected Keyframes Handles` is enabled
- a keyframe `Interpolation`  method is anything but `Bezier`

This PR corrects the first.

Details:
- In `box_select_graphkeys()`, the `incl_handles` parameter is only
be passed to `initialize_box_select_key_editing_data()`
- add a separate `KEYFRAME_ITER_HANDLES_INVISIBLE` flag (representing
SIPO_NOHANDLES)
- "include_handles" purely represents operator setting / user intend now
- "final" decision about handles/their visibility is done in
`keyframe_ok_checks()` etc

For consistency, add "include_handles" option to Lasso/Circle as well

Part of #139314

Pull Request: https://projects.blender.org/blender/blender/pulls/139349
2025-06-18 07:54:51 +02:00
Campbell Barton
ae452ba698 Merge branch 'blender-v4.5-release' 2025-06-18 15:19:28 +10:00
Campbell Barton
a2865bb370 Merge branch 'blender-v4.5-release' 2025-06-18 15:19:16 +10:00
Jacques Lucke
8286355767 Fix: crash when using node tool
The issue was incorrect reference counting, making the type not safe to use.
The solution is to use the automatically reference counted `ImplicitSharingPtr`
instead of doing it manually.

Pull Request: https://projects.blender.org/blender/blender/pulls/140551
2025-06-18 07:16:58 +02:00
Campbell Barton
4dba0113fd Fix #140396: bmesh.ops.dissolve_edges fails to dissolve vertices
Add an optional init function which operators

An alternative to [0] which missed Python API support (causing #140451).
While that could be resolved, tracking which "slots" have been set
would have to be flagged on every map/hash insertion which seems
excessive and is prone to bmesh operators failing if the flag is ever
missed. Prefer a simpler init function so dissolve edges doesn't have
a zero threshold.

Also support multi-line comment blocks in the generated API docs.

[0]: bd3a66a416
2025-06-18 04:42:42 +00:00
Guillermo Venegas
aa1dcddb3d Refactor: UI: Add uiLayout context_store methods
This replaces uiLayout context_store API with uiLayout methods,
following uiLayout refactors, following the Python API naming.

Pull Request: https://projects.blender.org/blender/blender/pulls/140566
2025-06-18 06:32:40 +02:00
Harley Acheson
43216b03eb Fix #140403: Window Edge Cannot be Greater than Border Width
If the outer window edge is greater than the area border width then
there are unpainted pixels at the edge. This only happens if the
border width is less than 2. This PR just adds a minimum width to
ensure coverage.

Pull Request: https://projects.blender.org/blender/blender/pulls/140563
2025-06-18 01:27:09 +02:00
Harley Acheson
0bcab8913f UI: Vertex Slide Status Display
While using Vertex Slide show only changing values in the area header and
only keymap entries on the Status Bar

Pull Request: https://projects.blender.org/blender/blender/pulls/140505
2025-06-17 23:35:41 +02:00
Sybren A. Stüvel
67b0e05a62 Fix #139762: Deleting an F-Curve from NLA strip in tweak mode crashes
The "delete this F-Curve" function assumes that the F-Curve is either a
driver or contained in `adt->action`. This does not have to be true, as
the Action editor can also show F-Curves from other uses (for example an
NLA strip). The channel delete operator (`ANIM_OT_channels_delete`) now
takes this into account.

Pull Request: https://projects.blender.org/blender/blender/pulls/140291
2025-06-17 22:42:43 +02:00
Brecht Van Lommel
aa25b4d3c2 Merge branch 'blender-v4.5-release' 2025-06-17 20:21:00 +02:00
wszqkzqk
3999975c29 Build: Add loong64 support in BLI_build_config.h
LoongArch is a new RISC ISA developed by Loongson, this adds the missing
entry to BLI_build_config.h. It has been verified to work on Arch Linux's
loong64 port.

Pull Request: https://projects.blender.org/blender/blender/pulls/130916
2025-06-17 20:20:26 +02:00
Zhou Qiankang
1692817b5e Fix: Wrong HIP device pointer size on riscv64 and loongarcg64
Add __LP64__ to 64-bit platform detection, to ensure hipDeviceptr_t has the
correct size on these platforms.

Pull Request: https://projects.blender.org/blender/blender/pulls/140528
2025-06-17 20:18:00 +02:00
Brecht Van Lommel
789db82dfd Merge branch 'blender-v4.5-release' 2025-06-17 20:09:12 +02:00
Brecht Van Lommel
03b1071bcb Fix: Invalid snprintf into the same string in recent bugfix
Mistake in 5b1126da66
2025-06-17 20:06:51 +02:00
Brecht Van Lommel
984ae99624 Fix: Python API doc build fails after previous pointcloud fix
This is now always in context, not just for experimental features.

Ref #140516
2025-06-17 20:06:51 +02:00
Guillermo Venegas
ba55e16532 Refactor: UI: Add uiLayout block get method
This replaces API for obtaining the uiLayout block with a method,
following uiLayout refactors.

Pull Request: https://projects.blender.org/blender/blender/pulls/140549
2025-06-17 19:30:11 +02:00
Jesse Yurkovich
50c7144032 Merge branch 'blender-v4.5-release' 2025-06-17 09:46:51 -07:00
Jesse Yurkovich
6f986e8c34 Fix #140515: Some pieces of Point Cloud support were still disabled
Certain aspects of Point Clouds were still guarded behind a
`WITH_POINTCLOUD` define.

Pull Request: https://projects.blender.org/blender/blender/pulls/140516
2025-06-17 18:46:08 +02:00