autodesk Python FBX绑定中的SIP文件中的语法错误
IM试图安装Autodesk FBX SDK,它要求您使用SIP构建绑定。当我运行命令python 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
,该命令在fbxTypes中丢弃了
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"
第32行中的代码。SIP is.sip is:
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版本IS 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.
我找不到语法中的错误性是什么。
Im trying to install Autodesk FBX SDK and it requires you to build bindings using sip. When I run the command python PythonBindings.py Python3_x64
, it runs the command
=> 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
which throws the error
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"
the code at line 32 in fbxtypes.sip
is :
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
The sip version is 4.19.25 which I built from source.
I think the reason is revised syntax as the sip files in Autodesk's FBX python bindings seem to be created a long time ago - in the file fbx_module.sip
:
%Timeline {FBX_2013_0}
%Copying
Copyright (C) 2009 Autodesk, Inc. and/or its licensors.
All Rights Reserved.
I can't find what the incorrectness in syntax is.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基于 this 引用自定义的构建绑定,听起来像2020 FBX SDK,不支持SIP 4.19.25。这可能是您遇到的问题,在这种情况下,根据该文章,您可以尝试 sip版本4.19.3 或更早。
Based on this reference for a custom build of the bindings, it sounds like for the 2020 fbx sdk, sip 4.19.25 is not supported. This might be the issue you're encountering, in which case as per that article you could try sip version 4.19.3 or earlier.