Commit Graph

887 Commits

Author SHA1 Message Date
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
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
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
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
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
Julien Duroure
a673c627e5 Fix #142767 - glTF exporter: Fix crash with shader node group traversal
Make sure to pass group_path by value in recursive function
2025-09-29 10:43:38 +02:00
Brecht Van Lommel
78ae7ec392 Render: Rename render passes for clarity
In very old OpenEXR version there was a limit on the channel names, which meant
the pass names needed to be short like "DiffDir". Change them to be longer like
"Diffuse Direct".

* This breaks forward compatibility. Old Blender version will lose links when
  reading compositing node setups with such passes, but #146571 will fix it
  for 4.5 LTS.
* Add-ons, scripts and compositing setups in other applications that rely on these
  names will also break.
* The find_by_type function for render passes has also been removed, as this was
  already deprecated and replaced by find_by_name.
* We assume spaces in the name are ok, since we have passes with them already
  and have not seen reports about compatibility issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/142731
2025-09-25 18:04:14 +02:00
quackarooni
2a1a658492 Nodes: Swap Node Operator
Implement a native method to swap between different node and zone types.

This implementation repurposes the existing menu definitions as base
classes, from which both an "Add" and a "Swap" version would be generated
from. This allows both menus to have the same layout, but use their own
operators for handling the different node/zone types.

In this PR, support for all node editors has been implemented.

Invoking the menu is currently bound to `Shift + S`, same as the old
implementation in Node Wrangler. Since "Swap" is implemented as a
regular menu, features that menus already have such as type-to-search
and adding to Quick Favorites don't require any extra caveats to
consider.

Resolves #133452

Pull Request: https://projects.blender.org/blender/blender/pulls/143997
2025-09-25 16:12:02 +02:00
Damien Picard
da92614fd2 Fix: Node Wrangler: Error in Merge Nodes when only one node selected
Running Node Wrangler's Merge Nodes operator on only one node
resulted in an error. It was introduced in commit db39daf9e7.

That commit assumed that `l[len(l)-2]` and `l[-2]` were the same, but
they are not when `len(l) == 1`. In that case, the former is valid but
the latter is not.

This commit fixes the error by checking how many nodes are selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/146361
2025-09-25 14:52:47 +02:00
Sybren A. Stüvel
e1b6cc2404 Anim: imported action slot named "Slot" when importing BVH/FBX files
Always name the imported action slot "Slot" when importing BVH and FBX
files, for ease of switching between imported Actions.

Note: this is only adjusting the old Python-based FBX importer.

Previously the slot would be named after the file itself (BVH) or had a
combination of the animated object, the animation "stack", and the
animation "layer" (FBX). This meant  that every imported animation would
get another slot name, making Action switching tedious.

Pull Request: https://projects.blender.org/blender/blender/pulls/146601
2025-09-23 15:19:55 +02:00
Julien Duroure
9f3770b949 Fix #142867 - glTF importer: Fix crash trying to import an empty glTF scene 2025-09-21 11:26:48 +02:00
Habib Gahbiche
1b4daf9d2e Nodes: remove "Use Nodes" in Shader Editor for Object Materials
"Use Nodes" was removed in the compositor to simplify the compositing
workflow. This introduced a slight inconsistency with the Shader Node
Editor.

This PR removes "Use Nodes" for object materials.

For Line Style, no changes are planned (not sure how to preserve
compatibility yet).
This simplifies the state of objects; either they have a material or
they don't.

Backward compatibility:
- If Use Nodes is turned Off, new nodes are added to the node tree to
simulate the same material:
- DNA: Only `use_nodes` is marked deprecated
- Python API:
  - `material.use_nodes` is marked deprecated and will be removed in
6.0. Reading it always returns `True` and setting it has no effect.
  - `material.diffuse_color`, `material.specular` etc.. Are not used by
EEVEE anymore but are kept because they are used by Workbench.

Forward compatibility:
Always enable 'Use Nodes' when writing blend files.

Known Issues:
Some UI tests are failing on macOS

Pull Request: https://projects.blender.org/blender/blender/pulls/141278
2025-09-14 17:53:54 +02:00
Damien Picard
ddbc6ed858 I18n: Allow translation of some messages using string formatting
- Add `iface_` translation functions and `translate=False` to a few UI
  elements.
- Add `rpt_` translation functions to a few reports.
2025-09-12 18:30:56 +02:00
luz paz
072f956ce0 Cleanup: Fix typos in scripts subdirectory
Fix spellings from comment and string
Found via codespell

