Fix #107623: Do not allow dragging search menu from custom socket #107628

Merged
Hans Goudey merged 1 commits from mod_moder/blender:tmp_fix_drag_from_custom_socket into main 2023-05-04 19:28:03 +02:00
1 changed files with 4 additions and 6 deletions

View File

@ -802,12 +802,10 @@ static bool should_create_drag_link_search_menu(const bNodeTree &node_tree,
if (nldrag.start_socket->in_out == SOCK_IN && nldrag.start_link_count > 0) {
return false;
}
/* Don't allow a drag from the "new socket" of a group input node. Handling these
* properly in node callbacks increases the complexity too much for now. */
if (ELEM(nldrag.start_node->type, NODE_GROUP_INPUT, NODE_GROUP_OUTPUT)) {
if (nldrag.start_socket->type == SOCK_CUSTOM) {
return false;
}
/* Don't allow a drag from the "new socket" (group input node or simulation nodes currently).
* Handling these properly in node callbacks increases the complexity too much for now. */
if (nldrag.start_socket->type == SOCK_CUSTOM) {
return false;
}
return true;
}