diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-05-12 15:36:33 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-05-12 15:36:33 +0400 |
commit | 5e0d2c896ee95735b21635da21dd0afc8f0ec349 (patch) | |
tree | bb81e1f7df5754c73ee487740ac5ca3843433670 /source/blender/editors/animation | |
parent | f487a96302f211219b1cf172b18a8203988c83f4 (diff) |
Graph Editor Bugfix: Drivers for Materials now get shown
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 67f89b3358d..afad396607b 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -754,7 +754,17 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads, Material *ma= give_current_material(ob, a); /* for now, if no material returned, skip (this shouldn't confuse the user I hope) */ - if (ELEM3(NULL, ma, ma->adt, ma->adt->action)) continue; + if (ELEM(NULL, ma, ma->adt)) + continue; + + if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) { + if (ANIMDATA_HAS_KEYS(ma) == 0) + continue; + } + else { + if (ANIMDATA_HAS_DRIVERS(ma) == 0) + continue; + } /* make a temp list elem for this */ ld= MEM_callocN(sizeof(LinkData), "DopeSheet-MaterialCache"); @@ -791,10 +801,16 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads, } } - /* add material's F-Curve channels? */ + /* add material's F-Curve or Driver channels? */ if (FILTER_MAT_OBJD(ma) || (filter_mode & ANIMFILTER_CURVESONLY)) { + if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) { // XXX the 'owner' info here is still subject to improvement - items += animdata_filter_action(anim_data, ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma); + items += animdata_filter_action(anim_data, ma->adt->action, filter_mode, ma, ANIMTYPE_DSMAT, (ID *)ma); + } + else { + // need to make the ownertype normal object here... (maybe type should be a separate one for clarity?) + items += animdata_filter_fcurves(anim_data, ma->adt->drivers.first, NULL, ma, ANIMTYPE_DSMAT, filter_mode, (ID *)ma); + } } } } |