Cleanup: Remove unused node function for finding link

Nowadays it's much better to use the topology cache.
This commit is contained in:
Hans Goudey
2023-05-16 09:44:41 -04:00
parent 320ac28f75
commit d87547abd5
2 changed files with 0 additions and 19 deletions

View File

@@ -217,8 +217,6 @@ void nodeParentsIter(bNode *node, bool (*callback)(bNode *, void *), void *userd
*/
bool nodeIsDanglingReroute(const bNodeTree *ntree, const bNode *node);
bNodeLink *nodeFindLink(bNodeTree *ntree, const bNodeSocket *from, const bNodeSocket *to);
bNode *nodeGetActivePaintCanvas(bNodeTree *ntree);
/**

View File

@@ -3790,23 +3790,6 @@ bool ntreeContainsTree(const bNodeTree *tree_to_search_in, const bNodeTree *tree
tree_to_search_in, tree_to_search_for, already_passed);
}
namespace blender::bke {
bNodeLink *nodeFindLink(bNodeTree *ntree, const bNodeSocket *from, const bNodeSocket *to)
{
LISTBASE_FOREACH (bNodeLink *, link, &ntree->links) {
if (link->fromsock == from && link->tosock == to) {
return link;
}
if (link->fromsock == to && link->tosock == from) { /* hrms? */
return link;
}
}
return nullptr;
}
} // namespace blender::bke
int nodeCountSocketLinks(const bNodeTree *ntree, const bNodeSocket *sock)
{
int tot = 0;