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
This commit is contained in:
Jacques Lucke
2025-10-14 11:18:22 +02:00
parent 2bb7a9f05d
commit 7fd0a5acef

View File

@@ -767,6 +767,10 @@ Array<SocketUsage> infer_all_sockets_usage(const bNodeTree &tree)
const Span<const bNodeSocket *> all_output_sockets = tree.all_output_sockets();
Array<SocketUsage> all_usages(tree.all_sockets().size());
if (tree.has_available_link_cycle()) {
return all_usages;
}
ResourceScope scope;
bke::ComputeContextCache compute_context_cache;