diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-07 21:30:52 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-07 21:30:52 +0400 |
commit | 448731834839bbddee02558080dd9a5e586f6f21 (patch) | |
tree | cc8fc6d72f842ecfee7a467c9ac7bae1c3e55fd3 /source/blender/editors/space_node | |
parent | 69ad40f9ea81ddf5cd0d83dc21cc7f66a8008765 (diff) |
Nodes: add socket option to hide the default value in the UI, to be used for
sockets that get their default value if no node is connected from elsewhere,
e.g. a texture coordinate.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index c2a2f319c28..a932f1b10d9 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -108,7 +108,8 @@ void ED_node_changed_update(ID *id, bNode *node) WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, id); } else if(treetype==NTREE_COMPOSIT) { - nodeUpdate(edittree, node); + if(node) + nodeUpdate(edittree, node); /* don't use NodeTagIDChanged, it gives far too many recomposites for image, scene layers, ... */ node= node_tree_get_editgroup(nodetree); @@ -691,7 +692,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE); - if (sock->link) { + if (sock->link || (sock->flag & SOCK_HIDE_VALUE)) { uiDefBut(node->block, LABEL, 0, sock->name, sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY, NODE_DY, NULL, 0, 0, 0, 0, ""); } |