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:
authorJeroen Bakker <j.bakker@atmind.nl>2011-07-04 22:48:36 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2011-07-04 22:48:36 +0400
commite814f2c71defdaaefed3d1e140bcebdc77c50f2c (patch)
tree1ee034f29d22aaef7aa818eb8bf62ea6eb4058eb /source/blender/blenkernel/BKE_node.h
parentc4491f558b77530ef45ef7a1b80ba7567e338bae (diff)
====== Proposal: Nodes property windows enhancement ======
===== Situation before this patch ===== in the current situation inside the node editor there is a properties panel (press 'n'-key). This pabel displays some information about the node, backdrop and grease pencil. The UI of the property panel is typically vertical oriented. Nodes in the other hand are not oriented in a direction. Both area's are draw via the same draw function. With some nodes this will create not user-friendly UI. Try the color-balance for instance). The 3 color circles are drawn next to each other, it would be better to draw them below each other. When creating more complex nodes you don't want to display all handles in the node-panel and in the properties panel. For instance fine-tuning handles you only want to appear in the property panel to reduce place in the node itself. ===== Situation after this patch ===== This patch separates the draw functions of the property panel and the node panel. When no special draw function is created for the property panel, the draw function of the node will be used as 'fallback' ===== Impact ===== ==== BKE_node.h ==== add a new uifunc (called uifuncbut) to the bNodeType struct. The definition is the same as the uifunc. ==== node_buttons.c ==== if the uifuncbut is set, call it. currently calls the uifunc method ==== drawnode.c ==== static void node_composit_set_butfunc(bNodeType *ntype). set the uifuncbut function where needed. When at the end of the method uifuncbut is still empty, set uifuncbut to the uifunc. ===== Final note ===== ! PS. this is not limited to the compositor it also works for Materials and Textures ! ! PPS. For other branching creating their own node-tree. Please make sure that your uifuncbut is set NULL or a valid draw function !
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r--source/blender/blenkernel/BKE_node.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index c86080aa21f..f0ed7a6f5c8 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -87,8 +87,9 @@ typedef struct bNodeType {
void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **);
/* this line is set on startup of blender */
- void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
- const char *(*labelfunc)(struct bNode *);
+ void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+ void (*uifuncbut)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+ const char *(*labelfunc)(struct bNode *);
void (*initfunc)(struct bNode *);
void (*freestoragefunc)(struct bNode *);