Commit Graph

150077 Commits

Author SHA1 Message Date
Nathan Vegdahl
b734eae387 Core: refer to Path Template docs in supported props' type info
When landing #134860 we didn't yet have documentation for the Path
Templates feature. Now that we do, we can refer users to it.

This PR adds a reference to the docs in the type info of properties that
are marked as supporting Path Templates.

Pull Request: https://projects.blender.org/blender/blender/pulls/139099
2025-05-22 09:58:25 +02:00
Bastien Montagne
647927a330 Fix IDP_MergeGroup_ex not taking 'ID management' flags as parameter.
For IDProperties, this flag is mostly used only to controll whether
IDProperty code should also handle ID refcounting or not (through
`LIB_ID_CREATE_NO_USER_REFCOUNT`).

Without this fix, IDProp Group Merge could end up trying to modify ID
refcount of its data-block properties (via `IDP_FreeProperty`), which
can lead to data corruption or even crashes (e.g. when used in readfile
code, before lib-linking process).

Issue discovered while working on the system IDProperties split project
(!135807).

Pull Request: https://projects.blender.org/blender/blender/pulls/139230
2025-05-22 09:19:21 +02:00
Campbell Barton
b5d3b3c1a3 Refactor: const-correctness in BLI_array_store API 2025-05-22 17:18:39 +10:00
Clément Foucault
78170cbf90 Fix #139189: Vulkan: UV Display Issues When Selecting Specific Mesh Regions
The format was not 4 byte aligned and not compatible with the new
format enums.

Pull Request: https://projects.blender.org/blender/blender/pulls/139202
2025-05-22 09:18:08 +02:00
Jacques Lucke
74751f985d Fix #139218: implicit group inputs show input value 2025-05-22 08:36:33 +02:00
Jacques Lucke
45ee859c22 Cleanup: make format 2025-05-22 08:29:55 +02:00
Mukhesh
615eb54ef4 Fix: VSE Duplicating strips in preview operates on all strips
Deselect strips not intersecting current frame, when operator is
invoked from preview.

Pull Request: https://projects.blender.org/blender/blender/pulls/139026
2025-05-22 07:34:14 +02:00
Campbell Barton
03f292c99b Fix assert adding particle system with an active float color layer
Updating the active legacy face data layers assumed the active color
layer was a byte layer.
2025-05-22 15:03:17 +10:00
Campbell Barton
50d3516fe5 Fix #139177: Realize Instances Node results in empty curves
Regression in [0] caused by new curve data blocks being created without
"ob_type" being set.

[0]: 8fea423e00
2025-05-22 14:51:39 +10:00
Sean Kim
f5276ac09e Cleanup: Rework sculpt_undo.cc for readability
* Avoid usage of `applied` in favor of helper methods to indicate
  undo and redo requirements
* Rename `bmesh_restore_begin` and `bmesh_restore_end` to avoid
  similarity with geometry methods
* Swap `geometry_original` and `geometry_modified` to match
  expected meaning

Pull Request: https://projects.blender.org/blender/blender/pulls/139244
2025-05-22 06:39:02 +02:00
Aaron Carlisle
22a2582844 Docs: Update RNA to user manual URL mapping 2025-05-22 00:11:19 -04:00
Jacques Lucke
47e84f1486 Cleanup: Nodes: remove unused method 2025-05-22 06:06:54 +02:00
Campbell Barton
e9aca43d89 Cleanup: use bool for comment variable in makesdna.cc
Also assert the value is set as expected when entering/exiting comments.
2025-05-22 13:51:29 +10:00
Campbell Barton
dbf86f291c Cleanup: prefer term "unreliable" over "flaky"
Avoid slang terms, also correct typo.
2025-05-22 13:51:29 +10:00
Sean Kim
f6abef2aaf Tests: Add undo test for Sculpt trim tool
For Sculpt Undo, certain operators will modify the topology count of the
mesh. These operators are handled separately from normal brush strokes,
and so having tests for an operator that uses this functionality is
beneficial in detecting regressions.

