View Single Post
Old 4th March 2005, 10:14 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,565
Default

Like lots of things in AC3D 5, ACMaterials are ACEntity.

So, if ACMaterial *m;

Code:
ACrgb rgb;
Float val;

   ac_entity_get_rgb_value( (ACEntity *)m, "diffuse", &rgb );
   ac_entity_get_rgb_value( (ACEntity *)m, "ambient", &rgb );
   ac_entity_get_rgb_value( (ACEntity *)m, "specular", &rgb );
   ac_entity_get_rgb_value( (ACEntity *)m, "emissive", &rgb );
   ac_entity_get_float_value( (ACEntity *)m, "shininess", &val );
   ac_entity_get_float_value( (ACEntity *)m, "transparency", &val );
Andy is offline   Reply With Quote