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.
This commit is contained in:
Janne Karhu 2010-11-06 22:23:37 +00:00
parent b0e62b0351
commit f793b75dcc

@ -1394,9 +1394,9 @@ static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data
/* need to check textures */ /* need to check textures */
if(ma->mtex) { if(ma->mtex) {
MTex **mtex = ma->mtex; MTex **mtex = ma->mtex;
int a; int mtInd;
for (a=0; a < MAX_MTEX; a++) { for (mtInd=0; mtInd < MAX_MTEX; mtInd++) {
if (ELEM3(NULL, mtex[a], mtex[a]->tex, mtex[a]->tex->adt)) if (ELEM3(NULL, mtex[mtInd], mtex[mtInd]->tex, mtex[mtInd]->tex->adt))
continue; continue;
else else
ok=1; ok=1;
@ -2206,7 +2206,7 @@ static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDo
int a; int a;
/* firstly check that we actuallly have some materials */ /* 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); Material *ma= give_current_material(ob, a);
if (ma) { if (ma) {
@ -2411,7 +2411,7 @@ static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDo
int a; int a;
/* firstly check that we actuallly have some materials */ /* 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); Material *ma= give_current_material(ob, a);
int mtInd; int mtInd;