Commit Graph

154334 Commits

Author SHA1 Message Date
Sybren A. Stüvel
44913ffb60 Anim: Remove legacy pose library conversion
Remove the operators to convert a legacy pose library (from Blender 2.93
and older) to the current system (introduced in Blender 3.0).

The removal is mostly because the pose markers do not play well with
slotted Actions. The conversion code was never updated for those, and by
now it's easier to remove them than to update the code to the current
data model.

Technically it was still possible to create a legacy pose library (an
Action with pose markers) in current versions of Blender, and then use
this operator to convert that to a modern pose library. I don't know of
anybody doing that, though.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/147061
2025-09-30 16:13:04 +02:00
Jeroen Bakker
2468b3c7dd Fix: Renderdoc uses incorrect flags
Unit tests passed incorrect flags resulting in renderdoc to not use
debug information when performing step by step debugging.

Pull Request: https://projects.blender.org/blender/blender/pulls/147063
2025-09-30 16:07:52 +02:00
Omar Emara
74b1b95218 Fix #146579: Frame variables not replaced in File Output node
Frame variables in File Output paths are not replaced by the frame in
single renders. This is because the path construction function gets
passed false for frame usage to not force append frames, which also
handles frame replacement.

To fix this, we replace frame variables manually without forcing them
before constructing the path.

Pull Request: https://projects.blender.org/blender/blender/pulls/146779
2025-09-30 15:24:09 +02:00
Sybren A. Stüvel
fb2548afbd Revert "IO: update FBX im-/exporter to use the current Action API"
This reverts commit 8536cd794e. It is
still under review, and was accidentally pushed to `main`.
2025-09-30 15:07:15 +02:00
Falk David
c08fccae53 Fix #146155: VSE: Too agressive sequencer scene versioning
The sequencer scene was set to the active scene in the window
in all cases. This is not great because we really only expect
the sequencer scene to be assigned when it was used.

The fix changes the versioning code to ensure that
1) The window has any VSE open.
2) The active scene uses an `Editing` struct (e.g. the user created
  strips, or interacted in some way with the VSE).

This also changes back the test that checks for the usages
of IDs. Before this test had to include the workspace for
the default scene. Now this scene is no longer used
by the workspace, because the versioning that sets
the sequencer scene is no longer run.

Pull Request: https://projects.blender.org/blender/blender/pulls/147044
2025-09-30 15:04:57 +02:00
Sybren A. Stüvel
8536cd794e IO: update FBX im-/exporter to use the current Action API
Use the current Action API (i.e. move away from the to-be-deleted-in-5.0
one) to import and export F-Curves from/to FBX files.

There is a slight difference in functionality for the exporter, in the
selection of which Actions to export for the "All Actions" option. This
is just a minimal change to ensure the legacy API is no longer used.

Old: `action.fcurves` was iterated, and if all FCurves could resolve to
existing properties, the Action was exported. This would only work
reliably for single-slotted Actions, due to the use of the deprecated
`action.fcurves` property.

New: the above check is done for each Channelbag in the Action. The
first Channelbag that match the above check is exported. This does _not_
export all suitable channelbags; it merely improves on the old behaviour
slightly. The new, C++-based FBX exporter is more feature-complete in
this regard.

This is part of #146586
2025-09-30 14:57:35 +02:00
Sybren A. Stüvel
dbcb701eb2 Anim: make it easier to convert from legacy to current Action API
The changes:

1. Add `group_name` to the `channelbag.fcurves.new()` and
   `action.fcurve_ensure_for_datablock()` RNA functions.
2. Add `anim_utils.action_ensure_channelbag_for_slot(action, slot)`.
3. Add `channelbag.fcurves.ensure()` RNA function.

This makes it possible to replace this legacy code:

```py
fcurve = action.fcurves.new("location", index=2, action_group="Name")
```

with this code:

```py
channelbag = action_ensure_channelbag_for_slot(action, action_slot)
fcurve = channelbag.fcurves.new("location", index=2, group_name="Name")
```

or replace this legacy code:

```py
fcurve = action.fcurves.find("location", index=2, action_group="Name")
if not fcurve:
    fcurve = action.fcurves.new("location", index=2, action_group="Name")
```

with this code:

```py
channelbag = action_ensure_channelbag_for_slot(action, action_slot)
fcurve = channelbag.fcurves.ensure("location", index=2, group_name="Name")
```

