Converting FBX to three.js
Asked Answered
O

4

7

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

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

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

And I have Python 2.6 installed to C:\Python26

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

But when I run the following command:

converty_to_threejs.py my_fbx_file.fbx test_output_file.js

I get the following error:

Could not locate the python FBX SDK! You need to copy the FBX SDK into your python install folder such as "Python26/Lib/site-packages" folder.

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

Does anyone have any idea why it wouldn't be able to find the FBX SDK folder? I put it exactly where it wants it, but it won't find it.

Thanks in advance!

Ortiz answered 19/4, 2013 at 0:11 Comment(2)
did you manage to solve this? If yes please post an answer to your question.Poplar
@user12411712 did you manage to get this working?Lankester
A
4

You need to copy some of the contents out of the Autodesk Python SDK into a directory that is in your PYTHONPATH environment variable (or update your PYTHONPATH to include the Autodesk SDK).

ex. Mac OS X (Yosemite)

In the case of OS X Yosemite, neither /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 were actually in my PYTHONPATH. So I added the following to my ~/.bash_profile:

# 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) into /usr/local/lib/python2.7/site-packages.

Windows etc.

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

Arredondo answered 20/2, 2015 at 4:1 Comment(0)
M
3

don't copy the folder FBX SDK, copy the content into C:\Pythons26\Lib\site-packages such as: cp [FBX_SDK_ROOT]/lib/Python26_x64/* /usr/lib/python2.6/site-packages/ It works for me.

Mejias answered 19/6, 2013 at 4:59 Comment(0)
H
1

Mac Os X

Download FBX SDK and copy

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

to

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

Hyman answered 22/7, 2015 at 14:19 Comment(1)
Make sure you copy the contents of /Python27 (fbx.so, FbxCommon.py, fbxsip.so) into the python folder: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7Ice
C
0

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 have 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.

Chartography answered 27/8, 2013 at 16:3 Comment(2)
I have copied the files in the above mentioned folder but I still get the same error. any clue..Lipkin
Just ran into this myself. Been literally over a year since you had the problem so hopefully you worked it out! But nonetheless please see my answer for the solution (re: PYTHONPATH).Arredondo

© 2022 - 2024 — McMap. All rights reserved.