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-10-10 15:33:20 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-10-10 15:33:20 +0400
commit77a0b90cdf5d42b774f75b392aa0e3aeb7ed3452 (patch)
tree26f13efed3174bb02f0619476f2888da54777f52 /source/blender/blenkernel
parentbbd9b5f47667138b192b011d338293b217bb4a1e (diff)
Cleanup: Consistent names for draw callbacks in bNodeType.
This aims to establish a common pattern for the various confusing draw callback function pointers in bNodeType: draw_<purpose>_<nodetype>[_ex] Currently there are 4 different types of draw callbacks: * draw_nodetype, draw_nodetype_prepare: Main draw functions, allows specialized node drawing for things like frames and reroute nodes. Not exposed in the API. * draw_buttons, draw_buttons_ex: Optional non-socket buttons, most commonly used callback. Extended version used in sidebar for verbose buttons that don't fit into a node. * draw_backdrop: Draw elements in the backdrop (compositor only). Not exposed in the API. * draw_input, draw_output: Specialized socket drawing for some nodes, only for OutputFile node. Should not be used any further and be removed at some point. Not exposed in the API.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_node.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 7f19a867093..6ede274b4c3 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -162,24 +162,26 @@ typedef struct bNodeType {
char storagename[64]; /* struct name for DNA */
- /// Main draw function for the node.
- void (*drawfunc)(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode,
+ /* Main draw function for the node */
+ void (*draw_nodetype)(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode,
struct bNodeTree *ntree, struct bNode *node, bNodeInstanceKey key);
- /// Updates the node geometry attributes according to internal state before actual drawing.
- void (*drawupdatefunc)(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
- /// Draw the option buttons on the node.
- void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
- /// Additional parameters in the side panel.
- void (*uifuncbut)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
- /// Additional drawing on backdrop.
- void (*uibackdropfunc)(struct SpaceNode *snode, struct ImBuf *backdrop, struct bNode *node, int x, int y);
-
- /// Draw a node socket. Default draws the input value button.
+ /* Updates the node geometry attributes according to internal state before actual drawing */
+ void (*draw_nodetype_prepare)(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
+
+ /* Draw the option buttons on the node */
+ void (*draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+ /* Additional parameters in the side panel */
+ void (*draw_buttons_ex)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+
+ /* Additional drawing on backdrop */
+ void (*draw_backdrop)(struct SpaceNode *snode, struct ImBuf *backdrop, struct bNode *node, int x, int y);
+
+ /* Draw a node socket. Default draws the input value button. */
/* XXX deprecated, only used for the OutputFile node,
* should be removed at some point.
*/
- NodeSocketDrawFunction drawinputfunc;
- NodeSocketDrawFunction drawoutputfunc;
+ NodeSocketDrawFunction draw_input;
+ NodeSocketDrawFunction draw_output;
/// Optional custom label function for the node header.
const char *(*labelfunc)(struct bNode *);