Note that the parameter name is different (`action_group` became
`group_name`). This clarifies that this is the name of the group, and
not a reference to the group itself.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/146977
2025-09-30 14:43:56 +02:00
Jacques Lucke
1e8636962e Refactor: Nodes: join group sockets with panel toggle panels
This simplifies the code a lot and is also a step towards making this code more reusable.

Pull Request: https://projects.blender.org/blender/blender/pulls/147041
2025-09-30 14:39:18 +02:00
Clément Foucault
2bf86f840d Fix #146813: EEVEE: AO With Shader To RGB fails to compile
This is caused by the forward_lib including eevee_nodetree_lib
before eevee_ambient_occlusion_lib.

Fixed by splitting eevee_nodetree_lib into the part that is
needed for forward_lib so that eevee_nodetree_lib is only
included from eevee_nodetree_frag_lib and eevee_nodetree_vert_lib.

Pull Request: https://projects.blender.org/blender/blender/pulls/146987
2025-09-30 14:05:53 +02:00
Brecht Van Lommel
b92c96e39b Cleanup: Compiler warnings when building without fluids or openvdb
Pull Request: https://projects.blender.org/blender/blender/pulls/146996
2025-09-30 14:02:16 +02:00
Jacques Lucke
c0de8c40ee Fix: Nodes: double clicking to enter/exit node group not reliable
The issue was that the used operator just took the active node into account.
However, clicking in empty space does not make the active node inactive.
Therefore, sometimes clicking on empty space would sometimes remove enter the
last selected group node. Furthermore, double clicking on other nodes may also
trigger exiting the current group.

This is fixed by introducing a new operator that explicitly checks what node is
hovered.

Pull Request: https://projects.blender.org/blender/blender/pulls/147053
2025-09-30 13:30:49 +02:00
Jeroen Bakker
da39dc1da8 RenderDoc: Grouping of unit tests
This PR introduces grouping of the unit tests inside debug groups.
Previously a capture would contain a single test. But for performance
reasons multiple tests are run in a single process, making it unclear
which commands belong to which test.

This PR will add a debug group for each test that is run.

Pull Request: https://projects.blender.org/blender/blender/pulls/147046
2025-09-30 13:25:11 +02:00
Casey Bianco-Davis
fe2b834189 Grease Pencil: Add Set Corner Type to the point context menu.
This adds the `Set Corner Type` operator to the right click menu.

This was missed in #143688.

Pull Request: https://projects.blender.org/blender/blender/pulls/147013
2025-09-30 13:00:04 +02:00
Jeroen Bakker
0428afbfcc Fix: Debugging gpu tests in renderdoc
Step by step debugging of unit tests inside renderdoc didn't work as the
debug information wasn't included when running unit tests. This should
have been the case, but was broken when introducing
`--debug_gpu_compile_shaders` startup parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/147040
2025-09-30 12:54:35 +02:00
Jeroen Bakker
918edbcb4c Cleanup: Remove unused method
Pull Request: https://projects.blender.org/blender/blender/pulls/147038
2025-09-30 12:53:56 +02:00
Miguel Pozo
1d596082ce Fix #146194: Draw: Don't create duplis from temporary preview objects
Don't attempt to create duplilists from (preview) dupliobjects.
It may render the same instance multiple times, and leave dangling
pointers.

Pull Request: https://projects.blender.org/blender/blender/pulls/146988
2025-09-30 12:15:27 +02:00
Pratik Borhade
87f0d3c695 Fix #147014: Crash when manually typing object dimension
Caused by 8de2e6f9fb
Craah due to missing nullptr check for `layout` pointer.

Pull Request: https://projects.blender.org/blender/blender/pulls/147017
2025-09-30 11:57:27 +02:00
Habib Gahbiche
4f722eaae3 Compositor: "Copy" button duplicates node tree
Currently, the compositor template ID creates a new node tree. This is
inconsistent with other node editors where the button copies the node
tree.
Also use "New" in geometry nodes operator description instead of "Copy"

Pull Request: https://projects.blender.org/blender/blender/pulls/146222
2025-09-30 11:46:32 +02:00
Omar Emara
d75b8e5b6e Compositor: Make a distinction between inputs and passes
This patch makes a distinction between passes accessed through nodes
like the Render Layers node, and inputs accessed through nodes like the
Group Input node. Previously, the Group Input node returned the passes
of the active scene and view layer accordingly to the name, while now,
it only returns the Image (Combined) pass and the result will be zeros.

