|
4th March 2005, 09:17 AM | #1 |
Member
Advanced member
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 39
|
Plugin SDK Material Changes
I notice that the material structure is now defined as;
Code:
typedef struct material_t { int dummy; // private } ACMaterial; // private ACEntity typedef struct material_template_t { ACrgb rgb; // diffuse ACrgb ambient; ACrgb specular; ACrgb emissive; float shininess; float transparency; } ACMaterialTemplate; Code:
ACMaterial *ac_palette_get_material(int num); |
4th March 2005, 10:14 AM | #2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
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 ); |
4th March 2005, 11:00 AM | #3 |
Member
Advanced member
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 39
|
Riiiight.
:? Is this documented anywhere? What "things" are entities (I'm guessing all the "#define AC_CLASS..." things) and what resname's are supported by each class, and what the types of those res's are? |
4th March 2005, 11:23 AM | #4 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Not yet sorry.
ACEntities include view windows, objects, images (for textures and bg images). You can find out what's in there if you edit tcl/ac3dview.tcl. Look for: ########## SIMPLE GLOBAL ENTITY BROWSER remove the following 'return' line and start AC3D to see a simple entity browser. (There is a small bug when reading rgb values from tcl but this is fixed for the bugfix release) Andy |
4th March 2005, 11:34 AM | #5 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Note that you may see a number of 'exciting' entity resource names if you do the above. Most are for future use and are not currently active in 5.0 - so don't get too excited...
Andy |
4th March 2005, 12:11 PM | #6 |
Member
Advanced member
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 39
|
Hmm, that doesn't seem to be in my version of tcl/ac3dview.tcl, which is a shame 'cos I was looking forward to seeing the exciting new entity names!
Thanks for the info Andy, I've got what I needed (for now) from your original reply. I'm just being greedy wanting more information now. Cheers. |
5th March 2005, 04:35 PM | #7 |
Member
Expert member
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
|
It's in ac3dutil.tcl
|
5th March 2005, 05:05 PM | #8 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Thanks Per!
Sorry for directing you to the wrong file ops: |
|
|