1
2
3
4
5
6
7
8
9
10
11
12
13from pyfbsdk import *
14import os
15import os.path
16
19
20
21def getFileName(f):
22 d, filename = os.path.split(f)
23 if filename:
24 return os.path.splitext(filename)[0]
25 else:
26 return "unknown"
27
28
29NO_LOAD_UI_DIALOG = False
30APPEND = False
31MERGE = True
32OPTIONS_FOR_LOAD = True
33
34
37nativeFile = os.path.abspath( os.path.join( sys.ApplicationPath, r"..\system\primitives\Cube.fbx"))
38print("Source File Path", nativeFile)
39
40
42options.NamespaceList = getFileName(nativeFile)+ "_open"
43
44
45app.FileOpen( nativeFile, NO_LOAD_UI_DIALOG, options )
46
47
48
49options.NamespaceList = getFileName(nativeFile)+ "_append"
50app.FileAppend( nativeFile, NO_LOAD_UI_DIALOG, options )
51
52
53options.NamespaceList = getFileName(nativeFile)+ "_open"
54options.SetAll(FBElementAction.kFBElementActionMerge, True)
55
56
57app.FileMerge( nativeFile, NO_LOAD_UI_DIALOG, options )
58
FBApplication is used mainly to manage files.
Definition: pyfbsdk_generated.h:801
Customize file loading and saving.
Definition: pyfbsdk_generated.h:7400
Provides access to the underlying system, and the MotionBuilder scene.
Definition: pyfbsdk_generated.h:18771