if you access classholder.meshes[index]

first you do not need to cast as Mesh, because only meshes are pushed into this array

second, you can apply as you did.

classholder.meshes[index].matwrial = new Material...

But you have to make sure it is the right one!
the exporter keeps track of the original names define at the time you export

so you can loop over the meshes array and check on meshes[index].name

I use the class all the time! There is no project i do that doesn't use this class!
and i do use exact same code if i need custom materials or changes.

Fabrice

On Jul 5, 2009, at 5:34 PM, Li wrote:

MMm, no sorry, no samples.

How can the material library be empty? It must somehow know what materials to apply to each mesh... Maybe you need to ask Fabrice, yes :P

Reply via email to