Node Wrangler: LTS: backport many bugfixes from main #105169

Merged
Damien Picard merged 7 commits from pioverfour/blender-addons:dp_nw_3.6 into blender-v3.6-release 2024-02-21 18:57:14 +01:00

7 Commits

Author SHA1 Message Date
Damien Picard f42344c798 Node Wrangler: bump version
This version is specific to Blender 3.6 LTS. Since NW only uses major
and minor version numbers, adding a bugfix version will not collide
with main (4.0+).
2024-02-16 18:41:49 +01:00
Damien Picard aa8f26a2bb Fix: Node Wrangler: new reroutes offset when output hidden
Depending on option, some outputs would be counted in the offset of
the new reroutes, even though they were hidden and no reroute was
created. This resulted in a misalignment.

Reroutes are now offset according to the actual spacing of displayed
outputs.
2024-02-16 18:41:49 +01:00
Damien Picard 2547ed9f9c Fix: Node Wrangler: new reroute locations on hidden nodes
When a node was hidden, the NWAddReroutes operator used a hack to
calculate its width. This was broken since at least 2.80, and not
really needed AFAICT.

Replace this hack with the width directly read from the node.
2024-02-16 18:41:48 +01:00
Damien Picard 16959c986e Node Wrangler: do not add reroutes to unavailable outputs
This avoids unconnected reroutes in some nodes such as the Shader
Editor's Mix node. This node has multiple modes, and one output for
each mode, but only one is shown at a time. The others are unavailable
and should be ignored.
2024-02-16 18:23:22 +01:00
Martijn Versteegh 858dc99229 Node Wrangler: skip internal attributes while populating menu
The Attributes menu generated by node wrangler for the shader editor included internal attributes not meant for use in shaders.

Pull Request: #105084
2024-02-16 17:55:49 +01:00
Damien Picard 3e7dee51e4 Fix #104941: Node Wrangler cannot use both bump and normal
Currently, if both bump and normal maps are selected in Principled
Setup, only one of them will be used. But they can both be used in a
PBR setup by plugging the normal output to the bump input.

See for instance Brecht's answer at
https://blender.stackexchange.com/a/16447.

This commit separates setup of bump and normal so they can both be
used at the same time.
2024-02-16 17:55:49 +01:00
Damien Picard 9ce454c34b Fix: Node Wrangler: wrong API in CopySettings operator
Previous commit dc6c334c4d changed the API used to create links
between nodes, but the call for the CopySettings operator was not
updated properly.
2024-02-16 17:37:35 +01:00