Pull Request: https://projects.blender.org/blender/blender/pulls/145834
2025-09-11 11:29:06 +02:00
Ido-Shahar
1df4aa4e11 Nodes: Node Wrangler: Support for string sockets in merge operator
Added support for string sockets in `nw_merge_nodes`, results in
creating "Join Strings" node. Note that the code is slightly different
from most socket types since String Join has a multi-input socket,
but the behaviour is pretty much identical to Geometry sockets with
Join Geometry.

Pull Request: https://projects.blender.org/blender/blender/pulls/145507
2025-09-04 17:01:20 +02:00
quackarooni
0545fba54f Nodes: Node Wrangler: Use socket icons for Lazy Connect menu
Replace the icons for the "From Socket" and "To Socket" pop-up menus from
`RADIOBUT_OFF` and `FORWARD`, to each socket type's corresponding icon.
This makes it easier to pick out sockets in longer lists, as they could now be
distinguished by their color.

Video and images in PR

Pull Request: https://projects.blender.org/blender/blender/pulls/145648
2025-09-03 13:07:49 +02:00
Julien Duroure
6f8978c71a Fix #144980 - glTF - Fix importing empty glTF files, without nodes or scenes 2025-09-02 17:19:37 +02:00
Demeter Dzadik
eb4c22c0a4 Copy Global Transforms: SKIP_SAVE on paste
Add the `SKIP_SAVE` option to the 'Paste Global Transform' operator
properties.

This fixes a bug with following repro steps:
- Specify a relative object
- Use relative copy/paste
- Try to use non-relative copy/paste
- It will fail because after you used the relative paste operator, the
  `use_relative` property is saved for ever as True.

Pull Request: https://projects.blender.org/blender/blender/pulls/145262
2025-09-01 15:21:09 +02:00
Julien Duroure
a2614464e5 glTF importer: add comment after recent changes 2025-08-29 16:45:45 +02:00
Julian Eisel
5669adf7e6 Fix #145388: Pose library breaks double-click in file browser
The pose library registered a double-click keymap item for the file
browser keymap, because that was the only way to add keymap items to the
asset browser (which is just the file browser under the hood). Since
450f428434, the pose library apply & blend operators are available in
more contexts, since their check for an active asset was moved from the
operator poll to the operator execution. So the pose apply operator
would end up triggering.

The poll function could be adjusted somehow to return false in this
case, e.g. by checking if it's executed from a file browser (not an
asset browser).

However, the operator should be independent of where it's called from.
So instead this registers a separate keymap for the asset browser, so
the pose library operators can be registered exclusively for the asset
browser.
2025-08-29 14:58:40 +02:00
Pasang Bomjan
0056784996 Nodes: Node Wrangler: Make Lazy Connect without menu to only consider visible sockets.
When using `Lazy Connect`, the operator currently also considers sockets that are hidden.
This causes unintentional socket connections and requires to use the operator with the
menus for manually picking sockets which is slower and defeats the purpose.

Videos in PR.

This PR fixes that by not considering the hidden sockets.

Pull Request: https://projects.blender.org/blender/blender/pulls/145316
2025-08-28 12:52:31 +02:00
Julian Eisel
450f428434 Fix #143699: Pose library asset shelf does not apply poses
This was quite involved to get to work. Basic idea is to make
`bl_activate_operator` work for the pose library asset shelf, and
introducing a `bl_drag_operator` for blending poses.

- Make pose asset operators take an asset reference, which is how
  `bl_activate_operator` usually gets the asset to operate on. This way
  poses references can be assigned to a shortcut, identified by asset
  library and relative asset path within the library. Falls back to
  getting the asset from context.
- Trigger `bl_activate_operator` on every click, instead of only when
  an un-active item becomes active. Needed so poses can be re-applied
  as before.
- Fix button context not passed to the `bl_activate_operator` when
  force-activating, e.g. on right-click events.
- Allow registering a `bl_drag_operator` in the asset shelf definition.
  Executed when dragging an asset in the shelf.
- When dragging an asset, highlight it as active, without calling the
  `bl_activate_operator`. This is important feedback to the user.
- Activate/select view items on click instead of drag, so dragging is
  possible.
- Let pose applying operators handle the Ctrl key to apply poses
  flipped. There's no simple way to attach such alternative behaviors
  to `bl_activate_operator`/`bl_drag_operator`
- Remove keymap items that were there for the previous "hacky" solution
  to apply & blend poses.