Pull Request: https://projects.blender.org/blender/blender/pulls/146831
2025-09-30 11:35:02 +02:00
Alaska
05840611d7 Fix #146551: Node wrangler treats warning nodes as unused nodes
Node wrangler has a "delete unused nodes" operator that will delete
nodes that do not contribute to the output of the node network.

Warning nodes, don't contribute to the output of the geometry nodes,
but it does output information to the Geometry nodes UI. So  warning
nodes should still be considered nodes that contribute to the output.

This commit adds warning nodes to the list of nodes that contribute
to the output to avoid them being deleted by the "delete unused nodes"
operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/146558
2025-09-30 11:34:50 +02:00
Pablo Vazquez
193e5935d0 UI: Do not use TitleCase in tooltips
Also don't use "Use" for a boolean label.
Following the HIG.
2025-09-30 11:32:06 +02:00
Lukas Tönne
8697bffe22 Fix #146946: Breaking a node zone crashes on valid pointer assumption
The Node Wrangler addon has a _Reset Nodes_ operator that can remove the input
node of a node zone. This crashes in reference set updates because the code
expects valid input/output node pairs in each zone.

The fix is two-fold:
1. Finding zones for the runtime now returns an empty result to ensure no
  invalid node pointers are being accessed. This should not happen in practice,
  all operators should make sure zone relationships are not broken.
2. The node wrangler addon is updated to ignore all zone types, including the
  newer repeat, closure, and for-each-element zones. The type filtering was
  outdated and now uses the `bl_idname` consistently.

Pull Request: https://projects.blender.org/blender/blender/pulls/147028
2025-09-30 10:49:20 +02:00
Falk David
cd40f5b0f1 VSE: Story Tools: Sync object modes when switching scenes
Currenty, when switching from one scene to another, the mode
of the active objects (before & after) is left untouched.

This becomes a workflow problem when trying to work across
different scenes. E.g. when opening the new "Storyboarding"
template and scrubbing to the next scene strip, the Grease Pencil
object is now in Object Mode, when in the previous shot it was
in Draw Mode.

To solve this, when syncing scenes try to change the mode of
the next active object to the mode of the previous active object
if the type of the object is the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/146981
2025-09-30 10:38:30 +02:00
Sybren A. Stüvel
acde9be6fd Fix: correctly update Actions when renaming/re-typing a custom property
Fix: correctly update Actions when renaming/re-typing a custom property

When renaming a custom property on a data-block, only update the
animation in a slot for that data-block. Previously all F-Curves were
updated, even when they were meant for other data-blocks.

This also handles the cases where the type of a custom property is
changed, and not just its name.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/146979
2025-09-30 10:23:20 +02:00
Campbell Barton
a59be80d38 Fix #146836: Auto merge not working in edit mode
Regression in [0] removed checks for indices referencing themselves
which need to be kept but can still be used as targets.

