diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2013-12-02 00:56:52 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2013-12-09 23:22:16 +0400 |
commit | 6c83d92d5827c94672a5b8240cfd27550945afc2 (patch) | |
tree | 8883e745aaa014285ebbec920559e4ef8930831e /source/blender/blenkernel/intern/node.c | |
parent | f120adf65ce5085ec54350b1633b25533881a251 (diff) |
Enhancement: By default do not show the previews of composite nodes
only input nodes will show the preview by default.
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 6f29221196c..147e7909322 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -122,7 +122,6 @@ static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node) node->miniwidth = 42.0f; node->height = ntype->height; node->color[0] = node->color[1] = node->color[2] = 0.608; /* default theme color */ - /* initialize the node name with the node label. * note: do this after the initfunc so nodes get their data set which may be used in naming * (node groups for example) */ @@ -134,6 +133,13 @@ static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node) nodeUniqueName(ntree, node); node_add_sockets_from_type(ntree, node, ntype); + + /* Composite node will only show previews for input classes + * by default, other will be hidden + * but can be made visible with the show_preview option */ + if (ntree->typeinfo->type == NTREE_COMPOSIT && ntype->nclass != NODE_CLASS_INPUT) { + node->flag &= ~NODE_PREVIEW; + } if (ntype->initfunc != NULL) ntype->initfunc(ntree, node); |