I'm trying to use the XSI FTK to convert .xsi files to my 3D engine filetype, but I can't afford to read materials. I use this code:
CSLScene XSIScn;
CSLMaterialLibrary *MaterialLibrary;
CSLMaterial **MatList;
if (XSIScn.Open(filename) != SI_SUCCESS)
return false;
XSIScn.Read();
MaterialLibrary = XSIScn.GetMaterialLibrary();
MatList = (CSLMaterial**)MaterialLibrary->GetMaterialList();
for (int m=0; mGetMaterialCount(); m++)
{
// Here I should have to analize each material,
// but if I call MatList[m]->GetDiffuseColor or other
// methods of the class I get an exception and
// the program terminates...
}
Anybody can help me? The FTK help is not clear about this...
Thanks in advance
nICO