diff options
author | Thomas Dinges <blender@dingto.org> | 2012-04-13 04:04:56 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-04-13 04:04:56 +0400 |
commit | bdce58a42c3ca63773ce9c6b32189cfe10b27039 (patch) | |
tree | 619a4fec534641c61161ca634d096458543dda50 /source/blender/editors/space_node | |
parent | 2a5a465e2c05dc4d3864019790f745ab75755389 (diff) |
Code cleanup:
* Remove some non used *_button_register functions, panels are done in python.
* Remove do_node_region_buttons, was not used anymore.
Fix:
* Only show Grease Pencil panel in the Node editor, when there is a valid nodetree.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_buttons.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index dac185bf46e..49151cc5dcd 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -64,19 +64,6 @@ /* ******************* node space & buttons ************** */ -#define B_NOP 1 -#define B_REDR 2 - -static void do_node_region_buttons(bContext *C, void *UNUSED(arg), int event) -{ - //SpaceNode *snode= CTX_wm_space_node(C); - - switch(event) { - case B_REDR: - ED_area_tag_redraw(CTX_wm_area(C)); - return; /* no notifier! */ - } -} /* poll callback for active node */ static int active_node_poll(const bContext *C, PanelType *UNUSED(pt)) @@ -94,7 +81,6 @@ static void active_node_panel(const bContext *C, Panel *pa) bNodeTree *ntree= (snode) ? snode->edittree : NULL; bNode *node = (ntree) ? nodeGetActive(ntree) : NULL; // xxx... for editing group nodes uiLayout *layout= pa->layout; - uiBlock *block; PointerRNA ptr; /* verify pointers, and create RNA pointer for the node */ @@ -105,11 +91,6 @@ static void active_node_panel(const bContext *C, Panel *pa) //else RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); - /* set update callback */ - // xxx is this really needed - block= uiLayoutGetBlock(layout); - uiBlockSetHandleFunc(block, do_node_region_buttons, NULL); - /* draw this node's name, etc. */ uiItemR(layout, &ptr, "label", 0, NULL, ICON_NODE); uiItemS(layout); @@ -179,6 +160,7 @@ void node_buttons_register(ARegionType *art) strcpy(pt->idname, "NODE_PT_gpencil"); strcpy(pt->label, "Grease Pencil"); pt->draw= gpencil_panel_standard; + pt->poll= active_node_poll; BLI_addtail(&art->paneltypes, pt); } |