from pyfbsdk import *
import os.path
SOURCE_SCENE_PATH = "multiple_elements_scene.fbx"
SAVE_SCENE_PATH = "single_elements_scene.fbx"
NO_LOAD_UI_DIALOG = False
OPTION_USED_FOR_LOADING = True
OPTION_USED_FOR_SAVING = False
app = FBApplication()
def CreateDummyScene():
cube = FBModelCube("cube")
character = FBCharacter("character")
actor = FBActor("actor")
camera = FBCamera("camera")
app.FileSave(SOURCE_SCENE_PATH)
app.FileNew()
CreateDummyScene()
options = FBFbxOptions(OPTION_USED_FOR_LOADING)
options.Characters = FBElementAction.kFBElementActionDiscard
options.CameraAnimation = False
app.FileOpen(SOURCE_SCENE_PATH, NO_LOAD_UI_DIALOG, options)
options = FBFbxOptions(OPTION_USED_FOR_SAVING)
options.SetAll(FBElementAction.kFBElementActionDiscard, False)
options.Actors = FBElementAction.kFBElementActionSave
options.ActorAnimation = True
options.UseASCIIFormat = True
app.FileSave(SAVE_SCENE_PATH, options)