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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user