From 13dfd8299758a5248613624e99a1643f35e2ff4e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 20 Sep 2011 06:25:15 +0000 Subject: 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. --- source/blender/makesdna/DNA_material_types.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_material_types.h') diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 09255adb829..6719dc8d9af 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -205,8 +205,9 @@ typedef struct Material { /* maximum number of materials per material array. * (on object, mesh, lamp, etc.). limited by - * short mat_nr in verts, faces. */ -#define MAXMAT 32767 + * short mat_nr in verts, faces. + * -1 becayse for active material we store the index + 1 */ +#define MAXMAT (32767-1) /* material_type */ #define MA_TYPE_SURFACE 0 -- cgit v1.2.3