diff options
author | Jacques Lucke <jacques@blender.org> | 2022-09-20 14:21:03 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-09-20 14:21:16 +0300 |
commit | 2b4cb893e7ebb33c24c7413ba0ff10eeb78bddfe (patch) | |
tree | 54ad42003882414a851a4dcbdae1bce366ac4304 /source/blender/makesdna | |
parent | 22efaa2e7be9a605d6b1b043041dcbe4cb0bc969 (diff) |
Fix T101214: hidden link can cause cycle in node tree
Links that are linked to unavailable sockets should be ignored.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 7832541e360..06e14c3134b 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -505,6 +505,7 @@ typedef struct bNodeLink { #ifdef __cplusplus bool is_muted() const; + bool is_available() const; #endif } bNodeLink; @@ -655,12 +656,12 @@ typedef struct bNodeTree { /** * Cached toposort of all nodes. If there are cycles, the returned array is not actually a * toposort. However, if a connected component does not contain a cycle, this component is sorted - * correctly. Use #has_link_cycle to check for cycles. + * correctly. Use #has_available_link_cycle to check for cycles. */ blender::Span<const bNode *> toposort_left_to_right() const; blender::Span<const bNode *> toposort_right_to_left() const; /** True when there are any cycles in the node tree. */ - bool has_link_cycle() const; + bool has_available_link_cycle() const; /** * True when there are nodes or sockets in the node tree that don't use a known type. This can * happen when nodes don't exist in the current Blender version that existed in the version where |