Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/node.cc
| Show First 20 Lines • Show All 2,432 Lines • ▼ Show 20 Lines | void nodeRemSocketLinks(bNodeTree *ntree, bNodeSocket *sock) | ||||
| } | } | ||||
| } | } | ||||
| bool nodeLinkIsHidden(const bNodeLink *link) | bool nodeLinkIsHidden(const bNodeLink *link) | ||||
| { | { | ||||
| return nodeSocketIsHidden(link->fromsock) || nodeSocketIsHidden(link->tosock); | return nodeSocketIsHidden(link->fromsock) || nodeSocketIsHidden(link->tosock); | ||||
| } | } | ||||
| bool nodeLinkIsSelected(const bNodeLink *link) | |||||
| { | |||||
| return (link->fromnode->flag & NODE_SELECT) || (link->tonode->flag & NODE_SELECT); | |||||
| } | |||||
| /* Adjust the indices of links connected to the given multi input socket after deleting the link at | /* Adjust the indices of links connected to the given multi input socket after deleting the link at | ||||
| * `deleted_index`. This function also works if the link has not yet been deleted. */ | * `deleted_index`. This function also works if the link has not yet been deleted. */ | ||||
| static void adjust_multi_input_indices_after_removed_link(bNodeTree *ntree, | static void adjust_multi_input_indices_after_removed_link(bNodeTree *ntree, | ||||
| bNodeSocket *sock, | bNodeSocket *sock, | ||||
| int deleted_index) | int deleted_index) | ||||
| { | { | ||||
| LISTBASE_FOREACH (bNodeLink *, link, &ntree->links) { | LISTBASE_FOREACH (bNodeLink *, link, &ntree->links) { | ||||
| /* We only need to adjust those with a greater index, because the others will have the same | /* We only need to adjust those with a greater index, because the others will have the same | ||||
| ▲ Show 20 Lines • Show All 2,569 Lines • Show Last 20 Lines | |||||