Pull Request: https://projects.blender.org/blender/blender/pulls/139249
2025-05-22 05:48:07 +02:00
Campbell Barton
9c421cbef2 Fix crash in grease pencil snap without a window region
Add window region check to the poll function.
2025-05-22 03:15:13 +00:00
Campbell Barton
991d48a9ed Fix crash in vertex group lock
Resolve discrepancy in the poll/exec functions active-object check.
Also use matching object access for the enum callback.
2025-05-22 13:05:49 +10:00
Jacques Lucke
afe57f6598 Fix: unintentional fall-through in switch statement 2025-05-22 04:56:05 +02:00
Jacques Lucke
5457cca3de Nodes: auto-hide unused inputs if usage depends on menu
Previously, when a socket was detected to be unused, it was just grayed out.
This patch adds support for automatically hiding unused sockets based on this
convention: Menu inputs control visibility while other inputs only control
whether something is grayed out.

More specifically, an input is visible if any of these conditions is met:
* It affects the output currently.
* It never affects the output. In this case its usage does not depend on any
  menu input.
* It is used if all non-menu inputs are considered to be unknown.

In the future, we could support customizing which inputs are allowed to control
visibility. For now it's good to use the convention that Blender generally
follows itself.

As before, panels are grayed out if they only contain grayed out sockets and
panels are hidden when they don't contain any visible sockets.

Hiding inputs works in group nodes, the Geometry Nodes modifier and node
operators. In theory it will work for all node tree types, but since only
Geometry Nodes supports the Menu Switch node currently, this patch currently
only makes a difference there.

The implementation reuses the existing `SocketUsageInferencer` with a different
sets of inputs. So no new core-inferencing logic was needed.

Design task: #132706.

Pull Request: https://projects.blender.org/blender/blender/pulls/138186
2025-05-22 04:48:43 +02:00
Campbell Barton
10876f3f4f Fix crash in Sequencer Unmute without a valid region
Regression in [0] using the contexts "region" without a null check.

[0] 541e2b3cdd
2025-05-22 02:37:29 +00:00
Campbell Barton
937d9853a4 Fix crash in keyframe jump when called without a valid area
Regression in [0] using the contexts "area" without a null check.

[0] 9663d287fc
2025-05-22 12:22:11 +10:00
Campbell Barton
2f6b89b174 Fix crash in attribute convert/remove
Regression in [0] caused the poll function to compare the result with
nullptr instead of std::nullopt.

The operators exec function then de-referenced the the std::nullopt.

[0]: 550094b018
2025-05-22 02:18:39 +00:00
Campbell Barton
d7207a7240 Cleanup: use function style casts for generated code 2025-05-22 11:33:37 +10:00
Campbell Barton
e5deeafe92 Cleanup: spelling in comments (make check_spelling_*) 2025-05-22 11:11:48 +10:00
Campbell Barton
0bd62779e8 Cleanup: various non-functional changes for C++ 2025-05-22 01:01:08 +00:00
Campbell Barton
d603d872b9 Cleanup: quiet missing-declarations warning 2025-05-22 01:01:06 +00:00
Brecht Van Lommel
fc686ff257 Fix #139002: Cycles particle object instance appears in center of scene
The particle system generates some particles with NaN values. The
set_if_different mechanism skipped copying those due to a refactor
in the matrix equality test. Revert that part of 689633d802 for now.

A better solution would be to improve handling of NaNs in Cycles,
and to find and fix the cause of the NaN in the particle system.

Pull Request: https://projects.blender.org/blender/blender/pulls/139238
2025-05-22 01:10:19 +02:00
Julian Eisel
3f705ff898 Fix: Windows test failure after recent asset library path changes
Test was failing since efdda78175. The asset library path was now using
backslashes on Windows, and got compared to a path with forward slashes. Use
our higher level path comparison function to make sure they point to the same
directory.
2025-05-21 21:20:15 +02:00
Julian Eisel
85150c7ba1 Fix: Asset browser glitch when library has back slash in path
When displaying an asset library that contains a back slash on macOS (or Linux,
I assume), resizing the asset browser would make all assets disappear, and
instead the message would show that indicates an invalid asset library path.
2025-05-21 21:06:08 +02:00
Jesse Yurkovich
e84c60561c Cleanup: Remove Dots Stroke material from USD's empty.blend test file
This extra material in what should be an empty file often makes some
checks and text comparisons needlessly more confusing.

