forked from blender/blender
main sync #3
@ -958,20 +958,33 @@ static void node_swap_links(bNodeLinkDrag &nldrag, bNodeTree &ntree)
|
|||||||
|
|
||||||
if (linked_socket.is_input()) {
|
if (linked_socket.is_input()) {
|
||||||
LISTBASE_FOREACH (bNodeLink *, link, &ntree.links) {
|
LISTBASE_FOREACH (bNodeLink *, link, &ntree.links) {
|
||||||
if (link->tosock == &linked_socket) {
|
if (link->tosock != &linked_socket) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (link->fromnode == start_node) {
|
||||||
|
/* Don't link a node to itself. */
|
||||||
|
nodeRemLink(&ntree, link);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
link->tosock = start_socket;
|
link->tosock = start_socket;
|
||||||
link->tonode = start_node;
|
link->tonode = start_node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
LISTBASE_FOREACH (bNodeLink *, link, &ntree.links) {
|
LISTBASE_FOREACH (bNodeLink *, link, &ntree.links) {
|
||||||
if (link->fromsock == &linked_socket) {
|
if (link->fromsock != &linked_socket) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (link->tonode == start_node) {
|
||||||
|
/* Don't link a node to itself. */
|
||||||
|
nodeRemLink(&ntree, link);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
link->fromsock = start_socket;
|
link->fromsock = start_socket;
|
||||||
link->fromnode = start_node;
|
link->fromnode = start_node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
BKE_ntree_update_tag_link_changed(&ntree);
|
BKE_ntree_update_tag_link_changed(&ntree);
|
||||||
}
|
}
|
||||||
|
@ -437,9 +437,6 @@ static void panel_draw(const bContext *C, Panel *panel)
|
|||||||
if (runtime_data->used_cpu) {
|
if (runtime_data->used_cpu) {
|
||||||
uiItemL(layout, "Using both CPU and GPU subdivision", ICON_INFO);
|
uiItemL(layout, "Using both CPU and GPU subdivision", ICON_INFO);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
uiItemL(layout, "Using GPU subdivision", ICON_INFO);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user