[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36517] branches/particles-2010/source/ blender: Removed the quick viewer output flag+button.

Lukas Toenne lukas.toenne at googlemail.com
Fri May 6 15:33:47 CEST 2011


Revision: 36517
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36517
Author:   lukastoenne
Date:     2011-05-06 13:33:47 +0000 (Fri, 06 May 2011)
Log Message:
-----------
Removed the quick viewer output flag+button. Current trees don't make use of this button, can be readded later if approved.

Modified Paths:
--------------
    branches/particles-2010/source/blender/blenkernel/BKE_node.h
    branches/particles-2010/source/blender/blenkernel/intern/node.c
    branches/particles-2010/source/blender/editors/space_node/node_draw.c
    branches/particles-2010/source/blender/editors/space_node/node_edit.c
    branches/particles-2010/source/blender/makesdna/DNA_node_types.h
    branches/particles-2010/source/blender/makesrna/intern/rna_nodetree.c

Modified: branches/particles-2010/source/blender/blenkernel/BKE_node.h
===================================================================
--- branches/particles-2010/source/blender/blenkernel/BKE_node.h	2011-05-06 13:23:31 UTC (rev 36516)
+++ branches/particles-2010/source/blender/blenkernel/BKE_node.h	2011-05-06 13:33:47 UTC (rev 36517)
@@ -302,7 +302,6 @@
  * new tree types have a per-output socket flag to indicate the final output to use explicitly.
  */
 void			ntreeSetOutput(struct bNodeTree *ntree);
-void			ntreeSetViewerOutput(struct bNodeTree *ntree, struct bNodeSocket *output);
 void			ntreeInitPreview(struct bNodeTree *, int xsize, int ysize);
 void			ntreeClearPreview(struct bNodeTree *ntree);
 

Modified: branches/particles-2010/source/blender/blenkernel/intern/node.c
===================================================================
--- branches/particles-2010/source/blender/blenkernel/intern/node.c	2011-05-06 13:23:31 UTC (rev 36516)
+++ branches/particles-2010/source/blender/blenkernel/intern/node.c	2011-05-06 13:33:47 UTC (rev 36517)
@@ -976,21 +976,6 @@
 		might be different for editor or for "real" use... */
 }
 
-void ntreeSetViewerOutput(bNodeTree *ntree, bNodeSocket *output)
-{
-	bNode *node;
-	bNodeSocket *sock;
-	
-	for (node=ntree->nodes.first; node; node=node->next) {
-		for (sock=node->outputs.first; sock; sock=sock->next) {
-			if (sock == output)
-				sock->flag |= SOCK_VIEW_OUTPUT;
-			else
-				sock->flag &= ~SOCK_VIEW_OUTPUT;
-		}
-	}
-}
-
 typedef struct MakeLocalCallData {
 	ID *group_id;
 	ID *new_id;

Modified: branches/particles-2010/source/blender/editors/space_node/node_draw.c
===================================================================
--- branches/particles-2010/source/blender/editors/space_node/node_draw.c	2011-05-06 13:23:31 UTC (rev 36516)
+++ branches/particles-2010/source/blender/editors/space_node/node_draw.c	2011-05-06 13:33:47 UTC (rev 36517)
@@ -706,14 +706,6 @@
 		
 		node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE);
 		
-		#if 0	/* XXX viewer output buttons: these could replace viewer nodes, disabled for now */
-		/* button for viewer output flag */
-		if (sock->flag & SOCK_VIEW_OUTPUT)
-			uiDefIconButR(node->block, TOG, 0, ICON_RESTRICT_VIEW_OFF, sock->locx-22, sock->locy-8, 16, 16, &sockptr, "view", 0, 0, 0, 0, 0, "");
-		else
-			uiDefIconButR(node->block, TOG, 0, ICON_RESTRICT_VIEW_ON, sock->locx-22, sock->locy-8, 16, 16, &sockptr, "view", 0, 0, 0, 0, 0, "");
-		#endif
-		
 		ofs= 0;
 		UI_ThemeColor(TH_TEXT);
 		slen= snode->aspect*UI_GetStringWidth(sock->name);

Modified: branches/particles-2010/source/blender/editors/space_node/node_edit.c
===================================================================
--- branches/particles-2010/source/blender/editors/space_node/node_edit.c	2011-05-06 13:23:31 UTC (rev 36516)
+++ branches/particles-2010/source/blender/editors/space_node/node_edit.c	2011-05-06 13:33:47 UTC (rev 36517)
@@ -2187,14 +2187,6 @@
 			node->flag &= ~(NODE_SELECT|NODE_ACTIVE);
 			newnode->flag |= NODE_SELECT;
 			
-			/* make sure only one is final output */
-			for (sock=newnode->outputs.first; sock; sock=sock->next) {
-				if (sock->flag & SOCK_VIEW_OUTPUT) {
-					ntreeSetViewerOutput(ntree, sock);
-					break;
-				}
-			}
-			
 			if(newnode->id) {
 				/* simple id user adjustment, node internal functions dont touch this
 				 * but operators and readfile.c do. */

Modified: branches/particles-2010/source/blender/makesdna/DNA_node_types.h
===================================================================
--- branches/particles-2010/source/blender/makesdna/DNA_node_types.h	2011-05-06 13:23:31 UTC (rev 36516)
+++ branches/particles-2010/source/blender/makesdna/DNA_node_types.h	2011-05-06 13:33:47 UTC (rev 36517)
@@ -114,8 +114,6 @@
 #define SOCK_DYNAMIC			16
 	/* group socket should not be exposed */
 #define SOCK_INTERNAL			32
-	/* use this socket as the viewer output */
-#define SOCK_VIEW_OUTPUT		64
 
 typedef struct bNodePreview {
 	unsigned char *rect;

Modified: branches/particles-2010/source/blender/makesrna/intern/rna_nodetree.c
===================================================================
--- branches/particles-2010/source/blender/makesrna/intern/rna_nodetree.c	2011-05-06 13:23:31 UTC (rev 36516)
+++ branches/particles-2010/source/blender/makesrna/intern/rna_nodetree.c	2011-05-06 13:33:47 UTC (rev 36517)
@@ -385,18 +385,6 @@
 	ntreeUpdateTree(ntree);
 }
 
-static void rna_NodeSocket_view_set(PointerRNA *ptr, int value)
-{
-	bNodeTree *ntree= ptr->id.data;
-	bNodeSocket *sock= ptr->data;
-	
-	if (value)
-		ntreeSetViewerOutput(ntree, sock);
-	else
-		/* just disable output here, only really makes sense when another socket is selected as output */
-		sock->flag &= ~SOCK_VIEW_OUTPUT;
-}
-
 static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max)
 {
 	bNodeSocket *sock= (bNodeSocket*)ptr->data;
@@ -2660,12 +2648,6 @@
 	RNA_def_property_ui_text(prop, "Name", "Socket name");
 	RNA_def_struct_name_property(srna, prop);
 	RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroupSocket_update");
-
-	prop = RNA_def_property(srna, "view", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flag", SOCK_VIEW_OUTPUT);
-	RNA_def_property_boolean_funcs(prop, NULL, "rna_NodeSocket_view_set");
-	RNA_def_property_ui_text(prop, "View", "View this output");
-	RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
 }
 
 static void rna_def_node_socket_int(BlenderRNA *brna, const char *name, const char *ui_name, int subtype)




More information about the Bf-blender-cvs mailing list