From 675d42dfc33d6c791d9e5da31dcc00930519a127 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 16 Apr 2020 15:09:49 +0200 Subject: UI: Draw real node sockets for node input buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For buttons representing node inputs (e.g. in the material properties) rather than drawing some generic socket icon, the actual sockets are drawn now. That includes color, shape and the selection outline. This should make it easier to understand what these buttons relate to. Screenshots: {F8469252}, {F8469248} (The left alignment will be done in a follow-up commit.) Differential Revision: https://developer.blender.org/D7409 Reviewed by: Brecht Van Lommel, Clément Foucault, William Reynish --- source/blender/editors/include/ED_node.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/include/ED_node.h') diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 7a1f64b61d4..dfdd809dbd1 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -37,6 +37,7 @@ struct Tex; struct View2D; struct bContext; struct bNode; +struct bNodeSocket; struct bNodeSocketType; struct bNodeTree; struct bNodeTree; @@ -79,6 +80,10 @@ void ED_node_draw_snap( struct View2D *v2d, const float cent[2], float size, NodeBorder border, unsigned int pos); /* node_draw.c */ +void ED_node_socket_draw(struct bNodeSocket *sock, + const struct rcti *rect, + const float color[4], + float scale); void ED_node_tree_update(const struct bContext *C); void ED_node_tag_update_id(struct ID *id); void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node); -- cgit v1.2.3