Restore this logic as well as fixing another problem (#147022)
where auto-merge would not merge into the nearest vertex, this
was especially noticeable then the threshold was set to a large value
but would happen at smaller values too.

[0]: bdae3e28a2
2025-09-30 17:37:17 +10:00
Jacques Lucke
d21f9fa07d Refactor: Geometry Nodes: extract function to draw panel content in modifier
Besides extracting a function, this also cleans up the construction of the rna_path.
2025-09-30 06:56:55 +02:00
Guillermo Venegas
083cc599f9 Fix: Wayland/IME accessing stale IME data
Guard IME data access to ensure stale IME data isn't used.

Ref !146834
2025-09-30 11:01:39 +10:00
Campbell Barton
ab4a66bd48 Cleanup: resolve pylint warnings 2025-09-30 10:45:29 +10:00
Sean Kim
a40d484b1a UI: Show preset controls for brush strength, size, and jitter curves
Toggles the new `show_presets` option on for the recently added brush
size, strength, and jitter curves across paint modes to allow users
to set these custom curves to any of the defined internal presets.

Pull Request: https://projects.blender.org/blender/blender/pulls/147000
2025-09-30 00:34:20 +02:00
Pablo Vazquez
41a1e871ef UI: Update editor descriptions
A long overdue pass on editor descriptions/tooltips.

Some editors used a variation of the editor name as description, while
others didn't even have one. In some editors their functionality
changed so use this opportunity to reflect this (UV for example,
no longer depends on "mesh editmode").

See PR for details.

Pull Request: https://projects.blender.org/blender/blender/pulls/146968
2025-09-29 23:24:49 +02:00
marcopavanello
390f053e32 Fix #146630: Single Scattering Sky has darker pixels near horizon
Store the ground fading of Single Scattering sky directly in the LUT.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/146659
2025-09-29 20:56:32 +02:00
Sean Kim
0f3c6da272 UI: Add preset curve buttons for curve mapping template
To support setting the custom `CurveMapping` to a well defined preset,
there exist a number of operators that are hardcoded to apply a
particular preset to a particular curve.

This commit begins to replace this functionality and make it part of the
template itself, allowing the preset to be applied to any curve. For
now, it only supports either positive or negative slopes, primarily for
the brush usecases.

The `brush.curve_preset` and `brush.sculpt_curves_falloff_preset`
operators are unneeded after this change and have been removed.

Notably, these preset controls have not been added elsewhere, they can
be added on a case by case basis in future commits by interested
modules.

Pull Request: https://projects.blender.org/blender/blender/pulls/146847
2025-09-29 20:11:29 +02:00
Sean Kim
af8cb99b10 Paint: Add asserts for BKE_brush_curve_strength
Neither the `distance` or `brush_radius` parameters make sense to be
negative and can cause odd behaviors.

Pull Request: https://projects.blender.org/blender/blender/pulls/146698
2025-09-29 19:13:56 +02:00
Brecht Van Lommel
b168a96083 Refactor: Use enum class instead of bool video
Pull Request: https://projects.blender.org/blender/blender/pulls/146888
2025-09-29 19:01:39 +02:00
Brecht Van Lommel
df12a448ba Color Management: Save and load HDR images with 203 nits
Based on extensive testing, this gives matching HDR brighness across most
application, with both PNG and AVIF. Video remains at 100 nits as that
appears to tbe convention there.

This is implemented by adding two modified PQ and HLG color spaces to the
OCIO config on startup, and for the specific cases of image save and loaded
these will replace the regular PQ and HLG color spaces.

This was chosen rather than adding them as color spaces in the OCIO config,
so that it can work for any config with appropriate interop IDs, including
the ACES config. Additionally, it would be unclear how to make this work with
view + display transforms, we wouldn't want to burden the users with having
to pick a different display depending if they are saving images or video.

Ref #145855, #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/146888
2025-09-29 19:01:33 +02:00
Jacques Lucke
ae2034e6c5 Attributes: make id attribute generic instead of built-in
The "id" attribute was built-in on curves (point domain), mesh (point domain)
and instances, but not on e.g. point clouds. This mismatch causes issues because
of the special rules regarding built-in attribute propagation. Furthermore, an
implication of this was that the id attribute had to be an integer attribute on
a specific domain, which is not always ideal.

This patch turns the id attribute into a normal generic attribute, except that
some nodes internally modify this attribute in special ways. This may cause some
compatibility breakage in rare cases, but that can generally be easily fixed by
either removing the id attribute or setting it explicitly on the right domain. I
can't think if a feasible way to avoid this unfortunately.

The internal special cases for the id attributes are generally skipped unless
the attribute is an integer attribute on the point/instance domain.

Pull Request: https://projects.blender.org/blender/blender/pulls/146941
2025-09-29 18:47:51 +02:00
Jacques Lucke
1ffa0c4648 Nodes: support searching for group inputs
This simplifies finding where a specific Group Input is used in a node group.
It extends what was added in #146882.

Pull Request: https://projects.blender.org/blender/blender/pulls/146992
2025-09-29 18:34:18 +02:00
Jacques Lucke
01ccf31d20 Fix: Nodes: propagated menu expanded state to group input
Previously, when a new group input was created from an expanded menu
socket, the expanded flag was not set on the group input.
2025-09-29 18:28:20 +02:00
Sean Kim
baa0bd6fbb Fix: Grease Pencil Sculpt shows dropdown toggle for size curve
Introduced in 5b02341a11

Pull Request: https://projects.blender.org/blender/blender/pulls/146778
2025-09-29 18:24:51 +02:00
Sean Kim
5ec5572a21 UI: Add dropdown toggle for grease pencil pressure curves
Follow up to 5b02341a11

Pull Request: https://projects.blender.org/blender/blender/pulls/146776
2025-09-29 18:22:29 +02:00
Casey Bianco-Davis
d4f84619ea Grease Pencil: Add new Corner Types
This adds three corner types: `Round` `Sharp` and `Flat`.
These control how the corner of `Grease Pencil` line strokes are rendered.

- The `Round` type draws circular arcs, and is what `Grease Pencil`
   currently supports and is default.
- The `Flat` type cuts off the tip of the corner.
- The `Sharp` type allows for sharp corners to be created.
  If the angle is sharper than `Miter Limit` then the tip will be cut like `Flat`

These three types match the main types of `line joins` present in `SVG`
files.

This data is stored in one `Point` attribute called `miter_angle`.
This stores both the `Corner Type`, the `Miter Limit` and defaults to
the `Round` type.

This PR adds:
- Rendering of the corner types.
- An operator for setting the `Corner Type` and `Miter Angle` attribute.
- Corner types to the `Outline` operator and modifier.

Part of #145380.

Pull Request: https://projects.blender.org/blender/blender/pulls/143688
2025-09-29 18:19:05 +02:00
Jacques Lucke
e53f0066f9 Fix #146409: nested shader node outputs are ignored
This was supported before, and was accidentally removed in 32c301e3cf. This
patch brings back support for nested shader node outputs. Only rule is that they
must not be in a zone.

Pull Request: https://projects.blender.org/blender/blender/pulls/146983
2025-09-29 18:17:35 +02:00
Jacques Lucke
ef92735a95 Nodes: support optional labels for group inputs
Built-in nodes already used the functionality to hide the input labels in a few
situations. However, this functionality was not exposed for node groups before.
It required some refactoring to get the semantics of the flag right. The tricky
aspect is that "Hide Label" would be an incorrect name, because the label is
still shown under various circumstances. Instead, the flag merely indicates that
drawing code may skip drawing the label.

This adds a new "Optional Label" input for node group inputs. Other names are
possible like "Requires Label" which would be the inverse.

Overall the implementation is pretty straight forward after
1f489ea31a,
469a70dba9 and
f79896f5b9.

Pull Request: https://projects.blender.org/blender/blender/pulls/146939
2025-09-29 18:14:41 +02:00
Simon Thommes
6f16a0805f Geometry Nodes: Fixes to essentials assets
Merge changes from blender/blender-assets#29 :

- Fix warning 'No Curve Selected' showing constantly in all shape modes.
- Fix radius extrapolation to work for round/custom profiles on both curve ends.
- Fix merging custom profile round caps to work on both curve ends.

Pull Request: https://projects.blender.org/blender/blender/pulls/146991
2025-09-29 18:10:00 +02:00
YimingWu
5cde024fc9 Fix #146413: Truncate socket names only if space is present after prefix
In 95259228d9 an optimization was made to
simplify geometry nodes socket names on panels when they contain the
exact group title as prefix, but this leads to issue where `Opening` can
be truncated as `ing` which is not desired. Now will check if a space
character is present after the prefix, then do the truncation.

Note that this implementation still doesn't truncate `CamelCase` or any
CJK name strings because they don't use the space character as
separator.

Pull Request: https://projects.blender.org/blender/blender/pulls/146973
2025-09-29 17:37:17 +02:00
Jacques Lucke
02bdc709c2 Shader Nodes: support Menu Switch node
This implements the Menu Switch node in shader nodes. It's the same node that is
used in Geometry Nodes and the Compositor.

The Menu Switch node is purely handled during preprocessing and thus builds on
top of #141936. Hence, it's input has to be a single value, just like the
iteration count for repeat zones. This limitation can be lifted in the future,
but currently there is no way to produce a non-single menu value in shader
nodes. This will become possible if other Switch nodes are added though.

Pull Request: https://projects.blender.org/blender/blender/pulls/146896
2025-09-29 17:26:38 +02:00
Hans Goudey
d75808fdf0 Fix: Node editor drawing stack use after scope
Caused by a bad conversion to StringRef in 950a2bb8a3.
Instead pass around StringRef since that's all that's needed by the UI code
anyway. And make the argument to the node socket drawing RNA function
clearer, previously it relied on the char pointer being first in StringRefNull.

Pull Request: https://projects.blender.org/blender/blender/pulls/146985
2025-09-29 17:24:50 +02:00
Clément Foucault
1cb373e980 Fix: EEVEE: Reversed condition in metallic BSDF optimization
This is a mistake from 0517e90233.
2025-09-29 17:24:16 +02:00
quackarooni
99b47b72aa Nodes: Remove "Swap" menu from editor header
Relocated the "Swap" menu from the header to inside of "Node" menu.
As it wasn't deemed ideal to put such a menu at the root level of the header.

Pull Request: https://projects.blender.org/blender/blender/pulls/146964
2025-09-29 17:22:15 +02:00
Pablo Vazquez
b5a6587ef9 Cleanup: Make format 2025-09-29 17:15:04 +02:00