Importing with the FBX Extensions SDK
 
 
 

Host Application Flow

The following pseudocode shows the order of execution of an FBX Extension while a scene is being imported by the host application.

At the beginning of the import process:
    ImportBegin()

For each object in the scene:
    If ( ImportHandled() returns TRUE ):
        The host application will let your extension import/create this object.
    Else:
        The host application will import this object.

For each object translated by the host application:
    ImportTranslated(), passing the object and its FBX object equivalent.

Upon import process completion:
    ImportEnd()

ImportBegin()

EXPORT_DLL void MayaExt_ImportBegin(KFbxScene* pFbxScene);
EXPORT_DLL void MaxExt_ImportBegin(KFbxScene* pFbxScene, INode* pMaxRootNode);
EXPORT_DLL void MBExt_ImportBegin( KFbxScene* pFbxScene );

This function is called before the host application imports the scene from the file. This function can be used to act on the FBX scene before it is loaded from the file.

ImportHandled()

EXPORT_DLL bool MayaExt_ImportHandled(KFbxObject* pFbxObject);
EXPORT_DLL bool MaxExt_ImportHandled(KFbxObject* pFbxObject);
EXPORT_DLL bool MBExt_ImportHandled( KFbxObject* pFbxObject );

This function is called by the host application every time it is about to translate the specified FBX object. If your extension should handle its creation, this function returns TRUE. If the host application should instead be responsible of translating the object, this function should return FALSE.

ImportTranslated()

EXPORT_DLL void MayaExt_ImportTranslated(KFbxObject* pFbxObject, MObject& pMayaObject);
EXPORT_DLL void MaxExt_ImportTranslated(KFbxObject* pFbxObject, INode* pMaxObject);
EXPORT_DLL void MBExt_ImportTranslated( KFbxObject* pFbxObject, HFBComponent pFBComponent );

This function is called by the host application for each FBX object translated by the host application into its own object format.

ImportEnd()

EXPORT_DLL void MayaExt_ImportEnd(KFbxScene* pFbxScene);
EXPORT_DLL void MaxExt_ImportEnd(KFbxScene* pFbxScene, INode* pMaxRootNode);
EXPORT_DLL void MBExt_ImportEnd( KFbxScene* pFbxScene );

This is called at the end of the import process.