from pyfbsdk import *
import os
import tempfile
lCube = FBModelCube( 'MyCubeWillNotBeSaved' )
lCube.Show = True
lPlane = FBModelPlane( 'MyPlaneWillBeSaved' )
lPlane.Show = True
lPlane.Selected = True
lOptions = FBFbxOptions(False)
lOptions.SaveSelectedModelsOnly = True
lOptions.UseASCIIFormat = True
lOptions.BaseCameras = False
lOptions.CameraSwitcherSettings = False
lOptions.CurrentCameraSettings = False
lOptions.GlobalLightingSettings = False
lOptions.TransportSettings = False
lFilePath = os.path.join( tempfile.gettempdir(), "SaveSelected.fbx" )
if FBApplication().FileSave(lFilePath, lOptions):
print "File successfully saved to %s" % lFilePath
else:
print "Failed to save file: %s" % lFilePath