=bmesh= fixed material deletion

This commit is contained in:
Joseph Eagar
2011-04-24 08:11:44 +00:00
parent 84afe5f3c9
commit b85935cbbc

View File

@@ -1663,9 +1663,9 @@ void mesh_delete_material_index(Mesh *me, int index)
int i;
for (i=0; i<me->totpoly; i++) {
MPoly *mf = &((MFace*) me->mpoly)[i];
if (mf->mat_nr && mf->mat_nr>=index)
mf->mat_nr--;
MPoly *mp = &((MPoly*) me->mpoly)[i];
if (mp->mat_nr && mp->mat_nr>=index)
mp->mat_nr--;
}
for (i=0; i<me->totface; i++) {