Bugfix #24163a: Unable to animate INSIDE a group node in the compositor

(This commit doesn't fix the original bug reported in the report, but does fix one that was discovered while investigating that one) 

Trying to insert keyframes for nodes within group nodes was failing. 

This was caused by the ID-block for those UI widgets being set to the Node Editor's current ID-block (i.e. NodeTree) vs the NodeTree that those nodes lived in. The net result was that the paths couldn't be resolved, as the paths obtained for those widgets could only work up to the group's nodetree.
This commit is contained in:
Joshua Leung 2010-12-07 11:03:53 +00:00
parent d3f9b0d05a
commit 6c32bffab0

@ -630,7 +630,7 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
}
static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNode *node)
static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node)
{
bNodeSocket *sock;
uiBut *bt;
@ -639,7 +639,6 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
int /*ofs,*/ color_id= node_get_colorid(node);
char showname[128]; /* 128 used below */
View2D *v2d = &ar->v2d;
bNodeTree *ntree = snode->nodetree;
PointerRNA ptr;
/* hurmf... another candidate for callback, have to see how this works first */
@ -943,7 +942,7 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode,
else if(node->flag & NODE_HIDDEN)
node_draw_hidden(C, ar, snode, node);
else
node_draw_basis(C, ar, snode, node);
node_draw_basis(C, ar, snode, ntree, node);
}
}
@ -954,7 +953,7 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode,
else if(node->flag & NODE_HIDDEN)
node_draw_hidden(C, ar, snode, node);
else
node_draw_basis(C, ar, snode, node);
node_draw_basis(C, ar, snode, ntree, node);
}
}
}