-
Notifications
You must be signed in to change notification settings - Fork 0
/
obg2fbx.py
29 lines (18 loc) · 1.18 KB
/
obg2fbx.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import fbx
# Create an SDK manager
manager = fbx.FbxManager.Create()
# Create a scene
scene = fbx.FbxScene.Create(manager, "")
# Create an importer object
importer = fbx.FbxImporter.Create(manager, "")
# Path to the .obj file
milfalcon = "C:\\Users\\MLH-Admin\\Desktop\\New Models\\ANDV2361\\ANDV2361_v6_LOD2.obj"
# Specify the path and name of the file to be imported
importstat = importer.Initialize(milfalcon, -1)
importstat = importer.Import(scene)
# Create an exporter object
exporter = fbx.FbxExporter.Create(manager, "")
save_path = "C:\\Users\\MLH-Admin\\Desktop\\New Models\\ANDV2361\\ANDV2361_v6_LOD2.fbx"
# Specify the path and name of the file to be imported
exportstat = exporter.Initialize(save_path, -1)
exportstat = exporter.Export(scene)