Fix T101214: hidden link can cause cycle in node tree

Links that are linked to unavailable sockets should be ignored.
This commit is contained in:
2022-09-20 13:21:03 +02:00
parent 22efaa2e7b
commit 2b4cb893e7
6 changed files with 42 additions and 24 deletions

View File

@@ -1044,10 +1044,10 @@ struct GeometryNodesLazyFunctionGraphBuilder {
if (link->is_muted()) {
continue;
}
const bNodeSocket &to_bsocket = *link->tosock;
if (!to_bsocket.is_available()) {
if (!link->is_available()) {
continue;
}
const bNodeSocket &to_bsocket = *link->tosock;
const CPPType *to_type = get_socket_cpp_type(to_bsocket);
if (to_type == nullptr) {
continue;
@@ -1258,7 +1258,7 @@ const GeometryNodesLazyFunctionGraphInfo *ensure_geometry_nodes_lazy_function_gr
const bNodeTree &btree)
{
btree.ensure_topology_cache();
if (btree.has_link_cycle()) {
if (btree.has_available_link_cycle()) {
return nullptr;
}