Creating a file importer
 
 
 

To import a file into an FBX scene (i.e., to load the scene with the contents of a file), you must first create an importer object:

// Create an importer
KFbxImporter* myImporter = KFbxImporter::Create(mySdkManager, "");

FBX can import many different kinds of files: FBX files in a binary (or native) format, FBX files in an ASCII format, FBX files using earlier versions of the FBX file format, and some non-FBX file formats, such as Collada (see File formats imported and exported). Any file that is to be imported into a program using FBX is called an import file.

    const char *myImportFile;   // Full path\filename of the file to be imported

Use the Initialize() member function to specify the path and name of the file to be imported.

    const bool lImportStatus = 
        myImporter->Initialize(myImportFile, -1, pSdkManager->GetIOSettings());
    if( !lImportStatus )
        ...// Problem with the file to be imported