Autodesk Python FBX绑定中的sip文件语法错误



我试图安装Autodesk FBX SDK,它需要您使用sip构建绑定。当我运行命令python PythonBindings.py Python3_x64时,它运行命令

=>   RUN COMMAND       : "/home/user1/miniconda3/envs/rl37/bin/sip" -o -t FBX_X64  -c /home/user1/Downloads/fbx_installed/build/Python37_x64 -b /home/user1/Downloads/fbx_installed/build/Python37_x64/fbx_module.sbf -I /home/user1/Downloads/fbx_installed/sip /home/user1/Downloads/fbx_installed/sip/fbx_module.sip

抛出错误

sip: /home/user1/Downloads/fbx_installed/sip/fbxtypes.sip:32: syntax error
Error: Unable to open
"/home/user1/Downloads/fbx_installed/build/Python37_x64/fbx_module.sbf"

fbxtypes.sip中第32行代码为:

enum EFbxType
{
eFbxUndefined,  //!< Unidentified.
eFbxChar,       //!< 8 bit signed integer.
eFbxUChar,      //!< 8 bit unsigned integer.
eFbxShort,      //!< 16 bit signed integer.
eFbxUShort,     //!< 16 bit unsigned integer.
eFbxUInt,       //!< 32 bit unsigned integer.
eFbxLongLong,   //!< 64 bit signed integer.
eFbxULongLong,  //!< 64 bit unsigned integer.
eFbxHalfFloat,  //!< 16 bit floating point.
eFbxBool,       //!< Boolean.
eFbxInt,        //!< 32 bit signed integer.
eFbxFloat,      //!< Floating point value.
eFbxDouble,     //!< Double width floating point value.
eFbxDouble2,    //!< Vector of two double values.
eFbxDouble3,    //!< Vector of three double values.
eFbxDouble4,    //!< Vector of four double values.
eFbxDouble4x4,  //!< Four vectors of four double values.
eFbxEnum,       //!< Enumeration.
eFbxString,     //!< String.
eFbxTime,       //!< Time value.
eFbxReference,  //!< Reference to object or property.
eFbxBlob,       //!< Binary data block type.
eFbxDistance,   //!< Distance.
eFbxDateTime,   //!< Date and time.
eFbxTypeCount   //!< Indicates the number of type identifiers constants.
};
%Feature SIZE_T_AS_ULONGLONG
%If (FBX_X86)
typedef unsigned int size_t; // <<<<<<    <<<<<<<<<<<   <<<<<<<<<<< line 32
%End
%If (FBX_X64)
%If (SIZE_T_AS_ULONGLONG)
typedef unsigned long long size_t;
%End
%If (!SIZE_T_AS_ULONGLONG)
typedef unsigned long size_t;
%End
%End

sip版本是4.19.25,我从源代码构建。

我认为原因是修改了语法,因为Autodesk的FBX python绑定中的sip文件似乎是很久以前创建的-在文件fbx_module.sip:

%Timeline {FBX_2013_0}
%Copying
Copyright (C) 2009 Autodesk, Inc. and/or its licensors.
All Rights Reserved.

我找不到语法上的错误。

根据这个自定义构建绑定的参考,听起来对于2020 fbx sdk, sip 4.19.25不受支持。这可能是您遇到的问题,在这种情况下,根据那篇文章,您可以尝试sip版本4.19.3或更早。

最新更新