diff options
author | Ton Roosendaal <ton@blender.org> | 2011-07-22 19:28:50 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-07-22 19:28:50 +0400 |
commit | ea90544d65a5b2549d5e0b4761de3bf0f2631688 (patch) | |
tree | 440209dcaa85c0ff10c84c933fc0c81de77164b9 /source/blender/editors/space_node/drawnode.c | |
parent | 382050501dc0036dc28434b205215ebc21a0cf1b (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 1bf2c3d89bd..50e657bbb61 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -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; } |