Introduced
6.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.
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
FBXImport( FilePathName, [TakeNb] )
Parameters
|
Parameter |
Type |
Description |
|
FilePathName |
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 |
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 |
Return Value
Boolean value indicating whether command succeeded or failed.
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
Autodesk Softimage v7.5