Commit Graph

120833 Commits

Author SHA1 Message Date
Piotr Makal
870f75b790 Fix #79163: Bevel operation produces disconnected UVs #139595.
Fix #79163 bug related to the bevel operation producing disconnected UVs for
new bevel faces. This change replaces previous approach using scattered and
selective usage of functions: bev_merge_uvs, bev_merge_edge_uvs and
bev_merge_end_uvs with one coherent technique for all stages of the bevel operation.
It is utilizing a concept of loop (BMLoop) buckets to keep track of UV vertices
that should be merged at the end of bevel operation by a single call to
bevel_merge_uvs function. This approach doesn't touch initial UV position
calculation done by interpolation algorithm in bev_create_ngon function and
keeps the concept of representative faces (called frep, facerep or rep_face in
code) to help decide to which bucket specific loops should be assigned.

This is from PR https://projects.blender.org/blender/blender/pulls/139595,
which has more explanation and discussion.
2025-06-19 10:00:58 -04:00
Pablo Vazquez
35bcbad7e9 UI: Add Footer to Animation & VSE Editors
Add a footer region which contains essentially the playback and frame
range buttons from the Timeline Editor, to the following editors:
- Dope Sheet
- Graph
- NLA
- Sequencer

Available in the View menu in each editor, hidden by default.

The motivation is to provide a convenient way to access these
often used controls, and in the near future adjust these footers
to add more playback functionality related to each editor.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/135697
2025-06-19 15:54:53 +02:00
Bastien Montagne
5bfee02df3 Merge branch 'blender-v4.5-release' 2025-06-19 15:42:14 +02:00
Bastien Montagne
eb5d630db1 Fix #140581: Crash due to invalid info about potential ID dependencies of GP data.
GreasePencil ID type did not list `ID_OB` as its potential ID dependency
type, leading to lack of remapping of its layers' parents objects
pointers (e.g. on Object deletion), leading to crash from accessing
freed data.
2025-06-19 15:33:05 +02:00
Jeroen Bakker
b752195d2a Refactor: Use float for reading back depth values
Depth textures are always float, so we can skip the conversions. In this
case the depth value was converted to GPU_DATA_UINT_24_8 and back to
float again.
2025-06-19 15:32:24 +02:00
Jeroen Bakker
6f8bc55cef Merge branch 'blender-v4.5-release' 2025-06-19 14:13:47 +02:00
Jeroen Bakker
fefbdefbca Fix: Vulkan: Crash on exit
We detected that the gpu/draw tests could lead to
crashes after the tests where finished. It was
identified that the crash happened as the submission
runner wasn't exited, uses a mutex, that is being
destroyed by the main thread.

Solution is to wait until the submission runner has
finished, before destroying resources.

Pull Request: https://projects.blender.org/blender/blender/pulls/140650
2025-06-19 14:13:00 +02:00
Jeroen Bakker
11ab2de07a Python/GPU: Deprecate DEPTH24 formats
GPU_DEPTH24_STENCIL8 and GPU_DEPTH_COMPONENT24 are deprecated in Blender
5.0. Internally they will be removed. When used via python they are
automatically converted to their DEPTH32F variant and a deprecation
warning will be displayed.

Pull Request: https://projects.blender.org/blender/blender/pulls/140644
2025-06-19 13:31:40 +02:00
Jeroen Bakker
a5e30aaa9e Refactor: GPU: Use Depth32F
Blender uses depth24 for legacy reasons. All backends that we support
have support for depth32f.

This PR updates all usages of depth24 with depth32f.

- depth24 are not supported on AMD/Intel/Vulkan and Metal. There depth32f
  was already used to work around this limitation.
- This allows us to implement reverse depth in workbench, overlay and
grease pencil in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/140531
2025-06-19 13:30:50 +02:00
Damien Picard
e3945710a8 I18n: Tweak Automatic language tooltip
- Clarify that the English fallback is the US variant, now that a UK
  variant exists.
- Rephrase slighty for clarity.

Pull Request: https://projects.blender.org/blender/blender/pulls/140624
2025-06-19 13:05:54 +02:00
Falk David
0e737b23c5 Revert "Attributes: Remove AttributeStorage legacy compatibility option"
This reverts commit 84212bae4b.
2025-06-19 12:20:20 +02:00
Philipp Oeser
819e7839ad Merge branch 'blender-v4.5-release' 2025-06-19 12:07:02 +02:00
Philipp Oeser
4f482989d6 Fix #140636: Crash clicking in armature editmode after deleting a bone
Mistake in 3ddd2dff37

