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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2007-04-13 01:10:19 +0400
committerTon Roosendaal <ton@blender.org>2007-04-13 01:10:19 +0400
commit6ec705e54b17de42d3297f48bb0fbfb23074d310 (patch)
tree9d4df1114da53ab367b2a1e550807d634e566ffd /source
parent5ca191027620e4802ff540424a60486c4742812a (diff)
Bugfix
Node system: new typedefinition system caused button callbacks for group node not to work. Since this is not configurable, added it hardcoded. with a "XXX Ugly Hack" note.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/drawnode.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/src/drawnode.c b/source/blender/src/drawnode.c
index 7faa4ecc76f..60da13a4e4a 100644
--- a/source/blender/src/drawnode.c
+++ b/source/blender/src/drawnode.c
@@ -619,9 +619,8 @@ static int node_shader_buts_geometry(uiBlock *block, bNodeTree *ntree, bNode *no
static void node_shader_set_butfunc(bNodeType *ntype)
{
switch(ntype->type) {
- case NODE_GROUP: /* note, generic type, but put here because we call this function anyway */
- ntype->butfunc= node_buts_group;
- break;
+ /* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */
+
case SH_NODE_MATERIAL:
ntype->butfunc= node_shader_buts_material;
break;
@@ -1513,9 +1512,8 @@ static int node_composit_buts_scale(uiBlock *block, bNodeTree *ntree, bNode *nod
static void node_composit_set_butfunc(bNodeType *ntype)
{
switch(ntype->type) {
- case NODE_GROUP: /* note, generic type, but put here because we call this function anyway */
- ntype->butfunc= node_buts_group;
- break;
+ /* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */
+
case CMP_NODE_IMAGE:
ntype->butfunc= node_composit_buts_image;
break;
@@ -2103,6 +2101,9 @@ static void node_draw_basis(ScrArea *sa, SpaceNode *snode, bNode *node)
glDisable(GL_BLEND);
}
if(node->type == NODE_GROUP) {
+ /* XXX ugly hack */
+ node->typeinfo->butfunc= node_buts_group;
+
iconofs-= 18.0f;
glEnable(GL_BLEND);
if(node->id->lib) {