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:
authorMatt Ebb <matt@mke3.net>2010-01-13 09:35:12 +0300
committerMatt Ebb <matt@mke3.net>2010-01-13 09:35:12 +0300
commit7df44b9cede3aa903c4463f9e5f885a705b4173a (patch)
tree1d9c9e221f1469989d7c3d901b5ffb424eba815d /source/blender/editors/space_node/drawnode.c
parent728359a6a5fd5736e1f1fdfa359f22474e76fd1d (diff)
Fix: wasn't able to rename node group nodetree name, or access the nodetree at all. Now you
can switch between them too. Wrapped group nodes in RNA as part of this.
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)
{