Fix T52218: Missing update when reconnecting node
If node was connected to output, we tag tree for update no matter where the node was re-plugged to. Should be safe for 2.79.
This commit is contained in:
parent
cf8d35edc8
commit
1a76bc7aeb
Notes:
blender-bot
2023-02-14 10:11:54 +01:00
Referenced by issue #52218, Node socket unlink issue
|
@ -567,7 +567,13 @@ static void node_link_exit(bContext *C, wmOperator *op, bool apply_links)
|
|||
ntree->is_updating = true;
|
||||
for (linkdata = nldrag->links.first; linkdata; linkdata = linkdata->next) {
|
||||
bNodeLink *link = linkdata->data;
|
||||
|
||||
|
||||
/* See note below, but basically TEST flag means that the link
|
||||
* was connected to output (or to a node which affects the
|
||||
* output).
|
||||
*/
|
||||
do_tag_update |= (link->flag & NODE_LINK_TEST) != 0;
|
||||
|
||||
if (apply_links && link->tosock && link->fromsock) {
|
||||
/* before actually adding the link,
|
||||
* let nodes perform special link insertion handling
|
||||
|
@ -593,11 +599,6 @@ static void node_link_exit(bContext *C, wmOperator *op, bool apply_links)
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* See note below, but basically TEST flag means that the link
|
||||
* was connected to output (or to a node which affects the
|
||||
* output).
|
||||
*/
|
||||
do_tag_update |= (link->flag & NODE_LINK_TEST) != 0;
|
||||
nodeRemLink(ntree, link);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue