Commit Graph

120848 Commits

Author SHA1 Message Date
Harley Acheson
c793bfda23 UI: Area Maintenance Post Op Transitions
While performance area maintenance operations (split, join, docking)
some areas get highlighted and some are shown darkened to indicate they
will be removed. This PR just adds transitions AFTER completion that
eases out this highlighting. Make it less jarring and a little easier
to follow what happens.

Pull Request: https://projects.blender.org/blender/blender/pulls/140628
2025-06-20 03:31:16 +02:00
Pablo Vazquez
fe0fe0a5ed UI: Theme: Remove unused region styling in editors
Move the styling of sidebar/toolbar regions away from common editor
settings into its own section, so styling can be enabled only in the
editors that actually have these regions.

Part of the simplifying theme making, #135192

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/140680
2025-06-19 23:28:48 +02:00
Harley Acheson
551e2d510a Merge branch 'blender-v4.5-release' 2025-06-19 12:04:55 -07:00
Harley Acheson
f3b0600083 Fix #139942: Clear Screen Active_Regions For Inter-Window Area Move
When dragging an area from one window to another it is possible for the
bScreen->active_area to be be invalid for a short period of time. This
is constantly updated so normally not noticeable but will cause ASAN
errors when trying to show keymaps in the status bar as this is use
after free. This PR just sets these to nullptr.

Pull Request: https://projects.blender.org/blender/blender/pulls/140683
2025-06-19 21:03:27 +02:00
Philipp Oeser
ab78ccf391 Merge branch 'blender-v4.5-release' 2025-06-19 18:41:56 +02:00
Philipp Oeser
b7b9add385 UI: actually return an icon for shapekeys in UI_icon_from_idcode
`UI_icon_from_idcode` is used e.g. from the Action Editor to indicate an
Action's Slot Type (and without the icon it is kinda hard to tell what
the slot is suited for...)

Before
![image.png](/attachments/de26790d-d7c1-4eb0-b48e-245ff201f6bf)

After
![image.png](/attachments/64f2e486-8880-424a-b793-b66503cf1087)

Discovered while investigating #140618

Pull Request: https://projects.blender.org/blender/blender/pulls/140658
2025-06-19 18:41:35 +02:00
Guillermo Venegas
ff9b80cc81 Cleanup: UI: Remove unused uiLayout::keepaspect_ property
Python API was removed since a78ef19054

Pull Request: https://projects.blender.org/blender/blender/pulls/140675
2025-06-19 18:39:51 +02:00
Hans Goudey
f61fbc468a Attributes: Remove AttributeStorage legacy compatibility option
Remove the use_attribute_storage_write experimental option and always
write in the new format, which is supported by 4.5. The new format is
only used at runtime by point clouds currently but there is no reason
for it to be an option at this point.

This is a second commit repeating 84212bae4b
after that was reverted. Issues that came up with Grease Pencil writing
have been resolved in the meantime.
2025-06-19 11:54:07 -04:00
Hans Goudey
77da71cd9d Merge branch 'blender-v4.5-release' 2025-06-19 11:45:07 -04:00
Hans Goudey
e82a051ade Fix: Issues in Grease Pencil blend file writing
After a recent commit, multiple drawings were always written using the
same address because we used the same stack memory in a loop. This
causes the blend file reading to not be able to distinguish between the
structs, meaning the file is corrupt. However, we already had the same
problem in some cases because of the inline buffer in `BlendWriteData`.
To resolve this, make all "temporary" data for writing live as long as
the writing is going on for the ID. This is somewhat inefficient since
it makes memory reuse impossible for this temporary data. In the future
we should use a technique like #127706 to address this.

For testing, I saved and loaded multiple production files with Grease
Pencil objects, with and without the "write with attribute storage"
option enabled. The fix still goes to 4.5 though, because the first
mentioned issue is present there, and the `CustomDataLayer` vector
address reuse is potentially a problem too.

Pull Request: https://projects.blender.org/blender/blender/pulls/140667
2025-06-19 17:44:28 +02:00
Michal Krupa
fdaaea6328 Core: Increase MAX_ID_NAME length from 66 to 258 (Blender 5.0)
Change the maximum data-block name from 64 to 256 bytes by increasing MAX_ID_NAME value.

Also increase a few related non-ID data name max size, essentially the action slots identifiers, as these are the primary key used to match an Action's slot to an ID by name.

Other sub-data (bones, modifiers, etc.) lengths are not modified here, as these can be made actual dynamic strings in the future, while keeping (a reasonable level of) forward compatibility, during the course of Blender 5 release cycles.

Implements #137608.

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/137196
2025-06-19 16:39:20 +02:00
Jeroen Bakker
09af302457 GPU: Remove depth24 texture format
Metal and AMD/Intel/Vulkan don't support depth24 texture formats
natively. The backends implemented fallback to use depth32f in
stead.

Recently we removed all usages of depth24 to use depth32 and the
next step is to remove the depth24 format and the workarounds in
the backend.

Note: The removal of `GPU_DATA_UINT_24_8` isn't part of this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/140659
2025-06-19 16:24:06 +02:00
Benjamin Beilharz
bc7412860a Compositor: Support all interpolation types for Map UV node
This patch adds support for Bilinear and Bicubic interpolation for the
Map UV node.

Pull Request: https://projects.blender.org/blender/blender/pulls/140351
2025-06-19 16:18:13 +02:00
Omar Emara
9e0e76f8ab Compositor: Remove Dot output from Normal node
This patch removes the Dot output from the Normal node. This previously
computed negative the dot product of the normalized inputs. We are
removing it because we now have a Vector Math node that can compute the
dot product, and because it output is confusing, considering it computes
the negative of the product and it implicitly normalized the input.

The node was moved to the input category, and might be later extended to
allow normal picking from the scene or normal passes.

Fixed #132770.

Pull Request: https://projects.blender.org/blender/blender/pulls/140599
2025-06-19 16:12:45 +02:00
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
Piotr Makal
8412c0b42d 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 09:50:14 -04: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