Pull Request: https://projects.blender.org/blender/blender/pulls/139228
2025-05-21 20:42:11 +02:00
Julian Eisel
efdda78175 Fix #136906: Crash if asset library path contains back slash on macOS
Convert all slashes to native format when initializing an asset library. This
might convert slashes that are valid parts of the file name, but this just
leads to an error about a not found asset library, which is better than
crashing. This is a typical tradeoff when dealing with cross platform paths.
2025-05-21 20:40:40 +02:00
Habib Gahbiche
289984d868 Tests: Compositor: add test with animated input
Pull Request: https://projects.blender.org/blender/blender/pulls/139227
2025-05-21 20:21:46 +02:00
John Kiril Swenson
65f821139f VSE: Copy handles to selected strips
Now that handles are effectively hidden with the "Tweak Handles" option
(and clear themselves if `use_restore_handle_selection` is set),
handle selection for multiple strips is quite unintuitive.

It is expected that, after selecting a group of strips, the user will
be able to tweak all of their handles, even if they are not connected,
consistent with other NLEs.

This patch enables that behavior by propagating handle selection to
all selected strips if "Tweak Handles" is on.

Pull Request: https://projects.blender.org/blender/blender/pulls/139075
2025-05-21 19:18:46 +02:00
John Kiril Swenson
50321bac99 Fix: VSE: Tweaking strip with selected handle
Originally, `element_already_selected` would always return `true`
as long as the user clicked on a strip that was already selected,
regardless of its handle selection state.

This led to unexpected behavior when trying to tweak a strip:
E.g. taking a strip, selecting its left handle, then trying to tweak
the strip itself would actually tweak the left handle unexpectedly, even
though the cursor would be far enough away that this does not make sense.
2025-05-21 19:18:41 +02:00
John Kiril Swenson
98090e0400 Cleanup: VSE: Add selection code documentation and const code
A lot of this is very messy and I keep running into
the same weird edge-cases, so hopefully more documentation
will help for the time being, until I can rework the entire
selection system in 5.0.
2025-05-21 19:18:41 +02:00
John Kiril Swenson
9a6350c4a0 Cleanup: VSE: Rename eStripHandle enums from SEQ_ to STRIP_
Rename from `SEQ_HANDLE_*` -> `STRIP_HANDLE_*`.
2025-05-21 19:18:41 +02:00
John Kiril Swenson
35cab63eaf Cleanup: VSE: Rename Strip::machine to channel
This should make VSE code more readable and easier to understand from an
outside perspective.

The name was chosen to be `channel` rather than `channel_index` to keep
things short and concise -- it should be clear based on the context
whether we are talking about the strip's channel index (singular case,
`Strip::channel` or `SeqTimelineChannel::index`) vs. the channel list
(plural case, e.g. `Editing::channels`).

Pull Request: https://projects.blender.org/blender/blender/pulls/138919
2025-05-21 19:13:20 +02:00
Sebastian Parborg
1858eba473 Fix: Jemalloc settings not getting applied as version check fails
Some Linux multi lib setups have a helper include file for Jemalloc that
in turn includes the actual header file. This makes our version regex fail.

As the Jemalloc version we are checking for is no longer in any of
the currently supported LTS linux distros, we can safely drop it.

Pull Request: https://projects.blender.org/blender/blender/pulls/139225
2025-05-21 19:10:57 +02:00
Bastien Montagne
4397fa5056 Refactor: Convert Node Socket Default Value and Storage readfile code to typed DNA handling.
For default values, the fairly complex reasoning for the code is explained
in details in comments. The TL;DR: would be that this code is needed to
safely load blendfiles older than 2.83, which were saved without any DNA
type information for these default value data.

Storage data have always been written with DNA info (added in commits
3bae60d0c9 and 9d91bc38d3), so no need to add special handling for them.
Just use regular DNA struct reading.

Pull Request: https://projects.blender.org/blender/blender/pulls/139175
2025-05-21 18:47:31 +02:00
Alberto Pilotto
e96e300099 Geometry Nodes: align sockets in Replace String and Slice string nodes
This is similar to f19f260ca8.

