blender/tests/files/node_group/node_copy_operators.blend
Lukas Tönne f7f4071e2e Fix #160692: Auto-removal of viewer socket crashes group operator
The `Make Group` operator for nodes expects that sockets remain valid
when removing a link to the node (to be replaced by a new external
link). This is not the case for highly dynamic nodes like viewer nodes.
A viewer socket is removed as soon as it is un-linked.

Make the group operator more robust by checking if sockets exist and
ignoring any link to group nodes when the socket disappears.
Ideally the viewer node would remain connected through these operations,
but that requires some detail special case for viewer behavior or some
way to ensure a viewer node copy has the same sockets as the original.

A regression test is also added for this case.

The `bl_node_copy_operators.py` has been modified to use the
`BLENDER_TEST_UPDATE` environment variable for updating the expected
test data, instead of the previous `--generate` script parameter.
This is consistent with other test scripts using the same mechanism.

A bug in `nearest_node_grid_coord` was fixed which created `nan` node
locations when running in `--background` mode due to zero UI scale.
Introduced by #157834.

Pull Request: https://projects.blender.org/blender/blender/pulls/160718
2026-06-26 14:59:43 +02:00

3 lines
131 B
Text

version https://git-lfs.github.com/spec/v1
oid sha256:5cd9cb11dbb559a807c3915aa8de6ac1c5a1d1c4bd02b80b6038322a356b187a
size 341071