From 7fd0a5acef245ff82d984c2a653cfc0198b01234 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 14 Oct 2025 11:18:22 +0200 Subject: [PATCH] Fix #147878: bad usage inferencing when there is a link cycle The inferencing algorithm does not work reliably when the tree has cycles. So return early and assume everything is used. The user is expected to fix the bad link as soon as possible. Pull Request: https://projects.blender.org/blender/blender/pulls/148009 --- source/blender/nodes/intern/socket_usage_inference.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/nodes/intern/socket_usage_inference.cc b/source/blender/nodes/intern/socket_usage_inference.cc index 9d7f216eb2e..70cfd1b2d3c 100644 --- a/source/blender/nodes/intern/socket_usage_inference.cc +++ b/source/blender/nodes/intern/socket_usage_inference.cc @@ -767,6 +767,10 @@ Array infer_all_sockets_usage(const bNodeTree &tree) const Span all_output_sockets = tree.all_output_sockets(); Array all_usages(tree.all_sockets().size()); + if (tree.has_available_link_cycle()) { + return all_usages; + } + ResourceScope scope; bke::ComputeContextCache compute_context_cache;