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:
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 7f8bf2618a4..5c5e316663c 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -94,54 +94,13 @@
#include "node_intern.h"
-/* ****************** GENERAL CALLBACKS FOR NODES ***************** */
-
-#if 0
-/* XXX not used yet, make compiler happy :) */
-static void node_group_alone_cb(bContext *C, void *node_v, void *unused_v)
-{
- bNode *node= node_v;
-
- nodeCopyGroup(node);
-
- // allqueue(REDRAWNODE, 0);
-}
/* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
-static void node_buts_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
+void node_buts_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
- uiBlock *block= uiLayoutAbsoluteBlock(layout);
- bNode *node= ptr->data;
- rctf *butr= &node->butr;
-
- if(node->id) {
- uiBut *bt;
- short width;
-
- uiBlockBeginAlign(block);
-
- /* name button */
- width= (short)(butr->xmax-butr->xmin - (node->id->us>1?19.0f:0.0f));
- bt= uiDefBut(block, TEX, B_NOP, "NT:",
- (short)butr->xmin, (short)butr->ymin, width, 19,
- node->id->name+2, 0.0, 19.0, 0, 0, "NodeTree name");
- uiButSetFunc(bt, node_ID_title_cb, node, NULL);
-
- /* user amount */
- if(node->id->us>1) {
- char str1[32];
- sprintf(str1, "%d", node->id->us);
- bt= uiDefBut(block, BUT, B_NOP, str1,
- (short)butr->xmax-19, (short)butr->ymin, 19, 19,
- NULL, 0, 0, 0, 0, "Displays number of users.");
- uiButSetFunc(bt, node_group_alone_cb, node, NULL);
- }
-
- uiBlockEndAlign(block);
- }
+ uiTemplateIDBrowse(layout, C, ptr, "nodetree", NULL, NULL, "");
}
-#endif
static void node_buts_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
{