|
| Re: File Format Support Import/Export |
 |
Mon, 29 Oct 2007 13:30:52 +000 |
Here is a snapshot from the code I use, hope it helps :
// Create an importer.
KFbxImporter *l_Importer = KFbxImporter::Create(m_SdkManager,
"");
if
(!KFbxIOPluginRegistryAccessor::Get()->DetectFileFormat(p_Filename.c_str(),
l_FileFormat))
{
// Unrecognizable file format. Try to fall back to native format.
l_FileFormat =
KFbxIOPluginRegistryAccessor::Get()->GetNativeReaderFormat();
}
l_Importer->SetFileFormat(l_FileFormat);
if (l_Importer->IsFBX())
{
// Set the import states. By default, the import states are always set
to true.
l_ImportOptions = KFbxStreamOptionsFbxReader::Create(m_SdkManager,
"");
l_ImportOptions->SetOption(KFBXSTREAMOPT_FBX_MATERIAL, false);
...
}
else if (l_Extension == "obj")
{
l_ImportOptions = KFbxStreamOptionsObjReader::Create(m_SdkManager,
"");
l_ImportOptions->SetOption(KFBXSTREAMOPT_OBJ_TRIANGULATE, false);
....
}
else ...
|
| Post Reply
|
|
|
|
|
|
|
|
|
|