Pull Request: https://projects.blender.org/blender/blender/pulls/144023
2025-08-28 12:04:31 +02:00
Eqkoss / T1NT1N
5658b408df Lights: Rename Spot Size to Beam Angle in UI
This is more consistent with other naming of angles in the user interface,
and more clear.

The identifier has not changed, so no API compatibility is broken.

Fix #144527

Pull Request: https://projects.blender.org/blender/blender/pulls/144661
2025-08-22 16:47:50 +02:00
Oxicid
b1d9a91647 FBX: Add material name collision mode
Introduces the Material Name Collision option, similar to how
USD / OBJ importers have it.

Pull Request: https://projects.blender.org/blender/blender/pulls/144375
2025-08-15 15:04:36 +02:00
Bastien Montagne
780b8ee415 Fix #144592: FBX exporter: Invalid memory access when exporting tangents.
Since the tangent attributes are now recomputed inside the loop over uv
layers, looping directly over this mesh data is dangerous, as computing
the tangents attributes might trigger some re-allocations, leading to
invalid memory accesses when accessing the next uv layer.

Solved by caching uv layers' names in a list beforehand, the uvlayers
themselves are not even needed for tangent data handling.

Regression from e0a9e98cbd.
2025-08-15 12:29:28 +02:00
Campbell Barton
729b76f454 Cleanup: use str.format to format strings in Python
Also replace redundant `{!s}` with `{:s}`.
2025-08-12 10:21:38 +10:00
Damien Picard
5998795aa6 UI: Replace contractions with long-form text
Avoid using contractions for can't, aren't, doesn't, and shouldn't.
Following the writing style guide in the Human Interface Guidelines.

Pull Request: https://projects.blender.org/blender/blender/pulls/143852
2025-08-05 11:16:22 +02:00
Nika Kutsniashvili
7158e02aed Modeling: Set shape key default value to 1.0
When adding a shape key, set its blend value to 1.0 / 100%.

There is no practical use case where user wants to add shape key but
not work on it. New shape keys at value 0 have no purpose. Adding
shape key should be interpreted by Blender as user wanting to
sculpt/model on it. Also, being at 1.0 initially doesn't change
anything visually, because key isn't edited yet and it doesn't deform
mesh.

The default value of the shape key is also set to 1.0. When using
right-click to reset values, user most often wants to return to 1
(which is "correct" state of deformation without multiplication)
rather than 0 (which is no deformation at all).

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133399
2025-08-01 15:43:31 +02:00
Campbell Barton
2c27d2be54 Cleanup: grammar corrections, minor improvements to wording 2025-08-01 21:41:24 +10:00
Falk David
4a36f5b2dc Fix: Rigify: Wrong type in create_object_data for Grease Pencil
The code was using the legacy Grease Pencil data type
in `create_object_data`. For the object type `GREASEPENCIL` we should
be using `bpy.data.grease_pencils_v3`.

Pull Request: https://projects.blender.org/blender/blender/pulls/142335
2025-08-01 13:35:10 +02:00
Brecht Van Lommel
eb8dc8f535 Fix: Operator, app template and benchmarking script errors after media type
Always set the media type before the file format.

Ref #142955

Pull Request: https://projects.blender.org/blender/blender/pulls/143433
2025-07-28 11:55:11 +02:00
Aaron Carlisle
60bd15ca40 Core: Add-ons: Display Maintainer as "Blender Foundation"
The author field is displayed in the UI as "Maintainer",
most of the original authors are no longer active or are part of the foundation.
Since the core add-ons are maintained the same as the rest of Blender they should be shown accordingly.

The exceptions here are the GLTF and Hydra add-ons; these Khronos Group and AMD are included as maintainers.

The orginal author field is preserved in the chance the add-on looses it's "core" status.

Pull Request: https://projects.blender.org/blender/blender/pulls/140690
2025-07-26 03:42:15 +02:00
Omar Emara
e34e6373b6 Compositor: Replace Composite node with Group Output node
This patch replaces the Composite node with the Group Output node as the
primary compositor output. The old node was removed and versioned. This
was done for consistency with Geometry Nodes and in preparation for more
generic use of the compositor in VSE modifiers, layered compositing, NPR
multi-stage compositing, and more.

The Group Output node relies on the node tree interface, so we now have
a default interface of a single input and a single output. For now, only
the first input is considered while the rest are ignored, just like the
Geometry Nodes design. Furthermore, the input is required to be of type
color. Warnings and errors are issues if any of those are not met, also
similar to Geometry Nodes.

