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:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-05-08 18:58:37 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-05-08 18:58:37 +0400
commit672d393517253707746d57a65ac9fa9734771be6 (patch)
tree54b0b653ec489bbe119f4435ef4ced40c07c47b8 /source/blender/editors/space_node/node_draw.c
parent0ee45c9301fa100624479255b3928945ded4042e (diff)
Change to socket draw functions: instead of always only drawing the socket label for connected sockets, leave this check up to the socket draw function itself. This allows future socket types to draw buttons or other info in all cases and handle connected/unconnected state more flexibly.
The drawinputfunc/drawoutputfunc callbacks in bNodeType are pretty much empty wrappers now and should be removed at some point. This per-node differentiation should rather be implemented as a specialized socket type if necessary. The only use case for this feature that remains is the file output node in compositor, which displays shortened file format info for each socket.
Diffstat (limited to 'source/blender/editors/space_node/node_draw.c')
-rw-r--r--source/blender/editors/space_node/node_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index ec563c7f175..d4228ac03b7 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -351,7 +351,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
row = uiLayoutRow(layout, 1);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT);
- node->typeinfo->drawoutputfunc((bContext *)C, row, &sockptr, &nodeptr, (nsock->flag & SOCK_IN_USE));
+ node->typeinfo->drawoutputfunc((bContext *)C, row, &sockptr, &nodeptr);
uiBlockEndAlign(node->block);
uiBlockLayoutResolve(node->block, NULL, &buty);
@@ -438,7 +438,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
uiLayoutSetContextPointer(layout, "node", &nodeptr);
uiLayoutSetContextPointer(layout, "socket", &sockptr);
- node->typeinfo->drawinputfunc((bContext *)C, layout, &sockptr, &nodeptr, (nsock->flag & SOCK_IN_USE));
+ node->typeinfo->drawinputfunc((bContext *)C, layout, &sockptr, &nodeptr);
uiBlockEndAlign(node->block);
uiBlockLayoutResolve(node->block, NULL, &buty);