When checking a flag on an editbone in that commit, wasnt checking if we
have an active editbone to begin with...

Pull Request: https://projects.blender.org/blender/blender/pulls/140640
2025-06-19 12:06:51 +02:00
Christoph Lendenfeld
7a86fea099 Merge branch 'blender-v4.5-release' 2025-06-19 11:54:29 +02:00
Julian Eisel
d292df83b7 Cleanup: UI: Improve comment for UI list filter function
I needed some clarification for this myself, noting important findings
in the comment.
2025-06-19 11:39:06 +02:00
Sybren A. Stüvel
df6d345bb4 Fix #139042: use index map instead of sorting transform system data
Avoid modifying the order of transform system data. Instead, create an
index map and use that to traverse the data arrays in sorted order.

The issue observed in #139042 stems from the assumption, in _some_ of
the code, that `tc->data[i]`, `tc->data_ext[i]`, and `tc->data_2d[i]`
all contain information about the same "transformable thing". Since
`tc->data` was sorted (by selection state and, optionally for
proportional editing, by distance) but the other arrays were not, this
caused issues.

The most obvious solution, sorting all arrays the same way, turned out
to be hard to do, as some elements in one array have pointers to
elements in another array. Reordering those arrays would therefore
also make it necessary to find and update those pointers.

Instead, I decided to implement a sorted index map. The arrays can
then be kept in their original order, and the index map can be used to
visit them in sorted order.

Pull Request: https://projects.blender.org/blender/blender/pulls/140132
2025-06-19 11:20:08 +02:00
Christoph Lendenfeld
4fbcdba21e Fix #140452: Pasting a single keyframe may mess up handles
The issue was that the wrong flag was passed to
`ANIM_nla_mapping_apply_if_needed_fcurve` resulting
in the handles not moved back in this method.

This issue was only visible when pasting on top of a single keyframe,
or when the key had free handles. That is because the handles would
be recalculated otherwise.

Pull Request: https://projects.blender.org/blender/blender/pulls/140542
2025-06-19 10:08:49 +02:00
Mattias Fredriksson
f27358fde7 Refactor: OBJ import, split file reading & parsing
Improve readability of the parse function for the OBJ importer.
Currently the behavior for parsing input data is nested with reading
and buffering the input stream in the same function. Separating
the problems into two separate functions makes the code easier
to read and understand. This avoids having 100+ lines of parsing
logic entwined with logic for reading/buffering the file.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/140388
2025-06-19 09:03:16 +02:00
Campbell Barton
e0427bff7a Merge branch 'blender-v4.5-release' 2025-06-19 16:37:03 +10:00
Campbell Barton
bce0f3f677 Fix #140339: Crash with "Spin" tool in "Edit Mode" Toggle Maximize Area
MESH_GGT_spin_redo (for the operator) depended on MESH_GGT_spin
(for the tool) having already been initialized however the order
gizmos are initialized currently isn't guaranteed.

Workaround the problem by adding a null check.
See the report for details.

Co-authored-by: Philipp Oeser <philipp@blender.org>
2025-06-19 16:22:09 +10:00
Campbell Barton
954b492914 Cleanup: remove unused "use_bgl" from the GPU StateManager 2025-06-19 11:57:56 +10:00
Campbell Barton
05631085f8 Cleanup: spelling in comments (make check_spelling_*) 2025-06-19 11:40:00 +10:00
Guillermo Venegas
96dee123d1 Refactor: UI: Add uiLayout aligment methods
This replaces uiLayout aligment API with uiLayout methods,
following uiLayout refactors and the Python API naming.

Also this converts the layout aligment enum to a fixed enum class.

Pull Request: https://projects.blender.org/blender/blender/pulls/140622
2025-06-19 02:57:37 +02:00
Campbell Barton
2eb325facc Merge branch 'blender-v4.5-release' 2025-06-19 10:34:28 +10:00
Campbell Barton
37fe1b9b8d Merge branch 'blender-v4.5-release' 2025-06-19 10:34:11 +10:00
Campbell Barton
23b2f987d3 Fix #138715: Crash selecting in edit-mode with geometry-node modifiers
The logic to access the edit-mesh for the selection engine didn't match
the logic used for drawing.

Resolve using the edit-mesh from: BKE_object_get_pre_modified_mesh

Ref !140525
2025-06-19 00:24:11 +00:00
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
Campbell Barton
41bf2f598f Cleanup: spelling in comments (make check_spelling_*) 2025-06-19 00:10:18 +00: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
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
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
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