Pull Request: https://projects.blender.org/blender/blender/pulls/139219
2025-05-21 18:01:06 +02:00
Jacques Lucke
40177a8426 UI: Tree View: support drag&drop below last element
Previously, when reordering a tree view item to the end, one had to move it drop
it fairly precisely on the lower half of the last item in the list. This patch
makes it possible to just drop it below the last item too. The outliner has the
same functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/139025
2025-05-21 17:56:39 +02:00
Jacques Lucke
6e29616c49 UI: support scrolling over fully visible tree view
Currently, nothing happens when trying to scroll while hovering a tree view that
is fully visible (i.e. does not have a scroll bar). This patch makes it so that
the scroll event is passed through in this case so that one can scroll the
entire region even when hovering the tree view. If the tree view does have a
scrollbar, then the scroll-event is still captured by that even if scroll all
the way up/down already.

Pull Request: https://projects.blender.org/blender/blender/pulls/138930
2025-05-21 17:18:12 +02:00
Habib Gahbiche
f6048a5e7b Compositor: UI: Visualize render size and domain size in image editor
Show render region as a bounding box with a passepartout option.
Additionally, a text info is shown at the upper left corner, similar to
the info text in 3d view, showing the render size and current image
size.

Devtalk thread:
https://devtalk.blender.org/t/compositor-ui-improvements/34186?u=izo

Pull Request: https://projects.blender.org/blender/blender/pulls/120471
2025-05-21 15:57:31 +02:00
Clément Foucault
9a9fec7f03 EEVEE: Only request raytracing shader specialization if needed
This improves opengl startup time with default settings
or when rendering with raytracing turned off.

Fix #139188

Pull Request: https://projects.blender.org/blender/blender/pulls/139201
2025-05-21 15:57:00 +02:00
Damien Picard
9ce0a2d1d5 I18n: Add translation contexts to node panels
Node UIs can now have panels. Some of those may need to have their
labels translated using translation contexts. PanelDeclarations
already had a translation_context member, this commit adds a way to
specify this context, and to use it for translation on drawing the
node.

Pull Request: https://projects.blender.org/blender/blender/pulls/139124
2025-05-21 13:54:11 +02:00
Aras Pranckevicius
8119e4baa7 Fix: FBX importer was not skipping special MotionBuilder viewport cameras
Reported on devtalk: MotionBuilder produced FBX files contain
"cameras" that are not really user visible cameras, but rather map to
MotionBuilder viewports. They are at root, have no child elements,
and have special names. There is also a "camera switcher";
ignore that too.

Pull Request: https://projects.blender.org/blender/blender/pulls/139204
2025-05-21 11:15:20 +02:00
Omar Emara
14f7faf283 Compositor: Turn Crop node options to inputs
This patch turns the options of the Crop node into inputs.

Instead of specifying the bounds of the crop, the inputs now specify the
Width and Height of the crop region. The Crop Image Size option was
renamed to Alpha Crop and inverted, so it now defaults to actual
cropping. The Relative option was removed, as it is now superseded by
the Relative To Pixel node, and removal was done to facilitate the
options to inputs project.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/139163
2025-05-21 11:01:25 +02:00
Omar Emara
f790547fe9 Compositor: Use realize size for relative to pixel conversion
The Relative To Pixel node considers the original resolution of the
image with no transformation, while it is more useful for it to consider
the realized size instead, because that's what later processing nodes
will be using.
2025-05-21 10:31:09 +03:00
Sean Kim
f801740e01 Fix: Potential ASAN crash when Dyntopo sculpting
If the cursor has never been over the mesh and a stroke is drawn that
starts off of it, passes over the mesh, and then ends off of the mesh,
then when the active index is accessed, it is possible that the BMesh
indices and tables are not initialized.

Pull Request: https://projects.blender.org/blender/blender/pulls/139184
2025-05-21 07:02:00 +02:00
Jacques Lucke
0559b6e787 Cleanup: Spreadsheet: remove unused extra column cache
This was used to cache a lazily evaluated viewer field in the past, but is
unused for a while now already. If we need it again, it can be implemented with
`GenericKey` instead of a custom version of that.

Pull Request: https://projects.blender.org/blender/blender/pulls/139192
2025-05-21 05:45:09 +02:00