我想导出二进制fbx文件与python抛出autodesk fbx,但导出文件没有材料,并导出ascii fbx,它可以工作良好的.could有人帮助我?ps:如何在linux中使用fbx转换导出ascii fbx文件到二进制文件,我在autodesk网站上搜索转换,是不支持Linux操作系统的。
发布于 2016-03-25 16:08:22
如果您想要输出材料,则需要添加
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()调用中使用Exporter.Initialize。
FbxConverter从来没有在Linux上发布过,所以没有选择。既然您获得了Python绑定,而且SDK可以执行与应用程序相同的操作,那么为什么不做一个简单的Python命令行转换器呢?
https://stackoverflow.com/questions/35549348
复制相似问题