Commit Graph

38 Commits

Author SHA1 Message Date
Damien Picard
09f9edb38c I18n: Translate "Hide Hotkey List" in Node Wrangler preferences
The button used a custom text that could be the same as the default,
properly extracted text ("Show Hotkey Text"), or a different
one ("Hide Hotkey Text"), and was thus not always shown.

Reported by Ye Gui in #43295.
2025-10-09 12:09:56 +02:00
quackarooni
f7c37b05e4 Fix: Node Wrangler: "Add Reroutes" operator creates new sockets for certain nodes
The "Add Reroutes" operator does not ignore virtual sockets when creating reroutes.

This has the unintended side effect of creating new sockets when attempting to link with said sockets.
This patch adds a check that explicitly skips over them.

Pull Request: https://projects.blender.org/blender/blender/pulls/147306
2025-10-03 20:30:29 +02:00
Damien Picard
8b351bdee8 Node Wrangler: Fixes for Save Viewer operator
## Fix: Error in Node Wrangler UI when in Sequencer mode

Node Wrangler tried to find the current scene compositing node tree,
even when there was none. This could happen if working on a sequencer
compositing modifier.

This commit hides the Save This Image button when not in Scene
compositing mode.

## Fix: Error in Node Wrangler's Save Image op when file path is empty

If the file path is empty in Save Image operator, it returns `None`
and errors out.

This commit makes it return `{'CANCELLED'}` early in that case.

## Add webp to list of file formats for Save Viewer

## Fix: Error when Viewer Node image renamed and saved

The "Viewer Node" image that contains the current compositing node
tree's viewer data has a hardcoded name by default. However it can be
renamed by the user, which will make the Save Viewer operator fail.

This commit extracts a utility function to get the current viewer
image based on its properties, and simply saves that.

In addition, this avoids having to change the area type to an image
editor to get the current viewer node, and restoring the node editor
afterwards. This action did not restore the current node tree if the
editor was inside a node group.

## Rename "Save This Image" to "Save Viewer Image"

When calling the operator through Menu Search, it is not clear what
"Save This Image" refers to. This commit renames the operator to "Save
Viewer Image", but keeps the old name for the button label.

Pull Request: https://projects.blender.org/blender/blender/pulls/147085
2025-10-02 16:14: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
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
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
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
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
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
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
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
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
Ido-Shahar
0e8110fa94 Node Wrangler: Add support for boolean sockets to nw_merge_nodes, results in a Boolean Math node
### Summary

A small fix / addition to Node Wrangler operators.py, specifically the
nw_merge_node operation. I added support for merging nodes with
boolean sockets, which used to not respond to nw_merge_nodes / nw_lazy_mix.

### Motivation

As a user, I found it frustrating that I couldn't use lazy mix on boolean
nodes, as geonodes-heavy projects relied on them, and required adding
Boolean Math nodes often.
I intuitively expected it to add a Boolean Math node, which is the most
similar to Math Add for floats & Join Geometry for geometry.

### Implementation

A boolean nodes list is created when the rest of the lists are cerated,
nodes with boolean outputs get added to it, it's taken into consideration
when checking if PASS_THROUGH, then if we didn't PASS_THROUGH,
a Boolean Math node is created, similar to the existing options.
When the user uses a math merge shortcut (ctrl+0, ctrl+*, etc), the
code ignores it, adds Boolean Math anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/140236
2025-07-04 15:26:21 +02:00
Brecht Van Lommel
b920f6f1a7 Shaders: Remove point density texture node
This is replaced by geometry nodes, where volumes can now be generated from
point clouds and meshes with more control, and more efficient rendering as a
sparse volume.

No backwareds compatibility is provided, as this would be complicated, and
probably this feature was not used much in the past few years.

