diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-06-27 07:54:33 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-06-27 07:54:33 +0400 |
commit | b6bc47eb098261189c63b3aecb806960db6235e1 (patch) | |
tree | 21b7fffb95505afbc686751ea29fe862144769b9 /source/blender/editors/animation/anim_filter.c | |
parent | 17da597cc83eaaacdb7d70bb8c8f74aee872f4d3 (diff) |
AnimChannelFiltering - Material Nodes support
Animation for Material nodes is now shown in Animation Editors :)
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index ca300892636..e2c902d6131 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -672,7 +672,7 @@ static bAnimListElem *make_new_animlistelem (void *data, short datatype, ID *own bNodeTree *ntree= (bNodeTree *)data; AnimData *adt= ntree->adt; - ale->flag= FILTER_NTREE_SCED(ntree); + ale->flag= FILTER_NTREE_DATA(ntree); ale->key_data= (adt) ? adt->action : NULL; ale->datatype= ALE_ACT; @@ -1282,25 +1282,11 @@ static size_t animdata_filter_gpencil (ListBase *anim_data, void *UNUSED(data), static size_t animdata_filter_ds_nodetree (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *owner_id, bNodeTree *ntree, int filter_mode) { ListBase tmp_data = {NULL, NULL}; - short expanded = 0; size_t tmp_items = 0; size_t items = 0; - /* get datatype specific data first */ - if (owner_id == NULL) - return 0; - - switch (GS(owner_id->name)) { - case ID_SCE: /* compositing nodes */ - { - //Scene *scene = (Scene *)owner_id; - expanded = FILTER_NTREE_SCED(ntree); // XXX: this macro needs renaming... doesn't only do this for scene ones! - } - break; - } - /* add nodetree animation channels */ - BEGIN_ANIMFILTER_SUBCHANNELS(expanded) + BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_NTREE_DATA(ntree)) { /* animation data filtering */ tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)ntree, filter_mode); @@ -1427,6 +1413,11 @@ static size_t animdata_filter_ds_materials (bAnimContext *ac, ListBase *anim_dat /* textures */ if (!(ads->filterflag & ADS_FILTER_NOTEX)) tmp_items += animdata_filter_ds_textures(ac, &tmp_data, ads, (ID *)ma, filter_mode); + + /* nodes */ + if ((ma->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE)) { + tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)ma, ma->nodetree, filter_mode); + } } END_ANIMFILTER_SUBCHANNELS; |