Commit Graph

4056 Commits

Author SHA1 Message Date
Campbell Barton
3165ab2933 Cleanup: duplicate field warning, trailing space 2025-10-02 07:49:07 +10:00
hogan.mastanduno
dde9d21b91 OpenXR: VR Advanced Locomotion Phase 1
Includes the following changes to the existing Locomotion system for VR Scene Inspection:
 * new VR Navigation Preferences and VR Session Settings
 * changes to XR raycast logic and its visualization
 * new XR vignette that appears when moving
 * snap turning

Pull Request: https://projects.blender.org/blender/blender/pulls/144241
2025-10-01 22:16:12 +02:00
Hans Goudey
a774ebd5af Geometry Nodes: Field to Grid Node
The purpose of this node is to create a grid with new voxel values on
the same grid topology as an existing grid. The new values are the
result of field evaluation. Multiple grids can be created at the same
time, so that intermediate results used for multiple grids can be
efficiently reused during evaluation. This is more efficient than the
"Volume Cube" node, for instance, because the output grid shares the
sparseness of the input topology grid.

Pull Request: https://projects.blender.org/blender/blender/pulls/147074
2025-10-01 18:40:49 +02:00
Sean Kim
9f755b6b01 Cleanup: Remove unused icon keyword argument
This value was never passed in and effectively hardcoded to `'NONE'`

Pull Request: https://projects.blender.org/blender/blender/pulls/147093
2025-10-01 18:08:35 +02:00
Simon Thommes
43fbbc95bc Modifiers: Add icons to remaining modifier assets in Generate category
This adds new icons for the remaining two modifier Essentials assets
bundled with Blender in the `Generate` category.
(`Curve to Tube` and `Scatter on Surface`)

Pull Request: https://projects.blender.org/blender/blender/pulls/147115
2025-10-01 15:50:34 +02:00
Habib Gahbiche
fb7818e55e Python: Create default node tree for new materials and worlds
The motivation is to keep backward compatibility after deprecating
 `material.use_nodes()` and `world.use_nodes`. For example the
following script would behave the same way in 4.5 and 5.0:
```python
mat = bpy.data.materials.new("My new mat")
mat.use_nodes = True
```

Pull Request: https://projects.blender.org/blender/blender/pulls/147052
2025-10-01 15:05:16 +02:00
Richard Antalik
698268f927 VSE: Remove transform effect
Functionality has been replaced by strip transform properties. Transform
strips in existing files will be replaced with gaussian blur with radius
of 0 to preserve modifiers and overall strip stack.

Pull Request: https://projects.blender.org/blender/blender/pulls/147003
2025-10-01 13:37:54 +02:00
Habib Gahbiche
5c58e29bd2 Fix: Motion Tracking: Clip->Setup Tracking Scene broken
Using the operator caused Python exceptions. The reason was the script
was not updated after the recent breaking changes in the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/147109
2025-10-01 11:48:51 +02:00
Brady Johnston
8b3be68b3d Geometry Nodes: new Join Bundle Node
Adds a Join Bundle node with a multi-input Bundle socket. Bundles are
iterated on the top level of each input bundle and items added to the resulting
single bundle. While creating the final bundle existing items have priority and
new items with an already existing name are discarded.

There is an info message when there are duplicate keys in the input bundles.

Co-authored-by: Brady Johnston
Co-authored-by: Jacques Lucke
Pull Request: https://projects.blender.org/blender/blender/pulls/146750
2025-10-01 09:20:11 +02:00
Campbell Barton
4199e4b9c0 Cleanup: remove outdated TODO's in space_view3d_toolbar.py
Since adding this TODO, the panels can be shown from the tool-header,
properties editor & active tools tab, so there isn't a good reason to
move them to space_view3d.py. Remove the TODO comments instead.
2025-10-01 16:03:18 +10:00
Sean Kim
0a72429ea8 UV Sculpt: Rename strength_curve and curve_preset
Similar to 327a1925cf

* Renames `strength_curve` to `curve_distance_falloff`
* Renames `curve_preset` to `curve_distance_falloff_preset`

These changes are done for consistency with the other concepts in the
other paint modes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147071
2025-09-30 20:57:19 +02:00
Ramon Klauck
412b5b3b3f Fix: VSE: Propagate split to connected strips by default
Currently, attempting to split connected strips that are not both
selected means that only one of the strips are affected.  This violates
the "connected" principle, so this PR makes the split operator propagate
the split to connected strips by default. Holding alt returns old
behavior (ignores connections), similar to selection logic.

Pull Request: https://projects.blender.org/blender/blender/pulls/146380
2025-09-30 18:12:12 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Brecht Van Lommel
7147227a40 Python API: Make context.tool_settings never null
Since 1122a05cb6 tool settings could return None, but we do not check this
consistently in scripts. Now always return some tool settings, since it's difficult
to verify and easy to forget proper null checks in e.g. operator poll functions.

The sequencer UI code was updated to continue showing tool settings only when
there is a sequencer scene.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146166
2025-09-29 16:54:40 +02:00
Sean Kim
15ddff12d4 UI: Grey out 'Show Object Origins' option in paint modes
The overlay is not shown in any of these modes, grey out the option
to better indicate to users that it is expected to have no effect.

Part of #93501

Pull Request: https://projects.blender.org/blender/blender/pulls/146876
2025-09-29 16:48:35 +02:00
Hans Goudey
59aa61b8be UI: Interleave essentials modifiers in "Generate" menu
Hardocde the position of the essentials assets in the menu,
for consistent alphabetical order and a clearer indication of
the different between the nodes and builtin "Array" modifiers
(the old one is now called "Array (Legacy)").

