Convert FBX to three.js

I am trying to use the FBX converter tool located in the utils / converters / fbx / folder from the three.js project located here:

https://github.com/mrdoob/three.js/

I installed the Python 2013.3 FBX SDK bindings (at least I think I did this part correctly)

And I have Python 2.6 installed on C: \ Python26

I copied the "FBX SDK" folder to C: \ Pythons26 \ Lib \ site-packages from C: \ Program Files \ Autodesk \ FBX

But when I run the following command:

convertty_to_threejs.py my_fbx_file.fbx test_output_file.js

I get the following error:

Could not find Python FBX SDK! You need to copy the FBX SDK to the python installation folder, such as the Python26 / Lib / site-packages folder.

I also made sure that C: \ Python26 was added to the PATH system variable.

Does anyone know why he cannot find the FBX SDK folder? I put him exactly where he wants it, but he will not find it.

Thanks in advance!

+7
source share
4 answers

do not copy the FBX SDK folder, copy the contents to C: \ Pythons26 \ Lib \ site-packages such as: cp [FBX_SDK_ROOT] / lib / Python26_x64 / * / usr / lib / python2.6 / site-packages / This works for me.

+3
source

You need to copy some of the content from the Autodesk Python SDK to a directory that is in the PYTHONPATH environment variable (or update PYTHONPATH to enable the Autodesk SDK).

ex. Mac OS X (Yosemite)

In the case of OS X Yosemite, no one /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages or /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages was not actually in my PYTHONPATH. So I added the following to my ~ / .bash_profile file:

 # Python 2.7 export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH 

and copied the contents of /Applications/Autodesk/FBX\ Python\ SDK/2015.1/lib/Python27 (FbxCommon.py, fbx.so, fbxsip.so) to /usr/local/lib/python2.7/site-packages .

Windows etc.

The same logic used in Mac OS X can be applied on other platforms, i.e. copy FbxCommon.py (and any other files in the same directory - DLL, etc.) to the directory in your PYTHONPATH.

+3
source

Mac os x

Download the FBX SDK and copy

/Apps/Autodesk/FBX\Python\SDK/2016.1/lib/Python27

to

/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7

+1
source

On macOS, I also had the same problem:

 Could not locate the python FBX SDK! You need to copy the FBX SDK into your python install folder such as "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages" folder. 

I copied fbx.so , FbxCommon.py and sip.so from SDK_PATH/2014.1/lib/Python2.6/ to /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages .

0
source

All Articles