[英]Convert .fbx to .obj with Python FBX SDK
I have a ten frame .fbx file of an animal walking. 我有一个动物行走的十帧.fbx文件。 This file includes a rigged model with textures, but I am only interested in the mesh of the model at each frame. 该文件包括带有纹理的装配模型,但我只对每个帧上模型的网格感兴趣。
How can I use Python FBX SDK or Python Blender SDK to export each frame of the fbx file into an obj file? 如何使用Python FBX SDK或Python Blender SDK将fbx文件的每一帧导出到obj文件?
Am I approaching this the wrong way? 我是否以错误的方式处理此问题? Should I try to find a way to do this manually in Maya/Blender first? 我是否应该首先尝试在Maya / Blender中手动找到一种方法?
its a example for fbx to obj import fbx 它是fbx到obj导入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 = "samples/millenium-falcon/millenium-falcon.fbx"
# 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 = "samples/millenium-falcon/millenium-falcon.obj"
# Specify the path and name of the file to be imported
exportstat = exporter.Initialize(save_path, -1)
exportstat = exporter.Export(scene)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.