forked from bartvdbraak/blender
When relinking node group outputs from sockets of different type, automatically change the output to the source type. Feature request by Daniel Salazar.
This commit is contained in:
parent
2658949752
commit
fb738f4929
@ -2216,6 +2216,12 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
/* we might need to remove a link */
|
||||
if(in_out==SOCK_OUT)
|
||||
node_remove_extra_links(snode, link->tosock, link);
|
||||
|
||||
/* when linking to group outputs, update the socket type */
|
||||
/* XXX this should all be part of a generic update system */
|
||||
if (!link->tonode) {
|
||||
link->tosock->type = link->fromsock->type;
|
||||
}
|
||||
}
|
||||
else if (outside_group_rect(snode) && (link->tonode || link->fromnode)) {
|
||||
/* automatically add new group socket */
|
||||
|
Loading…
Reference in New Issue
Block a user