通过python sdk将fbx转换为obj,而obj的法线是错误的

时间:2019-01-12 07:38:05

标签: fbx

我通过 FBX SDK 2019.2 Python Linux 将.fbx文件转换为.obj文件,但是obj的常规错误,我的代码有问题吗? after before

有我的代码:

def SaveScene(pSdkManager, pScene, pFilename, pFileFormat = -1, pEmbedMedia = False):
   if not pSdkManager.GetIOSettings():
    ios = FbxIOSettings.Create(pSdkManager, IOSROOT)
    pSdkManager.SetIOSettings(ios)

    pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_MATERIAL, False
    )
    pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_TEXTURE, False)
    pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_EMBEDDED, pEmbedMedia)
    pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_SHAPE, False)
    pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_GOBO, False)
    pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_ANIMATION, False)
    pSdkManager.GetIOSettings().SetBoolProp(EXP_FBX_GLOBAL_SETTINGS, False)
    # pSdkManager.GetIOSettings().GetBoolProp(EXP_STATISTICS_GRP,True)
    #pSdkManager.GetIOSettings().SetBoolProp(EXP_OBJ_DEFORMATION, False)

    result = lExporter.Initialize(pFilename, -1, pSdkManager.GetIOSettings())
    if result == True:
        result = lExporter.Export(pScene)

    lExporter.Destroy()
    return result
manager = FbxManager.Create()
scene = FbxScene.Create(manager, "")
importer = FbxImporter.Create(manager, "")
milfalcon = "001.FBX"
importstat = importer.Initialize(milfalcon, -1)
importstat = importer.Import(scene)
SaveScene(manager, scene, "test.obj")

0 个答案:

没有答案