[Bf-blender-cvs] [ce28025eaf5] master: Remove unused node socket flag that was added in the render pass commit

Lukas Stockner noreply at git.blender.org
Sun May 7 21:17:31 CEST 2017


Commit: ce28025eaf5014f16460dd1cb798ce5292087d94
Author: Lukas Stockner
Date:   Sun May 7 20:32:51 2017 +0200
Branches: master
https://developer.blender.org/rBce28025eaf5014f16460dd1cb798ce5292087d94

Remove unused node socket flag that was added in the render pass commit

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

M	source/blender/compositor/intern/COM_NodeGraph.cpp
M	source/blender/editors/space_node/drawnode.c
M	source/blender/makesdna/DNA_node_types.h
M	source/blender/makesrna/intern/rna_nodetree.c

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

diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp
index 891e64ed12b..c5096a6b352 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cpp
+++ b/source/blender/compositor/intern/COM_NodeGraph.cpp
@@ -179,8 +179,7 @@ void NodeGraph::add_bNodeLink(const NodeRange &node_range, bNodeLink *b_nodelink
 	/// @note: ignore invalid links
 	if (!(b_nodelink->flag & NODE_LINK_VALID))
 		return;
-	const int unavail_mask = SOCK_UNAVAIL | SOCK_VIRTUAL;
-	if ((b_nodelink->fromsock->flag & unavail_mask) || (b_nodelink->tosock->flag & unavail_mask))
+	if ((b_nodelink->fromsock->flag & SOCK_UNAVAIL) || (b_nodelink->tosock->flag & SOCK_UNAVAIL))
 		return;
 	
 	/* Note: a DNA input socket can have multiple NodeInput in the compositor tree! (proxies)
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 9b517425c1f..bbbbad41aa0 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3069,7 +3069,6 @@ static void std_node_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr,
 	bNode *node = node_ptr->data;
 	bNodeSocket *sock = ptr->data;
 	int type = sock->typeinfo->type;
-	bool connected_to_virtual = (sock->link && (sock->link->fromsock->flag & SOCK_VIRTUAL));
 	/*int subtype = sock->typeinfo->subtype;*/
 	
 	/* XXX not nice, eventually give this node its own socket type ... */
@@ -3078,7 +3077,7 @@ static void std_node_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr,
 		return;
 	}
 
-	if ((sock->in_out == SOCK_OUT) || ((sock->flag & SOCK_IN_USE) && !connected_to_virtual) || (sock->flag & SOCK_HIDE_VALUE)) {
+	if ((sock->in_out == SOCK_OUT) || (sock->flag & SOCK_IN_USE) || (sock->flag & SOCK_HIDE_VALUE)) {
 		node_socket_button_label(C, layout, ptr, node_ptr, text);
 		return;
 	}
@@ -3591,7 +3590,6 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
 {
 	bool do_shaded = false;
 	bool do_triple = false;
-	bool do_dashed = false;
 	int th_col1 = TH_WIRE_INNER, th_col2 = TH_WIRE_INNER, th_col3 = TH_WIRE;
 	
 	if (link->fromsock == NULL && link->tosock == NULL)
@@ -3608,8 +3606,6 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
 			return;
 		if (link->fromsock->flag & SOCK_UNAVAIL)
 			return;
-		if ((link->fromsock->flag & SOCK_VIRTUAL) || (link->tosock->flag & SOCK_VIRTUAL))
-			do_dashed = true;
 
 		if (link->flag & NODE_LINK_VALID) {
 			/* special indicated link, on drop-node */
@@ -3631,9 +3627,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
 		}
 	}
 
-	if (do_dashed) setlinestyle(3);
 	node_draw_link_bezier(v2d, snode, link, th_col1, do_shaded, th_col2, do_triple, th_col3);
-	if (do_dashed) setlinestyle(0);
 //	node_draw_link_straight(v2d, snode, link, th_col1, do_shaded, th_col2, do_triple, th_col3);
 }
 
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 0ba3e013c23..b922ac072b0 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -159,8 +159,7 @@ typedef enum eNodeSocketFlag {
 	SOCK_COLLAPSED = 64,				/* socket collapsed in UI */
 	SOCK_HIDE_VALUE = 128,				/* hide socket value, if it gets auto default */
 	SOCK_AUTO_HIDDEN__DEPRECATED = 256,	/* socket hidden automatically, to distinguish from manually hidden */
-	SOCK_NO_INTERNAL_LINK = 512,
-	SOCK_VIRTUAL = 1024			/* socket behaves like SOCK_UNAVAIL, but is drawn with dashed links */
+	SOCK_NO_INTERNAL_LINK = 512
 } eNodeSocketFlag;
 
 /* limit data in bNode to what we want to see saved? */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index dfdd2ff293a..60b75fca689 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -6924,11 +6924,6 @@ static void rna_def_node_socket(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Enabled", "Enable the socket");
 	RNA_def_property_update(prop, NC_NODE | ND_DISPLAY, NULL);
 
-	prop = RNA_def_property(srna, "is_virtual", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flag", SOCK_VIRTUAL);
-	RNA_def_property_ui_text(prop, "Virtual", "Socket is Virtual");
-	RNA_def_property_update(prop, NC_NODE | ND_DISPLAY, NULL);
-
 	prop = RNA_def_property(srna, "link_limit", PROP_INT, PROP_NONE);
 	RNA_def_property_int_sdna(prop, NULL, "limit");
 	RNA_def_property_int_funcs(prop, NULL, "rna_NodeSocket_link_limit_set", NULL);




More information about the Bf-blender-cvs mailing list