## FBXImport

### Introduced

v6.02

### Description

Imports an FBX file. You can customize what information to import by running any of the FBXImport* commands before running this command. The available FBXImport* commands are listed in the See Also section on this page. To set options that don't have assciated FBXExport* command you can use FBXImport "option" to create the import options property page and use SetValue to modify it.
Note: The FBXImport* commands are the scripting equivalent of setting the same values for importing FBX files through the UI (FBX Importer dialog) with the exception of the FBXImportNamespaceReplacement command.

### Scripting Syntax

    oBoolean = FBXImport( FilePathName, [TakeNb] );

### Return Value

Boolean value indicating whether command succeeded or failed.

### Parameters

Parameter | Type | Description
--- | --- | ---
FilePathName | String | Full path and filename of FBX file to import. Default Value: If not specified, a file browser pops up to pick the file to import.
TakeNb | Long | Number of the take to be imported. Specifying TakeID "0" is the equivalent of specifying No Animation - it loads the last take in the file. Any number greater than or equal to the number of takes in the file does not load the animation. Default Value: -1

### Examples

#### 1. JScript Example

    /*

    	This example demonstrates how to import a specific animation

    	take from an FBX file.

    */

    var fbxfile = "C:\\temp\\testing.fbx";

    var fso = new ActiveXObject( "Scripting.FileSystemObject" );

    if ( fso.FileExists(fbxfile) ) {

    	// First make sure the FBX Import settings are set to take animation

    	FBXImportAnimation( true );

    	// Then specify take 1 while importing

    	FBXImport( fbxfile, 1 );

    } else {

    	Application.LogMessage( "Couldn't find " + fbxfile, siWarning );

    }

#### 2. VBScript Example

    '

    ' This example demonstrates how to import an FBX file without

    ' cameras or lights

    '

    dim fbxfile

    fbxfile = "C:\temp\testing.fbx"

    set fso = CreateObject( "Scripting.FileSystemObject" )

    if fso.FileExists(fbxfile) then

    	' First make sure the FBX Import settings are set to skip cameras & lights

    	FBXImportCameras False

    	FBXImportLights False

    	' Now do the import

    	FBXImport fbxfile

    else

    	Application.LogMessage "Couldn't find " & fbxfile, siWarning

    end if

### See Also

FBXExport FBXImportAnimation FBXImportCameras FBXImportForceNormEnvelope FBXImportHardEdges FBXImportKeepXSIEffectors FBXImportLights FBXImportMode FBXImportNamespaceReplacement FBXImportProtectExprDrivenFC FBXImportSetEnvelopes FBXImportSkeletonsAsNulls FBXImportUnit FBXImportAutomaticUnit FBXImportCacheFile FBXImportFrameRate FBXImportFillTimeline