Pull Request: https://projects.blender.org/blender/blender/pulls/146887
2025-09-29 16:37:35 +02:00
Alaska
6c56289f43 Fix #146679: Node wrangler connects bump maps to filter width
This commit fixes a issue where the node wrangler addon would connect
bump mapping textures to the filter width input of the bump node,
instead of the height input.

Pull Request: https://projects.blender.org/blender/blender/pulls/146684
2025-09-29 16:18:15 +02:00
Jacques Lucke
f025637e3b Nodes: new operator to join Group Input nodes
This adds a new operator which can join multiple nodes together. Currently, it
only supports joining Group Input nodes. However, in the future it could be
extended to join e.g. Bake and Capture Attribute nodes.

This uses the recently freed up ctrl+J shortcut for this functionality, which
feels natural to me.

The implementation is fairly straight forward. The main tricky aspect is
sometimes the nodes can't be joined when that would result in two sockets being
linked to each other twice. In this case, the a separate Group Input node is
kept.

The selected nodes are merged into the active node (in case the active node is
part of the selection, otherwise there is a fallback).

Pull Request: https://projects.blender.org/blender/blender/pulls/146894
2025-09-29 13:58:27 +02:00
Casey Bianco-Davis
e8bb5a6558 Python: Rename IDType_ID_GP.name_plural to grease_pencils
This renames `IDType_ID_GP.name_plural` for Grease Pencil from
`grease_pencil_v3` to `grease_pencil`.

Part of #125058.

Pull Request: https://projects.blender.org/blender/blender/pulls/146903
2025-09-29 12:33:42 +02:00
Casey Bianco-Davis
d2269441bb Python: Rename bpy.data.grease_pencils_v3 to bpy.data.grease_pencils
This renames `bpy.data.grease_pencils_v3` to `bpy.data.grease_pencils`.

Part of #125058.

Pull Request: https://projects.blender.org/blender/blender/pulls/146904
2025-09-29 12:32:08 +02:00
Nika Kutsniashvili
1067112c11 UI: Theme: Remove "Active Spline" theme property
In 3D Viewport theme settings there is "Active Spline" property, which behaves weirdly.
Color of that property is multiplied to color of curve handles. Even though it says active,
it's multiplied in selected and unselected states, for all curves all the time.

That doesn't make much sense, has no real value, and ends up only causing confusion.
Having this property on anything but pure black means that whatever colors you choose
for curve handles in Preferences isn't actually what you're getting them. If color is set to
high-saturation color it completely washes away all colors and makes it difficult to differentiate
between handle types.

I think there is no reason for this property to exist, so this PR just removes that property.

Pull Request: https://projects.blender.org/blender/blender/pulls/145360
2025-09-29 12:27:16 +02:00
Casey Bianco-Davis
f8d2a3af38 Python: Rename bpy.types.GreasePencilv3 to bpy.types.GreasePencil
This renames python Grease Pencil type
from `bpy.types.GreasePencilv3` to `bpy.types.GreasePencil`.

Part of #125058.

Pull Request: https://projects.blender.org/blender/blender/pulls/146902
2025-09-29 12:25:23 +02:00
Damien Picard
417792f7fe I18n: Define NO_TRANSLATION ("Do not translate") context
This new translation context is for some special cases when
translation cannot be avoided, for example in an interface where some
props are built-in (translatable) and others are
user-defined (non-translatable), but we don't know which ones in
advance.

It allows specifying explicitly that translation should not occur
for user data when building the UI.

It is a followup to !145963, in which the context was introduced as a
string literal instead of a defined context.
2025-09-29 11:07:03 +02:00
Damien Picard
4e034b5ecb I18n: Improve message extraction for node socket declaration
Node sockets could already be declared using:

```cpp
add_input<decl::<SOCKET TYPE>>("NAME")
```

They can now additionally be declared with:

```cpp
add_input(socket_type, "NAME")
```

This commit adds the later form to the message extraction regex. Since
they are mutually exclusive, they are now in a non-capturing group
with an | operator.

Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
fb2f5b3a64 I18n: Translate dynamic enum items from glTF exporter
These dynamic enum items cannot be extracted automatically, so mark
them manually.

Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
263bc0d5cd I18n: Translate Node Wrangler shortcut list in add-on preferences
Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
0ef4320362 I18n: Translate "Subprocesses" label in System preferences
Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
6983b97640 I18n: Translate newly-created node group names
Reported by Ye Gui in #43295.
2025-09-29 11:07:03 +02:00
Damien Picard
8abd92caf0 I18n: Translate file working colorspace operator menu in properties
The items in this operator menu are extracted using the default
translation context, so this commit changes the UI to use the same
context.
2025-09-29 11:07:03 +02:00
Damien Picard
285c1ee8bb I18n: Get displays, views, looks, colorspaces info from OCIO config
This extracts the names and descriptions for displays, views, and
colorspaces. They are all used in the different parts of the UI.
The views' descriptions are used for the displays'.

The extraction uses the built-in PyOpenColorIO module. This ensures
only data that is actually used is extracted (not ignored in the
config).
2025-09-29 11:07:03 +02:00
Julien Duroure
7e0566b26e glTF: deprecation of use_nodes
use_nodes is now deprecated in Blender 5.0

- Remove check checks
- Remove all nodes before creating the node tree is no more needed : these nodes are no more created at material creation
2025-09-29 10:49:59 +02:00
Pablo Vazquez
65999a1b03 Template: Minimum updates to VFX template
Implements #146360

Update VFX template with minimum changes:
- Replace Timeline with DopeSheet footer.
- Save (with compression). 525kb → 92kb

All changes were done on a release build at 1920x1080, without a
preferences folder.

See PR for details and screenshtos.

Pull Request: https://projects.blender.org/blender/blender/pulls/146851
2025-09-29 10:45:44 +02:00