changes for materials to treat them as shorts not int/chars (since they are stored as shorts intermally)

- converting nurbs to mesh was casting the material to unsigned char.
- subsurf was casting to char, then int -> short in a loop.
- have material functions take & return shorts.
This commit is contained in:
2011-09-20 06:25:15 +00:00
parent 2b1513dbda
commit 13dfd82997
16 changed files with 78 additions and 59 deletions

View File

@@ -217,7 +217,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
if(me->totvert) {
/* Add this object's materials to the base one's if they don't exist already (but only if limits not exceeded yet) */
if(totcol < MAXMAT-1) {
if(totcol < MAXMAT) {
for(a=1; a<=base->object->totcol; a++) {
ma= give_current_material(base->object, a);
@@ -231,7 +231,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
totcol++;
}
if(totcol>=MAXMAT-1)
if(totcol >= MAXMAT)
break;
}
}