This introduces a new limitation: Composite outputs can no longer exist
in node groups, since they obviously then act as their respective group
outputs.

A refactor for the compositor scheduler is needed to simplify the logic
after this change, but this will be done in a separate patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/142232
2025-07-24 13:41:56 +02:00
Campbell Barton
0442a9fe0a Extensions: clarify the identifiers must "Python" id's in the error
Without this, it's not clear what a "valid identifier" means,
ref: #136517.
2025-07-24 18:29:36 +10:00
Campbell Barton
e5947bdf63 Cleanup: spelling (make check_spelling_*)
Also exclude some files that have too many false positives.
2025-07-20 14:59:19 +10:00
Campbell Barton
eee549f882 Docs: add readme for extensions
This intends to give an overview of the extensions implementation.

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>

Ref !134785
2025-07-17 03:20:16 +00:00
Campbell Barton
989af38c93 Docs: add some code-comments regarding the default exclusions 2025-07-17 13:11:43 +10:00
Nika Kutsniashvili
169dbdd60f Extensions: exclude backup blend files when building an extension
Ref !142091
2025-07-17 13:11:29 +10:00
Campbell Barton
d15e7b17aa Fix #142009: Extensions/Addon Tags not showing (property not found)
Changes to the Python API [0] broke the extension tags popover
which relied on RNA properties also having ID property access.

Replace the ID property based tags with a collection.

[0]: 7276b2009a
2025-07-16 13:29:42 +00:00
Campbell Barton
bf7dd85818 Cleanup: remove redundant imports 2025-07-16 23:19:30 +10:00
Campbell Barton
19ee3932c3 Fix #141948: No error on arbitrary assignments to PropertyGroup
Declare `__slots__` to prevent arbitrary assignment.
2025-07-16 17:44:06 +10:00
Denis Meyzer
e0a9e98cbd Fix: Only last tangents layer is exported to fbx when mesh has multiple uv layers
Only last tangents layer was written to all tangent layers before this fix.

Code before fix evaluate tangents for all layers into mesh loops data (which keeps data only for one layer) and then writes information about 'each' layer which is actually only the last one.
Code after fix evaluates tangents in the beginning of the loop that exports tangent data so that data for correct layer is being written into fbx.

Co-authored-by: Andrey Zhitkov

Pull Request: https://projects.blender.org/blender/blender/pulls/141839
2025-07-14 10:36:46 +02:00
Damien Picard
db39daf9e7 Fix: Node Wrangler: Various fixes and cleanup
Fix error in Attributes menu in World shading mode

Node Wrangler's Attributes menu allows direct addition of attributes
to a shading node tree. It only works on objects, not World, since the
latter does not store attributes.

Fix: Update Merge Nodes operator for new node types

Nodes were deduplicated between node modes (shading, compositing,
geometry) in Blender 5.0. This commit aligns Node Wrangler's Merge
Nodes operator to the new node types.

Cleanup
- Remove unused import and variables
- Merge Nodes Operator
  - Use negative list indices instead of length - index.
  - Chain conditions instead of nesting them.

Pull Request: https://projects.blender.org/blender/blender/pulls/141508
2025-07-11 15:25:06 +02:00
Philipp Oeser
6d900f841f Merge branch 'blender-v4.5-release' 2025-07-11 13:18:42 +02:00
Jesse Yurkovich
6df4c14e4b Fix #141760: FBX export inadvertently modifies color property on lights
Broken with commit a12bce039f

The Blender `Color` type is treated as a reference in Python. Make a
`.copy` to ensure that changes are not made to the actual scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/141762
2025-07-11 10:17:07 +02:00
Julien Duroure
dcd8d4423d Merge branch 'blender-v4.5-release' 2025-07-09 09:46:26 +02:00
Julien Duroure
100ed60f2d Fix: Importer can fail with blender file browser recursive option enabled
The files property, provided by the blender file browser, contain
paths relative to the directory property. Use that instead of using
the filepath parent directory.
2025-07-09 09:44:10 +02:00
Jesse Yurkovich
39215f00a4 Merge branch 'blender-v4.5-release' 2025-07-07 14:24:55 -07:00
Guillermo Venegas
2cf0c63461 Fix #140942: FBX importer fails when using file browser recursive option
The `files` property, provided by the blender file browser, contain
paths relative to the `directory` property. Use that instead of using
the file's parent directory.

Pull Request: https://projects.blender.org/blender/blender/pulls/141575
2025-07-07 23:24:26 +02:00