Need some fun once a while:

On dragging a non-connected node on a noodle, it will insert it.
Functionality tweaks are possible, but it already feels non-intrusive.

Rules:
- Insertion only when a single noodle is intersecting with node.
- Default connects first matching socket type. 
- If no socket match, it connects the first.
This commit is contained in:
2011-07-22 15:28:50 +00:00
parent 382050501d
commit ea90544d65
5 changed files with 156 additions and 6 deletions

View File

@@ -1869,10 +1869,17 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
else {
/* check cyclic */
if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) {
if(link->fromnode->flag & SELECT)
th_col1= TH_EDGE_SELECT;
if(link->tonode->flag & SELECT)
th_col2= TH_EDGE_SELECT;
/* special indicated link, on drop-node */
if(link->flag & NODE_LINKFLAG_HILITE) {
th_col1= th_col2= TH_ACTIVE;
}
else {
/* regular link */
if(link->fromnode->flag & SELECT)
th_col1= TH_EDGE_SELECT;
if(link->tonode->flag & SELECT)
th_col2= TH_EDGE_SELECT;
}
do_shaded= 1;
do_triple= 1;
}