Bugfix #20782: Animating two materials on a mesh--only first material's keyframes show up in f-curves editor

Wrong indices were being used to reference materials, resulting in too few materials showing up. It seems that at some point since coding this in the 2.4 codebase and now, the range has changed from [0, totcol) to [1, totcol].
This commit is contained in:
Joshua Leung 2010-01-24 23:08:38 +00:00
parent 265b9344ca
commit 1deecdb968
3 changed files with 3 additions and 3 deletions

@ -1185,7 +1185,7 @@ static int animdata_filter_dopesheet_mats (bAnimContext *ac, ListBase *anim_data
int items=0, a=0;
/* firstly check that we actuallly have some materials, by gathering all materials in a temp list */
for (a=0; a < ob->totcol; a++) {
for (a=1; a <= ob->totcol; a++) {
Material *ma= give_current_material(ob, a);
short ok = 0;

@ -767,7 +767,7 @@ void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, DLRBT_Tree *bl
if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) {
int a;
for (a=0; a < ob->totcol; a++) {
for (a=1; a <= ob->totcol; a++) {
Material *ma= give_current_material(ob, a);
/* there might not be a material */

@ -219,7 +219,7 @@ static short ob_keys_bezier_loop(BeztEditData *bed, Object *ob, BeztEditFunc bez
if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) {
int a;
for (a=0; a < ob->totcol; a++) {
for (a=1; a <= ob->totcol; a++) {
Material *ma= give_current_material(ob, a);
/* there might not be a material */