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
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
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
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
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
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
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
"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
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
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
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
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.
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
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
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.
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
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
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
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
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
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
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
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.
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