[Bf-blender-cvs] [6c83d92] master: Enhancement: By default do not show the previews of composite nodes only input nodes will show the preview by default.

Jeroen Bakker noreply at git.blender.org
Mon Dec 9 20:22:51 CET 2013


Commit: 6c83d92d5827c94672a5b8240cfd27550945afc2
Author: Jeroen Bakker
Date:   Sun Dec 1 21:56:52 2013 +0100
http://developer.blender.org/rB6c83d92d5827c94672a5b8240cfd27550945afc2

Enhancement: By default do not show the previews of composite nodes
only input nodes will show the preview by default.

===================================================================

M	source/blender/blenkernel/intern/node.c

===================================================================

diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 6f29221..147e790 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);




More information about the Bf-blender-cvs mailing list