From f793b75dcc3e6673b31f4bc60ee1e06db609e47c Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sat, 6 Nov 2010 22:23:37 +0000 Subject: [PATCH] Fix for [#24476] The driver is not displayed in GraphEditor. * TSK! give_current_material(..) is used with index+1 * Also very bad practice to use same loop variable name in a loop inside a loop. --- source/blender/editors/animation/anim_filter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 08b4f8a7bc8..0e61d761463 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1394,9 +1394,9 @@ static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data /* need to check textures */ if(ma->mtex) { MTex **mtex = ma->mtex; - int a; - for (a=0; a < MAX_MTEX; a++) { - if (ELEM3(NULL, mtex[a], mtex[a]->tex, mtex[a]->tex->adt)) + 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; @@ -2206,7 +2206,7 @@ static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDo int a; /* firstly check that we actuallly have some materials */ - for (a=0; a < ob->totcol; a++) { + for (a=1; a <= ob->totcol; a++) { Material *ma= give_current_material(ob, a); if (ma) { @@ -2411,7 +2411,7 @@ static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDo int a; /* firstly check that we actuallly have some materials */ - for (a=0; a < ob->totcol; a++) { + for (a=1; a <= ob->totcol; a++) { Material *ma= give_current_material(ob, a); int mtInd;