Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2013-12-02 00:56:52 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2013-12-09 23:22:16 +0400
commit6c83d92d5827c94672a5b8240cfd27550945afc2 (patch)
tree8883e745aaa014285ebbec920559e4ef8930831e
parentf120adf65ce5085ec54350b1633b25533881a251 (diff)
Enhancement: By default do not show the previews of composite nodes
only input nodes will show the preview by default.
-rw-r--r--source/blender/blenkernel/intern/node.c8
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);