<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [2020.3.7][Linux] FBX PythonBindings + Python 3.11 issues with FbxAxisSystem in FBX Forum</title>
    <link>https://forums.autodesk.com/t5/fbx-forum/2020-3-7-linux-fbx-pythonbindings-python-3-11-issues-with/m-p/13044935#M47</link>
    <description>&lt;P&gt;Did you have any problems or had to do extra steps when compiling the bindings? I followed the readme for the bindings and hit `STL1003: Unexpected compiler, expected C++ compiler.` possibly due to `/Tcsip_array.c` that seemed to be added by the sip build command. I'm running on windows instead of linux, but would appreciate any insight if you also ran into this problem.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 17:20:43 GMT</pubDate>
    <dc:creator>brad_powellZ4D5L</dc:creator>
    <dc:date>2024-09-25T17:20:43Z</dc:date>
    <item>
      <title>[2020.3.7][Linux] FBX PythonBindings + Python 3.11 issues with FbxAxisSystem</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/2020-3-7-linux-fbx-pythonbindings-python-3-11-issues-with/m-p/12821057#M45</link>
      <description>&lt;P&gt;Hey everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using FBX SDK + Python Bindings with Unreal Engine. The latest version comes with Python 3.11.&lt;/P&gt;&lt;P&gt;Unfortunately some of my code no longer works - this is the primary suspect&amp;nbsp;&lt;A href="https://github.com/python/cpython/issues/100458" target="_blank" rel="noopener"&gt;https://github.com/python/cpython/issues/100458&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In previous Python versions I used to create an FbxAxisSystem object by passing integers to the constructor.&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FbxAxisSystem(3, -2, 1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Python 3.11 however demands enums. And it's fine and below code works ok:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FbxAxisSystem(FbxAxisSystem.EUpVector.eZAxis, FbxAxisSystem.EFrontVector.eParityOdd, FbxAxisSystem.ECoordSystem.eLeftHanded)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that there are no negative counterparts for these enums. Currently there is no way to specify a sign when passing an argument.&lt;/P&gt;&lt;P&gt;Adding a sign before the enum also doesn't work anymore:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FbxAxisSystem(-FbxAxisSystem.EUpVector.eZAxis,...,...)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed in SDK header files a static function in fbxaxissystem.h that could do the job, but it looks like it's not supported by sip most likely. It cannot be used from python code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;static bool ParseAxisSystem(const char * pAxes, FbxAxisSystem&amp;amp; pOutput);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone else have the same issue and perhaps a possible solution or workaround?&lt;/P&gt;&lt;P&gt;I guess the easiest way to address this would be to just expand the enums if Autodesk team got involved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;enum EFrontVector
{
    eParityEven = 1,
    eParityOdd = 2
};
||
\/
enum EFrontVector
{
    eParityOddNegative = -2,
    eParityEvenNegative = -1,
    eParityEven = 1,
    eParityOdd = 2
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 18:20:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/2020-3-7-linux-fbx-pythonbindings-python-3-11-issues-with/m-p/12821057#M45</guid>
      <dc:creator>pawelb91</dc:creator>
      <dc:date>2024-06-05T18:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: [2020.3.7][Linux] FBX PythonBindings + Python 3.11 issues with FbxAxisSystem</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/2020-3-7-linux-fbx-pythonbindings-python-3-11-issues-with/m-p/12823596#M46</link>
      <description>&lt;P&gt;Ok, nevermind. I've found a workaround.&lt;/P&gt;&lt;P&gt;There are 2 possible ways to deal with this. Just have to edit one or two files before installing the bindings (python -m pip install . ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Edit file&amp;nbsp;fbxaxissystem.sip in the Python Bindings sip directory, add 2 lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;FbxAxisSystem(); // This one
FbxAxisSystem(EUpVector pUpVector, EFrontVector pFrontVector, ECoordSystem pCoorSystem);
FbxAxisSystem(const FbxAxisSystem&amp;amp; pAxisSystem);
FbxAxisSystem(const EPreDefinedAxisSystem pAxisSystem);
static bool ParseAxisSystem(const char * pAxes, FbxAxisSystem&amp;amp; pOutput); // And this one
virtual ~FbxAxisSystem();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After installing the bindings, the ParseAxisSystem(...) function will be properly bound and available. Could be used like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;...
axis_system = FbxAxisSystem()
FbxAxisSystem.ParseAxisSystem("xyz", axis_system)
up_vector = axis_system.GetUpVector()
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine, it allows negative vectors but I'm yet to figure out how to properly get desired output from the string &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) The second one is actually the one I proposed in my original post - expanding the enums. I tried it before and it didn't work, but turns out I forgot to update *.sip file as well. So, what you need to do is just expand the desired enums in both &amp;lt;python_bindings_path&amp;gt;/sip/fbxaxissystem.sip and &amp;lt;fbx_sdk_path&amp;gt;/include/fbxsdk/scene/fbxaxissystem.h. Example with EFrontVector:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;enum EFrontVector
{
    eParityOddNegative = -2, # Add this line
    eParityEvenNegative = -1, # Add this line
    eParityEven = 1,
    eParityOdd = 2
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After installing the bindings, the new values can be used in FbxAxisSystem(...) constructor and are working as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 17:13:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/2020-3-7-linux-fbx-pythonbindings-python-3-11-issues-with/m-p/12823596#M46</guid>
      <dc:creator>pawelb91</dc:creator>
      <dc:date>2024-06-06T17:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: [2020.3.7][Linux] FBX PythonBindings + Python 3.11 issues with FbxAxisSystem</title>
      <link>https://forums.autodesk.com/t5/fbx-forum/2020-3-7-linux-fbx-pythonbindings-python-3-11-issues-with/m-p/13044935#M47</link>
      <description>&lt;P&gt;Did you have any problems or had to do extra steps when compiling the bindings? I followed the readme for the bindings and hit `STL1003: Unexpected compiler, expected C++ compiler.` possibly due to `/Tcsip_array.c` that seemed to be added by the sip build command. I'm running on windows instead of linux, but would appreciate any insight if you also ran into this problem.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 17:20:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fbx-forum/2020-3-7-linux-fbx-pythonbindings-python-3-11-issues-with/m-p/13044935#M47</guid>
      <dc:creator>brad_powellZ4D5L</dc:creator>
      <dc:date>2024-09-25T17:20:43Z</dc:date>
    </item>
  </channel>
</rss>

