From 3ca44b5d167d6816c7ba3659c141f95036882932 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Mon, 8 Nov 2010 09:05:27 +0000 Subject: [PATCH] Second fix for [#24476] The driver is not displayed in GraphEditor. * Texture data still wasn't shown if material didn't have animation data. * Also unified the material/texture filtering logic a bit. --- .../blender/editors/animation/anim_filter.c | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 5b0d6c2c299..9875007bf41 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1390,29 +1390,34 @@ static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data /* for now, if no material returned, skip (this shouldn't confuse the user I hope) */ if (ma == NULL) continue; - if (ma->adt == NULL) { - /* need to check textures */ - if(ma->mtex) { - MTex **mtex = ma->mtex; - int mtInd; - for (mtInd=0; mtInd < MAX_MTEX; mtInd++) { - if (ELEM3(NULL, mtex[mtInd], mtex[mtInd]->tex, mtex[mtInd]->tex->adt)) - continue; - else - ok=1; - } - } - else - continue; - } - - + /* check if ok */ ANIMDATA_FILTER_CASES(ma, { /* AnimData blocks - do nothing... */ }, ok=1;, ok=1;, ok=1;) + + /* need to check textures */ + if (ok == 0 && !(ads->filterflag & ADS_FILTER_NOTEX)) { + int mtInd; + + for (mtInd=0; mtInd < MAX_MTEX; mtInd++) { + MTex *mtex = ma->mtex[mtInd]; + + if(mtex && mtex->tex) { + ANIMDATA_FILTER_CASES(mtex->tex, + { /* AnimData blocks - do nothing... */ }, + ok=1;, + ok=1;, + ok=1;) + } + + if(ok) + break; + } + } + if (ok == 0) continue; /* make a temp list elem for this */