FBX SDK Programmer's Guide > Animation > Animation data structures >

# Extracting take data from a file

You can extract and query animation data from FBX files without going through the overhead of loading the entire file. But you’ll need to use a concept, a class, and a function from the “old” FBX animation system.

In the new animation system, the animation stack is the highest-level container for animation data. In the old animation system, the take is the equivalent to the animation stack.

To extract the animation data, you’ll need to first create and initialize an importer object:

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

    // Initialize by providing a filename
    const bool lImportStatus = lImporter->Initialize(pFilename, -1, pSdkManager->GetIOSettings() );

You can get the number of takes (i.e., animation stacks) in the file:

    int myTakeCount;
    //...
    myTakeCount = myImporter->GetTakeCount();

You can step through the takes, storing the data for each take in a FbxTakeInfo object:

    for(int i = 0; i < lTakeCount; i++)
    {
        FbxTakeInfo* lTakeInfo = lImporter->GetTakeInfo(i);
        //...
    }

And you can use each take info object to initialize the corresponding animation stack object:

    FbxAnimstack* myAnimStack // Previously created animation stack object
    //...
    myAnimStack->Reset(myTakeInfo);

See also the CubeCreator tutorial program in <yourFBXSDKpath>\examples\UI Examples\CubeCreator\.