forked from bartvdbraak/blender
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:
parent
265b9344ca
commit
1deecdb968
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user