我想用python throw autodesk fbx sdk导出二进制fbx文件,但是导出文件没有材质,并且导出ascii fbx,它可以很好地工作。有人可以帮我吗?ps:如何使用fbx在Linux中将export ascii fbx文件转换为二进制文件,我在Autodesk网站中搜索转换,不支持Linux OS
如果要导出物料,则需要添加
pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_MATERIAL, True)
pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_TEXTURE, True)
pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_EMBEDDED, True) # or False if you want ASCII
在二进制和ASCII之间选择
pFileFormat =pSdkManager.GetIOPluginRegistry().GetNativeWriterFormat()
if not pEmbedMedia:
lFormatCount =pSdkManager.GetIOPluginRegistry().GetWriterFormatCount()
for lFormatIndex in range(lFormatCount):
if pSdkManager.GetIOPluginRegistry().WriterIsFBX(lFormatIndex):
lDesc =pSdkManager.GetIOPluginRegistry().GetWriterFormatDescription(lFormatIndex)
if "ascii" in lDesc:
pFileFormat =lFormatIndex
break
并在Exporter.Initialize()调用中使用pFileFormat。
FbxConverter从未针对Linux发布,因此没有选择。自从您获得Python绑定以来,又或者SDK可以与应用程序做同样的事情,为什么不做一个简单的Python命令行转换器呢?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句