Commit Graph

120800 Commits

Author SHA1 Message Date
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
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
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
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
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
илья _
9fcb41de5e Cleanup: unused type alias in release build
`volume_grid_function_eval.cc(635,15): warning: unused type alias 'ValueType' [-Wunused-local-typedef]`

Pull Request: https://projects.blender.org/blender/blender/pulls/140497
2025-06-17 17:49:21 +02:00
Hans Goudey
06a37729a2 Cleanup: Resolve unused variable warning
Caused by bdbc2a9fd9
2025-06-17 11:15:16 -04:00
BaiGave-1
d74c23b3b4 IO: OBJ: Add material name collision import setting
Similar to the same setting in USD: default keeps current behavior
(each material in each import creates a new material in Blender),
"Reference Existing" choice uses already existing materials, when
their names match.

Co-authored-by: BaiGave <107305554+BaiGave@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/140280
2025-06-17 17:03:58 +02:00
Philipp Oeser
bb2b286ab6 Merge branch 'blender-v4.5-release' 2025-06-17 16:31:55 +02:00
Philipp Oeser
adcea77c49 Fix #140257: Asset Browser Frame Selected wrong after a search
Also true (and reported) for the general File Browser.

In the implementation from 5a67407d5a it was noted that including the
active file was desirable(next to `FileSelection` `first` and `last` of
course).

`FileSelection` indices get correctly updated after search is altered/
cleared (by `file_current_selection_range_get`), the `FileSelectParams`
`active_file` however isnt.

This makes the framing go wrong when search is altered or cleared (it
uses an index from the previous/outdated filter result).
I case of the Asset Browser (in main) this was also obvious when you
looked at an active asset in the sidebar -> clearing a search (after
having selected something while searching) for example would make a
"completely different" asset active.

Since keeping track of a "previous" `active_file` (and trying to update
to an updated/correct index) turned out to be quite hairy, this PR goes
the route of actually clearing the `active_file` on search updates. Like
mentioned, this is still not ideal (at least for the Asset Browser, it
looses the "active" of something selected), but at least now you can
easily frame it again -- and is is better than in main (where "active"
would point to something completely unrelated and you could not even
frame it to click-activate it again).

Pull Request: https://projects.blender.org/blender/blender/pulls/140365
2025-06-17 16:31:40 +02:00
Ethan Mulwee
bdbc2a9fd9 UI: Properly disable the Remove Material Slot Button in edit mode
Currently the remove material slot button still appears to be
active while in edit mode. Attempting to use the button will
result in an error "Unable to remove material slot in edit mode."

Solution is to edit poll function to disable/gray out the remove
material slot button while in edit mode similar to other buttons

In the code a check was added for edit mode for the operator
execution as a fix for bug #21822. However this check was never added
to the polling function. This commit adds that check.

Pull Request: https://projects.blender.org/blender/blender/pulls/139660
2025-06-17 16:26:42 +02:00
Hans Goudey
54c3c8f411 Draw: Inline small functions to reduce overhead
Some functions used at least once per object/instance
when drawing are so trivial that function call overhead
becomes significant. Allowing these functions to be
inlined can remove that overhead and also give the
compiler more information it can use for optimization.

In the Erindale Flower Shop file, this change gives me
a 10% improvement in playback FPS, from 8.77 to 9.65.

Pull Request: https://projects.blender.org/blender/blender/pulls/140402
2025-06-17 16:06:05 +02:00
Jeroen Bakker
1d90d9f3bb Cleanup: Make format 2025-06-17 15:45:27 +02:00
Alaska
b561c78f93 Nodes: Remove legacy combine/separate nodes
In Blender 3.3 (1) the individual combine and separate color nodes were
combined together into a single combine/separate color node.

To ensure legacy addons still worked, the old nodes were left in
Blender, but hidden from the Add menus.

It has been nearly 3 years since that change was made, most if not all
addons should have been updated by now. So this commit removes these
hidden legacy nodes.

(1) blender/blender@82df48227b

Pull Request: https://projects.blender.org/blender/blender/pulls/135376
2025-06-17 15:36:33 +02:00
Brecht Van Lommel
ff8658b457 Merge branch 'blender-v4.5-release' 2025-06-17 14:17:06 +02:00
Brecht Van Lommel
5b1126da66 Fix #140375: Image editor save overwrites movie file
Create a good default name for saving individual frames of a movie file loaded
as an image datablock, instead of the movie file name.

Changes ImBuf to store the frame separate from the filepath, to implement this.
Seems more clear for ImBuf.filepath to be an actual filepath anyway.

Thanks to Jesse and Aras for investigating this bug.

Pull Request: https://projects.blender.org/blender/blender/pulls/140471
2025-06-17 14:15:19 +02:00
Bastien Montagne
4074d1d80b Cleanup: better naming for array length variables in rna_raw_access.
Extracted from PR !115967. Committed separately because otherwise, the
change in logic in that PR is lost in the renaming noise.

This commit is purely non-functional change.
2025-06-17 14:12:37 +02:00
Omar Emara
811c513d90 Compositor: Remove Map Value node
This patch removes the Map Value node that was deprecated in 4.5 and was
planned for removal in 5.0. The common Shading Map Range node should be
used instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/140533
2025-06-17 13:50:17 +02:00
Campbell Barton
c29c7d2eae Cleanup: remove unused functions 2025-06-17 21:24:58 +10:00