This node was supported in Cycles only, not by EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/140292
2025-06-16 12:06:02 +02:00
Habib Gahbiche
bd61e69be5 Compositor: make compositor node trees reusable
This is part of the short term roadmap goal of simplifying the
compositor workflow
(see https://projects.blender.org/blender/blender/issues/134214).
The problem is that many users don't know how to get started with
compositing in Blender, even when they have used Blender for other
areas, e.g. modeling.

Note: although the solution makes compositor node trees reusable
accross blend files, this is a nice side effect and not the main goal
of the PR.

This PR implements a "New" button that creates a new compositing node
tree, and manages trees as IDs. This has following advantages:
- Consistent with other node editors and other parts of Blender,
therefore making it easier to getting started with compositing if users
are familiar with shading or geometry nodes
- Give users the ability to reuse the compositing node tree by linking
or appending it.

Note: The parameter "Use Nodes" is still present in this PR, but will
be removed (in a backward compatible way) in a follow up PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/135223
2025-06-10 17:46:55 +02:00
Damien Picard
81d9e94218 UI: Fix and improve a few messages
- "Parameters for custom (OSL-based) Cameras" -> "cameras": lower case
  in tooltips.
- "Connect two nodes ... (automatically determined": missing
  parenthesis.
- "Join curve... control points are detected(if disabled...": add
  missing space.
- "Add Selected to Active Objects Collection" -> "Active Object's":
  typo.
- "Duplicate the acive shape key" -> "active": typo.
- "Copy selected points ": remove trailing space.
- "Move cursor" -> "Cursor": title case for operator.
- "Paste text to clipboard" -> "from clipboard": typo.
- "An empty Action considered as both a 'layered' and a 'layered'
  Action." -> "is considered as both a 'legacy' and a 'layered'
  Action": likely copy-paste error.
- "Target's Z axis will constraint..." -> "will constrain": typo.
- "The layer groups is expanded in the UI" -> "layer group": typo.
- Deprecation warnings: add missing parentheses.
- "... on low poly geometry.Offset rays...": add missing space after
  period.
- "... relative to the files directory" -> "... to the file's
  directory": typo.
- "The unit multiplier for pixels per meter" -> "The base unit": this
  property description was copy and pasted.
- "... beyond the faces UVs..." -> "the faces' UVs: typo.
- "Is tracking data contains ..." -> "Whether the tracking data
  contains": grammar.
- "Selected text" -> "Text": title case for prop.
- "The user has been shown the "Online Access" prompt and make a
  choice" -> "made a choice": grammar.
- "Glare ": remove trailing space.
- "Don't collapse a curves" -> "Do not collapse curves": grammar.

Some issues reported by Tamar Mebonia.

Pull Request: https://projects.blender.org/blender/blender/pulls/139118
2025-05-19 22:12:17 +02:00
Philipp Oeser
0a27641b8f Fix #137899: NW: Saving Viewer Node returns to Geometry Node Editor
To resolve, remember the editor `tree_type` and set that when returning
from the `IMAGE_EDITOR` to the `NODE_EDITOR`

Pull Request: https://projects.blender.org/blender/blender/pulls/137904
2025-04-24 09:20:43 +02:00
Guillermo Venegas
587ddace88 Cleanup: Remove redundant node wrangler operator
615100acda added support to
`NODE_OT_add_image` to open multiple images, This makes the NW
operator redundant, also `NODE_OT_add_image` can open multiple
images at drag-n-drop. The only difference is that this operator adds
the new image nodes as collapsed nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/128443
2025-04-23 11:51:07 +02:00
Jesse Yurkovich
17e6d1901b Fix #136994: Node Wrangler: Add ShaderNodeTexGabor to "textures" list
Add ShaderNodeTexGabor to the list of nodes that Node Wrangler considers
as a "texture".

Pull Request: https://projects.blender.org/blender/blender/pulls/137005
2025-04-04 22:12:03 +02:00
Damien Picard
5fc2d5b308 I18n: Fix Node Wrangler merge menus
Commit 8ff8fc4859 changed the context for the modes in Merge Nodes
and Change Nodes operators to Nodetree. The enum items were thus
extracted using this context, but the UI Menus were not updated to
reflect this change and a few items were no longer translated.

This commit fixes the issue by using the same translation context for
the menus' drawing.
2025-02-28 15:46:33 +01:00
Nika Kutsniashvili
89f829f736 Nodes: Node Wrangler: Remove "Frame Selected" operator
This operator was duplicating feature that already exists in core
Blender (`node.join`), and was not working great as well. So there is
no need to maintain this python operator, but to keep consistency for
users I kept the keymap and UI entry but assigned it to `node.join`
operator instead, so that users don't notice change.

I assigned keymap inside add-on and not in Blender core because people
who didn't use Node Wrangler have that key free, or have something else
assigned (and `node.join` is already mapped to Ctrl+J), so only Node
Wrangler users should have this keymap. We can change it and rename
built-in operator to Parent, instead of Join, and remap it to Shift+P,
but that's separate discussion.

Resolves #129404.

Pull Request: https://projects.blender.org/blender/blender/pulls/132758
2025-01-15 02:19:33 +01:00
Damien Picard
8ff8fc4859 I18n: Disambiguate "Floor"
Issue reported by Hoang Duy Tran.
2025-01-13 12:40:45 +01:00
Jesse Yurkovich
b8f236510d Fix: error in node wrangler format string 2024-09-16 04:50:18 +02:00
Jacques Lucke
92febd5fb2 Fix: error in node wrangler format string 2024-09-14 13:29:45 +02:00
Campbell Barton
dc74a98b9e Cleanup: remove unused imports 2024-07-23 15:58:21 +10:00
Damien Picard
6a52c76a65 I18n: Translate messages in extensions, operator descriptions, Node Wrangler
- Operator descriptions use tip_() since they will be displayed in
  tooltips.

- Extension messages:
  - Split "(Add-on|Theme) \"{:s}\" already installed!" into two
    messages.
  - Use rpt_() to translate error messages.

- Restore core add-on name and description translation.

- Use DATA_ to translate paint material slot name, so that translation
  happens only if the user enabled it for user-created data.

- Node Wrangler contains functions used to build operators' poll
  methods. This change allows them to be properly translated by using
  str.format() instead of f-strings, and explicit extraction with
  tip_().

Pull Request: https://projects.blender.org/blender/blender/pulls/123795
2024-07-04 10:49:52 +02:00
Damien Picard
fab15384a4 I18n: Node Wrangler: Use proper translation contexts in the UI
Many operator buttons in Node Wrangler used custom texts defined
elsewhere, but the translation context in this case is "Operator". It
should be using "Default" instead.

Attribute nodes in the shader editor should never be translated
because their name is user data.

Some button labels were switched to title case.

"Dodge" and "Burn" were renamed to "Color Dodge" and "Color Burn"
respectively, to match the item name from the actual node.

The "Frame Selected" operator now uses Node translation context, to
distinguish from the other operator of the same name which means
"Place selected in view".

Pull Request: https://projects.blender.org/blender/blender/pulls/123403
2024-06-25 10:36:44 +02:00
Damien Picard
dba5a393ca I18n: Node Wrangler: translate operator reports using rpt_()
Operator reports that use string formatting need explicit rpt_() tags,
otherwise translation occurs after formatting and the string is not
found in the translation files.
2024-06-25 10:36:43 +02:00
Damien Picard
db6d05537c UI: Node Wrangler: Fix message case and grammar
- Reuse menus' bl_label in UI code when identical.
- Switch labels to title case.
- Switch descriptions to sentence case.
- Do not end sentences with "." in reports.
- Replace "Can't" with "Cannot" and "Don't" with "Do Not".
2024-06-25 10:36:43 +02:00
Damien Picard
df2ee7298c I18n: Make Node Wrangler's support level OFFICIAL
The bl_info dictionary is deprecated for most extensions, but it is
still used for core add-ons and since Node Wrangler is now built-in,
it should be marked as official.

The reason for this change is actually that it enables translation of
the Node Wrangler UI, because add-ons below official support level
were never considered for translation.

-----

The reason only OFFICIAL add-ons are translated is that they are enabled [here](4f36fb1afe/scripts/modules/bl_i18n_utils/bl_extract_messages.py (L1052)) during message extraction.

Pull Request: https://projects.blender.org/blender/blender/pulls/123043
2024-06-11 14:30:32 +02:00
Jesse Yurkovich
7806d3229a Cleanup: make format 2024-05-31 18:59:34 +02:00
Jacques Lucke
5a43eb0cbc Add-ons: make node wrangler a core add-on
Making node wrangler a core add-ons means that it will ship with Blender, but it still has to be enabled explicitly. It won't be available on the extensions platform anymore.

We'll still continue to move parts of its functionality out of the add-on into default Blender. However, that takes a little bit longer, because we need to go over the design and code quality in more detail first. Once, the most important functionality (#121749) is merged, the remaining node wrangler features can be put on the extensions platform.

Ref !122557
2024-05-31 16:53:26 +02:00