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-27 08:42:17 +0300
committerMatt Ebb <matt@mke3.net>2010-01-27 08:42:17 +0300
commitde56a6384957d00c49d5e3846a8bcf7350e96daa (patch)
tree8baf5ad593ee61290e2cb8b02817d3096a647c34 /source/blender/editors
parent0c77490cb48ad2052fe1ca9d540c7a9fd82c2fa6 (diff)
Fix [#20773] NODE ANIMATION: Animating node values broken
Now the compositing node tree will update on frame change if any of the nodes are animated. This doesn't work for playback (i.e. alt a), that's better off waiting until we have some kind of frame caching system.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_anim.c40
-rw-r--r--source/blender/editors/space_node/node_draw.c19
-rw-r--r--source/blender/editors/space_node/space_node.c8
3 files changed, 10 insertions, 57 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 1a747edce11..6a7f2b2fcb7 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -30,45 +30,7 @@
static FCurve *ui_but_get_fcurve(uiBut *but, bAction **action, int *driven)
{
- FCurve *fcu= NULL;
-
- *driven= 0;
-
- /* there must be some RNA-pointer + property combo for this button */
- if(but->rnaprop && but->rnapoin.id.data &&
- RNA_property_animateable(&but->rnapoin, but->rnaprop))
- {
- AnimData *adt= BKE_animdata_from_id(but->rnapoin.id.data);
- char *path;
-
- if(adt) {
- if((adt->action && adt->action->curves.first) || (adt->drivers.first)) {
- /* XXX this function call can become a performance bottleneck */
- path= RNA_path_from_ID_to_property(&but->rnapoin, but->rnaprop);
-
- if(path) {
- /* animation takes priority over drivers */
- if(adt->action && adt->action->curves.first)
- fcu= list_find_fcurve(&adt->action->curves, path, but->rnaindex);
-
- /* if not animated, check if driven */
- if(!fcu && (adt->drivers.first)) {
- fcu= list_find_fcurve(&adt->drivers, path, but->rnaindex);
-
- if(fcu)
- *driven= 1;
- }
-
- if(fcu && action)
- *action= adt->action;
-
- MEM_freeN(path);
- }
- }
- }
- }
-
- return fcu;
+ return rna_get_fcurve(&but->rnapoin, but->rnaprop, but->rnaindex, action, driven);
}
void ui_but_anim_flag(uiBut *but, float cfra)
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index f6a2323b0f4..03bc8340810 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -109,22 +109,9 @@ void ED_node_changed_update(ID *id, bNode *node)
NodeTagChanged(edittree, node);
/* don't use NodeTagIDChanged, it gives far too many recomposites for image, scene layers, ... */
- /* not the best implementation of the world... but we need it to work now :) */
- if(node->type==CMP_NODE_R_LAYERS && node->custom2) {
- /* add event for this window (after render curarea can be changed) */
- //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC);
-
- //composite_node_render(snode, node);
- //snode_notify(snode);
-
- /* add another event, a render can go fullscreen and open new window */
- //addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC);
- }
- else {
- node= node_tree_get_editgroup(nodetree);
- if(node)
- NodeTagIDChanged(nodetree, node->id);
- }
+ node= node_tree_get_editgroup(nodetree);
+ if(node)
+ NodeTagIDChanged(nodetree, node->id);
WM_main_add_notifier(NC_SCENE|ND_NODES, id);
}
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 2229e19c251..40f7f56bf21 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -170,8 +170,12 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
/* preview renders */
switch(wmn->category) {
case NC_SCENE:
- if(wmn->data==ND_NODES)
- ED_area_tag_refresh(sa);
+ switch (wmn->data) {
+ case ND_NODES:
+ case ND_FRAME:
+ ED_area_tag_refresh(sa);
+ break;
+ }
break;
case NC_WM:
if(wmn->data==ND_FILEREAD)